Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-03-2011, 06:39 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Chat customizer!

So i finally figure how to trigger serverside! Its opened a lot more options to me with GS2. Anyway, heres what i came up with. Hope you like it. Its only very simple but to me, its a huge step!

PHP Code:
//Scripted by Emera. Chat Customizer!
function ActionServerSide() {
  if ( 
params[0] == "chat" ) {
    
player.chat(params[1]);
  }
}
//#CLIENTSIDE
function onPlayerChats() {
if (
player.chat == player.chat) {
player.chat "Emera: "@player.chat;
}
}

for ( 
temp.allplayers ) {
  
with (temp.p) {
    
triggerServer"gui"this.name"chat"message );
  }

It starts of the players chat with the message in the script. You can change it from "Emera: " by typing other messages in. There is no on / off yet because i haven't got to that stuff yet. Thanks guys.
__________________
Reply With Quote
 


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 10:30 PM.


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