
Ordush
-
Posts
1178 -
Joined
-
Last visited
Content Type
Forums
Articles
Bug Tracker
Downloads
Store
Posts posted by Ordush
-
-
2 minutes ago, camelot10 said:
#if VISUAL_STUDIO using robotManager.Helpful; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using wManager.Wow.Bot.Tasks; using wManager.Wow.Class; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; using wManager.Wow.Enums; using System.Configuration; using System.ComponentModel; using System.IO; #endif [Serializable] public class TestSettings : Settings { [Setting] [DefaultValue(true)] [Category("GHOST WOLF SETTINGS")] [DisplayName("Ghost Wolf")] [Description("Use Ghost Wolf")] public bool UGW { get; set; } [Setting] [DefaultValue(4)] [Category("GHOST WOLF SETTINGS")] [DisplayName("Use after X secondes")] [Description("Use Ghost Wolf after X secondes out of combat")] public int TGW { get; set; } public static TestSettings CurrentSetting { get; set; } public TestSettings() { } public bool Save() { try { return Save(AdviserFilePathAndName("CustomClass_Shaman", ObjectManager.Me.Name + "." + Usefuls.RealmName)); } catch (Exception e) { Logging.WriteError("CustomClass_ShamanSettings > Save(): " + e); return false; } } public static bool Load() { try { if (File.Exists(AdviserFilePathAndName("CustomClass_Shaman", ObjectManager.Me.Name + "." + Usefuls.RealmName))) { CurrentSetting = Load<TestSettings>(AdviserFilePathAndName("CustomClass_Shaman", ObjectManager.Me.Name + "." + Usefuls.RealmName)); } else { CurrentSetting = new TestSettings { UGW = true, TGW = 4, }; } CurrentSetting.PushToLua(); return true; } catch (Exception e) { Logging.WriteError("CustomClass_ShamanSettings > Load(): " + e); } return false; } void PushToLua() { UGW = Lua.LuaDoString<bool>("return luaVar"); } void FetchFromLua() { Lua.LuaDoString("UGW = " + UGW); } }
quick and dirty example
Cheers! Makes sense!
-
20 minutes ago, camelot10 said:
its a very bad practice to save variables between sessions like "c# -> wrobot -> lua -> wow -> addon -> disk" for wrobot and vice versa to load it.
you can load wrobot settings and set lua vars after load for your lua-fightclass. this allow you to skip dependancy from wow addon and store everything you need for fightclass
Thank you for giving me a straight answer! It's very appreciated.
If i understand you right, i should be able to set lua vars using C#. I am obviously not very good at C#.
I will give it a try looking through the code that people used to make settings (the links you lastly provided). And see if i can figure out how to use that to set lua vars.That was all i asked for mate. Thanks
-
2 minutes ago, camelot10 said:
god, why so agressive? there is a small bits of information on this forum, i just whant to explain you how you can solve 99% of wrobot problems by your own.
but lazy and agressive peoples like you, prefer to ask questions whats required a 5 minutes of time and brain working.
my second link, first google link lead to
there is everything you need for saving and loading data/params between wrobot sessions.
second google link gives complete info too. whats wrong with you? if you can't search internet and im trying to help, why you aggroed? since 24 aug, im only one who helping with answers in this topic. sorry if i hurt your feelings in any way. i hope you understand how to search strict string on current site and follow the trail to get answers in 5-10 mins and dont wait 3 weeks for "kind stranger"
And i appreciate any help i can get, but i don't understand why you have to be rude about it? Yes it took you 5 minutes to get how to use C# for saving/loading data/params.
What i asked was if/how i can use lua to do it. The reason i ask for lua is because i write my fightclasses in lua not C#.
Without any reason at all you keep telling me how much i suck at using google etc. I am not being aggressive, quite the opposite, i am being defensive because you keep being rude to me instead of just telling me: "I don't know if you can do it in lua". -
6 minutes ago, camelot10 said:
now i can be rude, but i must say that:
seems like you can't search correctly in the internet, first link in my search have partial code of robotManager.Helpful.Settings and lead to http://lmgtfy.com/?q=site%3Awrobot.eu+"AdviserFilePathAndName"
What is wrong with you? There is NO reason at all to be rude at all... Being arrogant and rude has no place in a public debate area. Clearly i can't seem to get where you want me to go, you could just point me directly to where you want me to go instead of making rude gestures and posting links to a "how to use google" site.
I am not being rude to you in any way. Your behavior is so weird...
If anyone asks a question on this forum and i know the answer, i will answer the question, and i will point to where people can find the help they need if i know where.
Edit: In short: Can you just tell me weather robotManager.Helpful.Settings Can work with lua or not?
If you don't know, that is fair enough. -
Just now, camelot10 said:
im not rude. i prefer to learn fly other peoples, not to carry then by myself at all time. maybe my english no so good. sorry
ps. i put correct link above.
And i allrdy did google it before you linked the "how to google" guide..
If you click your own link you will see there are 6 links, and none of them has any info on how to use robotManager.Helpful.Settings -
Just now, camelot10 said:
lemme give you world most superior advice at all time. "use search, young padawan"
here is quick jedi trick https://www.google.ru/search?q=site%3Awrobot.eu+"robotManager.Helpful.Settings"
No reason to be rude. I always search every bit of the internet before i begin asking quetions. I will try see if i can figure it out.
Thanks.
-
1 minute ago, camelot10 said:
then make your own settings and save to file robotManager.Helpful.Settings
Can i do that combined with Lua? if so, would you explain it to me?
Cheers!
-
3 minutes ago, camelot10 said:
Var.SetVar
Var.GetVar
its a internal wrobot dictionary, no relation to toc or blizzard. its used as wrobot cache, you can save, modify and delete this variables while wrobot run. if wrobot closed -> all var data lost/cleared. OR when wrobot starts, its create this cache/dictionary from scratch.
dunno what variable you talking about
Yeah the problem here is exactly that it's cleared.
The reason i was using an addon instead was because i want it to save my variables between game sessions. When you close the game and wrobot, from what i understand Var.SetVar and Var.GetVar clears and then we're back to default, thereby losing the saved data? -
So i've tested this out, and ofc. it works fine it remembers the variables i set.
The problem is that it does actions based on those variables which are blocked by blizzard. So the first thing that happens when i do anything using those variables i have saved in my ToC (SavedVariables) blizzard blocks my addon.
Is there not any way to save lua variables without using SavedVariables in-game? Since addons are also checked for secure usage. -
4 minutes ago, forerun said:
The bot is using method Interact which is a mapping to right click on x y z ( in that case mob position ) look what will happen when you click something using right click :) You may check if the autoattack is on and then stop it using IsAutoRepeatAction(slot) function? ( I suppouse )
Yeah i know that it's using "interact with" that is what starts the auto shoot, what i wanted was for it to turn that off, i am not sure as to what you mean by IsAutoRepeatAction, can you explain pretty please? :)
Edit: I could make a solution by doing isMove false as a condition for the stopattack since it has to stand still to auto shoot anyway, that just looks wacky.
-
3 minutes ago, forerun said:
The macro /stopattack is for that and only this is working on tbc I think.
I mean, if i don't use the bot (stop it or pause it) it will not auto attack
The bot is actively starting attack if you have an unfriendly target. :)
But i will try with /stopattack thanks.
Although it is a bit weird to spam /stopattack to prevent it from attacking, should be the other way around. :P
Edit: Yeah that is not working, it will stutter and not be able to move because it will be spamming /stopattack.
-
Hey all
Anyone ever found out how to turn OFF hunter auto attack?
I have a function that stops the rotation
All my abilities has
if RotaOn then canCast = "true" else canCast = "false" end
as a lua condition. Works fine, no spells are cast.
Problem is:
It is still casting auto shoot. If i target a mob it will begin auto shooting it.I have tried giving the same condition to many things like
Auto Shoot
Attack
auto
ShootNone of them works. It seems to me as if the auto attack happens b4 the fight class, as in if i make an empty fight class it will still auto shoot.
-
Hey yall
Any way i can do
(ObjectManager.Me.FocusObj.IsValid && ObjectManager.Me.FocusObj.HaveBuff("SPELLNAME"))
just with "HaveBuffCastedByMe" Instead of HaveBuff?
I mean if there is any function for it, what is it called? :) -
5 hours ago, drbisquerra said:
Thank you very much for the advice. I will change IP. Ordhus can you recommend any guide? How far from the forum can I find them?
Is a great way to start, try googling site:wrobot.eu ban or avoid or something like that. :)
-
There are several guides on this forum on how to avoid detection.
Also, you might want to change ip if you got banned more than once. If i was a server owner, and i banned someone 3 times, i'd be sure to look out for that person. ;) -
Hey yall!
Hope everybody is good!
I wasn't sure where to ask features for the bot, but it would be awesome sometime in the future to see focus in addition to target in the conditions
Example:
Focus Health Percent
so that we can do focus specific conditions. :) -
I still haven't figured this out, so if anyone could be of assistance. It would be lovely! :)
-
14 minutes ago, reapler said:
I've altered your second snippet, because it threw some errors:
if (GetCVar("HuntersMarkDisabled") == nil) then RegisterCVar("HuntersMarkDisabled", "default") end if (GetCVarBool("HuntersMarkDisabled")) then SetCVar("HuntersMarkDisabled", 0 ); DEFAULT_CHAT_FRAME:AddMessage("enabled frame: HuntersMark"); else SetCVar( "HuntersMarkDisabled", 1 ); DEFAULT_CHAT_FRAME:AddMessage("disabled frame: HuntersMark"); end
But since you are using only lua, i think there's a better solution but lua is not my favorite language ;) Maybe someone else can other offer a better answer.
Yeah i had an end too many. =P
I removed my reply because i realized what you meant, however. what you did there was what i already did, i just didn't do it c#. So unfortunately it doesn't work. :( -
Didn't know what to call the topic honestly. Hope people understand. :)
Been trying to wrap my brain around this function for ages now. Anyone who can help me?
function CombatSpellsToggleButton(ability, position) local frameButton = "SettingsFrame."..ability.."btn" local frameDisabled = ability.."Disabled" frameButton = CreateFrame("BUTTON", nil, SettingsFrame, "UIPanelCloseButton") frameButton:SetWidth(16) frameButton:SetHeight(16) if frameDisabled then frameButton:SetNormalTexture("Interface/Buttons/UI-PlusButton-Up") frameButton:SetPushedTexture("Interface/Buttons/UI-PlusButton-Down") else frameButton:SetNormalTexture("Interface/Buttons/UI-MinusButton-Up") frameButton:SetPushedTexture("Interface/Buttons/UI-MinusButton-Down") end frameButton:SetPoint("TOPRIGHT",SettingsFrame, -2,position) frameButton:SetScript("OnClick", function() if frameDisabled then frameDisabled = false frameButton:SetNormalTexture("Interface/Buttons/UI-MinusButton-Up") frameButton:SetPushedTexture("Interface/Buttons/UI-MinusButton-Down") else frameDisabled = true frameButton:SetNormalTexture("Interface/Buttons/UI-PlusButton-Up") frameButton:SetPushedTexture("Interface/Buttons/UI-PlusButton-Down") end end) frameButton:SetAlpha(1) frameButton:Show() end -- Settings Frame (Combat Spells) Hunter's Mark Toggle Button CombatSpellsToggleButton("HuntersMark", -86)
It does make the button, but the variable generated by frameDisabled does not work
So if i do
if HuntersMarkDisabled then
do something
end
that something doesn't happen -
6 minutes ago, forerun said:
if vUAflag==nil then vUAflag=0 end; -- If we're CURRENTLY casting UA and the timestamp isn't already set... if ({UnitCastingInfo("player")})[1]=="Unstable Affliction" and vUAts==nil then -- Record that UA is being cast and record the time at which we observed the ongoing cast. -- Setting the flag to 1 will prevent UA from being cast again. vUAflag=1 vUAts=GetTime() end; -- If the flag is set...but the time at which it was set was more than 2 seconds ago... if vUAflag==1 and GetTime()-vUAts>2 then -- Reset the flag and timestamp to allow UA again. vUAflag=0 vUAts=nil end
Ripped example - here you see how to cast Unstable Affliction when the time difference between start and now is > 2.
If vUaFlag=0 then cast
Perfect! Thank you so much! <3
-
3 minutes ago, forerun said:
CS rotation only perhaps. Some kind of pseudo code ( to prevent double cast of immolate in this example )
public long immolate_StartTime; public bool immolate_ResetTimer = true; public bool immolate_CanCast = true; public long immolate_Time = 1500; ..... wManager.wManagerSetting.CurrentSetting.EventsLuaWithArgsWaitTime = 1; EventsLuaWithArgs.OnEventsLuaWithArgs += (id, args) => { if (id == wManager.Wow.Enums.LuaEventsId.UNIT_SPELLCAST_START) { if (args.Count >= 2 && args[0] == "player" && args[1] == "Immolate") { if (immolate_ResetTimer == true) { immolate_StartTime = GetTime(); immolate_ResetTimer = false; } } } if ((GetTime() - immolate_StartTime) > immolate_Time) { immolate_CanCast = true; immolate_ResetTimer = true; } else { immolate_CanCast = false; } public long GetTime() { long startTick = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; return startTick; }
In this example the immolate will be casted again only after 1500 ms ( and this is preventing to overcasting ) To check when something start and count the time to push the event again. Well. IDK :)
Thank you for the quick answer!
If i use lua script to cast my spell with SpellInfo, couldn't i in theory also use the GetTime in lua to achieve this? :) -
1 minute ago, forerun said:
I only use macro ingame to pass the value to the wrobot cs rotation. You can create a global variable assign a value to that variable and read it in wrobot.
Lua.LuaDoString(@"SLASH_HELLOWORLD1, SLASH_HELLOWORLD2 = ""/Lux"",""/lux""; local function handler(msg, editbox) setglobal( ""Lux"", msg ) end SlashCmdList[""HELLOWORLD""] = handler; ");
In that example when user in game write : /lux 1 the global value Lux will be set to 1 and then inside the cs you can read the value in something like that:
var Lux = Lua.LuaDoString<int>("value = Lux;", "value");
Of course if you make an addon which is setting the certain globals in certain way you will be able then to read the values from inside the wrobot. So something like that is possible and it was done in pqr with pqi.
Of course, why didn't i think of that?
Thanks a ton mate!
I used to use PQR for WOTLK, where i made an in-game addon INSIDE pqr, i did exactly that to save my variables, i just totally forgot that i had done it, since it was ages ago. Thank you for the response! <3 -
4 minutes ago, forerun said:
Maybe is time for some education here.:P https://msdn.microsoft.com/en-us/library/h21280bw.aspx
Yes and it clearly states: \\ represents backslash in the post you just posted.
Anyway it's beside the point i made it work. You guys should rather focus on trying to help me with the other issues i have :P
-
Just now, iMod said:
Why should wrobot translate \\ to / ?
"translate" was just a rough term. In lua
\\
= backslash but for some reason when you use wrobot \\ turns into \ wen it spits out the code. Just like when you wanna do \n for newline you have to do \\n :)
Can we use savedVariables?
in Lua programming
Posted
I hit a roadblock here
It does change the setting if i click settings based on what i set HuntersMarkDisabled to in-game, but in-game doesn't change based on what it's set to in the settings (So it saves to settings, but doesn't load from settings)
I tried adding CurrentSetting.FetchFromLua(); to the "try" under load.
Do i need to rewrite the load, like the save has been rewritten for it to work? :)