Remove Negative Plant Effects by adamtwelve
Description: This script will attempt to remove
1#PlantEffectRemoval by AdamTwelve
2#shoutout to Brozen on discord who helped me with the checks.
3
4
5#This script will inventory all pots/planters within range, open them, check for negative effects and attempt removal.
6#some positive effects will get removed, the sentient brain handling needs some work.
7#it's possible to get 4 positive effects on a single page, I will be working on adding a check for next page.
8
9#Requirements:
10# Plant pots in range (2)
11# Defoliant, Fungicide, Farmers Almanac locked down within range
12#
13#Notes:
14#Defoliant - flask 6187 0
15#Fungicide - flask 6193 0
16#Farmers Almanac - books 29343 0
17#Plant gump 3224608375
18#Effects buttons 10,11,12,13. Next page 7, Previous page 6
19#
20#This script will inventory all pots/planters within range, open them, check for negative effects and attempt removal.
21#some positive effects will get removed, the sentient brain handling needs some work.
22#it's possible to get 4 positive effects on a single page, I will be working on adding a check for next page.
23
24
25clearignore
26clearlist pots
27createlist pots
28
29
30//createlist of all pots in range
31while findtype 6327|6328|6330|4551|6341|28987 true -1 -1 -1 as pot
32 setvar foundpot pot
33 if not inlist pots foundpot
34 pushlist pots foundpot
35 ignore pot
36 endif
37endwhile
38
39//open each pot and look for effects
40foreach y in pots
41 overhead 'checking pot number'
42 overhead index
43 dclick y
44 waitforgump 3224608375 5000
45 pause 250
46 //change the number below to reduce or increase the amount of cycles per pot.
47 //we use a for loop in case there are more than 4 effects (multiple pages)
48 if ingump 'Perma'
49 overhead 'one page of effects'
50 setvar pages 0
51 endif
52
53 if not ingump 'Perma'
54 overhead 'Multiple pages of effects'
55 setvar pages 1
56
57 endif
58
59 for 3
60 clearlist gumpbuttons
61 createlist gumpbuttons
62 pushlist gumpbuttons 13
63 pushlist gumpbuttons 12
64 pushlist gumpbuttons 11
65 pushlist gumpbuttons 10
66
67 foreach x in gumpbuttons
68 clearsysmsg
69 gumpresponse x
70 waitforgump 3224608375 5000
71 if insysmsg 'Reduces'
72 gumpresponse x 3224608375
73 waitforgump 3224608375 5000
74
75 if insysmsg 'Fungal'
76 overhead 'Removing Fungal effect'
77 gumpresponse 2
78 waitforgump 3224608375 5000
79 waitfortarget 5000
80 targettype 6193 true -1 -1 -1
81 waitforgump 3224608375 5000
82 endif
83
84 if insysmsg 'Pestilent'
85 overhead 'Removing Pestilent effect'
86 gumpresponse 2
87 waitforgump 3224608375 5000
88 waitfortarget 5000
89 targettype 6187 true -1 -1 -1
90 waitforgump 3224608375 5000
91 endif
92
93 if insysmsg 'Creature'
94 overhead 'Remiving Creature effect'
95 gumpresponse 2
96 waitforgump 3224608375 5000
97 waitfortarget 5000
98 targettype 29343 true -1 -1 -1
99 waitforgump 3224608375 5000
100 endif
101 endif
102 if insysmsg 'Brain'
103 overhead 'Ugh, brain found'
104 gumpresponse 2
105 waitforgump 3224608375 5000
106 waitfortarget 5000
107 targettype 6193 true -1 -1 -1
108 waitforgump 3224608375 5000
109 if insysmsg 'sentient'
110 while not insysmsg 'Brain Fungi'
111 overhead 'removing brain'
112 gumpresponse 2
113 waitforgump 3224608375 5000
114 waitfortarget 5000
115 targettype 6193 true -1 -1 -1
116 waitforgump 3224608375 5000
117 endwhile
118 endif
119 endif
120
121 endfor
122
123 // We found nothing bad, try next page
124 if pages = 2
125 overhead 'Page 2 clean, checking for 3rd page'
126 if not insysmsg 'reduces'
127 gumpresponse 7 3224608375
128 setvar pages 3
129 endif
130 endif
131 if pages = 1
132 overhead 'Page 1 clean, checking 2nd page'
133 if not insysmsg 'reduces'
134 gumpresponse 7 3224608375
135 setvar pages 2
136 endif
137 endif
138
139 if pages = 0
140 overhead 'no extra pages to check'
141 if not insysmsg 'reduces'
142 overhead 'page 1 clean'
143 endif
144 endif
145
146
147 endfor
148endfor
149
150
151