Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-25-2006, 08:08 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Resetting Player Attributes

Create a new database called
'Control_PlayerReset'
Inside that database, add in this script:

HTML Code:
public function doPlayerReset(playerAccount, resetNumber)
{ 
  if (temp.playerAccount in this.(@ "v" @ temp.resetNumber @ "-accounts"))
  {
    return false;
  }

  this.(@ "v" @ temp.resetVersion @ "-accounts").add(temp.playerAccount);
  sendtorc("/reset " @ temp.playerAccount);
  
  this.trigger("update", ""); 
}
Once you've added both of those two in, add in the Control-NPC [Or in a player-login sequence if there is one!] this script

HTML Code:
//Change the second value to the reset value for a quick reset
Control_PlayerReset.doPlayerReset(player.account, 1);
__________________

Last edited by Skyld; 09-25-2006 at 08:19 PM..
Reply With Quote
 


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 12:33 AM.


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