79135 4 Posted December 18, 2018 Share Posted December 18, 2018 Why if i add condition type c sharp code with operator || Bot will try use the spell every time not paying attention to other conditions? Link to comment https://wrobot.eu/forums/topic/10512-fc-question/ Share on other sites More sharing options...
Droidz 2738 Posted December 18, 2018 Share Posted December 18, 2018 hi, Sets the code between ( and) Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49973 Share on other sites More sharing options...
Bambo 148 Posted December 18, 2018 Share Posted December 18, 2018 (edited) https://www.programiz.com/c-programming/c-operators Check "Logical Operators". If I understand correctly you want to use a logical OR but in same condition another OR / AND but your problem is that the bot is not looking for those conditions but instead just checks the first OR? If I understand that correctly you might wanna use something like this (Usefuls.ContinentId == (int) ContinentId.Kalimdor || Usefuls.ContinentId == (int) ContinentId.Azeroth) && ObjectManager.Me.Level = 10 Edited December 18, 2018 by Bambo Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49974 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 3 minutes ago, Droidz said: hi, Sets the code between ( and) All another condition like (Me Level && Me In Cast && C Sharp Code && Buff && C Sharp Code) && (Kalimdor || Azeroth) . so? Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49975 Share on other sites More sharing options...
Matenia 628 Posted December 18, 2018 Share Posted December 18, 2018 (edited) All conditions in wRobot are combined with a && operator. In the fightclass editor, you can only create "or" scenarios, but using one sole C# or Lua condition OR creating a second spell with the same name and different conditions. I recommend you just look into how to use C# to write a fightclass from scratch and don't use the editor. Also what Droidz said - wrap your C# conditions in brackets like this: ( <condition> ) You can do everything in one C# conditon too: ObjectManager.Me.Level < 25 && !ObjectManager.Me.IsCast && ObjectManager.Me.HaveBuff("Power Word: Shield") && Usefuls.ContinentId < 2 Edited December 18, 2018 by Matenia Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49976 Share on other sites More sharing options...
Bambo 148 Posted December 18, 2018 Share Posted December 18, 2018 (edited) Wait, why can't we use logical OR in fightclass editor? it works in easy quester editor as well? Edit: Nvmd Edited December 18, 2018 by Bambo Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49978 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 12 minutes ago, Bambo said: https://www.programiz.com/c-programming/c-operators Check "Logical Operators". If I understand correctly you want to use a logical OR but in same condition another OR / AND but your problem is that the bot is not looking for those conditions but instead just checks the first OR? If I understand that correctly you might wanna use something like this (Usefuls.ContinentId == (int) ContinentId.Kalimdor || Usefuls.ContinentId == (int) ContinentId.Azeroth) && ObjectManager.Me.Level = 10 Yes. Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49979 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 5 minutes ago, Matenia said: All conditions in wRobot are combined with a && operator. In the fightclass editor, you can only create "or" scenarios, but using one sole C# or Lua condition OR creating a second spell with the same name and different conditions. I recommend you just look into how to use C# to write a fightclass from scratch and don't use the editor. Also what Droidz said - wrap your C# conditions in brackets like this: ( <condition> ) You can do everything in one C# conditon too: ObjectManager.Me.Level < 25 && !ObjectManager.Me.IsCast && ObjectManager.Me.HaveBuff("Power Word: Shield") && Usefuls.ContinentId < 2 oh, I wanted to do everything in a simple way, but I have to do everything conditions in the C Shape form.. Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49980 Share on other sites More sharing options...
Matenia 628 Posted December 18, 2018 Share Posted December 18, 2018 (edited) 5 minutes ago, Bambo said: Wait, why can't we use logical OR in fightclass editor? it works in easy quester editor as well? Because all conditions are combined (if you look at Spell Conditions and the way he entered them) through AND operators. You can only use OR operators, if you create your very own condition from scratch. But the way the fightclass editor adds up conditions that are set separately is through AND. 1 minute ago, 79135 said: oh, I wanted to do everything in a simple way, but I have to do everything conditions in the C Shape form.. You can do it in the form you wanted before (if you set brackets the way Droidz/Bambo explained), but it's really, really slow and inefficient. Edited December 18, 2018 by Matenia 79135 1 Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49981 Share on other sites More sharing options...
Droidz 2738 Posted December 18, 2018 Share Posted December 18, 2018 To see the result you can convert the fightclass to C# (in fightclass editor) Matenia and 79135 2 Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49982 Share on other sites More sharing options...
Bambo 148 Posted December 18, 2018 Share Posted December 18, 2018 1 minute ago, 79135 said: oh, I wanted to do everything in a simple way, but I have to do everything conditions in the C Shape form.. do what schaka said and learn c sharp, the forum can help the editor for fightclass and quest is ineffective in many cases 79135 1 Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49983 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 Still some question. how to force bot to use mount with name from my settings? Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49984 Share on other sites More sharing options...
Bambo 148 Posted December 18, 2018 Share Posted December 18, 2018 (edited) 1 minute ago, 79135 said: Still some question. how to force bot to use mount with name from my settings? Do you mean to force to mount up or to change the wrobot setting to a specific mount name? 2 minutes ago, Matenia said: Because all conditions are combined (if you look at Spell Conditions and the way he entered them) through AND operators. You can only use OR operators, if you create your very own condition from scratch. But the way the fightclass editor adds up conditions that are set separately is through AND. You can do it in the form you wanted before (if you set brackets the way Droidz/Bambo explained), but it's really, really slow and inefficient. I understand now. It is a fightclass editor thing that just chains all different conditions one after another and combines with &&. I misunderstood you. Edited December 18, 2018 by Bambo Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49985 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 Just now, Bambo said: Do you mean to force to mount up or to change the wrobot setting to a specific mount name? Force to mount up Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49986 Share on other sites More sharing options...
Bambo 148 Posted December 18, 2018 Share Posted December 18, 2018 (edited) 2 minutes ago, 79135 said: Force to mount up In vanilla I would try with ItemsManager.UseItem(11111); 1111 = your mount item id PS: Not sure if this is correct Edited December 18, 2018 by Bambo Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49987 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 Just now, Bambo said: In vanilla I would try with ItemsManager.UseItem(11111); 1111 = your mount item id PS: Not sure if this is correct while(!ObjectManager.Me.IsMounted) { SpellManager.CastSpellByNameLUA(wManager.wManagerSetting.CurrentSetting.FlyingMountName) Thread.Sleep(Others.Random(1500, 2500)); } I need to get name mount from settings Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49988 Share on other sites More sharing options...
Bambo 148 Posted December 18, 2018 Share Posted December 18, 2018 is mounting handled as a spell in vanilla? Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49989 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 Just now, Bambo said: is mounting handled as a spell in vanilla? I need for 3.3.5 ver WoW Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49990 Share on other sites More sharing options...
Bambo 148 Posted December 18, 2018 Share Posted December 18, 2018 So is the Spell name the exact same name as the mount? or is there any addition like "Summon: Mountname" Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49991 Share on other sites More sharing options...
Matenia 628 Posted December 18, 2018 Share Posted December 18, 2018 wManager.Wow.Bot.Tasks.MountTask.Mount(); // no conditions required 79135 1 Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49992 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 Just now, Matenia said: wManager.Wow.Bot.Tasks.MountTask.Mount(); // no conditions required Yes, work! Thanks Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49993 Share on other sites More sharing options...
79135 4 Posted December 18, 2018 Author Share Posted December 18, 2018 13 minutes ago, Bambo said: So is the Spell name the exact same name as the mount? or is there any addition like "Summon: Mountname" "So is the Spell name the exact same name as the mount?" - yes. If you use macro /cast Warhorse char is mount on warhorse Link to comment https://wrobot.eu/forums/topic/10512-fc-question/#findComment-49994 Share on other sites More sharing options...
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