Dead_Man Posted January 21, 2007 Posted January 21, 2007 All commented, mainly need help with Water functionI also put in a non-commented version if they annoy anyone from reading the codeexpandcollapse popupHotKeySet("`","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¹ ÅÕ½Ðí]½É±½]ÉÉÐÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíìÍôÅÕ½Ðì¤)¹%)]¹)¹Õ¹
HardCopy Posted January 21, 2007 Posted January 21, 2007 (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 January 21, 2007 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
Dead_Man Posted January 21, 2007 Author Posted January 21, 2007 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
J0ker Posted January 21, 2007 Posted January 21, 2007 (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 January 21, 2007 by J0ker
Dead_Man Posted January 21, 2007 Author Posted January 21, 2007 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
J0ker Posted January 21, 2007 Posted January 21, 2007 (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 January 21, 2007 by J0ker
newb_powa' Posted January 21, 2007 Posted January 21, 2007 (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 colorWhy 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 = 20Sleep(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 January 21, 2007 by newb_powa'
Dead_Man Posted January 22, 2007 Author Posted January 22, 2007 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now