Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Attention: IRC Bots (https://forums.graalonline.com/forums/showthread.php?t=60801)

KuJi 08-28-2005 05:00 AM

Attention: IRC Bots
 
1 Attachment(s)
Alright, first I would like to tell you all where to get information about irc bots.

http://ilfirin.org/graal/Graal_v4_IRC

Go their for information about the irc bots.


Now, for the event bots.

I had access to the admin panel, but after the new update..I lost it. I no longer recieve admin, I've tried everything. Restarting NC. Restarting Game Server etc..nothing has worked.

The problem is somewhere is one of these parts of the scripts:
NPC Code:

sendtext("irc","privmsg",{"IRCBot","!resetevents"} );
OR
function onReceiveText(texttype,textoption,textlines) {
if (texttype=="irc" && textoption=="privmsg" &&
textlines[0]=="IRCBot" && textlines[1]=="!eventsbotlogin") {
sendtext("irc","privmsg",{"IRCBot",{"!eventadmins" ,this.admins[0],this.admins[1]}});
sendtext("irc","privmsg",{"IRCBot",{"!eventchannel ",this.channel}});
}
}




And, theirs a bug with the IRC Chat (Picture Attached)

Ajira 08-28-2005 05:11 AM

Quote:

Originally Posted by KuJi
NPC Code:
sendtext("irc","privmsg",{"IRCBot",{"!eventadmins"  ,this.admins[0],this.admins[1]}});


Hmm, just putting this.admins there should work, but if it worked like that before, then I don't know.

raiden0899 08-28-2005 06:42 AM

I'm in that pic. I feel special :D.

projectigi 08-28-2005 08:31 AM

uhm didnt work for me too
i just put the !eventsadmin and !eventschannel pm thing in the doconnect part lol

Skyld 08-28-2005 12:35 PM

this.admins does have a value, yes?

projectigi 08-28-2005 12:49 PM

uhm event if it has one
when i took this script form graalwiki and put my account in it didnt even recieve a message form IRCBot lol

Skyld 08-28-2005 12:57 PM

Quote:

Originally Posted by projectigi
uhm event if it has one
when i took this script form graalwiki and put my account in it didnt even recieve a message form IRCBot lol

You may need to restart the gserver to allow IRC connections.

projectigi 08-28-2005 02:25 PM

then why my irc and events bot are both in the irc channels where they should be and send pm and things
just this events bot didnt get a message from IRCBot

Skyld 08-28-2005 02:39 PM

Quote:

Originally Posted by projectigi
then why my irc and events bot are both in the irc channels where they should be and send pm and things
just this events bot didnt get a message from IRCBot

Have you tried outputting the text from onReceiveText, to ensure that you are not actually receiving it?

projectigi 08-28-2005 04:56 PM

it didnt recieve anything form ircbot
because i places a echo right after
if(textlines[0]=="IRCBot")

KuJi 08-28-2005 04:56 PM

I am not recieving it, I tried to make it send text to channel, no worky.

Restarted, still doesn't work. Used to work b4 updae.

Yes their is something in this.admins
this.admins=Admin-Playerworld64,KuJi

Ajira 08-28-2005 05:19 PM

Quote:

Originally Posted by KuJi
I am not recieving it, I tried to make it send text to channel, no worky.

Restarted, still doesn't work. Used to work b4 updae.

Yes their is something in this.admins
this.admins=Admin-Playerworld64,KuJi

this.admins = {"Admin-Playerworld64", "KuJi"};

projectigi 08-28-2005 05:32 PM

ehr i think thats wrong ajira xD

Skyld 08-28-2005 06:06 PM

Quote:

Originally Posted by projectigi
ehr i think thats wrong ajira xD

I think you will find it is not.

Thrashsoul3 08-29-2005 01:08 AM

I would like to tell you that: sendtext("irc","privmsg",{"IRCBot","!resetevents"} );

That dos not reset the events, and i've restarted server several times. Does not work.

coreys 08-29-2005 01:27 AM

NPC Code:
function oncreated() {
sendtext("irc","login","Aeon IRC Bot");
sendtext("irc","join","#Aeon");
}
function onRecieveText("irc","kick","") {
if (clientr.ircadmin) {
if (texttype == "irc") {
if (textoptions == "kick") {
with (getplayer(params[3])) {
sendtext("irc","part","#Aeon");
}
sendtonc(params[3]"has been kicked from the IRC channel");
}
}else echo("I am recieving non-IRC data!");
}
}



anyone know what I'm doin wrong?

Skyld 08-29-2005 02:05 AM

Yes

function onRecieveText("irc","kick","") {

WHAT IS THAT?

Ajira 08-29-2005 03:22 AM

Quote:

Originally Posted by Skyld
Yes

function onRecieveText("irc","kick","") {

WHAT IS THAT?

LOL.
BTW, the bot nickname has to START with IRCBot_, Graal_, or EventsBot_.

Thrashsoul3 08-29-2005 03:51 AM

Bot does not recieve data from IRCBot, but does recieve other data.

napo_p2p 09-02-2005 11:14 AM

Mine didn't work until i changed:

NPC Code:
 if (texttype == "irc" && textoption == "privmsg" && textlines[0] == "IRCBot" && textlines[1] == "!eventsbotlogin") {



to

NPC Code:
 if (texttype == "irc" && textoption == "privmsg" && textlines[0] == "IRCBot" && textlines[2] == "!eventsbotlogin") {



(textlines[1] to textlines[2])

EDIT:
For Script ID: and Params: in the event admin window, how is that used exactly?

(I understand the script id part, but how do you access the params?)

Skyld 09-02-2005 12:29 PM

Well pointed out, napo_p2p. There was a mistake in the GraalWiki. textlines[1] is the destination, where textlines[2] is the data. It was checking the one wrong, but I have fixed it now.

Quote:

Originally Posted by napo_p2p
EDIT:
For Script ID: and Params: in the event admin window, how is that used exactly?

(I understand the script id part, but how do you access the params?)

The params are passed to the eventsbot when an event begins.

You will get something like this:

textlines[0]: IRCBot
textlines[1]: EventsBot_Rudora
textlines[2][0]: !startevent
textlines[2][1]: 1 (That's the script ID)
textlines[2][2]: test (That's the params option)
textlines[2][3]: Team A, Team B (team names as array)
textlines[2][>=4]: Player and team information

Update: added a parameter for team names (Stefan)


All times are GMT +2. The time now is 01:10 AM.

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