initEvents set %eat #scnt set %vaheta #scnt set %GUMP QMZB ;**************************************************************************** gosub item gosub open_carp loop: if #scnt > %eat { gosub closecraftgump gosub eat set %eat #scnt + 1800 } chooseSkill carpentry SetUOTitle C: #skill Arv: %c set %oldskill #skill gosub item if #contkind = %GUMP { set %c %c + 1 if #contposx <> 0 && #contposy <> 0 contpos 0 0 click %x2 %y2 wait 3s gosub waitforgump chooseSkill carpentry set %newskill #skill set %testchange %newskill - %oldskill if (%iskill = %newskill && %testchange = 1) gosub closecraftgump if %c > 60 { wait 3s gosub trash set %c 0 } } if #contkind <> %GUMP { gosub open_carp } goto loop ;**************************************************************************** sub closecraftgump if #contkind = %GUMP { if #contposx <> 0 && #contposy <> 0 contpos 0 0 click 122 480 } return sub item chooseSkill carpentry set %sk #skill set %selltypes PIE if #skill < 350 { ; bench set %x1 123 set %y1 170 set %x2 271 set %y2 170 set %itemt PIE set %boards 14 set %iskill 350 return } if #skill < 400 { ; large counters set %x1 123 set %y1 145 set %x2 271 set %y2 145 set %itemt UEE set %boards 25 set %iskill 400 return } if #skill < 450 { ; wood chairs set %x1 123 set %y1 170 set %x2 271 set %y2 196 set %itemt HFE set %boards 15 set %iskill 450 return } if #skill < 470 { ; writing table set %x1 123 set %y1 146 set %x2 271 set %y2 171 set %itemt BFE set %boards 15 set %iskill 470 return } if #skill < 480 { ; 47-48% open keg set %x1 123 set %y1 247 set %x2 271 set %y2 247 set %itemt JFK set %boards 14 set %iskill 480 return } if #skill < 500 { ; tambourine set %x1 123 set %y1 196 set %x2 271 set %y2 144 set %itemt LQF set %boards 15 set %iskill 500 return } if #skill < 510 { ; fancy chair set %x1 123 set %y1 173 set %x2 271 set %y2 220 set %itemt ZEE set %boards 17 set %iskill 510 return } if #skill < 520 { ; bookshelves set %x1 123 set %y1 221 set %x2 271 set %y2 120 set %itemt VCE set %boards 25 set %iskill 520 return } if #skill < 530 { ; tambourine set %x1 123 set %y1 196 set %x2 271 set %y2 170 set %itemt MQF set %boards 20 set %iskill 530 return } if #skill < 540 { ; dress form set %x1 123 set %y1 120 set %x2 271 set %y2 168 set %itemt ENF set %boards 16 set %iskill 540 return } if #skill < 550 { ; lap harp set %x1 123 set %y1 196 set %x2 271 set %y2 197 set %itemt QRF set %boards 20 set %iskill 550 return } if #skill < 560 { ; cherry style dresser set %x1 123 set %y1 220 set %x2 271 set %y2 170 set %itemt GZD set %boards 20 set %iskill 560 return } if #skill < 580 { ; cherry style dresser set %x1 123 set %y1 171 set %x2 271 set %y2 248 set %itemt RIE set %boards 20 set %iskill 580 return } if #skill < 600 { ; bardic tambourine set %x1 123 set %y1 196 set %x2 271 set %y2 221 set %itemt LQF set %boards 15 set %iskill 600 return } if #skill < 630 { ; fancy throne set %x1 123 set %y1 172 set %x2 271 set %y2 272 set %itemt DJE set %boards 30 set %iskill 630 return } if #skill < 680 { ;quarterd staffs set %x1 123 set %y1 120 set %x2 271 set %y2 223 set %itemt CQF set %boards 10 set %iskill 680 return } if #skill < 700 { ;gnarled saffs set %x1 123 set %y1 120 set %x2 271 set %y2 270 set %itemt PMH set %boards 16 set %iskill 700 return } if #skill < 750 { ;tassled tambourines set %x1 123 set %y1 196 set %x2 271 set %y2 345 set %itemt OQF set %boards 15 set %iskill 750 return } if #skill < 800 { ;tassled tambourines set %x1 123 set %y1 196 set %x2 271 set %y2 368 set %itemt NRF set %boards 35 set %iskill 800 return } if #skill < 850 { ;black staff set %x1 123 set %y1 120 set %x2 271 set %y2 295 set %itemt GFF set %boards 20 set %iskill 850 return } if #skill < 900 { ;water trough set %x1 123 set %y1 120 set %x2 271 set %y2 295 set %itemt TVH set %boards 160 set %iskill 900 return } if #skill < 950 { ;alcharian table set %x1 123 set %y1 147 set %x2 271 set %y2 320 set %itemt MTG set %boards 25 set %iskill 950 return } if #skill < 1000 { ;ceskaran table set %x1 123 set %y1 147 set %x2 271 set %y2 346 set %itemt KTG set %boards 25 set %iskill 1000 return } HALT return sub trash wait 3s if #contkind = %GUMP click 122 480 finditem %itemt C if #Findkind <> -1 { msg .trash$ set #lTargetID #FindID set #ltargetkind 1 target event macro 22 0 target finditem BKF G_4 if #Findkind <> -1 { set #lTargetID #FindID set #ltargetkind 1 set #ltargettile 0 set #lobjecttype BKF event macro 22 0 } } wait 2s return sub waitforgump set %bb #scnt alg1: if #contkind <> %GUMP { wait 1s set %test #scnt - %bb if %test > 20 { gosub open_carp wait 2s return } goto alg1 } return sub open_carp if #contkind = %GUMP { return } chooseSkill carpentry set %sk #skill if #skill < 850 || #skill > 900 { set %carptool AIG } else { set %carptool CGG } bc1: finditem %carptool C if #findkind <> -1 { key ESC set #lobjectid #findid set #lobjecttype #findtype set #ltargetid #findid nextCPos 0 0 event macro 17 0 wait 1s if #contposx <> 0 && #contposy <> 0 contpos 0 0 click %x1 %y1 wait 2s } if #contkind <> %GUMP { wait 1s goto bc1: } return sub eat set %eatable_items UWI_TWI_QQD_DWI finditem %eatable_items C if #Findkind <> -1 { set #lobjectID #FindID event macro 17 0 ; Done. You just eaten something } return sub worldXYZToScreenXY set %1 ( %1 - #charPosX ) * 22 set %2 ( #charPosY - %2 ) * 22 set %_cursorX #cliLeft + #cliXRes / 2 + %1 + %2 set %_cursorY #cliTop + #cliYRes / 2 + %1 - %2 - ( %3 - #charPosZ ) * 4 return Sub ResetJournal scanjournal 1 deletejournal return sub unload_reload gosub closecraftgump ; BACKPACK ID event macro 8 7 wait 20 contpos 592 367 set %charpid #contid ignoreItem reset unload_loopb: findItem TLK G_3 if #findkind <> -1 { if #findcol = 0 { event Drag #findid wait 20 set %need %boards * 60 if #findstack < %need { msg $ } else { msg %need msg $ } wait 1s click 400 253 wait 1s goto unload_end: } ignoreItem #findid goto unload_loopb: } unload_end: return sub waitjournal set %t #scnt xx: set %tt #scnt - %t if %tt > 30 { return } scanJournal 1 if %1 in #journal { set %i %i + 1 deleteJournal return } else { wait 2s goto xx } return