Autoslap

Don Von Alpha Dom
by Don Von Alpha Dom · 19 posts
12 years ago in Autoit
Posted 12 years ago · Author
I have seen people with auto slap scripts which will slap a person in the room again and again and again without the other person even getting the chance to respond. At the same time, you can chat while your avatar is slapping.

This would be really neat if we could make a script that does this and can quickly preform fight combos while at the same time allowing you to chat.

Could autoit do this?
Posted 12 years ago
Yes, easy enough, just get the use code for whatever action you want, and put it in a loop (adding a few more lines for error checking and things). However, that would work fine for solo actions but unless there is more data you can add to the use code, I am not sure how to tell it to target a specific avatar or another avatar in general.


Anyway, here is code that will repeatedly use a solo action:
Code
#include <File.au3>

Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 3)
Opt("TrayIconHide", 0)

;create the tray menu items
TrayCreateItem("Start Action (F1)")
TrayItemSetOnEvent(-1, "Start")
TrayCreateItem("Stop Action (F2)")
TrayItemSetOnEvent(-1, "Stop")
TrayCreateItem("Set Sleep Interval (F3)")
TrayItemSetOnEvent(-1, "Interval")
TrayCreateItem("Pause Action (F2)")
TrayItemSetOnEvent(-1, "Pause")
TrayCreateItem("Exit (Escape)")
TrayItemSetOnEvent(-1, "Terminate")

;Set global variables
Global $Paused = False
Global $sleep = 0
Global $stop = False

;Set the hotkeys
HotKeySet("{F1}", "Start")
HotKeySet("{F2}", "Stop")
HotKeySet("{F3}", "Interval")
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

while 1
   sleep(100)
wend

Func Start()
  If ProcessExists("IMVUClient.exe") OR ("IMVUQualityAgent.exe") Then
     Opt("WinTitleMatchMode", 4)
     ;Get the Window Handle for IMVU
     $hICWindow = WinGetHandle("[CLASS:ImvuNativeWindow]")
     ;Bring IMVU to the front so we don't accidently type into something else
     WinActivate($hICWindow)
     WinWait($hICWindow)
     If $stop = True Then
       $stop = False
     EndIf   
     while $paused = False AND $stop = False
       If $paused = True Then
         ;Pause the script for 24 days
         sleep(2147483647)
       EndIf
       ;Type the action code
       Send("*use 2080")
       ;Hit enter to submit it
       Send("{ENTER}")
       ;Pause for x amount of seconds
       Sleep($sleep)            
     wend
   EndIf
EndFunc

Func Stop()
   If $stop = False Then
     $stop = True
   EndIF    
EndFunc   

Func Interval()
   ;Create a dialog box for sleep time input
   $sleep = InputBox("Capture Interval", "Please Type In The Amount Of Time To Wait Inbetween Taking Pictures")
   $sleep = $sleep * 1000
EndFunc

Func TogglePause()
   If $Paused = True Then
     $Paused = False
      TrayTip("Resumed", "Script Resumed", 5)
   Else
     $Paused = True
     TrayTip("Paused", "Script Paused", 5)
   Endif
   While $Paused = True
     Sleep(100)
   WEnd
EndFunc

Func Terminate()
   Exit 0
EndFunc



Like I said, the above script only works for solo actions on your own avatar. It is an edited version of my picture taking macro script.


Just click on the room you want to run the macro in and use the following 5 hotkeys:

    F1- Start script
    F2- Stop script
    F3 - Set sleep interval
    Pause - Pause the script
    Escape - Close script

All of these options can be access from the tray icon if for some reason you are running the script without a keyboard.


Now, I know this isn't exactly what you wanted but it is all I know how to do till we figure out how to tell it to interact with another avatar. This also helps us get a start on it and shows that Autoit is capable of interacting in the client.
Posted 12 years ago
The chat spammer is easy to do, you can do that with autoit or just download a chat spammer from anywhere. As for the first "h4c|<", I am not sure exactly how he does it so I can't comment on it but I am sure it's not too difficult.
Posted 12 years ago · Author
Ð▪ℳ wrote:
The chat spammer is easy to do, you can do that with autoit or just download a chat spammer from anywhere. As for the first "h4(k", I am not sure exactly how he does it so I can't comment on it but I am sure it's not too difficult.


I am not really into spamming and crashing chats.
I just wanted a system for quickly preforming fighting combos.
Posted 12 years ago
Don Von Free Credits wrote:
Ð▪ℳ wrote:
The chat spammer is easy to do, you can do that with autoit or just download a chat spammer from anywhere. As for the first "h4(k", I am not sure exactly how he does it so I can't comment on it but I am sure it's not too difficult.


I am not really into spamming and crashing chats.
I just wanted a system for quickly preforming fighting combos.



Just need to figure out how to tell it to interact with other avatars and I could probably code up something.
Posted 12 years ago · Author
Our old control code which no longer works might help with that:
Code
 *msg TwoPartyAction:/squeezykiss 2 99999999 2 99999999


You use to be able to use that code to control other people in chat, but now it only works to control yourself.
That should work here though.

The first set of 99999999 is your CID.
The second set of 99999999 is your target's CID.
(I might have that switched around.)
Posted 12 years ago
That code works still.

Here's a script that will repeatedly stomp and bodyslam someone. It's the same as above so it has all the hotkeys. The only downside is while it's running, you can't type and you have to edit the code manually for each new person you want to use it on. I guess I probably could add a new prompt to enter cids eventually.

Code
#include <File.au3>

Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 3)
Opt("TrayIconHide", 0)

;create the tray menu items
TrayCreateItem("Start Action (F1)")
TrayItemSetOnEvent(-1, "Start")
TrayCreateItem("Stop Action (F2)")
TrayItemSetOnEvent(-1, "Stop")
TrayCreateItem("Set Sleep Interval (F3)")
TrayItemSetOnEvent(-1, "Interval")
TrayCreateItem("Pause Action (F2)")
TrayItemSetOnEvent(-1, "Pause")
TrayCreateItem("Exit (Escape)")
TrayItemSetOnEvent(-1, "Terminate")

;Set global variables
Global $Paused = False
Global $sleep = 0
Global $stop = False

;Set the hotkeys
HotKeySet("{F1}", "Start")
HotKeySet("{F2}", "Stop")
HotKeySet("{F3}", "Interval")
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

while 1
   sleep(100)
wend

Func Start()
  If ProcessExists("IMVUClient.exe") OR ("IMVUQualityAgent.exe") Then
     Opt("WinTitleMatchMode", 4)
     ;Get the Window Handle for IMVU
     $hICWindow = WinGetHandle("[CLASS:ImvuNativeWindow]")
     ;Bring IMVU to the front so we don't accidently type into something else
     WinActivate($hICWindow)
     WinWait($hICWindow)
     If $stop = True Then
       $stop = False
     EndIf   
     while $paused = False AND $stop = False
       If $paused = True Then
         ;Pause the script for 24 days
         sleep(2147483647)
       EndIf
       ;Type the action code
       Send("*msg TwoPartyAction:/footstomp 2 25048202 2 87094158")
       ;Hit enter to submit it
       Send("{ENTER}")
       ;Pause for x amount of seconds
       Sleep($sleep)   
       ;Type the action code
       Send("*msg TwoPartyAction:/bodyslam 2 25048202 2 87094158")
       ;Hit enter to submit it
       Send("{ENTER}")
       ;Pause for x amount of seconds
       Sleep($sleep)            
     wend
   EndIf
EndFunc

Func Stop()
   If $stop = False Then
     $stop = True
   EndIF    
EndFunc   

Func Interval()
   ;Create a dialog box for sleep time input
   $sleep = InputBox("Capture Interval", "Please Type In The Amount Of Time To Wait Inbetween Taking Pictures")
   $sleep = $sleep * 1000
EndFunc

Func TogglePause()
   If $Paused = True Then
     $Paused = False
      TrayTip("Resumed", "Script Resumed", 5)
   Else
     $Paused = True
     TrayTip("Paused", "Script Paused", 5)
   Endif
   While $Paused = True
     Sleep(100)
   WEnd
EndFunc

Func Terminate()
   Exit 0
EndFunc
Posted 12 years ago
This could be really useful thx! :D
Posted 11 years ago
what program i need to use this function can some one help

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT