Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-12-2010, 03:09 AM
Jimbo33 Jimbo33 is offline
****
Jimbo33's Avatar
Join Date: Jan 2008
Location: Canada
Posts: 74
Jimbo33 is on a distinguished road
Send a message via AIM to Jimbo33 Send a message via MSN to Jimbo33
Small question!

Hi,

I'm making a class selection GUI, and I want the player to get a specific weapon AND to get clientr.playerclass set to something when selecting a specific class, but the problem is that the stuff happening on button action are clientside, while adding weapons and editing those variables is serverside. Someone told me long ago how to call stuff serverside from clientside, something like:

HTML Code:
triggeraction(this.x,this.y ... or something like that?
So yeah, here's the part of my script after the player has pushed the button to select his class:

PHP Code:
function ClassSelect_Button3.onAction() {
  
clientr.playerclass "Swordsman";
  
addWeapon("-Swordsman/Skill1");
  
ClassSelect_Window1.destroy();

Obviously,the only thing working here is ClassSelect_Window1.destroy(), clientr.playerclass and addWeapon don't work because they have to be serverside...

HELP
Reply With Quote
  #2  
Old 02-12-2010, 03:19 AM
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
Check out this thread. I can explain more if needed.
__________________
Reply With Quote
  #3  
Old 02-12-2010, 03:20 AM
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
Searching triggerserver, triggeraction, or triggerclient should also provide more information on what you're looking for as well.
__________________
Quote:
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 02:19 PM.


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