PDA

View Full Version : Send to irc tab assistance


rockstar
01-27-2015, 11:16 AM
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)


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

temp.pl.sendtoirc("privmsg", temp.nick, temp.tab, temp.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:

TServerPlayer.sendtoirc(str, str) - sends an irc message to the player/RC,
parameters are command and parameters, possible 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


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
What your looking for is


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