Page 1 of 1

IF THEN tasks

Posted: Mon Apr 04, 2016 11:24 am
by afamilyguy
Hello. I am having problem with the IF THEN tasks below. Could you please anybody tell me the proper way to use these tasks?

Player.HP = 0 or Player.HP=%0 with "%" or without it? with spaces or not?
Player.HP < 1 or Player.HP<%1
Player.DistanceTo(X,Y,Z) > 100
Bot.RunTime = 30 minutes
Inventory.FreeSlots < 2

I also wonder the difference between IF and WHILE tasks. I am having problem with going to patrol area after character dies. What can you suggest me for it?

I will appreciate if you give examples for them. It has been 4-5 days I am trying hard to make a good bot but still having many problems. If I tried so hard without bot, I would already become 55 lvls as I wasted many time without sleep :/ Thank you.

Re: IF THEN tasks

Posted: Tue Apr 05, 2016 12:38 am
by PitViper
Player.HP returns a number 0 to 100, so you use it like:

Player.HP < 50 ..... then do something if your HP is < 50%

Same for player.Distance, returns the distance to that point from the player...

Bot.RunTIme returns hours.. .5 would be half an hour.

Google IF and WHILE logic, its pretty basic info. If condition do this (once) or WHILE condition.. do this (until condition is false)