Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Lil help needed (https://forums.graalonline.com/forums/showthread.php?t=134263038)

Emera 04-29-2011 12:13 PM

Lil help needed
 
Heya i was wondering, is there a way to send players chat to the RC? Like, lets say if the chat begins with // then i type something (//Hello) it would send it to RC as

Account: Hello

Is this possible at all?
Many thanks in advance if you post.
:cool:

Crow 04-29-2011 02:12 PM

You probably know of the onPlayerChats event. You should check if the player's chat begins with your desired string there ("//" in this case) and then send a trigger to the serverside. There, you can use sendToRC() or echo() to send a message to RC. If you're using echo(), only people with NPC-Control will be able to see it (unless sendechotorc is set to true in the server options).

fowlplay4 04-29-2011 03:24 PM

If you have Client-RC on, you can just use sendtorc.

I.e:

PHP Code:

//#CLIENTSIDE
function onPlayerChats() {
  
sendtorc(player.chat);



Emera 04-29-2011 05:42 PM

Check my other thread dude :) thanks for the help tho


All times are GMT +2. The time now is 08:22 AM.

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