Auto Skill and Loot

Download MapleStory hacks and bots over here!
Chotz
Sacrificer
Sacrificer
Posts: 23
Joined: Wed Sep 15, 2010 9:02 pm

Re: Auto Skill and Loot

Post by Chotz »

If auto attack at 200ms and auto loot at 100ms.
and if u activate the skill only its will be 5loops /sec bcoz the delay at 200ms
and if u activate the loot only it will be 10loops /sec bcoz the delay at 100ms
but if u activate both it will be 3.x loops/sec since it will sum both delay..bcoz both skill and loot coding within in the same loops..
soo after it sending "X" it will not skip "Z" unless u off 1 of it.
the reason why the skill cant be use bcoz of the delay between "X" to "Z" or "Z" to "X"...if u set loot delay at 30ms...after the macro sending Z in 30ms
soo within that 30ms i didnt think the character can catch that small delay..
small delay in loot can be good if using it alone...but not suitable if u using both function in the same time.
SoullessSoul
The Great Lord
The Great Lord
Posts: 1036
Joined: Sun Feb 07, 2010 3:32 am
Location: Lost WorlD

Re: Auto Skill and Loot

Post by SoullessSoul »

Oh Ok =) I Get It =)
Image
Leech
Death Warrior
Death Warrior
Posts: 80
Joined: Thu Oct 29, 2009 9:25 pm

Re: Auto Skill and Loot

Post by Leech »

Chotz,

Thanks for the code. I've been learning. Ask you something. I've been trying to create a Auto Summoning Skill (60 second):

Code: Select all

if $summoning = "DEACTIVATE SUMMONING MOB (F6)" Then
       ControlSend("MapleStory", "", "", "b")
       sleep(60000)
Else
EndIf
Problem is, when I incorporate it with Auto Loot:

Code: Select all

   if $loot = "DEACTIVATE AUTO LOOT (F2)" then
       ControlSend("MapleStory", "", "", "z")
       sleep(100)
   else
      endif
Auto Loot will not activate until the Summoning Mob script is complete (which is 60 seconds later). Any idea how to remedy it?

P/S: Trying to create a bot that auto loots, move L-R and summon mob.
Chotz
Sacrificer
Sacrificer
Posts: 23
Joined: Wed Sep 15, 2010 9:02 pm

Re: Auto Skill and Loot

Post by Chotz »

sorey for late reply, was busy
u cant use sleep for something like that...sleep will effect the entire loop..

using timediff should help u in this situation, it can calling a function in xxxx secs...without effecting the loop..
here so example of timediff...i just fo for autowalk..u should edit for ur summon coding.

hope this helping

Code: Select all

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiButton.au3>
#include <Timers.au3>


dim $var3
dim $loot  
dim $TimeStamp ;Declare variable for timestamp

$timer = 20000 ;duration for walk function to be active after 20secs

$var3 = "ON AUTO SKILL (F11)"
HotKeySet("c","skill")  ; i put my hotkey at c.
HotKeySet("{F11}","End") ; when i press F11, this prog will end

$Form1 = GUICreate("Auto Skill and Loot 1.0 by Chotz", 330, 120)
$Button1 = GUICtrlCreateButton($var3, 10, 10, 150, 70, 0)
$Button3 = GUICtrlCreateButton("Info", 10, 90, 70, 20, 0)
GUISetState(@SW_SHOW)

While 1    ;our looping
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			skill()
		Case $Button3
			Info()
	EndSwitch
	if $var3 = "OFF AUTO SKILL (F11)" then
		ControlSend("MapleStory", "", "", "x")
		sleep(150)
	EndIf
	if $var3 = "OFF AUTO SKILL (F11)" then       ;to make it active after i turn on my auto skill
		if TimerDiff($TimeStamp) >= $timer then  ;if timestamp older than timer...it will call walk function
			walk()
		Endif
	Else
		$TimeStamp = TimerInit() ; if u off autoattack, timestamp will keep reset itself
	EndIf
WEnd		;end of the loop...it will go back to "While 1"


Func walk()   ; walk function, u need to focus ur maple window.
	sleep(1000)
	Send("{LEFT down}")
    sleep(250)
    Send("{LEFT up}")
	sleep(1000)
	Send("{RIGHT down}")
    sleep(100)
    Send("{RIGHT up}")
	$TimeStamp = TimerInit() ;reset timestamp.
EndFunc

Func skill()
	if $var3 = "ON AUTO SKILL (F11)" then
		$var3 = "OFF AUTO SKILL (F11)"
		$TimeStamp = TimerInit()      ;after this function is called..the time stamp will be actived.
		GUICtrlSetData($Button1,$var3)
	Else
		$var3 = "ON AUTO SKILL (F11)"
		GUICtrlSetData($Button1,$var3)
	endif
EndFunc

Func Info()
MsgBox(0,"Info","Please set Character Skill key at X"& @LF &"Please set Character Loot key at Z")
EndFunc


Func End()
	Exit
EndFunc
;Created by Chotz

Leech
Death Warrior
Death Warrior
Posts: 80
Joined: Thu Oct 29, 2009 9:25 pm

Re: Auto Skill and Loot

Post by Leech »

Chotz wrote:sorey for late reply, was busy
u cant use sleep for something like that...sleep will effect the entire loop..

using timediff should help u in this situation, it can calling a function in xxxx secs...without effecting the loop..
here so example of timediff...i just fo for autowalk..u should edit for ur summon coding.

hope this helping
Chotz,

I was looking around the Net as well as the inbuilt help function. Was figuring out about TimeDiff but still not enough examples for me to understand. Thanks for your suggested example of timediff code. That will definitely help me understand it better. Will let you know soonest (got assignments to do at the moment. Busy too. ;) )

UPDATE: I'm still confused about using TimeDiff and TimeInit after trying them out on my codes. Seems that after casting my skill/summon (e.g. 60 second delay), the script will still pause for 60 seconds before moving.
Leech
Death Warrior
Death Warrior
Posts: 80
Joined: Thu Oct 29, 2009 9:25 pm

Re: Auto Skill and Loot

Post by Leech »

Chotz,

I'm actually trying to make a HS bot (move left, cast HS, move right, cast HS). See my code. Can't seem to get both the walk and casting part working together. Individually, only HS bot is ok. L-R bot gotta press again to reactivate.

Code: Select all

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiButton.au3>
#include <Timers.au3>

dim $var3
dim $holyshield
dim $TimeStamp ;Declare variable for timestamp

Global $gui, $guiPos

$timer = 5000 ;duration for walk function to be active after 60 secs

$var3 = "ACTIVATE L-R BOT (F5)"
$holyshield = "ACTIVATE HOLY SHIELD (F6)"
HotKeySet("{F5}","walk")
HotKeySet("{F6}","holyshield")

$Form1 = GUICreate("L-R HS Bot", 250, 200)
GUISetBkColor(0xA9A9A9)
$Button1 = GUICtrlCreateButton($var3, 27, 50, 195, 30, 0)
$Button2 = GUICtrlCreateButton($holyshield, 27, 100, 195, 30, 0)
$Button3 = GUICtrlCreateButton("Info", 27, 150, 70, 20, 0)
$Button4 = GUICtrlCreateButton("Exit", 152, 150, 70, 20, 0)
GUISetState(@SW_SHOW)

While 1
   $nMsg = GUIGetMsg()
   Switch $nMsg
      Case $GUI_EVENT_CLOSE
         ExitBot()
      Case $Button1
         walk()
      Case $Button2
         holyshield()
      Case $Button3
         Info()
      Case $Button4
         ExitBot()
   EndSwitch
      if $holyshield = "DEACTIVATE HOLY SHIELD (F6)" Then
       ControlSend("MapleStory", "", "", "b")
       sleep(120000)
   EndIf
      if $holyshield = "DEACTIVATE HOLY SHIELD (F6)" Then
          if TimerDiff($TimeStamp) >= $timer then  ;if timestamp older than timer...it will call walk function
             walk()
          Endif
       Else
          $TimeStamp = TimerInit() ; if u off autoattack, timestamp will keep reset itself
       EndIf
   WEnd
   
Func walk()
      if $var3 = "ACTIVATE L-R BOT (F5)" then
      $var3 = "DEACTIVATE L-R BOT (F5)"
      GUICtrlSetData($Button1,$var3)
   Else
      $var3 = "ACTIVATE L-R BOT (F5)"
      GUICtrlSetData($Button1,$var3)
   endif
       sleep(1000)
       Send("{RIGHT down}")
        sleep(2000)
        Send("{RIGHT up}")
       sleep(1000)
       Send("{LEFT down}")
        sleep(2000)
        Send("{LEFT up}")
       $TimeStamp = TimerInit() ;reset timestamp.
    EndFunc

Func holyshield()
   if $holyshield = "ACTIVATE HOLY SHIELD (F6)" then
      $holyshield = "DEACTIVATE HOLY SHIELD (F6)"
      GUICtrlSetData($Button2,$holyshield)
   Else
      $holyshield = "ACTIVATE HOLY SHIELD (F6)"
      GUICtrlSetData($Button2,$holyshield)
   endif
EndFunc

Func Info()
   MsgBox(0,"","Set Holy Shield Skill to 'B'.  Holy Shield is cast every 120 seconds.")
EndFunc

Func ExitBot()
      Exit 0
EndFunc
Chotz
Sacrificer
Sacrificer
Posts: 23
Joined: Wed Sep 15, 2010 9:02 pm

Re: Auto Skill and Loot

Post by Chotz »

hmm can u explain more bout ur plan? like where u lvling, how far ur char walking...and after he/she stop walking he/she will auto cast hs?

you got sleep 120sec inside loop, told u sleep will effect entire loop...make another timediff for HS..

Code: Select all

   EndSwitch
      if $holyshield = "DEACTIVATE HOLY SHIELD (F6)" Then
       ControlSend("MapleStory", "", "", "b")
       sleep(120000)
   EndIf
Leech
Death Warrior
Death Warrior
Posts: 80
Joined: Thu Oct 29, 2009 9:25 pm

Re: Auto Skill and Loot

Post by Leech »

Chotz wrote:hmm can u explain more bout ur plan? like where u lvling, how far ur char walking...and after he/she stop walking he/she will auto cast hs?

you got sleep 120sec inside loop, told u sleep will effect entire loop...make another timediff for HS..

Code: Select all

   EndSwitch
      if $holyshield = "DEACTIVATE HOLY SHIELD (F6)" Then
       ControlSend("MapleStory", "", "", "b")
       sleep(120000)
   EndIf
E.g. the map where Roids are at Magatia. The priest/bishop just stands at a platform and walks right for 1 second, cast HS, wait 60 sec, walks left again for 1 sec, cast HS, wait 60 sec, repeat.

I purposely included that sleep(120000) because I didn't really know how to insert the timediff part. I tried but still messed up. That's why I inserted the entire code for you to see.

I am thinking this would be a good bot to use for people with access to 2 computers. Mule HS.
Chotz
Sacrificer
Sacrificer
Posts: 23
Joined: Wed Sep 15, 2010 9:02 pm

Re: Auto Skill and Loot

Post by Chotz »

Try this...tested and working :mrgreen:

Code: Select all

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiButton.au3>
#include <Timers.au3>


dim $var3
dim $TimeStamp ;Declare variable for timestamp
dim $direction

$direction = "LEFT"
$timer = 60000 ;duration for walk function to be active after 60 secs
$var3 = "ON (F11)"

HotKeySet("{F11}","start")  ; i put my hotkey at c.
HotKeySet("{F10}","End") ; when i press F10, this prog will end

$Form1 = GUICreate("Testing", 170, 120)
$Button1 = GUICtrlCreateButton($var3, 10, 10, 150, 70, 0)
$Button3 = GUICtrlCreateButton("Info", 10, 90, 70, 20, 0)
GUISetState(@SW_SHOW)

While 1    ;our looping
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			start()
		Case $Button3
			Info()
	EndSwitch
	if $var3 = "OFF (F11)" then       ;to make it active after i turn on my auto skill
		if TimerDiff($TimeStamp) >= $timer then  ;if timestamp older than timer...i will call walk function
			walk()
		Endif
	Else
		$TimeStamp = TimerInit() ; if u off autoattack, timestamp will keep reset itself
	EndIf
WEnd		;end of the loop...it will go back to "While 1"

Func walk()   ; walk function, u need to focus ur maple window.
	if $direction = "LEFT" Then ; if direction is left, bot will walk left
		sleep(500)
		Send("{LEFT down}")
        sleep(1000)			;Walking for 1sec
        Send("{LEFT up}")
		$direction = "RIGHT"
		Sleep(500)
		Hs()
		$TimeStamp = TimerInit() ;reset timestamp.
	Else						 ;if direction not left, bot will walk right
		sleep(500)
		Send("{RIGHT down}")
        sleep(1000)			;Walking for 1sec
        Send("{RIGHT up}")
		$direction = "LEFT"
		Sleep(500)
		Hs()
		$TimeStamp = TimerInit() ;reset timestamp.
	EndIf
EndFunc

Func Hs()
	Sleep(500)
	ControlSend("MapleStory", "", "", "b")
	Sleep(500)
EndFunc

Func start()
	if $var3 = "ON (F11)" then
		ControlSend("MapleStory", "", "", "b") ;bot start with buff
		$var3 = "OFF (F11)"
		$TimeStamp = TimerInit()      ;after this function is called..the time stamp will be actived.
		GUICtrlSetData($Button1,$var3)
	Else
		$var3 = "ON (F11)"
		GUICtrlSetData($Button1,$var3)
	Endif
EndFunc

Func Info()
MsgBox(0,"Info","Please set Character Skill key at B"& @LF &"I am Chotz =3")
EndFunc


Func End()
	Exit
EndFunc
;Created by Chotz
Leech
Death Warrior
Death Warrior
Posts: 80
Joined: Thu Oct 29, 2009 9:25 pm

Re: Auto Skill and Loot

Post by Leech »

Chotz wrote:Try this...tested and working :mrgreen:
That was really fast! Let me try it out when I get home from work. Will reply after testing (which I'm sure it'll work).

Update: Thanks Chotz! Great work! Will use your 'template' for future coding!
Post Reply