WoTMUD Archives
http://www.wotmudarchives.org/forum/

misc scripts
http://www.wotmudarchives.org/forum/viewtopic.php?f=8&t=2312
Page 3 of 5

Author:  zain [ Wed Sep 12, 2012 5:04 pm ]
Post subject:  Re: misc scripts

#CLASS {Receipts and Tickets}
#ALIAS receipts {
#T+ {Receipt Triggers}
%char( 32)
#VARIABLE ReceiptCounter 1
look receipt
}
#ALIAS tickets {
#T+ {Receipt Triggers}
%char( 32)
#VARIABLE ReceiptCounter 1
look stable
}
#VARIABLE ReceiptCounter {3}
#CLASS 0
#CLASS {Receipts and Tickets|Receipt Triggers} {disable}
#TRIGGER {^* >} {#SUBSTITUTE {}}
#TRIGGER {look} {#GAG}
#REGEX {It is a (stable ticket|receipt) for (.*) from (.*), already redeemable\.$} {
#SUBSTITUTE { @ReceiptCounter: %2 - %3}
#ADD ReceiptCounter 1
look %concat( @ReceiptCounter, ".", %1)
}
#REGEX {It is a (stable ticket|receipt) for (.*) from (.*), redeemable in (.*)\.$} {
#SUBSTITUTE { @ReceiptCounter: %2 - %3 (%4)}
#ADD ReceiptCounter 1
look %concat( @ReceiptCounter, ".", %1)
}
#TRIGGER {You do not see that here.} {
#SUBSTITUTE { That's all!}
#T- {Receipt Triggers}
}
#CLASS 0
#T- {Receipt Triggers}

Author:  zain [ Wed Sep 12, 2012 5:05 pm ]
Post subject:  Re: misc scripts

#CLASS ReceiptSort
#ALIAS {reclist} {#IF ("%1" <> %null) {#VAR liststart "%1"};#IF ("%2" <> %null) {#VAR listend "%2"};reclists2e}
#ALIAS {rl} {#IF ("%1" <> %null) {#VAR liststart "%1"};#IF ("%2" <> %null) {#VAR listend "%2"};reclists2e}
#ALIAS {reclists2e} {#VAR receiptnum @liststart;#LOOP @liststart,@listend {exa %i.receipt}}
#ALIAS {recres} {#VAR receiptnum 1}
#TRIGGER {It is a receipt for (*)} {#SUB {Receipt #@receiptnum: %1};#ADD receiptnum 1}
#CLASS 0

Author:  zain [ Wed Sep 12, 2012 5:06 pm ]
Post subject:  Re: misc scripts

#CLASS {rentbar}
#VAR OfferTime {10/21/2004 2:47:22 AM}
#TRIGGER {* tells you, 'Rent will cost you (%*) per day, or (*) per day over five days.'} {
#var OfferTime %time( c)
#sta Rent at @OfferTime: %1
}
#CLASS 0

Author:  zain [ Wed Sep 12, 2012 5:06 pm ]
Post subject:  Re: misc scripts

#ALIAS calcrent {
#VAR copperwith 0
#VAR goldwith 0
take all.coin @container
count copper
count crowns
put all.coin @container
#TEMP {A banker whispers to you '*'} {
#IF ((@copperwith + @goldwith) = @rentcost) {#ECHO "Exactly enough!"} {
#IF ((@copperwith + @goldwith) > @rentcost) {
#ECHO "More than enough."
#MATH depmoney (@copperwith + @goldwith - @rentcost)
deposit @depmoney copper
} {
#IF ((@goldwith + @copperwith + @bankmoney) < @rentcost) {#ECHO "You do not have enough!"} {
#MATH getmoney (@rentcost - @goldwith - @copperwith)
withdraw @getmoney
}
}
}
}
bal
}
#ALIAS calcrent2 {
#VAR copperwith 0
#VAR goldwith 0
take all.coin @container
count copper
count crowns
put all.coin @container
#TEMP {A dark-eyed banker whispers to you '*'} {
#IF ((@copperwith + @goldwith) = @rentcost) {#ECHO "Exactly enough!"} {
#IF ((@copperwith + @goldwith) > @rentcost) {
#ECHO "More than enough."
#MATH depmoney (@copperwith + @goldwith - @rentcost)
deposit @depmoney copper
} {
#IF ((@goldwith + @copperwith + @bankmoney) < @rentcost) {#ECHO "You do not have enough!"} {
#MATH getmoney (@rentcost - @goldwith - @copperwith)
withdraw @getmoney
}
}
}
}
bal
}
#VAR bankmoney {5598}
#VAR rentcost {332}
#VAR container {pack}
#VAR goldwith {300}
#VAR copperwith {158}
#VAR depmoney {126}
#VAR getmoney {9}
#TRIGGER {A banker whispers to you 'Your balance is the equivalent of (%d) copper.'} {
#VAR bankmoney %1
#ECHO This is equivelent to : %eval( %1/20) gold crowns.
}
#TRIGGER {A dark-eyed banker whispers to you 'Your balance is the equivalent of (%d) copper.'} {
#VAR bankmoney %1
#ECHO This is equivelent to : %eval( %1/20) gold crowns.
}
#TRIGGER {(*) tells you, 'Rent will cost you (%d) gold {crown|crowns} and (%d) {copper|coppers} per day,} {#MATH rentcost (%2*20)+%3}
#TRIGGER {(*) tells you, 'Rent will cost you (%d) gold {crown|crowns} per day,} {#MATH rentcost (%2*20)}
#TRIGGER {(*) tells you, 'Rent will cost you (%d) {copper|coppers} per day,} {#VAR rentcost %2}
#TRIGGER {A banker whispers to you 'You don't seem to have an active account here.'} {#VAR bankmoney 0}
#TRIGGER {A dark-eyed banker whispers to you 'You don't seem to have an active account here.'} {#VAR bankmoney 0}
#TRIGGER {There {is|are} exactly (%d) {copper|coppers|pennys|penny}.} {#VAR copperwith %1}
#TRIGGER {There {is|are} exactly (%d) {crown|crowns}.} {#MATH goldwith (%1*20)}
#CLASS 0

Author:  zain [ Wed Sep 12, 2012 5:07 pm ]
Post subject:  Re: misc scripts

#CLASS {Rent Script}
#ALIAS calcrent {
#VAR copperwith 0
#VAR goldwith 0
take all.coin @container
count copper
count crowns
put all.coin @container
#TEMP {A banker whispers to you '*'} {
#IF ((@copperwith + @goldwith) = @rentcost) {#ECHO "Exactly enough!"} {
#IF ((@copperwith + @goldwith) > @rentcost) {
#ECHO "More than enough."
#MATH depmoney (@copperwith + @goldwith - @rentcost)
deposit @depmoney copper
} {
#IF ((@goldwith + @copperwith + @bankmoney) < @rentcost) {#ECHO "You do not have enough!"} {
#MATH getmoney (@rentcost - @goldwith - @copperwith)
withdraw @getmoney
}
}
}
}
bal
}
#VAR bankmoney {2743}
#VAR rentcost {231}
#VAR container {pack}
#VAR goldwith {200}
#VAR copperwith {31}
#VAR depmoney {600}
#VAR getmoney {45}
#TRIGGER {A banker whispers to you 'Your balance is the equivalent of (%d) copper.'} {
#VAR bankmoney %1
#ECHO This is equivelent to : %eval( %1/20) gold crowns.
}
#TRIGGER {(*) tells you, 'Rent will cost you (%d) gold {crown|crowns} and (%d) {copper|coppers} per day,} {#MATH rentcost (%2*20)+%3}
#TRIGGER {(*) tells you, 'Rent will cost you (%d) gold {crown|crowns} per day,} {#MATH rentcost (%2*20)}
#TRIGGER {(*) tells you, 'Rent will cost you (%d) {copper|coppers} per day,} {#VAR rentcost %2}
#TRIGGER {A banker whispers to you 'You don't seem to have an active account here.'} {#VAR bankmoney 0}
#TRIGGER {There {is|are} exactly (%d) {copper|coppers|pennys|penny}.} {#VAR copperwith %1}
#TRIGGER {There {is|are} exactly (%d) {crown|crowns}.} {#MATH goldwith (%1*20)}
#CLASS 0

Author:  zain [ Wed Sep 12, 2012 5:07 pm ]
Post subject:  Re: misc scripts

#CLASS {Report}
#ALIAS internalcomm {#say %-1}
#ALIAS remreport {#deli spreadout {%-1};#say %-1 removed from the Scout Report.}
#ALIAS addreport {#addi spreadout {%-1};#say %-1 added to the Scout Report.}
#ALIAS listreport {#say The script is currently reporting to:;#if (%numitems( @spreadout)=0) {#say No-one!} {#forall @spreadout {#say %i}}}
#VAR spreadout {nar}
#VAR reporting {1}
#BUTTON 2 {Report Off} {#VARIABLE processing 0} {Report On} {} {@reporting} {reporting} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {}
#CLASS 0
#CLASS {Report|Locate}
#ALIAS locaterep {#if (@reporting=1) {#var locstr %null;embrace;channel 'locate object' %-1;#t+ {Report|Locate|LocateToggle};#wa 8000;#if (@locstr<>%null) {rel;#var loc1str %pick( 'p:Select who to report', %sort( @locstr));#var loc2str %null;#var loc4str %null;#forall @loc1str {#if (%i =~ "%a (*)") {#additem loc2str {%%%%1}}};#forall @loc2str {#var loc4str %concat( @loc4str, " ~[", %i, "~]:");#var loc3str %i;#forall @loc1str {#if (%i =~ "^(%a) @loc3str$") {#var loc4str %concat( @loc4str, " ", %%%%1, ",")}}};#if (%len( @loc4str)>5) {#forall @spreadout {%i Loc~:%leftback( @loc4str, 1)}}} {#say No information received in time.};#var locstr %null;#t- {Report|Locate|LocateToggle}} {#say Reporting is off. Aborting operation.}}
#VAR locstr {}
#VAR zonetemp {Outer Caemlyn}
#VAR loc1str {}
#VAR loc2str {}
#VAR loc3str {}
#VAR loc4str {[]:}
#CLASS 0
#CLASS {Report|Locate|LocateToggle}
#TRIGGER {* - ~[*~] - (*), Carried by (%a).$} {#if (@reporting=1) {#var zonetemp {%1};#var zonetemp %replace( @zonetemp, Borderland, BL);#var zonetemp %replace( @zonetemp, Parched Ground, Parched);#var zonetemp %replace( @zonetemp, Fal Dara, FD);#var zonetemp %replace( @zonetemp, Mountain, Mtn);#var zonetemp %replace( @zonetemp, Tarwin's Gap, Gap);#var zonetemp %replace( @zonetemp, Village of Lockshear, LS);#var zonetemp %replace( @zonetemp, The Blight, Blight);#var zonetemp %replace( @zonetemp, Tar Valon, TV);#var zonetemp %replace( @zonetemp, Northern, N);#var zonetemp %replace( @zonetemp, North, N);#var zonetemp %replace( @zonetemp, Western, W);#var zonetemp %replace( @zonetemp, West, W);#additem locstr {%concat( %2, " ", @zonetemp)};#additem pcs %2}}
#CLASS 0
#CLASS {Report|Scout}
#VAR scoutstr {Darqal}
#VAR narstr { Darqal seen A Few Pigpens,}
#VAR processing {0}
#VAR currentscouted {A Few Pigpens}
#VAR previousscouted {A Few Pigpens}
#VAR scoutedcount {1}
#VAR incrementor {1}
#VAR nar2str { Darqal seen A Few Pigpens,}
#VAR roomtemp {A Few Pigpens}
#VAR scout2str {Darqal A Few Pigpens}
#VAR scouttemp1 {Darqal}
#TRIGGER {^(*)([A-Z]%a) tells you 'state'} {#var prompttemp {%1};#IF ((@prompttemp =~ "^[o~*] * >$") or (@prompttemp=%null)) {%concat( "tell ", %2, " Reporting state is currently (0 off, 1 on) ", %eval( -@processing+1))}} "" {case}
#TRIGGER {^(*)([A-Z]%a) tells you 'remove me'} {#var prompttemp {%1};#IF ((@prompttemp =~ "^[o~*] * >$") or (@prompttemp=%null)) {tell %2 You have been removed from the reports. (add me to add);remreport tell %2}} "" {case}
#TRIGGER {^(*)([A-Z]%a) tells you 'add me'} {#var prompttemp {%1};#IF ((@prompttemp =~ "^[o~*] * >$") or (@prompttemp=%null)) {tell %2 You have been added to the reports. (remove me to remove);addreport tell %2}} "" {case}
#TRIGGER {^(*)([A-Z]%a) tells you 'details'} {#var prompttemp {%1};#IF ((@prompttemp =~ "^[o~*] * >$") or (@prompttemp=%null)) {tell %2 %right( %leftback( @narstr, 1), 1)}} "" {case}
#TRIGGER {^(*)The master of scouts bellows 'Incoming message!!'} {#IF ((@prompttemp =~ "^[o~*] * >$") or (@prompttemp=%null)) {
#IF (@processing<>1) {
#VARIABLE processing 1
#VARIABLE scoutstr %null
#VARIABLE narstr %null
#VARIABLE scout2str %null
#T+ {Report|Scout|ScoutToggle}
#ALARM +5 {
#IF (%numitems( @scoutstr)<>0) {
#FORALL @scoutstr {
#VARIABLE narstr %concat( @narstr, " ", %repeatnum, " seen")
#VARIABLE incrementor 0
#VARIABLE scouttemp1 %repeatnum
#VARIABLE previousscouted %null
#LOOP 0,%eval( %numitems( @scout2str)-1) {
#IF (%item( @scout2str, %numitems( @scout2str)-%repeatnum) =~ "^@scouttemp1 (*)$") {
#VARIABLE currentscouted {%%%%%%1}
#ADD incrementor 1
#IF (@incrementor=1) {
#VARIABLE previousscouted @currentscouted
#VARIABLE scoutedcount 0
}
#IF (@currentscouted=@previousscouted) {#ADD scoutedcount 1} {
#VARIABLE narstr %concat( @narstr, " ", @previousscouted)
#IF (@scoutedcount<>1) {#VARIABLE narstr %concat( @narstr, " ~[", @scoutedcount, "~],")} {#VARIABLE narstr %concat( @narstr, ",")}
#VARIABLE previousscouted @currentscouted
#VARIABLE scoutedcount 1
}
}
}
#VARIABLE narstr %concat( @narstr, " ", @previousscouted)
#IF (@scoutedcount<>1) {#VARIABLE narstr %concat( @narstr, " ~[", @scoutedcount, "~],")} {#VARIABLE narstr %concat( @narstr, ",")}
}
#IF (%len( @narstr)<=200) {#VARIABLE nar2str @narstr} {
#VARIABLE nar2str %null
#FORALL @scoutstr {#VARIABLE nar2str %concat( @nar2str, %repeatnum, ", ")}
#VARIABLE nar2str %concat( " ", %leftback( @nar2str, 2), " scouted (details for report) ")
}
#IF (%len( @narstr)>10) {
#FORALL @spreadout {
%repeatnum %right( %leftback( @nar2str, 1), 1)
}
}
}
#VARIABLE processing 0
#T- {Report|Scout|ScoutToggle}
}
}
}}
#TRIGGER {^(*)The raven master bellows '(%a) was spotted in (*)'} {#if (@reporting <> 1) {#abort 1};#IF ((@prompttemp =~ "^[o~*] * >$") or (@prompttemp=%null)) {#if (@processing<>1) {#var processing 1;#var scoutstr %null;#var narstr %null;#var scout2str %null;#ala +1 {#if (%numitems( @scoutstr)<>0) {#forall @scoutstr {#var narstr %concat( @narstr, " ", %i, " seen");#var incrementor 0;#var scouttemp1 %i;#var previousscouted %null;#loop 0,%eval( %numitems( @scout2str)-1) { #if (%item( @scout2str, %numitems( @scout2str)-%i) =~ "^@scouttemp1 (*)$") {#var currentscouted {%%%%%%1};#add incrementor 1;#if (@incrementor=1) {#var previousscouted @currentscouted;#var scoutedcount 0};#if (@currentscouted=@previousscouted) {#add scoutedcount 1} {#var narstr %concat( @narstr, " ", @previousscouted);#if (@scoutedcount<>1) {#var narstr %concat( @narstr, " ~[", @scoutedcount, "~],")} {#var narstr %concat( @narstr, ",")};#var previousscouted @currentscouted;#var scoutedcount 1}}};#var narstr %concat( @narstr, " ", @previousscouted);#if (@scoutedcount<>1) {#var narstr %concat( @narstr, " ~[", @scoutedcount, "~],")} {#var narstr %concat( @narstr, ",")}};#if (%len( @narstr)<=200) {#var nar2str @narstr} {#var nar2str %null;#forall @scoutstr {#var nar2str %concat( @nar2str, %i, ", ")};#var nar2str %concat( " ", %leftback( @nar2str, 2), " scouted (details for report) ")};#if (%len( @narstr)>10) { #forall @spreadout { %i %right( %leftback( @nar2str, 1), 1)}}};#var processing 0}};#var roomtemp {%3};#var roomtemp %replace( @roomtemp, "The Dusty Road", "Dusty");#var roomtemp %replace( @roomtemp, "Borderlands", "BLs");#var roomtemp %replace( @roomtemp, "A Winding Road", "Winding");#var roomtemp %replace( @roomtemp, "Fal Dara", "FD");#var roomtemp %replace( @roomtemp, "FalDara", "FD");#var roomtemp %replace( @roomtemp, "Tarwins Gap", "Gap");#var roomtemp %replace( @roomtemp, "TarwinsGap", "Gap");#var roomtemp %replace( @roomtemp, "FDRoad", "FD Road");#var scout2str %additem( @scout2str, {%2 @roomtemp});#ADDI scoutstr %2}} "" {disable}
#CLASS 0
#CLASS {Report|Scout|ScoutToggle}
#TRIGGER {^(*)The master of scouts bellows '(%a) was spotted in (*)'} {#VARIABLE prompttemp {%1}
#IF ((@prompttemp =~ "^[o~*] * >$") or (@prompttemp=%null)) {
#VARIABLE roomtemp {%3}
#VARIABLE roomtemp %replace( @roomtemp, "The Dusty Road", "Dusty")
#VARIABLE roomtemp %replace( @roomtemp, "Borderlands", "BLs")
#VARIABLE roomtemp %replace( @roomtemp, "A Winding Road", "Winding")
#VARIABLE roomtemp %replace( @roomtemp, "Fal Dara", "FD")
#VARIABLE roomtemp %replace( @roomtemp, "FalDara", "FD")
#VARIABLE roomtemp %replace( @roomtemp, "Tarwins Gap", "Gap")
#VARIABLE roomtemp %replace( @roomtemp, "FDRoad", "FD Road")
#IF (@scout2str <> %null) {#VARIABLE scout2str %concat( {%2 @roomtemp}, "|", @scout2str)} {#VARIABLE scout2str {%2 @roomtemp}}
#ADDITEM scoutstr %2
}}
#TRIGGER {^(*)The master of scouts bellows 'was spotted in (*)'} {#VARIABLE prompttemp {%1}
#IF ((@prompttemp =~ "^[o~*] * >$") or (@prompttemp=%null)) {#VARIABLE scout2str %concat( {0 %2}, "|", @scout2str)}}
#CLASS 0
#T- {Report|Scout|ScoutToggle}
#T- {Report|Locate|LocateToggle}

Author:  zain [ Wed Sep 12, 2012 5:09 pm ]
Post subject:  Re: misc scripts

#CLASS {DirectionNarrate}
#ALIAS dirnar {
embrace
channel 'locate object' %-1
#TEMP {^Ok.$} {
#T+ {DirectionNarrate|Catcher}
#VARIABLE Catcher %null
#VARIABLE Located "%-1"
#ALARM +10 {#T- {DirectionNarrate|Catcher}}
}
}
#ALIAS doreport {#IF (%numparam( ) > 0) {narr Whispers on the wind, heard in @place speak of Spawn carrying @object : %-1}}
#CLASS 0
#CLASS {DirectionNarrate|Catcher} {disable}
#VAR Catcher {} {}
#VAR Located {} {}
#TRIGGER {^* - ~[*~] - somewhere around here, carried by a {trolloc|myrddraal|seanchan}.$} {#ADD Catcher.Around_here 1}
#TRIGGER {^* - ~[*~] - somewhere (*) of here, carried by a {trolloc|myrddraal|seanchan}.$} {#ADD Catcher.%proper( %replace( "%1", " ", "_")) 1}
#TRIGGER {^$} {
doreport %replace( %expanddb( @Catcher, ", ", ": "), "_", " ")
#T- {DirectionNarrate|Catcher}
}
#CLASS 0



#ALIAS doreport {#IF (%numparam( ) > 0) {say Whispers on the wind, heard in @place speak of Spawn carrying @object : %-1}} can be changed back to normal one as below,labelled backup


backup

#ALIAS doreport {#IF (%numparam( ) > 0) {say Located from @place: %-1}}

youll still need to set some variables, @objct and @place and an alias to call them

Author:  zain [ Wed Sep 12, 2012 5:09 pm ]
Post subject:  Re: misc scripts

#CLASS {StatusBar 1.6}
#ALIAS NoticeOff {#VARIABLE NoticeStatusColor dimgray}
#ALIAS NoticeOn {#VARIABLE NoticeStatusColor 65280}
#ALIAS MoodWimpy {
#VARIABLE MoodStatus Wimpy
#VARIABLE MoodStatusColor lightblue
}
#ALIAS MoodNormal {
#VARIABLE MoodStatus Normal
#VARIABLE MoodStatusColor steelblue
}
#ALIAS MoodBrave {
#VARIABLE MoodStatus Brave
#VARIABLE MoodStatusColor goldenrod
}
#ALIAS MoodBerserk {
#VARIABLE MoodStatus BERSERK
#VARIABLE MoodStatusColor red
}
#ALIAS PostureDefensive {
#VARIABLE PostureStatus Defens
#VARIABLE PostureStatusColor lightblue
}
#ALIAS PostureNormal {
#VARIABLE PostureStatus Normal
#VARIABLE PostureStatusColor steelblue
}
#ALIAS PostureOffensive {
#VARIABLE PostureStatus Offens
#VARIABLE PostureStatusColor goldenrod
}
#ALIAS PostureNone {#VARIABLE PostureStatusColor black}
#ALIAS SneakOff {#VARIABLE SneakStatusColor black}
#ALIAS SneakOn {#VARIABLE SneakStatusColor white}
#ALIAS SourceOff {#VARIABLE SourceStatusColor {black}}
#ALIAS SourceOn {#VARIABLE SourceStatusColor {white}}
#VARIABLE MoodStatus {Wimpy}
#VARIABLE MoodStatusColor {lightblue}
#VARIABLE NoticeStatusColor {dimgray}
#VARIABLE SneakStatusColor {black}
#VARIABLE PostureStatusColor {black}
#VARIABLE PostureStatus {Defens}
#VARIABLE SourceStatusColor {black}
#TRIGGER "ResetStatusBarOnLogon" {^You were rented for} {
NoticeOff
SneakOff
MoodWimpy
PostureNone
SourceOff
}
#TRIGGER {You stop paying increased attention to your surroundings.$} {NoticeOff}
#TRIGGER {You start paying increased attention to your surroundings.$} {NoticeOn}
#TRIGGER {^- NOTICE} {NoticeOn}
#TRIGGER {You sit down and rest your tired bones.$} {NoticeOff}
#TRIGGER {You sit down.$} {NoticeOff}
#TRIGGER {You go to sleep.$} {NoticeOff}
#TRIGGER {^Your mood is: Wimpy. You will flee below} {MoodWimpy}
#TRIGGER {^Your mood is: Normal. You will flee below} {MoodNormal}
#TRIGGER {^Your mood is: Brave. You will flee below} {MoodBrave}
#TRIGGER {^Your mood is: Berserk. You will flee below} {MoodBerserk}
#TRIGGER {Mood changed to: Wimpy$} {MoodWimpy}
#TRIGGER {Mood changed to: Normal$} {MoodNormal}
#TRIGGER {Mood changed to: Brave$} {MoodBrave}
#TRIGGER {Mood changed to: Berserk$} {MoodBerserk}
#TRIGGER {^- SNEAK} {SneakOn}
#TRIGGER {^{o|*} S} {SneakOn} "" {nocr|prompt}
#TRIGGER {Ok, you stop sneaking.$} {SneakOff}
#TRIGGER {You start riding %w.$} {SneakOff}
#TRIGGER {Posture changed to: Defensive$} {PostureDefensive}
#TRIGGER {Posture changed to: Normal$} {PostureNormal}
#TRIGGER {Posture changed to: Offensive$} {PostureOffensive}
#TRIGGER {Your posture is: Defensive.$} {PostureDefensive}
#TRIGGER {Your posture is: Normal.$} {PostureNormal}
#TRIGGER {Your posture is: Offensive.$} {PostureOffensive}
#TRIGGER {You feel the flows of said?? coursing through your body.$} {SourceOn}
#TRIGGER {^- SOURCE} {SourceOn}
#TRIGGER {^You are dead!%sSorry...$} {SourceOff
MoodWimpy
SneakOff
NoticeOff}
#ONINPUT {^release$} {SourceOff} "" {notrig}
#ONINPUT {^releas$} {SourceOff} "" {notrig}
#ONINPUT {^relea$} {SourceOff} "" {notrig}
#ONINPUT {^rele$} {SourceOff} "" {notrig}
#ONINPUT {^rel$} {SourceOff} "" {notrig}
#STATUS {<font fixedsys 11><color white black> @target</color><color @NoticeStatusColor black> NOTICE </color><color @MoodStatusColor black>@MoodStatus </color><color @PostureStatusColor black>@PostureStatus </color><color @SneakStatusColor black>SNEAK </color><color @SourceStatusColor black>SAI </color></font>}
#CLASS 0

Author:  zain [ Wed Sep 12, 2012 5:09 pm ]
Post subject:  Re: misc scripts

#CLASS {statusbar}
#TRIGGER {You have %1 hit, %5 saidar and %2 movement points.} {
#var hp {%1}
#var mv {%2}
#var sp {%5}
}
#TRIGGER {You have %1 hit and %2 movement points.} {
#var hp {%1}
#var mv {%2}
}
#TRIGGER {You need %3 exp to level and %4 qp to rank.} {
#var tnl {%3}
#var tnr {%4}
}
#STAT {Hp: @hp - Sp: @sp - Mv: @mv - Tnl: @tnl - Tnr: @tnr}
#CLASS 0

Author:  zain [ Wed Sep 12, 2012 5:10 pm ]
Post subject:  Re: misc scripts

#class TravelExpire
#var FoundMatch 0
#var Destinations %null
#var CurrentTime %null
#alias goto {#var FoundMatch 0;#forall @Destinations {#if (%lower(%i.Familiar) = %lower("%1")) {#var FoundMatch 1;#if (%i.Month = @CurrentTime.Month and %i.Year = @CurrentTime.Year) {channel 'travel' %i.Earthcode} {#say Travel code for %1 is not for the current month! Travel aborted!}}};#if (@FoundMatch = 0) {#say No matches found for %1!;listdests}}
#alias listdests {#say Current saved destinations:;#forall @Destinations {#if (%i.Month = @CurrentTime.Month and %i.Year = @CurrentTime.Year) {makelink %i.Familiar %i.Earthcode}};#show}
#alias makelink {#exec "#mxp ~<send href=~"channel 'travel' %2~">%1~</send>"}
#alias listolddests {#say Old destinations:;#forall @Destinations {#if (%i.Month <> @CurrentTime.Month or %i.Year <> @CurrentTime.Year) {#say %i.Familiar was %i.Earthcode during %i.Month, %i.Year}}}
#alias delolddests {#forall @Destinations {#if (%i.Month <> @CurrentTime.Month or %i.Year <> @CurrentTime.Year) {#delitem Destinations %i}}}
#alias newdest {#forall @Destinations {#if (%i.Familiar = %1) {#delitem Destinations %i}};#additem Destinations %addkey(%addkey(%addkey(%addkey("",Familiar,%1),Earthcode,%2),Month,@CurrentTime.Month),Year,@CurrentTime.Year);#say New destination %1 added.}
#alias updatetime {#send {time};#t+ {TravelExpire|TimeUpdate};#ala +30 {#t- {TravelExpire|TimeUpdate}}}
#trigger {The Wheel of Time turns towards the Light...$} {updatetime}
#trigger {The Wheel of Time turns towards the Dark...$} {updatetime}
#trigger {The Wheel of Time spins between the Dark and the Light...$} {updatetime}
#trigger {^You could not afford your rent!$} {updatetime}
#trigger {^You receive your change from rent.$} {updatetime}
#trigger {^Reconnecting.$} {updatetime}
#trigger {^You take over your own body, already in use!$} {updatetime}
#class {TravelExpire|TimeUpdate} {disable}
#trigger {^(%*)It is %d o'clock {am|pm}, on the %d{st|nd|rd|th} day of the month of (%w), year (%d).$} {#if ("%1" =~ "~* * > " or "%1" = %null) {#if (@CurrentTime.Month <> %2 or @CurrentTime.Year <> %3) {#say Month changed, current earthcodes invalidated!;#var CurrentTime %addkey(%addkey("",Month,%2),Year,%3)}};#t- {TravelExpire|TimeUpdate}}
#class 0
#input %null
#if (%trigger(TravelExpire) <> -1) {#say Class imported successfully} {#say An error occurred importing the class;#abort 1}

Page 3 of 5 All times are UTC - 5 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/