|
Curtis Novice
Joined: 25 Nov 2002 Posts: 39 Location: USA
|
Posted: Wed Oct 29, 2003 12:25 pm
Stringlist or Database Question |
I have the ability in my mud to touch players to check thier health status. Im trying to use this ability in a team fight to determine which of my enemies would have the lowest health and than target that player. Im looking for some guidance on the best way to do this. I know how to use stringlists but am not familiar with databases. Is this possible to do in a stringlist or do I need to sort this into a database.
This would be my command to touch.
#FORALL @enemylist {touch %i}
This will be the mud output I receive if they are in the room.
Doctor Evil has a health of 560 / 1000.
I need the EVIL and the 560 added to a database or stringlist and than sorted so the enemy with the lowest health is set as my target. |
|
|
|
megamog75 Enchanter
Joined: 20 Nov 2002 Posts: 627 Location: USA
|
Posted: Wed Oct 29, 2003 3:13 pm |
string list is fine,there are a number of ways to do it.
(%w) has a health of (%d) / 1000.
Doctor Evil has a health of 560 / 1000.
enemyhealth=%1~*%2
enemyhealth=560*evil
then use if statments to check against it
bug bot has a health of 230/3000.
if 230<560 change the enemyhealth if not stay with the one you got
go through your enemy list like this and your all set |
|
|
|
|
|