HO questo script e' possibile modificarlo in modo che tiri su piu' velocemente gli oggetti???
E' possibile togliere anche le tre locazioni di partenza??
Ho gia provato quello di razior ma a volte si blocca ...
E' possibile togliere anche le tre locazioni di partenza??
Ho gia provato quello di razior ma a volte si blocca ...
codice:
set %badmove 0 set %startx #charposx set %starty #charposy ; =========| BACKPACK |========= ; IDENTIFY CHARACTER BACKPACK Menu Clear Menu HideEUO Menu Window size 200 65 Menu Font Name tahoma Menu Window Title Encompas by Cedryk Menu Text 1 55 5 Double-Click on Menu Text 2 40 25 Your Backpack Now. Menu Show BackpackLoop: if #lobjecttype <> ZJF GOTO BackpackLoop Set %Character_backpack_ID #lobjectid Menu Hide ; =========| WAYPOINTS |========= ; 3 CHARACTER POSITIONS RECORDED ; TO BE USED AS CYCLIC HOMING POINTS ; WHEN NO REGS ARE FOUND IN A LARGE ; RADIUS. THESE ARE CENTER POINTS OF ; REG SEARCH RADIUS. SET THEM ; ACCORDINGLY ; SET WAYPOINT 1 Menu Clear Menu HideEUO Menu Window size 200 65 Menu Font Name tahoma Menu Window Title Reg AutoBot by Cedryk Menu Text 1 55 5 Go to WAYPOINT: 1 Menu Button 1 20 25 160 22 I'm There! Menu Show WAYPOINT1Loop: if #menubutton <> 1 GOTO WAYPOINT1Loop set %waypointx1 #charposx set %waypointy1 #charposy ; SET WAYPOINT 2 Menu Clear Menu HideEUO Menu Window size 200 65 Menu Font Name tahoma Menu Text 1 55 5 Go to WAYPOINT: 2 Menu Button 2 20 25 160 22 I'm There! Menu Show WAYPOINT2Loop: if #menubutton <> 2 GOTO WAYPOINT2Loop set %waypointx2 #charposx set %waypointy2 #charposy ; SET WAYPOINT 3 Menu Clear Menu HideEUO Menu Window size 200 65 Menu Font Name tahoma Menu Text 1 55 5 Go to WAYPOINT: 3 Menu Button 3 20 25 160 22 I'm There! Menu Show WAYPOINT3Loop: if #menubutton <> 3 GOTO WAYPOINT3Loop set %waypointx3 #charposx set %waypointy3 #charposy Menu clear Menu Text 1 20 5 Initializing... set %timeOut 2 set %lastmove a set %lastOOS X set %waypoint 3 set %wayseq -1 initEvents loop: Menu Delete 1 Menu Text 1 20 5 Looking for Items... findItem SZF_RZF_JZF_WZF_KZF_MZF_JUF_KUF_RWF_LNK_CPE_FPE_HPE_IPE_NFF_POF G_2 gosub TestItem #findkind if %valid = 1 { Menu Delete 1 Menu Text 1 20 5 Grabbing Item! if #findType in CPE_FPE_HPE_IPE { set #lObjectID #findID event Macro 17 0 ignoreitem reset ; set %lastOOS X } else { event Drag #findID if #findStack > 1 { set %__sCnt #sCnt waitCont: if #sCnt - %__sCnt > %timeOut goto loop if #contID <> #findID goto waitCont msg $ } set %__sCnt #sCnt waitDrag: set %lastOOS #findID if #sCnt - %__sCnt > %timeOut goto scanarray if #lLiftedID <> #findID goto waitDrag findItem %character_Backpack_Id set #findMod 139_217 wait 10 click #findX #findY p } scanjournal 1 if THAT_IS_OUT_OF_SIGHT in #journal { ignoreitem %lastOOS goto scanarray } wait 1s set %lastpos a set %badmove 0 ignoreitem reset set %lastOOS X goto loop } ; nothing around, move on to next scanarray: Menu Delete 1 Menu Text 1 20 5 Locating Items... set %mindist 10000 set %md_item X ; scan array of items findItem SZF_RZF_JZF_WZF_KZF_MZF_JUF_KUF_RWF_LNK_CPE_FPE_HPE_IPE_NFF_POF set %itemsfound #findcnt for %itm 1 %itemsfound { findItem SZF_RZF_JZF_WZF_KZF_MZF_JUF_KUF_RWF_LNK_CPE_FPE_HPE_IPE_NFF_POF %itm gosub TestItem #findkind if %valid = 1 { if %mindist > #finddist { if %lastOOS <> #findid { set %mindist #finddist set %md_item #findid } } } } if %md_item <> X { set %movecnt 0 findItem %md_item if #itemid = X goto loop MoveLoop: Menu Delete 1 Menu Text 1 20 5 Moving to Item... set %movex #findx set %movey #findy set %lastpos #charposx , #charposy Move %movex %movey 1 2s set %thispos #charposx , #charposy if %thispos = %lastpos { gosub rerout %movex %movey set %movecnt %movecnt + if %movecnt > 7 goto NextItem if %thispos = %lastpos goto NextItem set %badmove 0 } finditem %md_item if #finddist > 2 { set %movecnt %movecnt + if %movecnt > 5 { NextItem: Menu Delete 1 Menu Text 1 20 5 Moving on to Next Item... wait 10 set %badmove %badmove + ignoreitem %md_item set %badmove 0 goto scanarray } goto MoveLoop } } if %md_item = X goto GoWaypoint if %badmove > 3 { gosub rerout %movex %movey if %thispos = %lastpos { ; go to waypoin GoWaypoint: set %badmove 0 for %cnt 1 15 { Menu Delete 1 Menu Text 1 20 5 Moving to Waypoint: %waypoint set %lastpos #charposx , #charposy set %movex %waypointx . %waypoint set %movey %waypointy . %waypoint move %movex %movey 0 2s set %thispos #charposx , #charposy findItem SZF_RZF_JZF_WZF_KZF_MZF_JUF_KUF_RWF_LNK_CPE_FPE_HPE_IPE_NFF_POF G_30 if %badmove > 3 goto NextWaypoint ; watch for items along the way if #findcnt > 0 { Menu Delete 1 Menu Text 1 20 5 Item Found en rout! wait 10 goto loop } if %lastpos = %thispos { if %cnt = 1 goto NextWaypoint set %startx %waypointx . %waypoint set %starty %waypointy . %waypoint set %lastpos %startx , %starty if %lastpos <> %thispos ; not at waypoint { gosub Rerout %movex %movey set %badmove %badmove + } } } NextWaypoint: set %badmove 0 set %waypoint %waypoint + %wayseq if %waypoint > 3 { set %wayseq -1 set %waypoint 2 } if %waypoint < 1 { set %wayseq 1 set %waypoint 2 } } } goto loop sub Rerout Menu Delete 1 Menu Text 1 20 5 Rerouting... set %badmove 0 ; rout around rerout: set %destx %1 set %desty %2 set %movex #charposx set %movey #charposy set %startdir #chardir set %beginpos %movex , %movey ; back out backout: set %moved 0 set %movedir %startdir - 4 if %movedir < 0 set %movedir %movedir + 8 for %try 0 7 { ; char is heading towards destination ; build motion deltas set %dx 0 set %dy 0 if %movedir in 7_0_1 set %dy -1 if %movedir in 3_4_5 set %dy 1 if %movedir in 4_5_6 set %dx -1 if %movedir in 1_2_3 set %dx 1 set %lastpos #charposx , #charposy set %movex %movex + %dx set %movey %movey + %dy move %movex %movey 0 1s set %thispos #charposx , #charposy if %thispos = %lastpos { set %movedir + if %movedir > 7 set %movedir 0 } if %thispos <> %lastpos { set %moved %moved + goto donebackout } } donebackout: ; move perpendicular if %thispos <> %lastpos { set %movedir %startdir - 2 if %movedir < 0 set %movedir %movedir + 8 for %try 0 7 { set %dx 0 set %dy 0 if %movedir in 7_0_1 set %dy -1 if %movedir in 3_4_5 set %dy 1 if %movedir in 4_5_6 set %dx -1 if %movedir in 1_2_3 set %dx 1 set %lastpos #charposx , #charposy set %movex %movex + %dx set %movey %movey + %dy move %movex %movey 0 1s set %thispos #charposx , #charposy if %thispos = %lastpos { set %movedir %movedir - if %movedir < 0 set %movedir %movedir + 8 } if %thispos <> %lastpos { set %moved %moved + goto doneperprout } } } doneperprout: ; move in original direction if %thispos <> %lastpos { set %movedir %startdir - 1 if %movedir < 0 set %movedir 7 set %startpos #charposx , #charposy set %dx 0 set %dy 0 if %movedir in 7_0_1 set %dy -1 if %movedir in 3_4_5 set %dy 1 if %movedir in 4_5_6 set %dx -1 if %movedir in 1_2_3 set %dx 1 for %try 1 %moved { set %movex %movex + %dx set %movey %movey + %dy move %movex %movey 0 1s } set %stoppos #charposx , #charposy if %startpos = %stoppos goto backout } set %endpos #charposx , #charposy set %lastpos %beginpos set %thispos %endpos return sub TestItem ; test the validity of an item set %valid %1 set %cpx #charposx set %cpy #charposy
Commenta