Graal Forums  

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

View Poll Results: Was this useful to you?
Yeah 4 57.14%
No 3 42.86%
Voters: 7. You may not vote on this poll

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-01-2006, 04:29 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Reset on Login (Text-Saved)

Text saved for reset. Also allows you to just change a variable to reset everyone easily =). Basically, on login it checks if your reset version is less then the players current version.. if it is lower it will reset you first (for security issues) and then add it. Works great, and well. =). Have fun, don't forget to rep!

In Control-NPC:
PHP Code:
function onCreated()
{
  
this.resetver 1;
}

function 
onActionPlayerOnline()
{
  
temp.rplayers.loadvars("resetlog.txt");

  if (
makevar("temp.rplayers.acct_" player.account) < this.resetver)
  {
    
sendtorc(format("/reset %s"player.account));

    
makevar("temp.rplayers.acct_" player.account) = this.resetver;
    
temp.rplayers.savevars("resetlog.txt"0);
    return 
false;
  }

  
// Whatever else you possibly have in the control-npc under actionplayeronline you can place here =).

The text file should be stored in scriptfiles/resetlog.txt.

Example File
acct_KuJi=1
Reply With Quote
  #2  
Old 10-01-2006, 03:54 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
If I had a server it'd be a good asset. Nice job =)
__________________
V$:CONFL16T
Reply With Quote
  #3  
Old 10-01-2006, 04:03 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Bleh. makevar() !

Simple but effective, none the less.
Reply With Quote
  #4  
Old 10-01-2006, 04:07 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by Skyld View Post
Bleh. makevar() !

Simple but effective, none the less.
Whats wrong with makevar()? :o
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #5  
Old 10-01-2006, 04:21 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by xXziroXx View Post
Whats wrong with makevar()? :o
I just prefer using temp.foo.(@ bar). I find it clearer.
Reply With Quote
  #6  
Old 10-01-2006, 05: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
Very cool =]
__________________
Reply With Quote
  #7  
Old 10-01-2006, 05:14 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Skyld View Post
I just prefer using temp.foo.(@ bar). I find it clearer.
I find it ugly =(.
Reply With Quote
  #8  
Old 10-01-2006, 07:05 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by Skyld View Post
I just prefer using temp.foo.(@ bar). I find it clearer.
Haha same here, maybe because you taught me the basics of gs2?
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #9  
Old 10-01-2006, 07:54 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
Quote:
Originally Posted by xXziroXx View Post
Haha same here, maybe because you taught me the basics of gs2?
Here too, I thought I was the only one...
__________________
Reply With Quote
  #10  
Old 10-02-2006, 06:41 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
I always used clientr flags for this. Doesn't really matter in the end i guess.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 07:25 AM.


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