annotate gm-spider.tf @ 1686:db1a3e72c1d1 default tip

Update to match in-game changes ('help item conditions').
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 18 May 2024 21:25:57 +0300
parents 356c3c26aee6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 ;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 ;; GgrTF::Spider - Spider guild support @ BatMUD
1655
356c3c26aee6 Get rid of ISO-8859-1 in copyrights.
Matti Hamalainen <ccr@tnsp.org>
parents: 1586
diff changeset
3 ;; (C) Copyright 2006-2015 Jutom & Matti Hamalainen (Ggr)
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 ;;
1501
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
6 ;;
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
7 ;; This program is free software; you can redistribute it and/or
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
8 ;; modify it under the terms of the GNU General Public License
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
9 ;; version 2 as published by the Free Software Foundation.
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
10 ;;
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
11 ;; This program is distributed in the hope that it will be useful,
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
14 ;; file "COPYING.txt" for more details.
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
15 ;;
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
16 ;; You should have received a copy of the GNU General Public License
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
17 ;; along with this program; if not, write to the Free Software
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
18 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
19 ;; MA 02110-1301 USA.
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
20 ;;
6eba70947636 Add GPL notice.
Matti Hamalainen <ccr@tnsp.org>
parents: 1497
diff changeset
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 ;;
1277
980a1f19a258 More copyright and version requirement updates.
Matti Hamalainen <ccr@tnsp.org>
parents: 1272
diff changeset
23 ;; NOTICE! This file requires GgrTF (version 0.6.15 or later) to be loaded.
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 ;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 /loaded GgrTF::Spider
1035
c10f8a59a2e3 Use module depencies for checking required parent modules.
Matti Hamalainen <ccr@tnsp.org>
parents: 932
diff changeset
26 /test prdefmodule("Spider")
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
28
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 ;; Initialization and options
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1497
384f8ceb4a32 Kill previous timer pid if any, to prevent overlaps.
Matti Hamalainen <ccr@tnsp.org>
parents: 1496
diff changeset
32 /set spider_pid=0
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
33 /set spider_timer_t=35
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
34 /set spider_warn_t=15
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
35 /set spider_avgn_min=60
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
36 /set spider_avgq_min=80
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
37
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
38 /def -i gspider_reset =\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
39 /set spider_drain_t=0%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
40 /set spider_ctrl_t=0%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
41 /set spider_drains=0%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
42 /set spider_easy=0%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
43 /set spider_easy_n=0%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
44 /set spider_type=0
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
45
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
46 /def -i gspider_reset_extra =\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
47 /set spider_avgn_val=$[prrepval(5, spider_avgn_min)]%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
48 /set spider_avgq_val=$[prrepval(5, spider_avgq_min)]
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
49
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
50 /gspider_reset
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
51 /gspider_reset_extra
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
52
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 ;;; Spider related lites
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 ;; Spiderservant
1272
f22029a60ed6 Cleanups, use /glite in some places.
Matti Hamalainen <ccr@tnsp.org>
parents: 1248
diff changeset
58 /glite -mregexp -t'^([a-zA-Z0-9_ ]+)( the spider whispers )\'(.*)\'$' gservant_whisper =\
1248
4397134e60ed Change spider servant lite colours back to darker ones.
Matti Hamalainen <ccr@tnsp.org>
parents: 1246
diff changeset
59 /substitute -p @{Cred}%{P1}@{n}%{P2}@{Cyellow}'%{P3}'@{n}
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
63 ;; Helper functions
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1493
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
65 /def -i gspider_drain =\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
66 /if (spider_easy)\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
67 /set spider_easy_n=$[spider_easy_n+1]%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
68 /endif%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
69 /set spider_drain_t=$[time()]%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
70 /set spider_drains=$[spider_drains+1]%;\
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 /set spider_easy=0
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
73
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
74 /def -i gspider_inform =\
1509
96c4c868b7bb Clear spider inform pid when the process is running, to prevent stop code
Matti Hamalainen <ccr@tnsp.org>
parents: 1504
diff changeset
75 /set spider_pid=0%;\
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
76 /msq @{Cgreen}Upcoming spider demon drain in %{spider_warn_t}s.@{n}
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
77
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
78
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
79 /def -i gspider_stop_timer =\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
80 /if (spider_pid > 0)\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
81 /kill %{spider_pid}%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
82 /set spider_pid=0%;\
1504
7d8d1f7503e6 Clear next drain timer variable when stopping timer.
Matti Hamalainen <ccr@tnsp.org>
parents: 1502
diff changeset
83 /set spider_next_drain=0%;\
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
84 /endif
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
85
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
86 /def -i gspider_setup_timer =\
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
87 /if ({1} > spider_warn_t)\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
88 /gspider_stop_timer%;\
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
89 /set spider_next_drain=$[time() + {1}]%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
90 /set spider_pid=$(/grepeat -$[{1} - spider_warn_t] 1 /gspider_inform)%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
91 /endif
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
92
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
93
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
94 /def -i gspider_control =\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
95 /msq @{BCgreen}Demon controlled.@{n}%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
96 /set spider_ctrl_t=$[time()]%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
97 /set spider_type=0%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
98 /set spider_drains=0%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
99 /let _dtime=$(/praverage %{spider_avgn_val})%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
100 /test gspider_setup_timer(_dtime)
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
101
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
102
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
103 /def -i gspider_drain_queen =\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
104 /mss @{BCgreen}The Spider Queen is smiling, demon battlechannelled.@{n}%;\
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
105 /if (spider_ctrl_t > 0)\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
106 /let _ddelta=$[time() - spider_ctrl_t]%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
107 /set spider_avgq_val=$(/prnth %{spider_avgq_val} %{_ddelta})%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
108 /let _dtime=$(/praverage %{spider_avgq_val})%;\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
109 /test gspider_setup_timer(_dtime)%;\
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
110 /endif%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
111 /gspider_drain%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
112 /set spider_ctrl_t=$[time()]%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
113 /set spider_type=1
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
114
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
115
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
116 /def -i gspider_drain_normal =\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
117 /if (spider_easy)\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
118 /mss @{BCgreen}Demon channelled with points.@{n}%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
119 /else \
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
120 /mss @{BCred}Demon channelled without points!!@{n}%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
121 /endif%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
122 /if (spider_ctrl_t > 0)\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
123 /let _ddelta=$[time() - spider_ctrl_t]%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
124 /set spider_avgn_val=$(/prnth %{spider_avgn_val} %{_ddelta})%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
125 /endif%;\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
126 /gspider_drain
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
127
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
128
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
129 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
130 ;; Spider demon control
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
131 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
132 /eval /def -i -F -p9999 -ag -msimple -t"You feed %{set_plrname}'s spider demon's hunger with your ritual." gspider_ctrl =\
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
133 /gspider_control
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
134
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
135 ;; Point(s) used or not?
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
136 /eval /def -i -F -p9999 -ag -msimple -t"%{set_plrname}'s demon feels easier to control than usual." gspider_easydrain =\
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
137 /set spider_easy=1
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
138
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
139 ;; Spider demon channelling message
1493
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
140 /eval /def -i -F -p9999 -msimple -t"%{set_plrname}'s spider demon draws power from you." gspider_normaldrain =\
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
141 /gspider_drain_normal
1493
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
142
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143 ;; Channelling with help from queen
1493
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
144 /def -i -F -p9999 -msimple -t"Spider Queen smiles upon you and helps you control the demon." gspider_queendrain =\
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
145 /gspider_drain_queen
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
146
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
147 ;; Demon banished
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
148 /def -i -F -p9999 -msimple -t"You feel your mind returning back to normal." gspider_banished =\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
149 /gspider_reset
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
150
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
151 ;; Banish failure
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
152 /def -i -F -p9999 -msimple -t"Alien thoughts invade your mind! Your body no longer is yours alone!" gspider_banishfail =\
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
153 /msr HAAALP demon is doing mean things!! Need banish or channel!!
1493
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
154
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
155
1502
0a1e87ee7052 Refactor spider demon helper module.
Matti Hamalainen <ccr@tnsp.org>
parents: 1501
diff changeset
156 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1065
98dd57c1fc5e Move some documentation from manual to embedded tfdoc in the scripts.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
157 ;;@command /spidstatus
98dd57c1fc5e Move some documentation from manual to embedded tfdoc in the scripts.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
158 ;;@desc Prints time elapsed since last demon control, demon drains
98dd57c1fc5e Move some documentation from manual to embedded tfdoc in the scripts.
Matti Hamalainen <ccr@tnsp.org>
parents: 1035
diff changeset
159 ;;@desc (and possibly other demon status information in future).
1272
f22029a60ed6 Cleanups, use /glite in some places.
Matti Hamalainen <ccr@tnsp.org>
parents: 1248
diff changeset
160 /def -i spidstatus =\
1493
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
161 /if (spider_ctrl_t > 0)\
1495
34d742910e20 Implement spider demon drain timer. Might be working wrong, dunno lol. :P
Matti Hamalainen <ccr@tnsp.org>
parents: 1493
diff changeset
162 /if (spider_type)\
1493
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
163 /let _extra=@{Cred}battle/queen@{n}%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
164 /else \
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
165 /let _extra=normal%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
166 /endif%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
167 /msq @{BCyellow}Time since last control:@{n} @{BCwhite}$[prgetstime(spider_ctrl_t)]@{n} (%{_extra} control)%;\
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
168 /else \
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
169 /msq @{BCred}No demon controls registered yet.@{n}%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
170 /endif%;\
1493
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
171 /if (spider_drains > 0)\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
172 /if (spider_easy_n > 0)\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
173 /let _extra=(@{BCwhite}%{spider_easy_n}@{n} easy)%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
174 /else \
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
175 /let _extra=%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
176 /endif%;\
bddaa177e365 Try to improve spider guild module, based on suggestions from Mardraum.
Matti Hamalainen <ccr@tnsp.org>
parents: 1472
diff changeset
177 /msq @{BCgreen}Drains:@{n} @{BCwhite}%{spider_drains}@{n}, $[prgetstime(spider_drain_t)] ago. %{_extra}@{n}%;\
882
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 /else \
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179 /msq @{BCgreen}No drains happened yet!@{n}%;\
04abd37e4751 Rename additional modules from ggrtf-*.tf to gm-*.tf.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180 /endif