Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-13-2011, 07:52 PM
Ohk4y Ohk4y is offline
Registered User
Ohk4y's Avatar
Join Date: Jun 2011
Posts: 43
Ohk4y is an unknown quantity at this point
Send a message via AIM to Ohk4y
Player Subscription Check

I have been trying to figure out how to check if the player is Gold, trial, or classic for a while now and I came across
PHP Code:
player.subscription 
and on Esteria, it won't display my upgrade status if I do the following clientside or serverside
PHP Code:
player.chat player.subscription 
Is there another way to check for this?
- Thanks
__________________
Reply With Quote
  #2  
Old 11-13-2011, 07:57 PM
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
There is no player.subscription, it's player.upgradestatus. Here's some sample usage...

Control-NPC:

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

__________________
Quote:
Reply With Quote
  #3  
Old 11-13-2011, 08:00 PM
Ohk4y Ohk4y is offline
Registered User
Ohk4y's Avatar
Join Date: Jun 2011
Posts: 43
Ohk4y is an unknown quantity at this point
Send a message via AIM to Ohk4y
Thank you! it works
Rep +
__________________
Reply With Quote
  #4  
Old 11-14-2011, 05:06 PM
MysticalDragon MysticalDragon is offline
Global Administration
MysticalDragon's Avatar
Join Date: Oct 2002
Location: Lynn Ma
Posts: 883
MysticalDragon is just really niceMysticalDragon is just really nice
Send a message via AIM to MysticalDragon Send a message via MSN to MysticalDragon
And for the record /scripthelp is your friend! /scripthelp upgrade returned this
TServerPlayer.upgradestatus - string (read only). And to test that I just did in the top of a script (serverside of course)
NPC Code:
temp.md = findplayer("MysticalDragon").upgradestatus;
echo("Echo Test" SPC temp.md);


and that returns in RC "Echo Test gold".
__________________
~Delteria Support
~Playerworld Support
~PWA Chief
http://support.toonslab.com
[email protected]



Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:50 PM.


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