Jump to content

Really weird. Help.


Recommended Posts

Hello, i am new at this.

I have just started at making my first bot for a game called Rose Online.

This is a Hp/Mp/Skill Bot.

RunWait(@ComSpec & ' /C C:\Program Files\Triggersoft\Rose Online\ROSEonline.exe')
    WinActivate ("RoseOnline") 
     sleep (200)
        $Counter = 0
If PixelGetColor(78, 40) = (0xffffff) Then
GUICtrlCreateInput("Please input shotcut for hp item/skill{}", 105, 255, 130)
        sleep (3000)
Else 
If NOT $Counter = 0 Then
Exit
EndIf
Endif
$Counter = 0
If PixelGetColor(69, 57) = (0xffffff) Then
GUICtrlCreateInput("Please input shotcut for mp item/skill{}", 105, 255, 130)
        sleep (2500)
Else 
If NOT $Counter = 0 Then
Exit
EndIf
Endif
$Counter = 0
If PixelGetColor(78, 40) = (0xffffff) Then
GUICtrlCreateInput("Please input shotcut for attack skill{}", 105, 255, 130)
        sleep (4000)
Else 
If NOT $Counter = 0 Then
Exit 
EndIf
        Endif 
Exit

I was wondering was GUICtrlCreateInput("Please input shotcut for attack skill{}", 105, 255, 130) the right code to make a box screen where you can input a Hotkey?

If it is not could you plz help me fix it.

Oh and why does it close right after it goes into Rose Online?

other bots i have used for it work fine.

This is my first ever auto it program so bear with me.

Thanks. ;-)

REALLY THANKS.

Edited by Scorekeeper
Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

Hmm this is only a part of your script, but from what i see it looks good..

I think the reason for your script is exiting when the file is being executed is your "exit" command at the bottom. But is hard to tell witchout the full script..

Link to comment
Share on other sites

here is what i have got

WinActivate ("RoseOnline") 
While 1
$Counter = 0
GUICtrlCreateInput("Please input shotcut for hp item/skill{}", 105, 255, 130)
If PixelGetColor(78, 40) = (0xffffff) Then
        sleep (3000)
         Exit
         EndIf
$Counter = 0
GUICtrlCreateInput("Please input shotcut for mp item/skill{}", 105, 255, 130)
If PixelGetColor(69, 57) = (0xffffff) Then
        sleep (2500)
        Exit
        EndIf
$Counter = 0
GUICtrlCreateInput("Please input shotcut ifor attack skill{}", 105, 255, 130)
If PixelGetColor(78, 40) = (0xffffff) Then
        sleep (4000)
        Exit    
        EndIf
        Sleep(500)
        Wend

If there is something worng will you plz help to complete it.

As this is is far as i can go because i have just got and learned autoit today.

I would really apreciate it id you could help me.

Thanks.

The main question is will the bot run forever until i stop it.

Also any of you changes i would love to hear about but also learn about how you people do it.

Thanks

P.S I WOULD LOVE it if you could make a boxes appear for each of them so i can have multiple hotkey selections.

The bot is not fully functional untill i do this. Really if you can do this THANKS because i can't.

Something like.....

Please input shotcut for hp item/skill.

{F?} in a withe box .. so it can be edited.

Edited by Scorekeeper
Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

Look at HotKeySet() in the help file. Also look at this...

http://www.autoitscript.com/forum/index.ph...opic=7734&st=15

That topic is about localizing hotkey to a GUI window, the code shown in the above link is a function created that will localize a hotkey to a specific window. I show you this because above you said about hotkeys and using the F? Keys, which in most cases is already taken up by another program or windows and would cause things to happen which you don't want. Use the above code to make it so that the hotkey's you assign are only used while "RoseOnline" is active.

As with the...

P.S I WOULD LOVE it if you could make a boxes appear for each of them so i can have multiple hotkey selections.

Simple use something like this...

HotKeySet(GUICtrlRead($inputbox), "MyFunc")

Ofcourse reading the input box like that would have its limitations. When you want to add a hotkey it will have to be in the format of how it is used in the help file, so you just cant type something like "Shift Alt D" and expect to work, you would have to type "+!d", or you could convert the words to there appropriate operators, eg Shift = "+", Alt = "!".

Hope that helps, sorry if it sounds a bit confusing or advanced as its only your 1st/2nd day of AutoIt :(.

Edited by Burrup

qq

Link to comment
Share on other sites

I was wondering could you please help me....

I understood what you where saying a bit then i never when i went to the link.

I also use the code

HotKeySet(GUICtrlRead($inputbox), "MyFunc")

But get errors.

I was wondering could anyone plz help me finish this POSSIBLY help with writing the script.

I know its simple to you but it could hepl me out a lot.

Thanks.

:">

OH and sorry for the double post.

Could i also ask does anyone have a program to un exe or turn a exe auto it program into au3.

Plz and thanks.

Edited by Scorekeeper
Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

Can't think atm to help you but AutoIt comes with a decompiler. Anything writted and then compiled to an EXE with AutoIt can then be decompiled so you can view its code. Provided that it doesn't have a 'Pass Phrase'. When you compile an AutoIt code it asks you if you would like to include a 'Pass Phrase', this is a essentially a password for your script, so that you can prevent some from 'stealing' your source code or for other reason of not wanting to have some one see it. Most compiled EXE's however will not have a 'Pass Phrase' and oyu can view it as you wish :(.

qq

Link to comment
Share on other sites

Could you plz tell me where the decompiler is thanks.

i cant see it.

I FOUND IT, ITS OK.

But still need help writing the script.

Also is there any way to get past the passphrase because i could use a part of the script that this person made because it is able to do what i want but i don't know who made it. I know its not the smatest thing to say but i am really dying to finish this.

Could any of you AutoITers plz complete my script, i'm a newb so sew me.

I am sitting here baffled at trying to do this. I'm only a kid.

PLZZZZZ. :(

Edited by Scorekeeper
Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

Also is there any way to get past the passphrase.

From Burrup's post:
... can then be decompiled so you can view its code. Provided that it doesn't have a 'Pass Phrase'. When you compile an AutoIt code it asks you if you would like to include a 'Pass Phrase', this is a essentially a password for your script, so that you can prevent some from 'stealing' your source code or for other reason of not wanting to have some one see it
.
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

I really need someone to help me finish my script

WinActivate ("RoseOnline") 
While 1
$Counter = 0
GUICtrlCreateInput("Please input shotcut for hp item/skill{}", 105, 255, 130)
If PixelGetColor(78, 40) = (0xffffff) Then
        sleep (3000)
         Exit
         EndIf
$Counter = 0
GUICtrlCreateInput("Please input shotcut for mp item/skill{}", 105, 255, 130)
If PixelGetColor(69, 57) = (0xffffff) Then
        sleep (2500)
        Exit
        EndIf
$Counter = 0
GUICtrlCreateInput("Please input shotcut ifor attack skill{}", 105, 255, 130)
If PixelGetColor(78, 40) = (0xffffff) Then
        sleep (4000)
        Exit    
        EndIf
        Sleep(500)
        Wend

I can not make boxes appear for you to to input a f2,f3,f4 command(But i know it can be done).

Plz help me finish the bot.

PLZZZZZ.

It is too hard for me.

Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

I really need someone to help me finish my script

I can not make boxes appear for you to to input a f2,f3,f4 command(But i know it can be done).

Plz help me finish the bot.

PLZZZZZ.

It is too hard for me.

<{POST_SNAPBACK}>

WinActivate ("RoseOnline")
While 1
$Counter = 0
GUICtrlCreateInput("Please input shotcut for hp item/skill{}", 105, 255, 130)
If PixelGetColor(78, 40) = (0xffffff) Then
        sleep (3000)
         Exit
         EndIf

Well, I'd suggest looking at your syntax. Why do you have an EXIT command after every IF statement? That will only cause your program to stop and ... well ... Exit. If it's in a loop, and you want it to break out of the loop, try EXITLOOP.

As your code stands right now, it's going to do everything up to the first EXIT before stopping.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

What i really need help with is

GUICtrlCreateInput("Please input shotcut for hp item/skill{}", 105, 255, 130)

Because a box will not appear, the bot is suposed to detect if the pixel goe black then heal me/mp me/skill me.....

but i can make a box where you can input F1,f2 ETC.

Thanks

Here is the code now

WinActivate ("RoseOnline") 
While 1
$Counter = 99999999999999999999999
GUICtrlCreateInput("Please input shotcut for hp item/skill{}", 105, 255, 130)
If PixelGetColor(113,43) = (0xffffff) Then
        sleep (3000)
         ExitLoop
         EndIf
$Counter = 0
GUICtrlCreateInput("Please input shotcut for mp item/skill{}", 105, 255, 130)
If PixelGetColor(109,58) = (0xffffff) Then
        sleep (2500)
        ExitLoop
        EndIf
$Counter = 0
GUICtrlCreateInput("Please input shotcut ifor attack skill{}", 105, 255, 130)
If PixelGetColor(113,43) = (0xffffff) Then
        sleep (4000)
        ExitLoop    
        EndIf
        Sleep(500)
    Wend
Edited by Scorekeeper
Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

I THINK i have done it here is my code.

I still can not make boxes where you insert your command if you could tell me it would help.

One problem it looks fine to be but doesn't heal......

Just wondering see PixelGetColor what one is right ... 0xACA899 or hex version 838651????

something isnt right.

WinActivate ("RoseOnline") 
HotKeySet ( "{f2}" ,"hitpoints")
HotKeySet("{ESC}", "End")
For $i = 1 to 2
if $i = 3 then exitloop
$i=1
Next

Func hitpoints()
$i=3
If PixelGetColor(91,43) = (0xACA899) Then
        sleep (3000)
    EndIf
    EndFunc

HotKeySet ( "{f3}" ,"magicpoints")
$X=0
Do
Sleep(100)
Until $X=1

Func magicpoints()
If PixelGetColor(88,56) = (0xACA899) Then
        sleep (2500)
    EndIf
EndFunc


HotKeySet ( "{f4}" ,"skillone")
For $i = 1 to 2
if $i = 3 then exitloop
$i=1
Next

Func skillone()
$i=3
If PixelGetColor(91,43) = (0xACA899) Then
        sleep (3000)
    EndIf
    EndFunc

HotKeySet ( "{f5}" ,"skilltwo")
$X=0
Do
Sleep(100)
Until $X=1

Func skilltwo()
If PixelGetColor(70,42) = (0xACA899) Then
        sleep (2500)
    EndIf
    EndFunc

Func End()
    Exit
EndFunc
Edited by Scorekeeper
Fou-Lu - Bof4 "...Wouldst thou fight a god?"
Link to comment
Share on other sites

You have it mixed around ... Hex = 0xACA899... Decimal = 838651

With PixelGetColor() the decimal value is returned.

<{POST_SNAPBACK}>

Should not matter. But it appears one of your numbers is wrong...

If 0xACA899 = 838651 Then MsgBox(0,'','Prints if the values are identical!')

I know this works:

If 0xF7FBFF = 16251903 Then MsgBox(0,'','I know this will print')

You can compare decimal or hex agains PixelGetColor. The representation doesn't matter. If I want the color black, I can say 0, 0x0, 0x000000, or even 0.00 because they all represent zero.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...