Hello, nice piece of programming here. Im just beginning to work my way into this language, my previous experience being with a simplified form of C used to program NPC AIs for Neverwinter Nights. Luckily I keep two videogame addictions for when I burn out on one of them
Anyways, my point:
Ive hit a wall in my initial script attempts here with what seems like a simple thing; my if statements are not being parsed. Ive compared them to other statements in the Hunter.bot I am modifying, but my syntax looks like existing syntax, so I don't understand why I am getting the "Unable to Parse" error at my own code.
The following is what Ive tried to write. It is just a modification in the hunter.mac in the part that chooses the target. Instead of a random one by name, I want to choose the nearest target of a calculated level range based off of my own toon's level:
Code: Select all
|Check max level of mob
|Compare to own level
/varset OwnHp $char(level)
/echo @OwnHp
/varset MobHp $target(level)
/echo @MobHp
/varset MaxMob $calc(@OwnHp-2)
/echo @MaxMob
/varset MinMob $calc(@OwnHp-6)
/echo @MinMob
if n $int($calc(@OwnHp-2))<@MobHp /goto :Aquire
if n $int($calc(@OwnHp-6))>@MobHp /goto :Aquire
