| Yoko http://forum.yoko.com.ua/ |
|
| BETEPAH HELP [Lumber] http://forum.yoko.com.ua/viewtopic.php?f=20&t=3113 |
Page 1 of 1 |
| Author: | difficultdispla [ 2005-02-15 20:10:27 ] |
| Post subject: | BETEPAH HELP [Lumber] |
Скажы плз куда надо вставить строчку uo.say("Bank") wait(100) чтоб он открыл банк и сложыл логи. [code] ################################################################################################### var f=file("C:\trees3.dat") ## - Ïóòü ê ôàéëó â êîòîðîì áóäóò õðàíèòñÿ êîîðäèíàòû äåðåâüåâ. ### var TryHiding=1 ## 1 - Ïåðåä òåì êàê ðóáèòü äåðåâî, áóäåò ïûòàòüñÿ óéòè â õàéä, 0 - íå áóäåò . ### var TryRecall=1 ## 1 - Ïîñëå òîãî êàê ñîáåðåò LogsQty ëîãîâ, áóäåò ïûòàòüñÿ ðåêîëèòüñÿ äîìîé, ### ñêëàäûâàòü ëîãè â ñóíäóê è ðåêîëèòüñÿ îáðàòíî , 0 - íå áóäåò. ### var RechargeBook=1 ## 1 - Âêëþ÷èòü ðå÷àðæ ðóíáóêè, 0 - îòêëþ÷èòü ðå÷àðæ. ### var RuneToHome=1 ## - Íîìåð ðóíû Äîìîé,ïî ñ÷¸òó â ðóíáóêå.(ñåé÷àñ â 9îì ñëîòå,ìîæíî ìåíÿòü îò 1-9) ### var RuneToLumber=9 ## - Íîìåð ðóíû â Ëåñ,ïî ñ÷¸òó â ðóíáóêå.(ñåé÷àñ â 1îì ñëîòå,ìîæíî ìåíÿòü îò 1-9) ### var LogsQty=600 ## - Êîëè÷åñòâî ëîãîâ, äîáûâ êîòîðîå íàäî ðåêîëèòüñÿ äîìîé. ### var GetFromFile=1 ## 1 - Êîîðäèíàòû äåðåâüåâ áóäóò ñ÷èòûâàòñÿ èç ôàéëà, 0 - ñîáèðàòñÿ èç êëèåíòà ### (ñíà÷àëà ñîáåðèòå à ïîòîì ñ÷èòûâàéòå èç ôàéëà). ### var AttackEnts=1 ## 1 - Âêëþ÷èòü ðåêîë ïî ðóíå(â ïàêå) ïðè àòàêå, 0 - îòêëþ÷èòü ðåêîë. ### var CastAtAttack=0 ## 1 - Âêëþ÷èòü êàñò - "Magic Arrow" íà íàïàâøåãî, 0 - îòêëþ÷èòü êàñò. ### var EatingFood=0 ## 1 - Áóäåì åñòü, 0 - íåò. ### var TypeFood='0x097B' ## - Òèï åäû êîòîðóþ áóäåì êóøàòü.(ñåé÷àñ ôèøòåéêè) ### var Reconnect=0 ## 1 - Âêëþ÷èòü ðåêîííåêò íà ñåðâåð åñëè âûêèíåò, 0 - îòêëþ÷èòü ðåêîííåêò. ### var RecallDrop=0 ## 1 - Âêëþ÷èòü ðåêîë ïîñëå ïîáåãà îò åíòà äîìîé è âûëîæèòü ëîãè, 0 -âûêëþ÷èòü. ### var RecallLumber=0 ## 1 - Âêëþ÷èòü ðåêîë â ëåñ ïîñëå óêàçàíèÿ îáüåêòîâ, 0 - âûêëþ÷èòü. ### var Chest='0x401BB7F9' ## - ID ñóíäóêà êóäà áóäóò âûãðóæàòüñÿ ëîãè, ãäå äîëæíû ëåæàòü ðåêîëû è åäà. ### var LumberSound=('C:\Warning.wav') ## - Çâóê êîòîðû áóäåò ïðèãðàí ïðè àòàêå.(çàìåíèòå íà ñâîé) ### var Trytodrop=1 ## áóäåì ïûòàòñÿ ïîäõîäèòü ê ñóíäóêó èëè íåò. ### var oldX,oldY,time ## - Äëÿ ðåêîëà. ### ################################################################################################### ### ### Ïîñëå íàñòðîéêè: ### Èäèòå â ëåñ â êîòîðîì âû õîòèòå ðóáèòü. ### Çàïóñòèòå cêðèïò Lumberjacking(), Èíæåêò ïîïðîñèò âàñ óêàçàòü Òîïîð ### (ïîÿâèòñÿ ïðèöåë, ïðèöåëîì íà òîïîð êîòîðûé âû ñ ñîáîé âçÿëè), ### çàòåì èíæåêò ïîïðîñèò âàñ óêàçàòü Ðóíáóê(ïîÿâèòñÿ ïðèöåë, ïðèöåëîì íà íåãî). ### Ïîñëå ýòîãî ÷àð ïîéäåò ïî êîîðäèíàòàì è áóäåò âûðóáàòü äåðåâüÿ. ########### ### Êîä ### ########### sub Lumberjacking() var i=0,j=0,k=0,r=0,q=0,ii,jj var TopX=324,TopY=65 dim TreeX[5000], TreeY[5000],TreeT[5000] dim TreeTile[29] var flag=0,treeCount=0,clicks=0,flag2=0 ######################## ### Ãðàôèêà äåðåâüåâ ### ######################## TreeTile[0]=3277 TreeTile[1]=3280 TreeTile[2]=3283 TreeTile[3]=3286 TreeTile[4]=3289 TreeTile[5]=3291 TreeTile[6]=3294 TreeTile[7]=3296 TreeTile[8]=3299 TreeTile[9]=3302 TreeTile[10]=3393 TreeTile[11]=3394 TreeTile[12]=3395 TreeTile[13]=3396 TreeTile[14]=3415 TreeTile[15]=3416 TreeTile[16]=3417 TreeTile[17]=3418 TreeTile[18]=3419 TreeTile[19]=3438 TreeTile[20]=3439 TreeTile[21]=3440 TreeTile[22]=3441 TreeTile[23]=3442 TreeTile[24]=3460 TreeTile[25]=3461 TreeTile[26]=3462 TreeTile[27]=3290 TreeTile[28]=3288 uo.Exec("filterspeech on") uo.Exec("filterspeech add 'Where do you want to use the pickaxe?'") uo.Print('Âûáåðè Òîïîð: ') uo.Exec('addobject Axe') while uo.Targeting() wait(100) wend if TryRecall==1 then uo.Print('Âûáåðè PóíÁóê: ') uo.Exec('addobject Runebook') while uo.Targeting() wait(100) wend end if if AttackEnts==1 then uo.Exec('exec AttackEnts') end if if Reconnect==1 then uo.Exec('exec Reconnect') end if if RecallLumber==1 then uo.Exec('exec RecallToLumber') wait(9000) end if ##################################### ### Çàãðóæàåì êîîðäèíàòû èç ôàéëà ### ##################################### if GetFromFile==1 then uo.Print('Çàãðóæàåì êîîðäèíàòû èç ôàéëà...') f.open() treeCount=safe call f.ReadNumber() for i=1 to treeCount TreeT[i]=safe call f.ReadNumber() TreeX[i]=safe call f.ReadNumber() TreeY[i]=safe call f.ReadNumber() next f.close() else ###################################### ### Ñîáèðàåì êîîðäèíàòû èç êëèåíòà ### ###################################### uo.Print('Âûáåðè Êèðêó: ') uo.Exec('addobject Pickaxe') while uo.Targeting() wait(100) wend uo.Print('Ñîáèðàåì êîîðäèíàòû äåðåâüåâ â îêðóãå...') repeat clicks=0 flag=0 uo.DeleteJournal() ####################### ### Êëèêàåì íà òàéë ### ####################### uo.UseObject('Pickaxe') waitForTarget() uo.DeleteJournal() WaitForTryRock() ############################### ### Ïðîâåðÿåì äåðåâî ëè ýòî ### ############################### flag=0 for k=0 to 28 if uo.LastTile(0)==TreeTile[k]+1 then flag=2 end if next if flag==0 then for k=0 to 28 if uo.LastTile(0)==TreeTile[k] then flag=1 end if next end if if uo.Lasttile(1)==uo.getX() and uo.Lasttile(2)==uo.gety() then flag=3 end if ######################### ### Êëèêíóëè íà ñòâîë ### ######################### if flag==1 then flag2=0 if treeCount>0 then for ii=1 to treeCount if TreeX[ii]==uo.LastTile(1) and TreeY[ii]==uo.LastTile(2) then flag2=1 end if next end if if flag2==0 then treeCount=treeCount+1 TreeX[treeCount]=uo.LastTile(1) TreeY[treeCount]=uo.LastTile(2) TreeT[treeCount]=uo.LastTile(0) uo.Print('Íàéäåíî äåðåâî '+str(treeCount)+' : x='+str(uo.Lasttile(1))+' y='+str(uo.LastTile(2))+' '+str(treeCount)) end if end if ########################## ### Êëèêíóëè ïî ëèñòâå ### ########################## if flag==2 then flag2=0 if treeCount>0 then for ii=1 to treeCount if TreeX[ii]==uo.LastTile(1) and TreeY[ii]==uo.LastTile(2) then flag2=1 end if next end if if flag2==0 then treeCount=treeCount+1 TreeX[treeCount]=uo.LastTile(1) TreeY[treeCount]=uo.LastTile(2) TreeT[treeCount]=uo.LastTile(0)-1 uo.print('Íàéäåíî äåðåâî '+str(treeCount)+' : x='+str(uo.Lasttile(1))+' y='+str(uo.LastTile(2))) end if end if until (Flag==3) or (treeCount==500) uo.Exec("filterspeech off") uo.Print('Àíàëèç çàêîí÷åí, êîîðäèíàòû äåðåâüåâ çàïèñàíû â ôàéë C:\trees3.dat') SaveToFile(treeCount,TreeX,TreeY,TreeT) end if uo.Print('Äåðåâüåâ íàéäåíî: '+str(treeCount)) wait(2000) ###################################### ### Õîäèì ïî ñîáðàííûì êîîðäèíàòàì ### ###################################### while 1==1 if treeCount>0 then for i=1 to treeCount if TryRecall==1 and uo.Count('ZLK')>=LogsQty then ToRecall() end if if Trytodrop==1 and uo.Count('ZLK')>=LogsQty then GotoXY(uo.getx(Chest),uo.gety(Chest)) DropLogs() end if uo.Print('Èäåì ê äåðåâó '+str(i)+': x='+str(TreeX[i])+' y='+str(TreeY[i])) InfoLogs() flag=GotoXY(TreeX[i],TreeY[i]) if flag==1 then if TryHiding==1 then ToHide() end if GetTree(str(TreeT[i]),str(TreeX[i]),str(TreeY[i]),str(uo.GetZ())) end if next end if wend end sub sub GetTree(Type,X,Y,Z) var i uo.Print('Íà÷èíàåì ðóáêó äåðåâà...') for i=0 to 15 if uo.Warmode()==1 then return 0 end if wait(200) uo.DeleteJournal() ### CheckLag() uo.WaitTargetTile(Type,X,Y,Z) uo.UseObject('Axe') if WaitForChange()==1 then return 1 end if next return 0 end sub sub ToRecall() RecallToHome() DropLogs() InfoLogs() if RechargeBook==1 then RechargeBook() wait(4000) end if if EatingFood==1 then EatingFood() end if wait(3000) RecallToLumber() end sub sub RecallToHome() uo.Print('Ïðûãàåì Äîìîé.') RunebookRecall(RuneToHome) end sub sub RecallToLumber() uo.Print('Ïðûãàåì â Ëåñ.') RunebookRecall(RuneToLumber) end sub sub ToHide() while not uo.Hidden() uo.Print('Ïûòàåìñÿ óéòè â õàéä...') uo.DeleteJournal() uo.UseSkill('Stealth') wait(6000) wend wait(100) end sub sub WaitForRecall() var Text1=uo.GetName()+": The spell fizzles." var mess='',lastX=uo.getX(),lastY=uo.getY() for var i=0 to 200 mess=uo.Journal(0) if uo.Journal(0)==Text1 then return 0 end if if uo.getX()<>lastX or uo.getY()<>LastY then return 1 end if wait(50) next return 0 end sub sub WaitForHide() var Text1=uo.GetName()+": You have hidden yourself well" var Text2=uo.GetName()+": You can't seem to hide here." var mess for var i=0 to 200 mess=uo.Journal(0) if uo.Journal(0)==Text1 then return 1 end if if uo.Journal(0)==Text2 then return 0 end if wait(50) next return 0 end sub sub WaitForChange() var Text1=uo.GetName()+': You hack at the tree for a while, but fail to produce any useable wood.' var Text2='There are no logs here to chop.' var Text3="You can't reach this." var Text4="That is too far away." var Text5="there is nothing there to chop" var mess for var i=0 to 200 mess=uo.Journal(0) if uo.Journal(0)==Text2 or uo.Journal(0)==Text3 or uo.Journal(0)==Text4 then return 1 end if if uo.Journal(0)==Text1 then return 0 end if if mess[0]=='Y' and mess[1]=='o' and mess[2]=='u' and mess[4]=='p' and mess[5]=='u' and mess[6]=='t' then return 0 end if wait(50) next return 0 end sub sub WaitForTryRock() var Text1="That is too far away." var Text2="Try mining in rock." var Text3="There is no ore here to mine." var Text4="You have no line of sight to that location" var Text5="You can't see the target" for var i=0 to 50 if uo.Journal(0)==Text1 or uo.Journal(0)==Text2 or uo.Journal(0)==Text3 or uo.Journal(0)==Text4 or uo.Journal(0)==Text5 then return 1 end if wait(200) next return 0 end sub sub WaitForTarget() for var i=0 to 50 if uo.Targeting()==1 then return 1 end if wait(200) next return 0 end sub sub WaitForChangeXY(myX,myY,lastX,lastY) for var i=1 to 50 if lastX<>myX or lastY<>myY then return 1 end if wait(200) next return 0 end sub sub GotoXY(x,y) var myX,myY,lastX=0,lastY=0,i,halt=0,z,r=0 for i=1 to 60 myX=uo.getX(); myY=uo.getY(); if LastX==myX and LastY==myY then halt=halt+1 else halt=0 end if if halt>=10 then if uo.GetDir()==1 then for z=0 to 8 uo.Press(40) next end if if uo.GetDir()==3 then for z=0 to 8 uo.Press(37) next end if if uo.GetDir()==5 then for z=0 to 8 uo.Press(3 next end if if uo.GetDir()==7 then for z=0 to 8 uo.Press(39) next end if halt=15 end if if Numb(x-myX)<=1 and Numb(y-myY)<=2 then return 1 end if if x<=myX then if y<=myY then for z=0 to 3 uo.Press(3 next else for z=0 to 3 uo.Press(37) next end if else if y<=myY then for z=0 to 3 uo.Press(39) next else for z=0 to 3 uo.Press(40) next end if end if lastX=myX lastY=myY wait(200) next return 0 end sub sub Numb(num) if num>=0 then return num else return num*(-1) end if end sub sub SaveToFile(treeCount,TreeX,TreeY,TreeT) var f=file("D:\trees3.dat") var s=0,i=0 f.open() f.create() s=safe call f.writeln(treeCount) for i=1 to treeCount s=safe call f.writeln(str(TreeT[i])+' '+str(TreeX[i])+' '+str(TreeY[i])) next f.close() end sub sub DropLogs() ToHide() if uo.Waiting() then uo.CancelTarget() end if var a,Exit dim Logs[1] Logs[0]=0x1BDD uo.Print('Âûêëàäûâàåì Ëîãè.') uo.SetReceivingContainer(Chest) wait(500) for a=0 to 0 Exit=0 repeat uo.FindType(Logs[a]) if uo.GetQuantity('finditem')>0 then uo.Grab('0','finditem') wait(1500) else Exit=1 end if until Exit==1 next uo.UnSetReceivingContainer(Chest) uo.Print('Ëîãè Âûëîæåíû.') end sub sub InfoLogs() uo.Print('Ó âàñ âñåãî '+str(uo.Count('0x1BDD'))+' ëîãîâ â ñóìêå') uo.Print('Èç íèõ '+str(uo.Count('0x1BDD','0x0000'))+' ïðîñòûõ è ' +str(uo.Count('0x1BDD')-uo.Count('0x1BDD','0x0000'))+' öâåòíûõ') end sub sub RunebookRecall(n) oldX=uo.getX() oldY=uo.getY() repeat uo.Exec('warmode 0') uo.UseObject('Runebook') wait(1000) uo.LClick(135, n*15+55) wait(500) uo.LClick(135, n*15+55) time=uo.Timer() repeat wait(500) until oldX<>uo.getX() or oldY<>uo.getY() or uo.Life==0 or uo.InJournal('needs') or time+200<uo.Timer() uo.DeleteJournal() until oldX<>uo.getX() or oldY<>uo.getY() end sub sub Open(Container) uo.DeleteJournal() uo.UseObject(Container) repeat wait(500) until uo.InJournal('Contains') end sub sub RechargeBook() ToRecharge() DropScrolls() end sub sub ToRecharge() uo.SetReceivingContainer('backpack') Open(Chest) uo.FindType('0x1F4C','-2',Chest) uo.Grab('50','finditem') wait(500) Checklag() uo.UseObject('Runebook') wait(1000) Checklag() uo.Lclick(296,91) wait(1000) uo.UnsetReceivingContainer() end sub sub DropScrolls() if uo.Waiting() then uo.CancelTarget() end if var s,Exit dim Scrolls[1] Scrolls[0]=0x1F4C uo.SetReceivingContainer(Chest) wait(500) for s=0 to 0 Exit=0 repeat uo.FindType(Scrolls[s]) if uo.GetQuantity('finditem')>0 then uo.Grab('0','finditem') wait(1500) else Exit=1 end if until Exit==1 next uo.UnSetReceivingContainer(Chest) end sub sub EatingFood() ToEat() DropFood() end sub sub ToEat() uo.SetReceivingContainer('backpack') Open(Chest) uo.FindType(TypeFood,'-1',Chest) uo.Grab('50','finditem') wait(500) repeat Checklag() uo.UseType(TypeFood) wait(1000) until uo.InJournal('You are simply too full to eat any more!') uo.UnsetReceivingContainer() end sub sub DropFood() if uo.Waiting() then uo.CancelTarget() end if var f,Exit dim Food[1] Food[0]=TypeFood uo.SetReceivingContainer(Chest) wait(500) for f=0 to 0 Exit=0 repeat uo.FindType(Food[f]) if uo.GetQuantity('finditem')>0 then uo.Grab('0','finditem') wait(1500) else Exit=1 end if until Exit==1 next uo.UnSetReceivingContainer(Chest) end sub sub AttackEnts() uo.DeleteJournal() var Enemy='0x00000000' repeat if uo.InJournal('is attacking you') or uo.InJournal('OOPS!!!') or uo.InJournal('Wis Quas') then uo.Exec('terminate Lumberjacking') Enemy=uo.JournalSerial(uo.InJournal('is attacking you')-1) ##uo.PlayWav(LumberSound) if CastAtAttack==1 then uo.Cast('Magic Arrow',Enemy) end if uo.DeleteJournal() RecallAtAttack() end if wait(1000) until false end sub sub RecallAtAttack() var mX,mY reccal: uo.DeleteJournal() if uo.Waiting() then uo.CancelTarget() end if mX=uo.getX("self") mY=uo.getY("self") uo.DeleteJournal() uo.FindType('0x1F14',-1,'mY') uo.Cast('Recall','finditem') uo.Print('Àòàêà! Ðåêîëèìñÿ!') wait(4000) if not uo.getX("self")<>mX and not uo.getY("self")<>mY then goto reccal end if if RecallDrop==1 then RecallToHome() DropLogs() InfoLogs() end if Terminate() end sub sub Reconnect() var ReconnectTime,rFlag ReconnectTime='0' rFlag=1 repeat while (uo.ObjAtLayer('Bpack')=='') if rFlag then ReconnectTime=MakeTime() rFlag=0 end if wait(20000) uo.Say('') wait(3000) uo.Say('') wait(3000) uo.Say('') wait(3000) uo.LDblClick(357,164) uo.LClick(616,459) wait(3000) wend wait(3000) if (rFlag==0) and (ReconnectTime<>'0') then uo.TextOpen() uo.TextPrint('Disconnected & Reconnected @ '+ReconnectTime) rFlag=1 ReconnectTime='0' end if until false end sub sub MakeTime() var d,t,ret,i ret=str(uo.Time()) t="" for i=0 to Len(ret) t=ret[Len(ret)-i]+t if (i==2) or (i==4) then t=":"+t end if next ret=str(uo.Date()) d="" for i=0 to Len(ret) d=ret[Len(ret)-i] + d if (i==2) or (i==4) then d="."+d end if next ret=t+" @ "+d return ret end sub sub Terminate() uo.Print('Âñå ôóíêöèè ñêðèïòà âûêëþ÷åíû!') uo.DeleteJournal() uo.Exec('terminate all') wait(100) uo.Exec('terminate all') wait(100) uo.Exec('terminate all') wait(100) end sub sub CheckLag() if uo.Waiting()>0 then uo.Exec('canceltarget') end if uo.DeleteJournal() uo.Click('backpack') repeat wait(50) until uo.InJournal('backpack') end sub [/code] |
|
| Author: | SAMURAI [ 2005-02-15 20:29:00 ] |
| Post subject: | |
sub DropLogs() Где-то рядом с этой строкой... |
|
| Author: | Striker [ 2005-02-18 17:51:07 ] |
| Post subject: | |
какой банк ты чо упал он по 500 стоунов носит за заход или больше даже |
|
| Author: | Porvalo [ 2005-02-20 14:10:19 ] |
| Post subject: | |
он прав про банк забудь туда ниче не влезет в дом складывай |
|
| Author: | BETEPAH [ 2005-02-22 09:21:02 ] |
| Post subject: | |
Не соглашусь с вами. Например на Антаресе в банке 1кк веса влезает. Так что Иногда банк это выход. |
|
| Author: | difficultdispla [ 2005-04-24 17:22:03 ] |
| Post subject: | |
| Author: | Destruction [ 2005-04-24 19:37:56 ] |
| Post subject: | |
Я мало где играл, но в основном, есть фича - есть класть в банк логи на логи, инги на инги итд и тп, то весь может значительно превышать максимальный. |
|
| Page 1 of 1 | All times are UTC+02:00 |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|