Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; chest diaply modifier for BatMUD
- ;;
- ;; - we will we will store you, ta dum dhum thum
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;
- ;; original revision by mithrand (c)
- ;;
- ;; rev 1.1_blux_mod
- ;; changelog:
- ;; - 14/july/2003 (17:39CET)
- ;; 1. unset changed
- ;; 2. added more robust label check
- ;; 3. added <purple glow> check
- ;; 4. added chgag wariable (debug feat.)
- ;;
- ;;
- /set chgag=1%;
- /def -E(chgag==1) -ag -mregexp -t'^An ebony casket labeled as kesz \((closed|open)\)$' casketredisplayer=\
- /set chestno=$[chestno+1]%;\
- ;;this is really lame, ive got only 1 coffer so i dont care stuff is hardcoded\
- /if (strstr({*},"(closed)")>0) /set accs=@{Ccyan} (closed) @{n}%;\
- /elseif (strstr({*},"(unlocked)")>0) /set accs=@{Ccyan}(unlocked)@{n}%;\
- /elseif (strstr({*},"(open)")>0) /set accs=@{Cred} (open) @{n}%;\
- /else /set accs=@{Cgreen} (locked) @{n}%;\
- /endif%;\
- /while (strlen(chestno)<3) /set chestno= %chestno%;/done%;\
- /echo -p #%chestno %accs# \$\$ - kesz ebony
- /def -E(chgag==1) -ag -mregexp -t'^(An|A) (tiny [a-z]+ box|small [a-z]+ box|[a-z]+ crate|large [a-z]+ crate|classical [a-z]+ chest|[a-z]+ chest|small sailor chest|small [a-z]+ sailor chest|big [a-z]+ sailor chest|[a-z]+ safe|massive [a-z]+ safe|large [a-z]+ vault|gargantuan [a-z]+ vault) (reinforced with [a-z]+ |)labeled as [a-zA-Z0-9_]+(| \(unlocked\)| \(closed\)| \(open\))( <[a-z]+ glow>|)( \(glowing\)|)$' chestredisplayer =\
- /set chestno=$[chestno+1]%;\
- /set tpos=$[strstr({*},"reinforced with")]%;\
- /if (tpos>0) \
- /set tstr=$[substr({*},tpos+16)]%;\
- /set tpos=$[strstr(tstr," ")]%;\
- /set reinf=+ $[substr(tstr,0,tpos)]%;\
- /else /unset reinf%;\
- /endif%;\
- /set tpos=$[strstr({*},"labeled as")]%;\
- /set tstr=$[substr({*},tpos+11)]%;\
- /set tpos=$[strstr(tstr," ")]%;\
- /if (tpos==-1) /set label=%{tstr}%;\
- /else /set label=$[substr(tstr,0,tpos)]%;\
- /endif%;\
- /if (strstr({*},"(closed)")>0) /set accs=@{Ccyan} (closed) @{n}%;\
- /elseif (strstr({*},"(unlocked)")>0) /set accs=@{Ccyan}(unlocked)@{n}%;\
- /elseif (strstr({*},"(open)")>0) /set accs=@{Cred} (open) @{n}%;\
- /else /set accs=@{Cgreen} (locked) @{n}%;\
- /endif%;\
- /if (({2}=~"tiny") & ({4}=~"box")) /set slots=# 1%;/set mat=%{3}%;\
- /elseif (({2}=~"small") & ({4}=~"box")) /set slots=# 2%;/set mat=%{3}%;\
- /elseif ({3}=~"crate") /set slots=# 3%;/set mat=%{2}%;\
- /elseif (({2}=~"large") & ({4}=~"crate")) /set slots=# 4%;/set mat=%{3}%;\
- /elseif (({2}=~"classical") & ({4}=~"chest")) /set slots=# 5%;/set mat=%{3}%;\
- /elseif ({3}=~"chest") /set slots=# 6%;/set mat=%{2}%;\
- /elseif (({2}=~"small") & ({4}=~"sailor")) /set slots=# 7%;/set mat=%{3}%;\
- /elseif (({2}=~"small") & ({3}=~"sailor")) /set slots=# 7%;/set mat=old chest%;\
- /elseif (({2}=~"big") & ({4}=~"sailor")) /set slots=# 8%;/set mat=%{3}%;\
- /elseif ({3}=~"safe") /set slots=# 9%;/set mat=%{2}%;\
- /elseif (({2}=~"massive") & ({4}=~"safe")) /set slots=# 10%;/set mat=%{3}%;\
- /elseif (({2}=~"large") & ({4}=~"vault")) /set slots=# 11%;/set mat=%{3}%;\
- /elseif (({2}=~"gargantuan") & ({4}=~"vault")) /set slots=# 12%;/set mat=%{3}%;\
- /else /set slots=X%;\
- /endif%;\
- /while (strlen(mat)+strlen(label)<27) /set mat= %mat%;/done%;\
- /while (strlen(chestno)<3) /set chestno= %chestno%;/done%;\
- /echo -p X%chestno %accs%slots - %label %mat %reinf%;
- /def -F -t'There are no obvious exits.'=/set chestno=0%;
- /def -F -t'Obvious exits are: *'=/set chestno=0%;
- /def -F -t'Obvious exit is: *'=/set chestno=0%;
- ;;;;;;;
- ;
- ; scroll cabinets addon
- ;
- /def -E(chgag==1) -ag -mregexp -t'^A beautifully crafted scroll cabinet labeled as [a-zA-Z0-9]* (\(closed\)|\(open\))' scrollcabinet=\
- /if (strstr({*},"(closed)")>0) /set accs=@{Ccyan}(closed)@{n}%;\
- /elseif (strstr({*},"(open)")>0) /set accs=@{Cred}(open)@{n}%;\
- /endif%;\
- /echo -p cabinet %{8} %accs%;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement