nadayou
New Member
Enter your message here...
Posts: 12
|
Post by nadayou on Jun 17, 2020 6:22:08 GMT
I need help to correct my script simple before i put my bot.. here example script
Walk time by wait()
A to B take wait 4sec B to C 4sec C to D 1.5sec D to C 1.5sec C or D to A or B 4sec
Since i use random
B to A no problem took 4 sec A to D no problem took 4sec D to A or B 1.5sec my problem is here why cannot set back 4sec?
My code smple here
ore1 = Location (25,18) -- a face <-- ore2 = Location (38,46) -- b face <-- ore3 = Location (29,74) -- c face <-- ore4 = Location (36,82) -- d face <-- ore5 = Location (36,82) -- future update ors = {ore1,ore2,ore3,ore4}
ordm = 0 rnd = 0 function dlmcvemin() ordm = math.random(1,4) if rnd == ordm then click(myclick) else witadju() rnd = ordm mpp = mapreg:exists(mp3,0) if mpp then click(Location (mpp:getX()+ors[ordm]:getX(),mpp:getY()+ors[ordm]:getY())) wait(wit) -- <-------adjust wait after walk then actionclick click(myclik) end -- end if mpp end -- end if rnd end
wit = 4 function witadju() if rnd == 3 then wit = 1.5 elseif rnd == 4 then wit = 1.5 else wit = 4 end --end rnd end
aa = 1 while true do dlmcvemin() aa = aa + 1 if aa > 4 then aa = 1 end end
|
|