Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Send to irc tab assistance (https://forums.graalonline.com/forums/showthread.php?t=134269823)

rockstar 01-27-2015 11:16 AM

Send to irc tab assistance
 
hey all, im not script ninja so ill need some assistance here if ya's don't mind.
Ive got a report system working (thanks to another staff member) and a tab system working (thanks Carlito).
Ive created a tab specifically for reports but am unaware on how to echo the report to the other tab.
any help is appreciated.
TIA

callimuc 01-27-2015 02:09 PM

it's pretty easy (using temp.flags for better understanding)

PHP Code:

temp.pl findPlayer(player2receiveMessage);
temp.nick temp.pl.nick;
temp.tab "Reports";
temp.message "Incomming report!";

temp.pl.sendtoirc("privmsg"temp.nicktemp.tabtemp.message); 

The message 'Incomming report!' would appear in the 'Reports' tab with a nick (the green part at the beginning) of your 'temp.pl.nick'.

Additional info:

PHP Code:

TServerPlayer.sendtoirc(strstr) - sends an irc message to the player/RC,
parameters are command and parameterspossible commands are join (channel),
part (channel), topic (channel,topic), privmsg (source,channel,message),
notice (source,channel,message


MysticalDragon 01-28-2015 12:21 AM

What your looking for is

PHP Code:

  temp.message "Test";
  (
"RC_Tabs").tabecho("Reports""Report:"temp.message); 

RC_Tabs is the database the public function is located at. The first param is the tab name, second param is the name of your echo sorta like "[NPC-Control]:". The last param is the the message you want to be displayed in the tab. Its best to use this method because it works with client-rc on your server into specific tabs.

rockstar 01-28-2015 10:17 AM

Thanks MD.

callimuc 01-28-2015 10:36 AM

Quote:

Originally Posted by MysticalDragon (Post 1734267)
What your looking for is

PHP Code:

  temp.message "Test";
  (
"RC_Tabs").tabecho("Reports""Report:"temp.message); 

RC_Tabs is the database the public function is located at. The first param is the tab name, second param is the name of your echo sorta like "[NPC-Control]:". The last param is the the message you want to be displayed in the tab. Its best to use this method because it works with client-rc on your server into specific tabs.

Oh wow, never knew that existed. Does it provide any more functions for us to use?

xAndrewx 01-29-2015 02:44 PM

@Callimuc - he made a DB on his server with the function in.

It's not an actual global script


All times are GMT +2. The time now is 01:24 PM.

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