forked from brycole/gemstone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforage.lic
139 lines (119 loc) · 4.32 KB
/
forage.lic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
=begin
This is a simple foraging script that is not very intelligent.
Only putting it up as I don't see another on the Repo.
Your foragesack must be set. You can do this through ;settings change foragesack (item)
Usage is ;forage (Full Herb Name) (Herb Base Noun) (Quantity)
I.E. ;forage "blue trafel mushroom" mushroom 6
It will forage until you find the amount requested or it tells you to change rooms.
Because it uses a variable to compare to the sort verb, it has a small quirk. If you already have 2 calamia fruits, as an example, but need 8... You have to put the number wanted as 8 rather than 6. I.E. ;forage "calamia fruit" fruit 8
5/7/2010 - Fixed a small bug. It previously used sort cluster to determine the number of items it had found. This utilized the root noun only. Hence if you asked for ten tkaro root but already had two pepperthorn root in your cloak. It'd only get 8 tkaro root. Changed it to sort utilizing script variable one. Hopefully should fix it. The only issue seems that some herbs have adjectives that even the sort verb can't use. I've put in a hook to have it utilize the sort cluster verb like previously if it gets this response from the game. For the majority of herbs it'll never be seen. If you see it though it will say "Please rephrase the command." Just ignore it or squelch it. An annoying phrase I know.
6/22/2010 - Added in haste and presence to the script. Haven't done much testing. Please let me know any errors.
6/23/10 - Fixed that stupid "Please rephrase that command." message.
6/24/10 - Fixed a small bug with the sorting when it would return "What were you referring to?"
---Rontuu---
=end
silence_me
start:
waitrt?
clear
if (Spells.majorelemental >= 6) and not checkspell(506) and checkmana(6)
fput 'incant 506'
elsif (Spells.minorelemental >= 2) and not checkspell(402) and checkmana(2)
fput 'incant 402'
end
waitrt?
clear
put "forage for #{script.vars[1]}"
match "start", "...wait"
match "good", "manage to find"
match "bad", "you notice that someone"
match "retry", "find nothing"
match "retry", "suddenly you feel"
match "retry", "you suddenly feel"
match "retry", "fumble about"
match "retry", "stumble about"
match "retry", "when your hand comes"
match "nothere", "no hint of what"
match "nothere", "no evidence of what"
match "nothere", "no trace of"
matchwait
nothere:
echo
respond ("**************************")
respond ("***Herb Not Found Here!***")
respond ("**************************")
exit
good:
waitrt?
clear
put "put #{script.vars[2]} in my #{Lich.foragesack}"
match "continue", "You put"
match "good", "...wait"
matchwait
good2:
waitrt?
clear
put "put #{script.vars[2]} in my #{Lich.foragesack}"
match "alternate", "You put"
match "good2", "...wait"
matchwait
continue:
waitrt?
clear
put "sort #{script.vars[1]} in my #{Lich.foragesack}"
match "finished", "#{script.vars[3]} items in"
match "finished", "#{script.vars[3]} item"
match "start", "top of the"
match "continue", "...wait"
match "alternate", "What were you referring"
match "alternate", "Please rephrase that command."
matchwait
alternate:
waitrt?
clear
put "sort cluster #{script.vars[2]} in my #{Lich.foragesack}"
match "finished", "#{script.vars[3]} items in"
match "finished", "#{script.vars[3]} item"
match "start2", "top of the"
match "alternate", "...wait"
matchwait
finished:
echo
respond ("*********************************************")
respond ("***#{script.vars[3]} #{script.vars[1]} have been found!***")
respond ("*********************************************")
exit
bad:
echo
respond ("********************************")
respond ("***Foraged Out - Change Rooms***")
respond ("********************************")
exit
retry:
goto "start"
retry2:
goto "start2"
start2:
waitrt?
clear
if (Spells.majorelemental >= 6) and not checkspell(506) and checkmana(6)
fput 'incant 506'
elsif (Spells.minorelemental >= 2) and not checkspell(402) and checkmana(2)
fput 'incant 402'
end
waitrt?
clear
put "forage for #{script.vars[1]}"
match "start2", "...wait"
match "good2", "manage to find"
match "bad", "you notice that someone"
match "retry2", "find nothing"
match "retry2", "suddenly you feel"
match "retry2", "you suddenly feel"
match "retry2", "fumble about"
match "retry2", "stumble about"
match "retry2", "when your hand comes"
match "nothere", "no hint of what"
match "nothere", "no evidence of what"
match "nothere", "no trace of"
matchwait