View Single Post
  #2  
Old 06-30-2007, 09:22 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
PHP Code:
public function applyStatChange(stat, amt) {
  
temp.limited = {"hp", "mp"};
  
temp.max = 0;
  
temp.min = 0;

  if (
amt.type() != 0) return; // not a number
  
with (findPlayer(this.account)) {
    
clientr.mud.(@ stat) += amt;
    if (
stat in limited) {
      
max = clientr.mud.(@ "max" @ stat);
      
min = clientr.mud.(@ "min" @ stat);
      if (
clientr.mud.(@ stat) > max)
        
amt = max;
      if (
clientr.mud.(@ stat) < min)
        
amt = min;
    }
  }
} 
__________________
Reply With Quote