Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   onRcPlayerChats(){ ? (https://forums.graalonline.com/forums/showthread.php?t=134264904)

Gunderak 10-28-2011 09:46 AM

onRcPlayerChats(){ ?
 
Is there any form of onRcPlayerChats
I know of onRCChat(){
but that will only work if you open the scripted rc.
I ask this question because I am trying to script an rc chat system for non gold staff.

fowlplay4 10-28-2011 03:54 PM

No. (You were already told this...)

Gunderak 10-28-2011 04:19 PM

yes but is there any form of even reading it from the rclog.txt file?
I have kinda worded my question wrong aswell.
And btw I can barely remember what I have eaten for breakfast, let alone that one fact ;)

cbk1994 10-28-2011 09:47 PM

rclog.txt is a log of RC actions, not chat. There's no known way to get RC chat serverside.

Gunderak 10-29-2011 01:58 AM

bugger.
Is there any way to read from the rclog.txt file and load the last five lines excluding the date/time?

callimuc 10-29-2011 02:19 AM

Quote:

Originally Posted by Gunderak (Post 1672245)
bugger.
Is there any way to read from the rclog.txt file and load the last five lines excluding the date/time?

Something like this could work. This lists the "chat" of the other players, and adds something you will "chat".

PHP Code:

function onActionServerSide() {
  if (
params[0] == "AddText") {
    
temp.filename "logs/rclog.txt";
    
temp.lines = {params[1SPC "(" SPC params[2SPC "):" SPC params[3]};
    
temp.lines.savelines(temp.filename1);
    
temp.file.loadlines(filename);
    for (
temp.aallplayerstemp.a.triggerclient(name"ShowText"temp.file);
  }
}

//#CLIENTSIDE

//GUI stuff

function RC2_textedit01.onAction() {
  
triggerserver("gui"name"AddText"player.nickplayer.communitynameRC2_textedit01.text);
  
RC2_textedit01.text "";
}

function 
onActionClientSide() {
  if (
params[0] == "ShowText"RC2_chatlist_text.addrow(0temp.c[temp.cd]);



Gunderak 10-29-2011 03:12 AM

ok thanks, I'm have a little play around with that.


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

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