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 09-08-2011, 02:41 AM
furry_mougle furry_mougle is offline
big heart
furry_mougle's Avatar
Join Date: Aug 2011
Posts: 42
furry_mougle is an unknown quantity at this point
Serverside substring

how would I pass temp.tag serverside? it only registers clientside

edit: mark got it

PHP Code:
function onActionServerSide(cmd) {
  if (
cmd == "tag") {
    
player.guild temp.tag;
  }
  if (
cmd == "emptytag"){
    
player.guild "";
  }
}

//#CLIENTSIDE

function onPlayerChats(){
temp.tag player.chat.substring("/tag ".length());
  if (
player.chat.starts("/tag ") && player.guild == "" ) {
    
triggerserver("gui",this.name,"tag"); // triggers params tag and sets player guild
    
player.chat "Tag set to: " temp.tag;
  } else if(
player.chat == "/tag" && player.guild != "" ){
    
triggerserver("gui",this.name,"emptytag");
    
player.chat "";
  }

__________________
Quote:
Originally Posted by ffcmike View Post
But make sure to change beer.png to Orange Juice.
pay bills to play graal

Last edited by furry_mougle; 09-08-2011 at 03:13 AM..
Reply With Quote
  #2  
Old 09-08-2011, 02:46 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
need to send the tag to be set to as a parameter in your triggerserver.

triggerserver("gui", this.name, "tag", temp.tag);

then in the serverside, either define another param in the function definition
function onActionServerside(cmd, tag)

or change player.guild = temp.tag to
player.guild = params[1];
Reply With Quote
  #3  
Old 09-08-2011, 02:53 AM
furry_mougle furry_mougle is offline
big heart
furry_mougle's Avatar
Join Date: Aug 2011
Posts: 42
furry_mougle is an unknown quantity at this point
thanks markus! didn't even think of that dog!
__________________
Quote:
Originally Posted by ffcmike View Post
But make sure to change beer.png to Orange Juice.
pay bills to play graal
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 05:11 PM.


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