Sign in to follow this  
Followers 0
Harmonful

Help to make a bot

9 posts in this topic

Hi there

i want to make a tibia bot...

but i want That when they send me a mensage in tibia sounds an alarm and the char walk to a position i have this:

HotKeySet("{+}", "mana") 
 While 1     Sleep(100) WEnd   
Func    mana ()     
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F8}")    
Sleep (2000)    SoundPlay ( "beep-02.wav" ) 
EndFunc

This script just make that tbe char get mana and say n spell

Also i want that the script repeats himself

thx for ur time

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

What I did was that I made it into a func, and then called the func at the end of the script like this:

HotKeySet("{+}", "mana") 
 While 1     Sleep(100) WEnd   
Func    mana ()     
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F8}")    
Sleep (2000)    SoundPlay ( "beep-02.wav" ) 
EndFunc
mana ()

That will work?

Edited by miketh2005

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

What I did was that I made it into a func, and then called the func at the end of the script like this:

HotKeySet("{+}", "mana") 
 While 1     Sleep(100) WEnd   
Func    mana ()     
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F8}")    
Sleep (2000)    SoundPlay ( "beep-02.wav" ) 
EndFunc
mana ()

That will work?

This is the last time you get a warning: Stop spamming this forum with the same question and stick to your own thread.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

This is the last time you get a warning: Stop spamming this forum with the same question and stick to your own thread.

Jos

What are you talking about, dude, you need to stop being mod happy, if you had read his question and tried to help him, you would see that that was his code, not mine. I was trying to help him.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

What are you talking about, dude, you need to stop being mod happy, if you had read his question and tried to help him, you would see that that was his code, not mine. I was trying to help him.

The last time I checked I wasn't your buddy...

I can see now you are indeed helping the OP, have fun.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The last time I checked I wasn't your buddy...

What does that mean? You don't even want to admit when your wrong. This is the 2nd time now you thought wrongly of me. You are too pre-judgmental. Don't judge a book by its cover.

Share this post


Link to post
Share on other sites

What does that mean? You don't even want to admit when your wrong. This is the 2nd time now you thought wrongly of me. You are too pre-judgmental. Don't judge a book by its cover.

You are right ... I made a wrong assumption, but looking at your posted code I wonder if you even tried the change your made to the OP's script yourself?

That extra line you added doesn't make any difference since that line is never reached.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

How about this, then? (I changed the hotkey to start it.)

HotKeySet("{PGUP}", "mana") 
HotKeySet("{PGDN}", "end")
 While 1     Sleep(100) WEnd   
Func    mana ()
$var1 = 0
Do  
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F8}")    
Sleep (2000)    SoundPlay ( "beep-02.wav" ) 
Until $var1 = 1
EndFunc

Func end ()
    While
    $var1 = $var1 + 1
    ExitLoop
    EndFunc

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Example, You still need to edit!!!!

; most frown upon game cheats, so all I can help with.

; Hotkeys <---- Add any more you want.
HotKeySet("{-}", "EndScrip")
HotKeySet("{+}", "mana")
; End --------------------------------

; PreSetting <-- Add Settings you want.
$Left = 0
$LeftTop = 0
$Right = 50
$RightBottom = 50
$Color = 0xED1C24 ; Should be color Red.
$MaxLoops = 1
; End --------------------------------

while 1
    PixelSearch($Left,$LeftTop,$Right,$RightBottom,$Color)
    If True Then
        mana()
    EndIf
WEnd

Func mana()     
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F8}")    
Sleep (2000)
SoundPlay ( "beep-02.wav" ) 
EndFunc

Func EndScrip() ;Exit The Main Scrip, Works Fine!
exit 0
EndFunc


; Or
Func mana()  
While $i <= $Maxloops   
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F7}")    
Sleep (2000)    
ControlSend("Tibia", "", "", "{F8}")    
Sleep (2000)
SoundPlay ( "beep-02.wav" ) 
$i = $i + 1 ; +1 Each Loop.... <--- Easy To understand!
EndFunc
Edited by evilelf

Share this post


Link to post
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
Sign in to follow this  
Followers 0