IF THEN tasks

Anything related to MMOViper that doesn't fit in a better forum. All are welcome to participate. Also use this area for pre-sale members to ask questions.

Moderator: ScreamingEagle

Post Reply
Message
Author
afamilyguy
Posts: 4
Joined: Wed Mar 30, 2016 10:11 pm

IF THEN tasks

#1 Post 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.

PitViper
Site Admin
Posts: 20778
Joined: Tue Oct 16, 2007 7:01 am

Re: IF THEN tasks

#2 Post 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)

Post Reply

Return to “General Discussion Area”