Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Account Upgrade Status (https://forums.graalonline.com/forums/showthread.php?t=134262345)

fowlplay4 03-07-2011 07:18 AM

Account Upgrade Status
 
Due to the introduction of Community names there has been what I consider 4 different account types.

- Gold
- Classic
- Community (People with an actual community name not Graal######)
- Trial

This snippet will let you identify them accordingly, and provide a proper string for use in profiles.

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.communityname.starts("Graal")) {
        
temp.status "Community";
      } else {
        
temp.status "Trial";
      }
      break;
  }
  return 
temp.status;



PowerProNL 03-07-2011 10:14 AM

Never heard of 'community subscription' and I have my own acc (not Graal#), but useful for new servers :)

r3ckless 03-26-2012 03:22 AM

This is what I have, and it isn't returning my upgrade status...
What am I doing wrong?

PHP Code:

findplayer("Stowen").addweapon(this); 

//#CLIENTSIDE

function onCreated() {
getUpgradeStatus();
sleep("1");
player.chat pl.upgradestatus;
}

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.communityname.starts("Graal")) {
        
temp.status "Community";
      } else {
        
temp.status "Trial";
      }
      break;
  }
  return 
temp.status;



salesman 03-26-2012 03:25 AM

Quote:

Originally Posted by r3ckless (Post 1690034)
This is what I have, and it isn't returning my upgrade status...
What am I doing wrong?

PHP Code:

findplayer("Stowen").addweapon(this); 

//#CLIENTSIDE

function onCreated() {
getUpgradeStatus();
sleep("1");
player.chat pl.upgradestatus;
}

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.communityname.starts("Graal")) {
        
temp.status "Community";
      } else {
        
temp.status "Trial";
      }
      break;
  }
  return 
temp.status;



you're referring to an object, pl, that doesn't exist.

+ you're not even using the function he gave you.

xXziroXx 03-26-2012 03:31 AM

Quote:

Originally Posted by r3ckless (Post 1690034)
This is what I have, and it isn't returning my upgrade status...
What am I doing wrong?

I suggest you start with something much easier if this is above your level, which it clearly seems to be.

fowlplay4 03-26-2012 03:50 AM

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



Deas_Voice 04-11-2012 07:57 PM

you mind giving some information about this "community" subscription?
i'm sure there's a lot of us who haven't heard about that before.

for a instance, how do you obtain such thing?

fowlplay4 04-11-2012 08:12 PM

Quote:

Originally Posted by Deas_Voice (Post 1691796)
you mind giving some information about this "community" subscription?
i'm sure there's a lot of us who haven't heard about that before.

for a instance, how do you obtain such thing?

I invented it. It's basically a Graal###### account that has a community name which means they've upgraded at least once.

I use it on Zodiac to provide benefits above Trial status.

Admins 04-11-2012 09:31 PM

Yes that also means you can access the forums.


All times are GMT +2. The time now is 03:47 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.