ID:149420
 
How do you make vars be defined as words and they grow? I want exp to give military ranks (ex. Sergeant, Lieutenant, etc.) instead of levels (ex. 1, 2, etc.). The ranks should grow as experience grows, but exp isn't reset.
I think a simple way to do it is just two have two vars, one for rank number and one for rank name, then you can modify rank name based on rank number like this:

<code>mob/verb/set_rank(num as num) usr.rank = num usr.rank_name = Rank(num) proc/Rank(num) switch(num) if(1) return "Ant" if(2) return "Fly Smasher" if(3) return "Slugmaster" if(4) return "Cowcruncher" if(5) return "Wielder of Big Club" if(6) return "Bone-muncher" else return "Tofu Eater"</code>

Thus Rank() will be given a number, and based on that number will return a value name specified in the Rank proc.
In response to Foomer
I mean, that it's defined by experience, which is defined by points.
In response to Drafonis
Drafonis wrote:
I mean, that it's defined by experience, which is defined by points.

Then use the example that he gave you. Nobody is giving you code...for free :)
In response to Drafonis
You can use if([num] to [num]) in a switch() to define the area of experience that you want that title to apply to.