View Single Post
  #6  
Old 03-26-2012, 03:50 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I've updated this function, there was a bug.

PHP Code:
function getUpgradeStatus(pl) { 
  
temp.status pl.upgradestatus
  switch (
pl.upgradestatus) { 
    case 
"gold"
      
temp.status "Gold"
      break; 
    case 
"classic"
      
temp.status "Classic"
      break; 
    case 
"trial"
      if (
pl.communityname != pl.account || (!pl.account.starts("Graal") && !pl.account.starts("pc:"))) { 
        
temp.status "Community"
      } else { 
        
temp.status "Trial"
      } 
      break; 
  } 
  return 
temp.status

Control-NPC Usage:

PHP Code:
function onActionPlayerOnline() {
  
clientr.upgradestatus getUpgradeStatus(player);
}

function 
getUpgradeStatus(pl) { 
  
temp.status pl.upgradestatus
  switch (
pl.upgradestatus) { 
    case 
"gold"
      
temp.status "Gold"
      break; 
    case 
"classic"
      
temp.status "Classic"
      break; 
    case 
"trial"
      if (
pl.communityname != pl.account || (!pl.account.starts("Graal") && !pl.account.starts("pc:"))) { 
        
temp.status "Community"
      } else { 
        
temp.status "Trial"
      } 
      break; 
  } 
  return 
temp.status

__________________
Quote:
Reply With Quote