;************************************ ;Ceed's Apple Poisoner v2.03 ;by Minoc Miner Murderer ;************************************ ;revamped with new menus, completely self explanitory ;make sure there are no tribal berries visible to EUO as they have the same ID as apples ;credits go to Moriarty for the base structure, victor lacroix for help with lag issues ;Roadkill for help with debugging, and cheffe for the intro print text procedure ;Much thanks to all of you ;*******************************************RELEASE NOTES************************************ ;v1.0 beta - initial release ;v1.1 - fixed some timing issues, reordered script for clarity ;v1.2 - fixed a problem with the empty bottle blocking the apple from returning to the stack ;v1.21 - fixed a problem with potion recognition ;v1.30 - fixed some more timing issues, updated #contkind values and added some variables ;v1.31 - typo fix ;v1.4 - condesed script (unreleased) ;v1.5 - added directions menu (unreleased) ;v1.6 - added options menu (unreleased) ;v1.7 - original script broken into sub routines (unreleased) ;v1.8 - added some latency fixes to sub routines and timers (unreleased) ;v1.9 - configured options menu (unreleased) ;v2.01 - added status display (unreleased) ;v2.02 - configured the status display (unreleased) ;v2.03 - second public release ;***************************************************************************************************** ;------------------------------------------------------------------------------------------------------------------------------ ;------------------------------------SCRIPT BEGINS BELOW THIS POINT---------------------------------- ;------------------------------------------------------------------------------------------------------------------------------ ;initialization initevents ignoreitem reset set %dragcontkind KJQC set %singledragcontkind ACIB set %delay 15 set %shortdelay 5 set %poisondelay 12 set %screenresx 640 set %screenresy 480 set %poisontype AVF set %bottletype WUF set %kegtype QMJ set %appletype QQD set %curetype NUF set %bandagetype ZLF set %GStype JZF set %MRtype MZF set %SStype RZF set %GLtype KZF set %fishtype HND set %skipintro 0 set %mage 0 set %pots 0 set %eat 0 chooseskill poison set %orig #skill set #ltargetkind 1 set %lpcnt 0 menu clear if %skipintro = 1 goto Main set %hits #maxhits - 15 set %eattimer #scnt set %bdgtimer #scnt ;******intro****** gosub introsetup set %cnt -5 introloop1: set %cnt %cnt + 5 set %cnt2 150 - %cnt wait 1 gosub printtext if %cnt < 60 goto introloop1 wait 2s set %col 255 introloop2: menu font color %col set %col %col - 5 gosub printtext if %col > 0 goto introloop2 } Main: } gosub directions } gosub menu } if %mage = 0 && %pots = 0 set %cure 0 set %heal 0 if %mage = 1 2 set %cure 1 set %heal 1 if %pots = 1 2 set %cure 2 set %heal 2 gosub build_display gosub positions menu font style menu text STAT %statx %staty Initializing menu text EVENT %eventx %eventy Target your applebag now. set #targcurs 1 set #ltargetid NULL targetapplebagloop: if #ltargetid = NULL goto targetapplebagloop menu delete EVENT set %applebag #ltargetid set %curcont #contid set #lobjectid %applebag event macro 17 waitforcont1: if #contid = %curcont goto waitforcont1 wait %delay contpos 350 300 wait %delay menu text EVENT %eventx %eventy Target your emptybag now. set #targcurs 1 set #ltargetid NULL targetemptybagloop: if #ltargetid = NULL goto targetemptybagloop menu delete EVENT set %emptybag #ltargetid set %curcont #contid set #lobjectid %emptybag event macro 17 waitforcont2: if #contid = %curcont goto waitforcont2 wait %delay contpos 150 300 wait %delay } look_for_apples: gosub look_for_apples } menu delete STAT } Begin: menu delete STAT menu text STAT %statx %staty Working... } gosub calculate gosub initdisplay } if %eat = 1 gosub eat } drag_apple: gosub drag_apple } gosub find_empty_bottle } pour_poison: gosub pour_poison } menu delete STAT menu text STAT %statx %staty Waiting... wait_for_timer: if #scnt < %skilltimer goto wait_for_timer menu delete STAT menu text STAT %statx %staty Working... use_poison: gosub use_poison gosub apply_poison } cure: if c in #charstatus 13 if %cure = 0 goto move_bottle if %cure = 1 gosub cure1 if %cure = 2 gosub cure2 heal: if %heal = 0 goto move_bottle if %heal = 1 gosub heal1 if %heal = 2 gosub heal2 } move_bottle: gosub drag_bottle } gosub restack } goto Begin ;******intro subs******* sub introsetup menu clear menu window size 400 200 menu window title Ceed's Ceed's Apple Poisoner v2.03 menu window color black menu font bgcolor BLACK menu font color RED menu font size 16 menu font style BI menu hideeuo menu show return sub printtext menu delete TEXT1 menu delete TEXT2 menu text TEXT1 50 %cnt Ceed's Apple Poisoner v2.0 menu text TEXT2 100 %cnt2 © Minoc Miner Murderer$ return sub directions menu clear menu hideeuo menu window size 400 425 menu window title Ceed's Apple Poisoner v2.03 menu window color black menu font bgcolor black menu font color red menu font size 12 menu font style BI menu text 1 65 5 Directions for Ceed's Apple Poisoner menu font size 10 menu font style I menu text 2 5 30 You will need the following: menu font size 8 menu font style menu text 3 25 50 1) Poison Kegs suitable for your skill level menu text 5 25 65 2) One empty bottle menu text 6 25 80 3) Two empty bags menu text 7 25 95 4) A stack of at least 5 apples menu text 8 25 110 5) Heal and Cure reagents if you're a mage menu text 9 25 125 6) Bandages and Cure Potions if you're a warrior menu text 10 25 140 7) A stack of fish steaks if you want the script to feed your character menu font size 12 menu font style BI menu text 11 5 160 '*'*'NOTE'*'*' If you're char is above 80 skill you will menu text 12 80 175 not need reagents, potions or bandages. menu text 13 5 195 You may only select one cure/heal method at a time. menu font size 10 menu font style I menu text 14 5 220 Recommended setup: menu font size 8 menu font style menu text 15 25 240 1) Place you're apple stack into one of the bags and menu text 16 40 255 drag the pack to the upper right of your of your main pack menu text 17 25 270 2) Drag the other bag (empty) to the lower right corner menu text 18 25 285 3) Drag all of your poison kegs to the left side of your pack menu text 19 25 300 4) Place the empty bottle anywhere in your main pack menu text 20 25 315 5) Place heal and cure regs or bandages and potions into menu text 21 40 330 your main bag if you are going to need cured. menu font size 10 menu font style BI menu button CONT 150 375 100 25 Continue set #menubutton N/A menuloop1: if #menubutton = N/A goto menuloop1 return sub menu menu clear menu hideeuo menu window size 400 235 menu window title Ceed's Apple Poisoner v2.03 menu window color black menu font bgcolor black menu font color red menu font size 9 menu font style BI menu button 1 40 45 120 20 Cure with Potions: menu font size 10 menu font style if %pots = 1 menu text POTS 165 45 Yes if %pots = 0 menu text POTS 165 45 No menu font size 9 menu font style BI menu button 2 210 45 120 20 Cure with Magery: menu font size 10 menu font style if %mage = 1 menu text MAGE 335 45 Yes if %mage = 0 menu text MAGE 335 45 No menu font size 14 menu font style BI menu text CHOICE 30 10 Choose a curing method (optional): menu text 4 20 100 Only enable this if you have fishsteaks! menu font size 10 menu button 3 90 130 120 25 Feed Character: menu font size 12 menu font style if %eat = 1 menu text EAT 235 130 Enabled if %eat = 0 menu text EAT 235 130 Disabled menu font size 10 menu font style B menu button 4 175 200 50 20 Begin menu show menuloop2: set #menubutton N/A mainmenuloop: if #menubutton = N/A goto mainmenuloop goto A , #menubutton A1: menu font size 10 menu font style if %pots = 1 2 set %pots 0 goto skipA1 if %pots = 0 set %pots 1 skipA1: if %pots = 1 5 menu delete POTS menu text POTS 165 45 Yes set %mage 0 menu delete MAGE menu text MAGE 335 45 No if %pots = 0 2 menu delete POTS menu text POTS 165 45 No goto menuloop2 A2: menu font size 10 menu font style if %mage = 1 2 set %mage 0 goto skipA2 if %mage = 0 set %mage 1 skipA2: if %mage = 1 5 menu delete MAGE menu text MAGE 335 45 Yes set %pots 0 menu delete POTS menu text POTS 165 45 No if %mage = 0 2 menu delete MAGE menu text MAGE 335 45 No goto menuloop2 A3: menu font size 12 menu font style if %eat = 1 2 set %eat 0 goto skipA3 if %eat = 0 set %eat 1 skipA3: if %eat = 1 2 menu delete EAT menu text EAT 235 130 Enabled if %eat = 0 2 menu delete EAT menu text EAT 235 130 Disabled goto menuloop2 A4: if %mage = 1 4 set %cure1 1 set %cure2 0 set %heal1 1 set %cure2 0 if %pots = 1 set %cure1 0 set %cure2 1 set %heal1 0 set %cure2 1 menu clear return ;************display subs************* sub build_display menu window size 400 50 menu window title Ceed's Apple Poisoner v2.03 menu window color black menu font bgcolor black menu font color red menu font size 9 menu font style BI menu text MSTATUS 2 5 Status: menu text MEVENT 3 20 Event: menu text CSKILL 275 2 Skill: menu font style B menu text CSKILL1 340 2 ( menu text CSKILL2 395 2 ) menu text CSKILL3 378 2 , menu font style BI menu text CGAIN 275 17 Gain: menu font style B menu text CGAIN1 340 17 ( menu text CGAIN2 395 17 ) menu text CGAIN3 378 17 , menu font style BI menu text CGAIN3 345 17 + menu text LOOPS 275 32 Poisons Used: if %mage = 1 8 menu font size 8 menu font style B menu text GSCNT 215 0 GS: menu text GLCNT 215 12 GL: menu text MRCNT 215 24 MR: menu text SSCNT 215 36 SS: menu font size 9 menu font style BI if %pots = 1 2 menu text BDGCNT 200 5 Bndgs: menu text POTCNT 200 28 CPots: return sub positions set %statx 50 set %staty 5 set %eventx 50 set %eventy 20 set %s1x 355 set %s1y 2 set %s2x 384 set %s2y 2 set %g1x 355 set %g1y 17 set %g2x 384 set %g2y 17 set %lpcntx 367 set %lpcnty 32 set %GLx 240 set %GLy 0 set %GSx 240 set %GSy 12 set %MRx 240 set %MRy 24 set %SSx 240 set %SSy 36 set %bdgx 245 set %bdgy 5 set %cpx 245 set %cpy 28 return sub initdisplay menu delete S1 menu delete S2 menu delete G1 menu delete G2 menu delete LPCNT menu text S1 %s1xm %s1y %s1 menu text S2 %s2x %s2y %s2 menu text G1 %g1xm %g1y %g1 menu text G2 %g2x %g2y %g2 menu text LPCNT %lpcntx %lpcnty %lpcnt if %mage = 1 10 menu font size 8 menu delete GS menu delete GL menu delete MR menu delete SS menu text GS %GSx %GSy %GS menu text GL %GLx %GLy %GL menu text MR %MRx %MRy %MR menu text SS %SSx %SSy %SS menu font size 9 if %pots = 1 4 menu delete BDG menu delete CP menu text BDG %bdgx %bdgy %bdg menu text CP %cpx %cpy %cp wait 1 return sub calculate chooseskill poison set %s1 #skill / 10 set %s2 #skill - %s1 * 10 set %total #skill - %orig set %g1 %total / 10 set %g2 %total - %g1 * 10 if %s1 => 100 set %xmod 0 if %s1 < 100 set %xmod 5 if %s1 < 10 set %xmod 12 set %s1xm %s1x + %xmod if %g1 => 100 set %xmod 0 if %g1 < 100 set %xmod 5 if %g1 < 10 set %xmod 12 set %g1xm %g1x + %xmod if %mage = 1 gosub count_mage if %pots = 1 gosub count_warr return sub count_mage findregsloop: finditem %GLtype C if #findkind = -1 4 menu text EVENT %eventx %eventy You need more garlic! gosub stopped menu delete EVENT goto findregsloop set %GL #findstack finditem %GStype C if #findkind = -1 4 menu text EVENT %eventx %eventy You need more ginseng! gosub stopped menu delete EVENT goto findregsloop set %GS #findstack finditem %MRtype C if #findkind = -1 4 menu text EVENT %eventx %eventy You need more mandrakes! gosub stopped menu delete EVENT goto findregsloop set %MR #findstack finditem %SStype C if #findkind = -1 4 menu text EVENT %eventx %eventy You need more spider's silk! gosub stopped menu delete EVENT goto findregsloop set %SS #findstack return sub count_warr findwarriorloop: finditem %bandagetype C if #findkind = -1 4 menu text EVENT %eventx %eventy You need more bandages! gosub stopped menu delete EVENT goto findwarriorloop set %bdg #findstack finditem %curetype C if #findkind = -1 4 menu text EVENT %eventx %eventy You need more cure pots! gosub stopped menu delete EVENT goto findwarriorloop set %cp #findcnt return sub stopped menu delete STAT menu text STAT %statx %staty Paused pause return ;************other subs************* sub look_for_apples finditem %appletype C if #findbagid <> %applebag 2 ignoreitem #findid goto look_for_apples if #findkind = -1 gosub no_apples if #findstack < 5 gosub no_apples wait %shortdelay set %apple_stack #findid ignoreitem %apple_stack return sub drag_apple drag_apple: set %appledragtimer #scnt + 5 event drag %apple_stack wait_for_apple_drag: if #scnt > %appledragtimer goto drag_apple if #contkind <> %dragcontkind goto wait_for_apple_drag msg 1$ finditem %emptybag set #findmod 23_10 click #findx #findy P wait %delay return sub no_apples menu text EVENT %eventx %eventy You need more apples! halt return sub find_empty_bottle finditem %bottletype C if #findkind = -1 3 finditem %poisontype C if #findkind = 0 goto use_poison finditem %bottletype C if #findkind = -1 gosub no_bottles return sub no_bottles menu text EVENT %eventx %eventy You need a bottle! halt return sub pour_poison pour_poison_loop: finditem %kegtype C if #findkind = -1 gosub no_poison set %kegid #findid set #lobjectid %kegid event macro 17 wait %delay scanjournal 1 if keg_is_empty in #journal 2 ignoreitem %kegid goto pour_poison_loop finditem %poisontype C if #findkind = -1 goto pour_poison_loop if #targcurs = 1 2 key ESC wait %delay return sub use_poison finditem %poisontype C if #findkind = -1 goto pour_poison set #ltargetid #findid event macro 13 30 target event macro 22 wait %delay return sub no_poison menu text EVENT %eventx %eventy You need more poison! gosub stopped menu delete EVENT goto pour_poison return sub apply_poison finditem %appletype C if #findkind = -1 3 key ESC wait %delay goto drag_apple set %single_apple #findid set #ltargetid %single_apple target event macro 22 set %skilltimer #scnt + %poisondelay wait %delay set %lpcnt %lpcnt + 1 return sub cure1 cure1: event macro 15 10 target event macro 23 wait %delay if c in #charstatus goto cure1 wait %delay return sub cure2 cure2: if #scnt > %bdgtimer 8 finditem %bandagetype C if #findkind = 0 6 set #lobjectid #findid event macro 17 target event macro 23 set %bdgtimer #scnt + 15 wait %delay finditem %curetype C if #findkind = -1 menu text EVENT %eventx %eventy You're out of cures$and in trouble!! set #lobjectid #findid event macro 17 wait %delay if C in #charstatus goto cure2 return sub heal1 heal1: if #hits < %hits 5 event macro 15 28 target event macro 23 wait %delay goto heal1 return sub heal2 heal2: if #hits < %hits 12 if #scnt > %bdgtimer 10 finditem %bandagetype C if #findkind = -1 2 menu text EVENT %eventx %eventy You're out of bandages! halt set #lobjectid #findid event macro 17 target event macro 23 set %bdgtimer #scnt + 15 wait %delay goto heal2 return sub drag_bottle finditem %bottletype C if #findkind = -1 gosub find_empty_bottle if #findbagid = %applebag 2 ignoreitem #findid goto move_bottle set %emptybottle #findid bottle_drag_loop: set %bottledragtimer #scnt + 5 event drag %emptybottle check_for_empty_bottle: if #scnt > %bottledragtimer goto bottle_drag_loop if #contkind <> %singledragcontkind && #contkind <> %dragcontkind goto check_for_empty_bottle if #contkind = %dragcontkind msg $ finditem %applebag set #findmod 23_10 click #findx #findy p wait %delay return sub restack restack_loop: set %singleappletimer #scnt + 5 event drag %single_apple check_for_single_apple: if #scnt > %singleappletimer goto restack_loop if #contkind <> %singledragcontkind 3 if #contkind <> %dragcontkind goto check_for_single_apple msg $ finditem %applebag wait %shortdelay set #findmod 23_10 click #findx #findy p wait %delay return sub eat if #scnt < %eattimer goto exiteat finditem %fishtype C if #findkind = -1 gosub no_fish wait %shortdelay set #lobjectid #findid set %subtimer #scnt + 10 eatloop: if %subtimer < #scnt 4 menu text EVENT %eventx %eventy You need more fish! gosub stopped menu delete EVENT goto begin event macro 17 wait %shortdelay if simply_too_full notin #sysmsg goto eatloop set %eattimer #scnt + 600 exiteat: menu delete DISP return