Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-12-2010, 04:59 PM
Imperialistic Imperialistic is offline
graal player lord
Imperialistic's Avatar
Join Date: Apr 2007
Location: Florida
Posts: 1,094
Imperialistic is a jewel in the roughImperialistic is a jewel in the rough
TStaticVar Output Methods

With a little help from DrakilorP2P I created just a script that I'm actually proud of (NOT A SCRIPTER).

Was curious if there was any other easier methods or ways you could handle it?

PHP Code:
function onActionServerSide()
{
  if (
params[0] == "printMyVariable") {
    
myNewVar.loadvars("levels/users/Imperialistic/other/imptest.txt");
    
temp.theVariable base64decode(myNewVar.variable);
    
//echo("Loaded ---> " @ temp.theVariable);
    
findplayer("Imperialistic").sendPM(temp.theVariable);     
  }
  
 if (
params[0] == "saveMyVariable") {
 
myVar = new TStaticVar();
 
myVar.variable params[1];
 
//myVar.secondvariable = "World";
 
myVar.variable base64encode(myVar.variable);
 
myVar.saveVars("levels/users/Imperialistic/other/imptest.txt"1);
 } 
}
 
//#CLIENTSIDE
function onPlayerChats(){
 if (
player.chat ":load"){
      
triggerServer("gui"this.name"printMyVariable");
    }
if (
player.chat.starts("/save")) {
      
temp.argument player.chat.substring(5).trim();
      
temp.arguments temp.argument.tokenize();
      
triggerServer("gui"this.name"saveMyVariable"temp.argument);
  }
 } 
__________________
" It's been swell, but the swelling's gone down. "
Reply With Quote
 

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 04:34 AM.


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