Mercurial > hg > batmud > ggrtf
annotate gm-bmaster.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 |
rev | line source |
---|---|
1244
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 ;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 ;; GgrTF::Beastmaster - Beastmaster guild support @ BatMUD |
1655
356c3c26aee6
Get rid of ISO-8859-1 in copyrights.
Matti Hamalainen <ccr@tnsp.org>
parents:
1454
diff
changeset
|
3 ;; (C) Copyright 2010 Matti Hamalainen (Ggr) |
1244
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 ;; |
1454
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
6 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
7 ;; This program is free software; you can redistribute it and/or |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
8 ;; modify it under the terms of the GNU General Public License |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
9 ;; version 2 as published by the Free Software Foundation. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
10 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
11 ;; This program is distributed in the hope that it will be useful, |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
12 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
13 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
14 ;; file "COPYING.txt" for more details. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
15 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
16 ;; You should have received a copy of the GNU General Public License |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
17 ;; along with this program; if not, write to the Free Software |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
18 ;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
19 ;; MA 02110-1301 USA. |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
20 ;; |
113c9a66eaf1
Add a better/more proper GPL license header in files.
Matti Hamalainen <ccr@tnsp.org>
parents:
1251
diff
changeset
|
21 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1244
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 ;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 ;; NOTICE! This file requires GgrTF (version 0.6.14 or later) to be loaded. |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 ;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 /loaded GgrTF::Beastmaster |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 /test prdefmodule("Beastmaster") |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 ;; Bindings |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
31 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 ;; Fails and fumbles |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
37 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 ;; Mount handling |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 /def -i gbmaster_getmount =\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 /if ({#} > 0 & {1}!~"")\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 /let _mount=%{*}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 /elseif (bmount_curr!~"")\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 /let _mount=%{bmount_curr}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
46 /else \ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
47 /let _mount=%{bmount_last}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
48 /endif%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
49 /return gbmaster_short(_mount) |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
50 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
51 /def -i gbmaster_short =\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
52 /let _mount=%{*}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
53 /if (regmatch("^([A-Za-z ]+) [0-9]+$", _mount))\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
54 /let _mount=%{P1}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
55 /endif%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
56 /return _mount |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
57 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
58 /def -i -p1 -mregexp -t"^(.+?) gives you a big slobbery lick\.$" gbmaster_arrives =\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
59 /let _mount=%{P1}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
60 /if (_mount =~ gbmaster_short(bmount_curr))\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
61 /test gbmaster_ride(_mount)%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
62 /else \ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
63 /test gbmaster_lead(_mount)%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
64 /endif |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
65 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
66 /def -i gbmaster_lead =\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
67 /set bmount_last=$[gbmaster_getmount({1})]%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
68 /if (bmount_last =~ gbmaster_short(bmount_curr))\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
69 @@dismount%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
70 /endif%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
71 @@lead %{bmount_last} |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
72 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
73 /def -i gbmaster_ride =\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
74 /set bmount_last=$[gbmaster_getmount({1})]%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
75 /let _short=$[gbmaster_short(bmount_curr)]%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
76 /if (bmount_last =~ _short)\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
77 @@release%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
78 /endif%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
79 @@ride %{bmount_last} |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
80 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
81 /def -i gbmaster_heel =\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
82 /if ({#} > 0 & {1}!~"")\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
83 /let _mount=%{*}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
84 /elseif (bmount_curr!~"")\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
85 /let _mount=%{bmount_curr}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
86 /endif%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
87 /set bmount_last=%{_mount}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
88 @@use heel at %{_mount} |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
89 |
1250 | 90 ;; Remount or lead |
91 /def -i gbmaster_remount =\ | |
92 /let _mount=$[gbmaster_short(bmount_curr)]%;\ | |
93 @@ride %{_mount}%;\ | |
94 @@lead %{_mount} | |
95 | |
96 | |
97 | |
98 ;; Heel mount | |
99 /def -i -mregexp -t" seems to perk up. It will now respond to:$|^This animal already responds to your call with the syntax:$" gbmaster_get_heel1 =\ | |
100 /set bmount_flag=1 | |
101 | |
102 /def -i -ag -Ebmount_flag -mregexp -t"^use heel at (.+)$" gbmaster_get_heel2 =\ | |
103 /set bmount_flag=0%;\ | |
104 /set bmount_curr=%{P1}%;\ | |
105 /msq @{BCwhite}Mount heel id@{n}: '@{BCgreen}%{bmount_curr}@{n}'. | |
106 | |
107 | |
108 ;; Auto remount | |
109 /def -i -mregexp -t"^(You are knocked off your mount!|Your mount throws you!|Your annoyed mount throws you!)$" gbmaster_dismount =\ | |
110 /msr Thrown off mount!%;\ | |
111 /repeat -0.5 1 /gbmaster_remount | |
112 | |
113 | |
1244
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
114 /def -i ride = @@release $[gbmaster_short(bmount_curr)]%;/test gbmaster_ride({*}) |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
115 /def -i rele = @@release $[gbmaster_getmount({*})] |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
116 /def -i lead = /test gbmaster_lead({*}) |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
117 /def -i heel = /test gbmaster_heel({*}) |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
118 /def -i dis = @@dismount%;@@lead $[gbmaster_short(bmount_curr)] |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
119 /def -i store = @@dismount%;@@release%;@@store $[gbmaster_getmount({*})] |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
120 |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
121 /def -i rug =\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
122 /set bmount_last=$[gbmaster_getmount({*})]%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
123 @@party report Ride underground -> %{bmount_last}%;\ |
c62e6c475bb2
Initial beastmaster module added, still very experimental and not meant for use.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
124 @@use ride underground at %{bmount_last} |