Jump to content

FC question


79135

Recommended Posts

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 by Bambo
Link to comment
Share on other sites

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
Share on other sites

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 by Matenia
Link to comment
Share on other sites

 

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
Share on other sites

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
Share on other sites

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 by Matenia
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by Bambo
Link to comment
Share on other sites

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 by Bambo
Link to comment
Share on other sites

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
Share on other sites

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
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...