NosTplayeR Posted September 2, 2008 Posted September 2, 2008 hi first of all id like to ask how if you can help me i have a script that was copied in the other forum but the script need to be edited to use the loot and rest functionhere's the scriptHotKeySet("{Home}","start")Hotkeyset("{END}","stop")Hotkeyset("{PAUSE}","Pause")Global $PausedGlobal $Waitif Not WinExists("Nostale") then MsgBox(64, "NosBot", "You must be running Nostale") ExitEndIfMsgBox(64, "NosBot", "To Start the Bot Press the Home Key, and to stop press the End Key, and to pause Press the Pause key")Wait()Func start()WinActivate ( 'Nostale' )Sleep(500)while 1 If PixelGetColor(280, 175) = 0xE0B200 Then Rest() ElseTarget()loot() <--i just added this so (but if u have suggestion how can i func the loot tell me)EndIfWEndEndFuncFunc Target() Send("{Space}") Sleep(250) Send("{Space}") Sleep(500)EndFuncFunc loot() Send("`") Sleep(500)EndFuncFunc Rest() Send("t") <---- i dont know why it press like a million times lolEndFuncFunc Pause() $Paused = NOT $PausedWhile $Paused ToolTip("NosBot: Paused ", 2, 0) Sleep (400)WEndEndFuncFunc Wait() $Wait = NOT $WaitWhile $Wait ToolTip("NosBot: Press the HOME key to start, Press the END key to Terminate ", 2, 0) Sleep (400)WEndEndFuncFunc stop() ToolTip("NosBot: Shutting Down ", 2, 0) MsgBox(64, "NosBot", "whatever")ExitEndFunchow can you press a key once? for example send("t") "but it just press once not a million times-.-"if anyone playing this game can help me? or any suggestions?
Andreik Posted September 2, 2008 Posted September 2, 2008 (edited) This line is wrong. If PixelGetColor(280, 175) = 0xE0B200 Then PixelGetColor returns decimal value of pixel's color and you tried to compare to a hex value. So, try this: If "0x" & Hex(PixelGetColor(280, 175),6) = 0xE0B200 Then Edited September 2, 2008 by Andreik
Moderators SmOke_N Posted September 2, 2008 Moderators Posted September 2, 2008 This line is wrong. If PixelGetColor(280, 175) = 0xE0B200 Then PixelGetColor returns decimal value of pixel's color and you tried to compare to a hex value. So, try this: If "0x" & Hex(PixelGetColor(280, 175),6) = 0xE0B200 Then You're telling him to compare a string to an unsigned integer. If (PixelGetColor(280, 175) == 0xE0B200) Then Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Andreik Posted September 2, 2008 Posted September 2, 2008 You're telling him to compare a string to an unsigned integer. If (PixelGetColor(280, 175) == 0xE0B200) Then Maybe your exemple is more better but if you try you`ll see that my example run correctly.
Moderators SmOke_N Posted September 2, 2008 Moderators Posted September 2, 2008 Maybe your exemple is more better but if you try you`ll see that my example run correctly.It's not a matter of getting the desired result, it's a matter of doing it correctly to begin with. Comparing two different data types is not a "correct" method for a boolean return without casting them to the same type of data type. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
RZLucian0127 Posted June 23, 2009 Posted June 23, 2009 (edited) uhm... i have a few suggestions..first before u begin in While line while handling the Nostale window, put send('!1'). because you will get a bug in PixelGetColor() Function for sure.bugs:can't detect minHP, maxHP, minMP, maxMPExample:; Default Setting of your Desktop Resolutions. ("!2") Next Screen Resolutions ; if Default is 800x600, and your bot is set to 1024x768, then send ('!2'). because ('!1') is 800x600. ; Hehehe thats all for my suggestion ^__^ i got my own bot in Nostale so i share some tips :) ; i got 1 bug in my bot when the target arrow is set to player.. it will follow the player whenever the player goes T__T. $ScreenSet = False While 1 WinWaitActive($WinOfNosTale) If Not $ScreenSet Then Send ("!1") EndIf WEnd Edited June 23, 2009 by RZLucian0127
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