-
Posts
23 -
Joined
-
Last visited
Content Type
Forums
Articles
Bug Tracker
Downloads
Store
Posts posted by Icesythe7
-
-
No i mean i can simply return u a table containing only "known" spell ranks and names but not the id
-
would it help u any if i could return the name and rank of only known spells?
-
1 minute ago, Ordush said:
Awesome mate, so it checks the spellbook if it has a spell with given spellid.
But this is in C#. Is there any way to do this in Lua? (My druid is not made in CS): =/
I know it can be done in Lua, because blizzard themselves implemented it in WOTLK with the IsSpellKnown Function Which is the one i'm trying to get. :)Oh didnt know u needed it in lua um let me lookup the api on that if i can do it in vanilla i can do it in tbc im sure
-
9 minutes ago, Ordush said:
Here is EXACTLY what i want to do using my old PQR shadow priest (WOTLK) example. :)
-- Prayer of Fortitude local POFortitude = false local POFMat = false -- Rank 4 if IsSpellKnown(48162) then POFortitude = 48162 POFMat = "DevoutCandles" -- Rank 3 elseif IsSpellKnown(25392) then POFortitude = 25392 POFMat = "SacredCandles" -- Rank 2 elseif IsSpellKnown(21564) then POFortitude = 21564 POFMat = "SacredCandles" -- Rank 1 elseif IsSpellKnown(21562) then POFortitude = 21562 POFMat = "HolyCandles" end
So i want to check if the player has a spell in a certain rank by ID
As you can see here: If the player doesn't have Prayer of Fortitude at all, it will make POFortitude false
If the player does have Prayer of Fortitude rank 2 it will make POFortitude that rank
Then later when i tell it to cast spell by ID (I cast by ID to make it multi-lang). It will check the bag if it has mat based on POFMat >5 (So it only casts prayer if it has more than 5 mats).
public bool HasSpellId(int spellId) { return SpellManager.SpellBook().Any(spell => spell.Id == spellId); }
The smart way to do this is make an array of the shit u wanna check and checkit onload and whatever is to add it to a new array and use that new array for what u need to do to minimize the loop thi does, then register an lua event ontrained spell(w/e the name is) and anytime it called update ur local array
-
now i understand give me a second
-
So you simply want a function like this
if (HasSpell(56342)) { //dosomething
-
So you are wanting to input a spell id and return the max rank of that spell if it isknown or nil if it is not known...am i understanding correctly?
-
1 minute ago, Ordush said:
LOL I just realized i posted in the wrong forum hahaha
nevermind lol
The method he posted obviously works fine, he is just using list instead of array.
My question was simply if i could use array when checking for buffs.
His answer lead me to the short answer which is no. And the long answer is: Yes if you do a foreach and check every buff 1 buff at a time.
Sorry Icesythe lolnp lol
-
Maybe im not understanding correctly what exactly are you trying to do
-
3 hours ago, Ordush said:
@Apexx
I figured why this method doesn't work well.
It sure does work cross language, but you won't be able to rank check with this.
If you have rank 1 of an ability, it will never do nil no matter what ID you use, be it rank 1 or rank 5 of a spell.
Reason this has a consequence: Say i want it to buy mats for buffs. Then i won't be able to specify what mats to buy based on what rank is available.could just use the wow api to do it all
-
4 hours ago, Droidz said:
Hello, your project seem good, I added subscription a your account ( https://wrobot.eu/clients/purchases/ )
Hey thanks man
-
1 minute ago, BetterSister said:
I personally think @Droidz should give you free 1 month private server license. We need more people like you who can do programming If i wasn't so broke at the moment i would just buy the license for you
lol it's ok I enjoy coding altho this really should be implemented into core because it is hard to get the correct thread to run the lua environment on
-
Just now, BetterSister said:
Impressive code. You doing this all with trial license?
Yes, I don't have extra money right now and its not a big deal anyways only annoying part is the math equation I have to do every restart lol
-
Hello there, I enjoy coding in lua and found that only wow's outdated lua 5.0 api can be used(for vanilla), so I had the idea of making a plugin that could use all of WRobots api in an lua script to make fight classes, profiles, or anything really, so far I have a working prototype but was curious if I would be the only one using it or if there is any interest from the community to use lua scripting? If you guys would use the plugin then I will gladly continue work on it, currently it can run a simple script like this:
local me = objectManager.me local ConjureWater = spell.__new("Conjure Water"); local ConjureFood = spell.__new("Conjure Food"); local ConjureManaRuby = spell.__new("Conjure Mana Ruby"); local ConjureManaCitrine = spell.__new("Conjure Mana Citrine"); local ConjureManaJade = spell.__new("Conjure Mana Jade"); local ConjureManaAgate = spell.__new("Conjure Mana Agate"); local IceArmor = spell.__new("Ice Armor"); local FrostArmor = spell.__new("Frost Armor"); local ArcaneInt = spell.__new("Arcane Intellect"); local ManaShield = spell.__new("Mana Shield"); local IceBarrier = spell.__new("Ice Barrier"); local DampenMagic = spell.__new("Dampen Magic"); local FrostBolt = spell.__new("Frostbolt"); local FireBall = spell.__new("Fireball"); local FrostNova = spell.__new("Frost Nova"); local Blink = spell.__new("Blink"); local FireBlast = spell.__new("Fire Blast"); local CoC = spell.__new("Cone of Cold"); local CounterSpell = spell.__new("Counterspell"); local PolyMorph = spell.__new("Polymorph"); function Buff() if FrostArmor.knownSpell and (not me.haveBuff("Frost Armor")) then return FrostArmor.launch() elseif ArcaneInt.knownSpell and (not me.haveBuff("Arcane Intellect")) then return ArcaneInt.launch() end end function EatDrink() --todo end function Fight() if FrostBolt.knownSpell and objectManager.target ~= nil and (not me.isCast) then return FireBlast.launch() or FrostBolt.launch() end end function onTick() if me.isDeadMe then return end if me.inCombat then Fight() elseif (not me.haveBuff("Frost Armor")) or (not me.haveBuff("Arcane Intellect")) then Buff() end end function onDraw() if objectManager.target == nil then return end draw.line(me.position, objectManager.target.position, color.black) end
If you guys have any input on callbacks needed or api needed I can probably make it all, the project can be found here if anyone is curious or has suggestions on things to change
-
ok so heres whats happening calling pulse turns radar3d on in maps(even tho the switch is off) and the only way to turn it off is to turn it on and back off, if i draw something myself it only will draw if radar 3d is on if i turn it on and bacj off while my plugin is running my draws disappear
-
5 minutes ago, Apexx said:
Correct, it's using the Radar3D. If it's drawing to multiple things without you coding it in, check the settings Other, there's an arrow to pull up another menu with many other items to draw. Maybe see if they are on?
it still draws a random blue circle but its working now xd https://i.gyazo.com/e0e5b485a0e5c921e47bfae196310753.mp4
-
1 minute ago, Apexx said:
I don't unfortunately, and it's getting late here.
Ok well its like its turning radar3d in map on when i call pulse is what is seems like
-
no its not, do u have discord by chance so we dont have to do this here?
-
Why when i call radar3d pulse does it draw a bunch of stuff i didnt tell it too?
-
Does this get called continuously or just 1 time? What i have worked with in the past when drawing it will draw the item once per frame so you would draw in a while loop, if this does just draw and then stay forever how can i remove it?
-
Thanks for the reply I have since figured out the settings however if you could give me an explanation of how the drawing event works that would be super(cant check ur file as i am a trial user i just use the 15 min trial on vanilla currently)
-
Hello there, new guy here I searched the forum and unless I missed it I can't figure out how to(if its even possible) run just a plugin when starting the bot ie i hit the play i want it to just load my plugin only and do nothing else or if I could load a plugin + just a grinder profile with no fightclass that would be ok as well, also is there an api to draws like DrawLine, Drawcircle etc?
Global Lua API
in Lua programming
Posted
What are u doing by the way executing an entire lua script in c# in a loop?