boshi Posted November 25, 2008 Share Posted November 25, 2008 Let me introduce to my script first. This script is use to harvest sword of the star for the game Mythwar II by fighting mobs. The drop rate is 1 mokka every 3-5battle. But the difficulties is I have to cancel the quest and get the quest back in order to harvest the item until I got full inventories. So I create a funtion that will renew the quest after 5 battle. But the problem is the counter reach 5 while it is still in first battle because the script loops in there. any1 can help me? expandcollapse popupWinWaitActive ( "Myth War", "" ) Hotkeyset ( "{END}", "exit1") WinMove ( "Myth War", "", 1, 1 ) Opt("MouseClickDelay", 100 ) Opt("MouseClickDownDelay", 30 ) $battle = 0 $disiple = PixelSearch ( 0, 0, 400, 600, 0x684028, 2 ) While 1 If $battle = 2 then 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 Else strafe() EndIf WEnd Func strafe() If PixelGetColor ( 569, 498 ) = 0xF03800 then MouseClick ( "left", 640, 500, 1, 0 ) MouseClick ( "left", 640, 560, 1, 0 ) $battle = $battle + 1 ToolTip ( $battle, 0, 0 ) Sleep ( 15000 ) Else MouseClickDrag ( "left", 492, 384, 492, 300, 0 ) EndIf EndFunc;==> strafe func exit1() Exit (0) endfunc;==> exit1Also I need help how to character Samsung would stop and search for the NPC (non playing character) to renew the quest by searching the pixel of disciple in the screenshot attach. The character Samsung will move around the bush and the coordinate of the npc will also need to be determine everytime when I need to renew the quest. 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