boshi Posted November 19, 2008 Share Posted November 19, 2008 Here is the script my make:expandcollapse popupWinWaitActive ( "The Game War", "" ) Hotkeyset ( "{END}", "exit1") WinMove ( "The Game War", "", 1, 1 ) Opt("MouseClickDelay", 100 ) Opt("MouseClickDownDelay", 30 ) $battle = 0 $disiple = PixelSearch ( 0, 0, 400, 600, 0x684028 ) while 1 = 1 If PixelGetColor ( 763, 45 ) = 0xF06810 then strafe() If PixelGetColor ( 436,526 ) = 0x200000 then attack() If $battle = 5 then getquest() wend Func strafe() MouseClick ( "left", 492, 384, 1, 0 ) MouseClick ( "left", 492, 300, 1, 0 ) EndFunc;==> strafe Func attack() MouseClick ( "left", 640, 500, 1, 0 ) MouseClick ( "left", 640, 560, 1, 0 ) $battle = $battle + 1 EndFunc;==> attack Func getquest() MouseClick ( "left", $disiple[0], $disiple[1], 1, 0 ) Sleep ( 100 ) MouseClick ( "left", 300, 300, 1, 0 ); cancel quest Sleep ( 100 ) MouseClick ( "left", $disiple[0], $disiple[1], 1, 0 ) Sleep ( 100 ) MouseClick ( "left", 300, 300, 1, 0 ); skip Sleep ( 100 ) MouseClick ( "left", 300, 280, 1, 0 ); get quest Sleep ( 100 ) MouseClick ( "left", 300, 300, 1, 0 ); skip EndFunc;==> getquest func exit1() Exit (0) endfunc;==> exit1What the script do?The script basically use to hunt the item. But, the problem is everytime I get the item I need to get the quest again by talking to the npc nearby. Chances to get the item probably after 5 battle. So after 5 battle will surely get the item and the quest should be renew.The function strafe is use to make the character move at one corner near the npc The function attack is when the character enter battle mode scene will click on auto attack.The function getquest happen after 5 battle count. means that after 5 times enter the battle mode, the quest will be renew.The problem is after strafe around I need to search for the npc color to click on it and get new quest.Can u help me?The only thing that work is that the character move around and battle but no renew of quest Link to comment Share on other sites More sharing options...
Fend Posted November 19, 2008 Share Posted November 19, 2008 (edited) I am not seeing where you are calling attack and strafe in your main loop...possibly you want If $battle = 5 then getquest() Else (fight() or strafe() or whatever you want) I had some problems when writing a bot using $battle = $battle + 1 You might want to try $battle +=1. You can test the value everytime it enters into attack by using a tooltip(check the function section) to make sure that your $battle is properly counting up. Sometimes when windos pop up in games the mouseclick function doesnt work for me, I usually substitue it for Controlclick in situations like that. Hopefully this helps. Edited November 19, 2008 by Fend I like cookies? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now