Sign in to follow this  
Followers 0
Dead_Man

WoW macro, should work the way i see it but doesnt

8 posts in this topic

All commented, mainly need help with Water function

I also put in a non-commented version if they annoy anyone from reading the code

HotKeySet("`","Attack")
HotKeySet("^2","Water")
HotKeySet("^`","Endall")

$1 = InputBox("Setup Water","Enter Max MP")
$2 = InputBox("Setup Water","Enter How much mana it costs to make your water")
$3 = $1 / $2 

;----------------- Main Loop -----------------
while 1
    Sleep(100)
WEnd
;----------------- Main Loop -----------------


Func Attack() ; Attack 5 is frostbolt on my keayboard i may remove when i publish just for water function
        while 1
            ControlSend("World of Warcraft","","","{5}")
            sleep(1700)
        WEnd
EndFunc

Func Endall() ; Simply Endall like it states, no need to mess with
    while 1
        Sleep(100)
    WEnd
EndFunc

Func Water() ; What i need help with, look like it should work but it doesnt $3 is the max amount 
            ;of stacks you can make with how much mana you have and how much mana it costs to use the spell to make water
while $3 < 1 ; first time using a while thats not "while 1" this may be wrong
ControlSend("World of Warcraft","","","{1}")
sleep(4000) ; delay for how long it takes to cast conjure water
$3 = $3 - 1 ; first time using math like this.. 
            ;may be wrong: counts down to one, one being when you should be out of mana and your done with this round of making water
if $3 = 1 Then ; refill mana when your out with the water you made
    ControlSend("World of Warcraft","","","{2}") ; 2 is my drink water button
    sleep(26000) ; How long it takes to refill your mana with this water
    ControlSend("World of Warcraft","","","{3}") ; activates my /stand macro ingame so i dont need auto-it to cover it
EndIf ;; end statements
WEnd
EndFuncoÝ÷ Ù«­¢+Ø)!½Ñ-åMÐ ÅÕ½ÐìäØìÅÕ½Ðì°ÅÕ½ÐíÑѬÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½ÐíxÈÅÕ½Ðì°ÅÕ½Ðí]ÑÈÅÕ½Ðì¤)!½Ñ-åMÐ ÅÕ½ÐíxäØìÅÕ½Ðì°ÅÕ½Ðí¹±°ÅÕ½Ðì¤((ÀÌØìÄô%¹ÁÕÑ ½à ÅÕ½ÐíMÑÕÀ]ÑÈÅÕ½Ðì°ÅÕ½Ðí¹ÑÈ5à5@ÅÕ½Ðì¤(ÀÌØìÈô%¹ÁÕÑ  ½à ÅÕ½ÐíMÑÕÀ]ÑÈÅÕ½Ðì°ÅÕ½Ðí¹ÑÈ!½ÜµÕ µ¹¥Ð½ÍÑÌѼµ­å½ÕÈÝÑÈÅÕ½Ðì¤(ÀÌØìÌôÀÌØìļÀÌØìÈ((ì´´´´´´´´´´´´´´´´´5¥¸1½½À´´´´´´´´´´´´´´´´´)Ý¡¥±Ä(%M±À ÄÀÀ¤)]¹(ì´´´´´´´´´´´´´´´´´5¥¸1½½À´´´´´´´´´´´´´´´´´(()Õ¹ÑѬ ¤($%Ý¡¥±Ä($$%
½¹Ñɽ±M¹ ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíìÕôÅÕ½Ðì¤($$%ͱÀ ÄÜÀÀ¤($%]¹)¹Õ¹()Õ¹¹±° ¤(%Ý¡¥±Ä($%M±À ÄÀÀ¤(%]¹)¹Õ¹()Õ¹]ÑÈ ¤)Ý¡¥±ÀÌØì̱ÐìÄ)
½¹Ñɽ±M¹ ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíìÅôÅÕ½Ðì¤)ͱÀ ÐÀÀÀ¤(ÀÌØìÌôÀÌØìÌ´Ä)¥ÀÌØìÌôÄQ¡¸(%
½¹Ñɽ±M¹ ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíìÉôÅÕ½Ðì¤(%ͱÀ ÈØÀÀÀ¤(%
½¹Ñɽ±M¹ ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíìÍôÅÕ½Ðì¤)¹%)]¹)¹Õ¹

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Give this a try.

Also i would always recommend never to use numbers as variables ($3 $2 etc) , this will hinder you bigtime in the longterm. Ugly, but more importantly very confusing when trying to debug your code.

Func Water() 
while $3 
    ControlSend("World of Warcraft","","","{1}")
    sleep(4000) 
    $3 -=1 
WEnd

ControlSend("World of Warcraft","","","{2}") ; 2 is my drink water button
    sleep(26000) ; How long it takes to refill your mana with this water
    ControlSend("World of Warcraft","","","{3}") ; activates my /stand macro ingame so i dont need auto-it to cover it
EndFunc
Edited by HardCopy

Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Share this post


Link to post
Share on other sites

thanks, got a new problem now so im gonna post before i go to bed, i just changed

Func Water() 
while $3 < 1 
ControlSend("World of Warcraft","","","{1}")
sleep(4000) 
$3 = $3 - 1 
if $3 = 1 Then
    ControlSend("World of Warcraft","","","{2}")
    sleep(26000)
    ControlSend("World of Warcraft","","","{3}") 
EndIf 
WEnd
EndFunc
oÝ÷ ÚÚºÚ"µÍ[ÈØ]
HÚ[H   ÌÍÌÈ    ÝÈHÛÛÛÙ[
    ][ÝÕÛÜÙØÜY   ][ÝË  ][ÝÉ][ÝË    ][ÝÉ][ÝË    ][ÝÞÌ_I][ÝÊBÛY

HÌÍÌÈH  ÌÍÌÈHHY ÌÍÌÈ    ÏH[PÛÛÛÙ[
    ][ÝÕÛÜÙØÜY   ][ÝË  ][ÝÉ][ÝË    ][ÝÉ][ÝË    ][ÝÞÌI][ÝÊBÛY

BPÛÛÛÙ[
    ][ÝÕÛÜÙØÜY   ][ÝË  ][ÝÉ][ÝË    ][ÝÉ][ÝË    ][ÝÞÌßI][ÝÊH[YÑ[[[Â

my new problem: when my mana is full for a second run, i stand up, make only one water and start drinking again, i think something else has to be inside the loop to show that i have full mana again

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Pixelgetcolor of your mana bar

$ManaBar = Pixelgetcolor(x,y)

Do
$ManaBar = Pixelgetcolor(x,y)
; your loop
Until $ManaBar = "Color of the right side of your mana bar"
Edited by J0ker

Share this post


Link to post
Share on other sites

im trying to make it so everyone can use, not everyone plays the same screen resolution, and people can use a mod to change the location of your health bar and change the color

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Well, If u make a bot, u NEED to add some restrictions or people that will use it will complain that it's not working. Ex: Make sure that your WoW window is in windowed mode.

Restrictions can also be used as a password. Ex: You need BLABLA mod to be able to get x color so you can make the bot work.

Edited by J0ker

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

im trying to make it so everyone can use, not everyone plays the same screen resolution, and people can use a mod to change the location of your health bar and change the color

Why not asking like other variable for the perso stats (like energy or intelligence) wich can influence the rate you gain your mana and then it with sleep.

e.g.

$Intelligence = 20

Sleep(50*$intelligence)

This is only an exemple and I don't know enough of WoW to make the real equation but I think you understand the way I think.

Edited by newb_powa'

Share this post


Link to post
Share on other sites

i got it to work my own way thanks everyone that tried to help

$1 = InputBox("Setup Water","Enter Max MP")
$2 = InputBox("Setup Water","Enter How much mana it costs to make your water")
$3 = $1 / $2
$4 = $1 / $2

;----------------- Main Loop -----------------
while 1
    Sleep(100)
WEnd
;----------------- Main Loop -----------------

Func Water() 
while $3 > 1 
ControlSend("World of Warcraft","","","{1}")
sleep(4000) 
$3 = $3 - 1 
if $3 <= 1 Then
    ControlSend("World of Warcraft","","","{2}")
    sleep(26000)
    ControlSend("World of Warcraft","","","{3}")
    $3 = $4
EndIf 
WEnd
EndFunc

$4 just return's it to its origonal value

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