Lua programming
62 topics in this forum
-
where do I start with lua? I have a rogue and I wish to look cleaner like apply poisins, vanish at 20 percent reset from fight then regen, and range pulling certain targets with melee classes that have range weapons. SHOW ME THE WAY COMMANDER. SOMEONE BE THE COMMANDER O.O
-
- 5 replies
- 2.7k views
- 1 follower
-
-
Hey guys, I've found some old code in the forum and tried to bring it back to life. Unfortunately this is my first experience with lua. var bindLocation = Lua.LuaDoString("hearth=GetBindLocation();", "hearth"); var position = new Vector3(-407.123f, 1633.99f, -4439.37f, 15.43328); int npcEntryId = 6929; while (bindLocation != "Orgrimmar") { wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(position, npcEntryId); Lua.LuaDoString("GossipTitleButton1:Click();"); Lua.RunMacroText("/click StaticPopup1Button1"); } I get this lua error: http://prntscr.com/kai2uj Probably a simple thing that I am just overlooking. Appreciate any he…
- 6 replies
- 2.7k views
- 1 follower
-
Is it possible to detect if there is a marker on the target? (like skull or cross) With the bugfixed "Hostile near" (*happy*) it will be nessasary to concentrate (no AOE) the fire, if the boss is marked and has adds.
- 2 replies
- 3.1k views
-
Hey yall Anyone knows if there is a link to the global lua api for any wow versions? A document where all the global functions are in. i.e. The game has the function UnitRace() or the function IsSpellKnown Reason i want to find this is because i want to add some of these functions added to the gamer after 2.4.3 into my fight class. I have already added some of those that i could figure out how were made like: print, UnitBuffName, cdRemains, IsSpellUsable etc. But i can not for the life of me guess what the code is for IsSpellKnown. I need to have this function in order to be able to use spell id's instead of spell names (thereby making it possible to make…
- 22 replies
- 8.2k views
- 2 followers
-
Some classes has spells to avoid falling damage. For example, priest has "Levitate". Problem is to detect when this spell required 1) declare global LUA variable in additional C# code string fallTime=Lua.LuaDoString("fallTime=nil","fallTime"); 2) add spell "Levitate", with options: Can move during cast = Yes; Cast if mounted = true; Cast spell on = player; Combat only = false 3) add conditions for this spell: - Buff (Name=Levitate, Need=false) - Lua script, with return var "falling" and return value research "ok" falling="no" if(IsFalling()) then if (fallTime==nil) then fallTime=GetTime() elseif (GetTime()-fallTime>=1) then …
- 5 replies
- 3.1k views
-
Hello everybody, im new here and im trying to convert my LUA Fightclasses in the right way to make it work with the Bot Core. function isFrencyStack5() luacode = "francymax = 0; for i=1,40 do local _,_,_,c,_,_,_,_,_,_,s = UnitAura('player',i); if s==19615 and c==5 then francymax = 1 break end end" if tonumber(WowLuaDoLocalizedString(luacode, 'francymax'))==1 then return true else return false end end How do you guys inject that string code and get a retval to get that function to work? Greez Galvanar
- 2 replies
- 2.4k views
-
Since we're not making an addon, but we're making lua in the bot and the filename changes all the time (ghuheu38.lua) we can't make a side addon with the toc for the savedvariable Is there some other smart way to do it with wrobot? :)
- 25 replies
- 8.9k views
- 1 follower
-
Hello, I was messing around with the even handler in lua and I was wondering if there is a way to cancel the spell after you pressed it. The best result i've achieved is when I try to cast a certain spell (for example: Bloodlust), and the script will SpellStopCasting(), blocking immediately the cast as soon as it starts. basically making me unable to cast it. But when the spell is not a cast, and it's an istant spell (for example: Riptide), the script freeze the game for a second, then unfreeze with the spell casted. Which is not what I wanted. In few words, can I stop an istant spell fired with UNIT_SPELLCAST_SENT? Or when that event starts, it's too late to bl…
- 26 replies
- 8.4k views
- 1 follower
-
Hey all! Is there any way that i can set the "timer" for an ability with lua? Example: I want to be able to change the timer on steady shot, so it matches gun/bow/crossbow speed. Instead of having to adjust the Class Profile, i'd like to make it so you can set your speed with lua. Now this can be edited in many ways an example could be if i set the timer as a variable: timer = WeaponSpeed Then one would be able to change the weapon speed in-game with /run WeaponSpeed = 3.5
- 4 replies
- 3.1k views
- 1 follower
-
Apparently \n doesn't work for new lines. Is there any other way to make new lines? "I am".."\n".."not".."\n".."Alone?"
-
- 1 reply
- 1.4k views
- 1 follower
-
-
Hey all I tried to make an in-game frame using lua just the way i would with lua in-game in any other way (macros etc). So in the "spellname" area in the creator i wrote in my code, and i set it to "not spell, is lua script" Ending up with this: <SpellName>if not FrameCreated then FrameCreated = true StatusFrame = CreateFrame("Frame") StatusFrame:ClearAllPoints() StatusFrame:SetBackdrop({bgFile = "Interface\\Buttons\\WHITE8X8",}) StatusFrame:SetBackdropColor(0,0,0,.4) StatusFrame:SetHeight(60) StatusFrame:SetWidth(122) StatusFrame:SetPoint("TOPLEFT",ChatFrame1, 0,90) StatusFrame:SetMovable(true) StatusFrame:EnableMo…
-
- 1 reply
- 1.7k views
- 1 follower
-
-
local SpellName = GetSpellInfo(109259) for i = 1, 4, 1 do local UnitIdString = "party" .. i .. "target" if UnitExists(UnitIdString) then if GetRaidTargetIndex(UnitIdString) == 8 then CastSpellByName(SpellName, UnitIdString) return end end end hi how can i use this code in fight class or party command plug in Thanks
-
- 5 replies
- 3.1k views
-
-
Dear Wrobot. How would i go about checking for a seal of command proc, and then execute seal of blood at the same time the proc happens?
-
- 0 replies
- 1.2k views
-
-
Will this code work for Multi-language to check where a Hearthstone is set? Lua.LuaDoString<string>("bindlocation = GetBindLocation(); return bindlocation;") == "Trade District"
-
- 3 replies
- 3.1k views
- 1 follower
-
-
How can i run Lua.LuaDoString 5 times rather than have 5 lines in my code?
-
- 5 replies
- 2.7k views
- 1 follower
-
-
Hello, as title says, is there a way, a command, to include in a lua script that Wrobot function? Its useful to check when to do AoE spells and other things. Thanks let me know =)
-
- 4 replies
- 2.5k views
- 1 follower
-
-
Is there a way to check if a Talent is selected for levels 15,30,45, etc. when it's not a usable spell?
-
- 1 reply
- 3.1k views
- 1 follower
-
-
Working on a very detailed rotation for Demonology Warlocks, but I can't seem to find a way to count how many imps are out with simple LUA. If I can't find a simple solution, I can do a much more complicated and time consuming count with timers, but I'd like to avoid that.
-
- 3 replies
- 2.5k views
-
-
I have some compilation errors with my rotation code. error CS0019 Operator && cannot be used for operand types bool and int Also one of the following. wManager.Wow.ObjectManager.ObjectManager does not have definition for ComboPoint Translated them from finnish best i could. Here is 0.1v of the rotation code. new SpellState("Rake", 16, context => ObjectManager.Me.HaveBuff(5215) && !ObjectManager.Target.HaveBuff(155722), false, false, false, false, true, true, true, true, 0, false, false, false, false, false, false, wManager.Wow.Helpers.FightClassCreator.YesNoAuto.Auto, "", "none", true, true, false), …
- 3 replies
- 1.8k views
-
Hi, is it possible to add event handling in a fight class ? In this sample someone shout "Hero" and the mage/shaman/whatever cast Bloodlust/Timewarp/whatever. local frame=CreateFrame("Frame"); --[[Need a frame to capture events]] frame:RegisterEvent("CHAT_MSG_SAY"); --[[Register our event]] frame:SetScript("OnEvent",function(self,event,msg) --[[ OnEvent handler receives event triggers ]] if event=="CHAT_MSG_SAY" and msg=="HERO" then --[[ Someone sends "HERO" in /say ]] hero=SpellInfo(2825) CastSpellByName(Hero) end end);
-
- 3 replies
- 2k views
-
-
Dear i would like to know command to use it by party chat plugin to command party (slave) to use portal For examble " Portal to Stormwind - (on WowHead) WoWGameObject 4396 176296 Or Refreshment Table - (on WowHead) WoWGameObject 7537 233282 Or healthstone "Warlock" ...etc Thanks
-
- 1 reply
- 2.1k views
-
-
Hey :), Can someone give me please an example on how to use the below in LUA programming? - Gatherer - InteractWithNPC - InteractWithNPC and gossip 1 and 2 PS: only interact with npc, not go to and interact with npc. Regards, NvD
-
- 1 reply
- 2.1k views
-
-
hey all, I want to create a customer profile to kill some mobs, but i want to kill only a specific number of mobs and for a limit time (if possible) then log out / exit bot or game. I have create a custom profile to kill the mobs, but i dont know how to update .cs file to kill only a specific number of mobs. Can anyone help please ? :) Regards, NvD TheCreepingMist.cs
- 2 replies
- 2.1k views
-
hi iis there any command to open guild chest for party chat command plugin or a code to interact with object like this One if (wManager.Wow.Helpers.Party.IsInGroup()) { wManager.Wow.Helpers.Interact.InteractGameObject(new wManager.Wow.ObjectManager.WoWPlayer(wManager.Wow.ObjectManager.ObjectManager.GetObjectByGuid(wManager.Wow.Helpers.Party.GetPartyLeaderGUIDHomeAndInstance()).GetBaseAddress).TargetObject.GetBaseAddress); } i need to make charters open guild chest item number 206602 Thanks
- 4 replies
- 2.5k views
-
How do i tell the bot to check if boss in dungeon is dead? Sure i can use ObjectManager.GetWoWUnitHostile() but it's not fail proof
-
- 5 replies
- 3.6k views
-