NEW Shammy macro using NetBots and what I have learned
I have gone back and rewritten my Shammy macro now that I have learned a bit about netbots. I STILL think it is a very cool plugin. I'm rewritting each one of my toons macros including my clerics. In my spare time I have been spending the last week experimenting and testing all the neat things I can do with netbots. I have finally finished my Shammy macro. Tested? No... BUT I will be soon once I'm all done for now I will at least post what I have. Lots of example of netbots so I hope it comes in handy.. snippets edit .. if it helps then I have done my job =)
Macro
Thu Jun 28, 2012 5:05 pm
Clean up all your spell ID declarations...
Most of your /goto's are useless as they simply go to the next line...
Redo things as seperate subroutines like this.
Then change sub main
_________________
Sorvani
Macro
Most of your /goto's are useless as they simply go to the next line...
Redo things as seperate subroutines like this.
Macro
Then change sub main
Macro
_________________
Sorvani
Thu Jun 28, 2012 10:22 pm
Senior Project Member
Ok I can see how:
could help to reduce some of the code. As long as it will accomplish the same thing in my " Buffs" section then that is cool. I had to do alot of asking around to see if there where ways to use netbots to identify spells because of the way it works. It can ID spells but it lists them and if not done correctly then (like if the spell is at the end or the start of the list) it won't find it. Also, had to isolate the ID so 271 spell wouldn't get confused with 1271 spell or a simular one. After much testing I found that the way I did it works great.
Yes, I could have turned a lot of those loop tags into subs but I was going for reducing the amount of subs so the macro wasn't bouncing all over the place and it was easier to fillow. Do I need alot of those loop tags? No your right I don't but I worked on it maybe 30 mins to an hour each day and with my format in Note++ it was easier to tag each section I was working on and make notes as I was going in the macro so I would know or remember what I was doing the next day. There was a lot of stopping to test this and that or I would get an idea about something else and start testing that. It was just easier for me to follow and didn't want alot of notes all over my macro.
Plus, with the loop tags there I can always find a section I want to work on faster or expand upon and know exactly where to go.
Considering this has got to be one of the most complex macros I have ever written, I think it's pritty cool. Just still need to test it now. (after of corse I rewrite my clerics macro nw =P )
Macro
could help to reduce some of the code. As long as it will accomplish the same thing in my " Buffs" section then that is cool. I had to do alot of asking around to see if there where ways to use netbots to identify spells because of the way it works. It can ID spells but it lists them and if not done correctly then (like if the spell is at the end or the start of the list) it won't find it. Also, had to isolate the ID so 271 spell wouldn't get confused with 1271 spell or a simular one. After much testing I found that the way I did it works great.
Yes, I could have turned a lot of those loop tags into subs but I was going for reducing the amount of subs so the macro wasn't bouncing all over the place and it was easier to fillow. Do I need alot of those loop tags? No your right I don't but I worked on it maybe 30 mins to an hour each day and with my format in Note++ it was easier to tag each section I was working on and make notes as I was going in the macro so I would know or remember what I was doing the next day. There was a lot of stopping to test this and that or I would get an idea about something else and start testing that. It was just easier for me to follow and didn't want alot of notes all over my macro.
Plus, with the loop tags there I can always find a section I want to work on faster or expand upon and know exactly where to go.
Considering this has got to be one of the most complex macros I have ever written, I think it's pritty cool. Just still need to test it now. (after of corse I rewrite my clerics macro nw =P )
Fri Jun 29, 2012 11:41 am
You created a variable called RegenSpell, gave it a value of Chloroplast, then hard coded the Chloroplast name into the spell ID lookup just 2 lines later. The same thing happened with all other buff names.
Both lines do roughly the same thing, but do so in different ways.
The ${Spell[name]} version loops through the entire spellfile with it's thousands of entries. The ${Me.Book[name]} version loops through the spells in your spellbook, which is a considerably smaller list.
In this example, there is very little difference because spell/buff ID's are only set at the beginning of the macro. However, a complex macro that has many ${Spell[name]} calls in subroutines might seem more laggy than the ${Me.Book[name]} version. Especially if the macro is run by multiple toons.
Does your macro do this?
Macro
Both lines do roughly the same thing, but do so in different ways.
The ${Spell[name]} version loops through the entire spellfile with it's thousands of entries. The ${Me.Book[name]} version loops through the spells in your spellbook, which is a considerably smaller list.
In this example, there is very little difference because spell/buff ID's are only set at the beginning of the macro. However, a complex macro that has many ${Spell[name]} calls in subroutines might seem more laggy than the ${Me.Book[name]} version. Especially if the macro is run by multiple toons.
Also, had to isolate the ID so 271 spell wouldn't get confused with 1271 spell or a simular one. After much testing I found that the way I did it works great.
Does your macro do this?
Sun Jul 01, 2012 12:05 am
Senior Project Member
Spells
Yes I noticed when I was trying to find a way and researching and asking questions about how NetBots could be used to find, detect and cast buffs that would have worn off, I found that the way I ended up isolating the Spell ID works great.
When you use netbots to check spells it would give a list of spell ID numbers of spells currently on that toon. I did try other ways and returns and tested and ran into problems because the way NetBots works. I did find with the way it did it if you tried to find the ID of the spell and it was simular to another spell ID (like 1 number more but still having all the same numbers) it would actualy mistake it for that spell. I personaly didn't have it do it but after again researching I found people who it had done it to. Also because of this fact, I found also if the spell ID was at the begining or the end of the list of buff IDs it wouldn't detect it at all. This had to do with the space problem. I forget the exact details of this but did a lot of testing in trying to find just the ID number of the spell using NetBots and I always had the same problem, if at the front or back it ran into problems (first or last spell in the list). But if you notice the /varset with the spaces around it:
Macro
and with the way I isolated the spell ID it actualy does what it needs to do now. I have rewritten all my toons this way now. There is a topic on MQ2 forums where several others and I worked through this problem. Credit actualy goes to a few people who came up with this salution and I worked through it, tested it and worked it in.
http://www.macroquest2.com/phpBB3/viewtopic.php?f=47&t=18378
The link is in the VIP section so not sure if you can access it without VIP access.
Macro
From here if I need to to change anything it is mostly just copy paste or type a new spell in at the top of the macro and done. Make my life much easier only having to replace a small amount of code when needed.
Thu Jul 05, 2012 9:53 am