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 03-01-2011, 10:48 PM
callimuc callimuc is offline
ジ
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
changing player.nick, player.guild,..

Hey guys. I´m trying something which i might also post in code gallery if it´s finished . But currently i got a fail. I want like when I press the gui button, that it will change the player.guild,... but it wont work. Script here :

PHP Code:
function onActionServerSide() {
  if (
params[0] == "test") {
    
player.nick = login_nickname1.text;
    
player.guild = login_nickname2.text;
  }
}
//#CLIENTSIDE
//gui stuff
function button1.onAction() {
  
triggerserver("gui",this.name,"test");
} 
-callimuc
Reply With Quote
  #2  
Old 03-01-2011, 10:52 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
PHP Code:
function onActionServerSide() {
  if (
params[0] == "test") {
    
player.nick = params[1];
    
player.guild = params[2];
  }
}
//#CLIENTSIDE
//gui stuff
function button1.onAction() {
  
triggerserver("gui",this.name,"test",login_nickname1.text,login_nickname2.text);
} 
GUI controls are clientside, so you can't access their data from the server, thus you pass them in parameters.
Reply With Quote
  #3  
Old 03-01-2011, 10:53 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Make sure to follow the advice in this thread as well.
__________________
Reply With Quote
  #4  
Old 03-02-2011, 12:06 AM
callimuc callimuc is offline
ジ
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Oh ok thx. I'm currently on iPod here, and my gold will end tonight so I'll try it out when I'm upgraded again
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 09:20 PM.


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