Skip to content
Outlands Hub

Razor script

Remove Negative Plant Effects

by adamtwelve · 157 lines
Download

Compatibility unverified

This community Razor script has not been tested in game by the Hub. Read its setup and client requirements before use.

PlantEffectRemoval by AdamTwelve shoutout to Brozen on discord who helped me with the checks.

Bard
Remove Negative Plant Effects.razor
1# This is an automated backup - check out https://outlands.uorazorscripts.com/script/be45898e-afe8-4a31-8fb3-e712cef6bc2c for latest2# Automation by Jaseowns3## Script: Remove Negative Plant Effects4## Created by: adamtwelve#03025#############################################6 7#PlantEffectRemoval by AdamTwelve8#shoutout to Brozen on discord who helped me with the checks.9 10 11#This script will inventory all pots/planters within range, open them, check for negative effects and attempt removal.12#some positive effects will get removed, the sentient brain handling needs some work.13#it's possible to get 4 positive effects on a single page, I will be working on adding a check for next page.14 15#Requirements:16#    Plant pots in range (2)17#    Defoliant, Fungicide, Farmers Almanac locked down within range18#19#Notes:20#Defoliant - flask 6187 021#Fungicide - flask 6193 022#Farmers Almanac - books 29343 023#Plant gump 322460837524#Effects buttons 10,11,12,13.  Next page 7, Previous page 625#26#This script will inventory all pots/planters within range, open them, check for negative effects and attempt removal.27#some positive effects will get removed, the sentient brain handling needs some work.28#it's possible to get 4 positive effects on a single page, I will be working on adding a check for next page.29 30 31clearignore32clearlist pots33createlist pots34 35 36//createlist of all pots in range37while findtype 6327|6328|6330|4551|6341|28987 true -1 -1 -1 as pot38    setvar foundpot pot39    if not inlist pots foundpot40        pushlist pots foundpot41        ignore pot42    endif43endwhile44 45//open each pot and look for effects46foreach y in pots47    overhead 'checking pot number'48    overhead index49    dclick y50    waitforgump 3224608375 500051    pause 25052        //change the  number below to reduce or increase the amount of cycles per pot.53        //we use a for loop in case there are more than 4 effects (multiple pages)54            if ingump 'Perma'55                overhead 'one page of effects'56                setvar pages 057            endif58 59            if not ingump 'Perma'60                overhead 'Multiple pages of effects'61                setvar pages 162 63            endif64      65        for 366            clearlist gumpbuttons67            createlist gumpbuttons68            pushlist gumpbuttons 1369            pushlist gumpbuttons 1270            pushlist gumpbuttons 1171            pushlist gumpbuttons 1072            73            foreach x in gumpbuttons74             clearsysmsg 75             gumpresponse x76             waitforgump 3224608375 500077                if insysmsg 'Reduces'78                    gumpresponse x 3224608375 79                     waitforgump 3224608375 500080                     81                        if insysmsg 'Fungal'82                            overhead 'Removing Fungal effect'83                            gumpresponse 284                            waitforgump 3224608375 500085                            waitfortarget  500086                            targettype 6193 true -1 -1 -187                            waitforgump 3224608375 500088                        endif89                        90                        if insysmsg 'Pestilent'91                            overhead 'Removing Pestilent effect'92                            gumpresponse 293                            waitforgump 3224608375 500094                            waitfortarget  500095                            targettype 6187 true -1 -1 -196                            waitforgump 3224608375 500097                        endif98                        99                        if insysmsg 'Creature'100                            overhead 'Remiving Creature effect'101                            gumpresponse 2102                            waitforgump 3224608375 5000103                            waitfortarget  5000104                            targettype 29343 true -1 -1 -1105                            waitforgump 3224608375 5000106                        endif       107                endif                                108                        if insysmsg 'Brain'109                            overhead 'Ugh, brain found'110                            gumpresponse 2111                            waitforgump 3224608375 5000112                            waitfortarget  5000113                            targettype 6193 true -1 -1 -1114                            waitforgump 3224608375 5000115                            if insysmsg 'sentient'116                                while not insysmsg 'Brain Fungi'117                                    overhead 'removing brain'118                                    gumpresponse 2119                                    waitforgump 3224608375 5000120                                    waitfortarget  5000121                                    targettype 6193 true -1 -1 -1122                                    waitforgump 3224608375 5000123                                endwhile124                             endif125                        endif126 127                endfor128                129            // We found nothing bad, try next page130            if pages = 2131                overhead 'Page 2 clean, checking for 3rd page'132                    if not insysmsg 'reduces'133                        gumpresponse 7 3224608375134                    setvar pages 3135                    endif136            endif137                        if pages = 1138                overhead 'Page 1 clean, checking 2nd page'139                    if not insysmsg 'reduces'140                        gumpresponse 7 3224608375141                        setvar pages 2142                    endif143            endif144            145            if pages = 0146                overhead 'no extra pages to check'147                        if not insysmsg 'reduces'148                            overhead 'page 1 clean'149                    endif150            endif151            152 153        endfor154endfor155 156 157