Advertisement
Guest User

Untitled

a guest
Dec 4th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.07 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;
  3. ;; chest diaply modifier for BatMUD
  4. ;;
  5. ;; - we will we will store you, ta dum dhum thum
  6. ;;
  7. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  8. ;;
  9. ;; original revision by mithrand (c)
  10. ;;
  11. ;; rev 1.1_blux_mod
  12. ;; changelog:
  13. ;; - 14/july/2003 (17:39CET)
  14. ;; 1. unset changed
  15. ;; 2. added more robust label check
  16. ;; 3. added <purple glow> check
  17. ;; 4. added chgag wariable (debug feat.)
  18. ;;
  19. ;;
  20. /set chgag=1%;
  21. /def -E(chgag==1) -ag -mregexp -t'^An ebony casket labeled as kesz \((closed|open)\)$' casketredisplayer=\
  22. /set chestno=$[chestno+1]%;\
  23. ;;this is really lame, ive got only 1 coffer so i dont care stuff is hardcoded\
  24. /if (strstr({*},"(closed)")>0) /set accs=@{Ccyan} (closed) @{n}%;\
  25. /elseif (strstr({*},"(unlocked)")>0) /set accs=@{Ccyan}(unlocked)@{n}%;\
  26. /elseif (strstr({*},"(open)")>0) /set accs=@{Cred} (open) @{n}%;\
  27. /else /set accs=@{Cgreen} (locked) @{n}%;\
  28. /endif%;\
  29. /while (strlen(chestno)<3) /set chestno= %chestno%;/done%;\
  30. /echo -p #%chestno %accs# \$\$ - kesz ebony
  31.  
  32. /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 =\
  33. /set chestno=$[chestno+1]%;\
  34. /set tpos=$[strstr({*},"reinforced with")]%;\
  35. /if (tpos>0) \
  36. /set tstr=$[substr({*},tpos+16)]%;\
  37. /set tpos=$[strstr(tstr," ")]%;\
  38. /set reinf=+ $[substr(tstr,0,tpos)]%;\
  39. /else /unset reinf%;\
  40. /endif%;\
  41. /set tpos=$[strstr({*},"labeled as")]%;\
  42. /set tstr=$[substr({*},tpos+11)]%;\
  43. /set tpos=$[strstr(tstr," ")]%;\
  44. /if (tpos==-1) /set label=%{tstr}%;\
  45. /else /set label=$[substr(tstr,0,tpos)]%;\
  46. /endif%;\
  47. /if (strstr({*},"(closed)")>0) /set accs=@{Ccyan} (closed) @{n}%;\
  48. /elseif (strstr({*},"(unlocked)")>0) /set accs=@{Ccyan}(unlocked)@{n}%;\
  49. /elseif (strstr({*},"(open)")>0) /set accs=@{Cred} (open) @{n}%;\
  50. /else /set accs=@{Cgreen} (locked) @{n}%;\
  51. /endif%;\
  52. /if (({2}=~"tiny") & ({4}=~"box")) /set slots=# 1%;/set mat=%{3}%;\
  53. /elseif (({2}=~"small") & ({4}=~"box")) /set slots=# 2%;/set mat=%{3}%;\
  54. /elseif ({3}=~"crate") /set slots=# 3%;/set mat=%{2}%;\
  55. /elseif (({2}=~"large") & ({4}=~"crate")) /set slots=# 4%;/set mat=%{3}%;\
  56. /elseif (({2}=~"classical") & ({4}=~"chest")) /set slots=# 5%;/set mat=%{3}%;\
  57. /elseif ({3}=~"chest") /set slots=# 6%;/set mat=%{2}%;\
  58. /elseif (({2}=~"small") & ({4}=~"sailor")) /set slots=# 7%;/set mat=%{3}%;\
  59. /elseif (({2}=~"small") & ({3}=~"sailor")) /set slots=# 7%;/set mat=old chest%;\
  60. /elseif (({2}=~"big") & ({4}=~"sailor")) /set slots=# 8%;/set mat=%{3}%;\
  61. /elseif ({3}=~"safe") /set slots=# 9%;/set mat=%{2}%;\
  62. /elseif (({2}=~"massive") & ({4}=~"safe")) /set slots=# 10%;/set mat=%{3}%;\
  63. /elseif (({2}=~"large") & ({4}=~"vault")) /set slots=# 11%;/set mat=%{3}%;\
  64. /elseif (({2}=~"gargantuan") & ({4}=~"vault")) /set slots=# 12%;/set mat=%{3}%;\
  65. /else /set slots=X%;\
  66. /endif%;\
  67. /while (strlen(mat)+strlen(label)<27) /set mat= %mat%;/done%;\
  68. /while (strlen(chestno)<3) /set chestno= %chestno%;/done%;\
  69. /echo -p X%chestno %accs%slots - %label %mat %reinf%;
  70.  
  71. /def -F -t'There are no obvious exits.'=/set chestno=0%;
  72. /def -F -t'Obvious exits are: *'=/set chestno=0%;
  73. /def -F -t'Obvious exit is: *'=/set chestno=0%;
  74.  
  75. ;;;;;;;
  76. ;
  77. ; scroll cabinets addon
  78. ;
  79.  
  80. /def -E(chgag==1) -ag -mregexp -t'^A beautifully crafted scroll cabinet labeled as [a-zA-Z0-9]* (\(closed\)|\(open\))' scrollcabinet=\
  81. /if (strstr({*},"(closed)")>0) /set accs=@{Ccyan}(closed)@{n}%;\
  82. /elseif (strstr({*},"(open)")>0) /set accs=@{Cred}(open)@{n}%;\
  83. /endif%;\
  84. /echo -p cabinet %{8} %accs%;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement