mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
I have this script in my remotes:
ON *:TEXT:!rsfact :#: { /msg $chan$readrsfact.txt }

Whats supposed to happen is when som1 types !rsfact it will then look into the text and read a random fact. AT first it worked but it took a few tries. Afer looking in the bots status section i saw it was saying * /describe: insufficient parameters
-
* /describe: insufficient parameters

Whats wrong with it?

Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Well, the error you are getting is not caused by this particulair remote script, since the /describe command is not used here.

The remote you showed, is wrong though.
The correct version is:
ON *:TEXT:!rsfact:#:{ msg $chan $read(rsfact.txt) }

This should work without problems.
But like I said, it won't solve the error, since its simply caused by another script.

Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
Thanks man. I got another question:
Trying to get it so any ops can invite my bot. The code I got is:
ON @*:INVITE:#:
if ($nick isop $chan) {
/join $chan}
}

It isnt working. Am I doing it wrong.
Also we want a script that will acitivate with a command like !setevent (ops only) [event info etc here]

Then som1 later can say !event and it will say w/e the person inputed before.

Does any1 have any idea on how to do this?

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Originally Posted By: zad0909
Thanks man. I got another question:
Trying to get it so any ops can invite my bot. The code I got is:
ON @*:INVITE:#:
if ($nick isop $chan) {
/join $chan}
}

It isnt working. Am I doing it wrong.
Also we want a script that will acitivate with a command like !setevent (ops only) [event info etc here]

Then som1 later can say !event and it will say w/e the person inputed before.

Does any1 have any idea on how to do this?


You need a } for every {. You have 2 }. Remove the } in join $chan}.

By the way, in order to know whether someone is op in a channel, you have to be in the channel. That means you needed to know the person was op in the channel he was inviting you before joining it. Understand? I wouldn't even include the if ($nick isop $chan) part..

Last edited by LostShadow; 04/08/07 01:48 AM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
For his script, he does need 2 }'s and 2 {'s. He's missing one { on the first line and the } you mentioned needs a space before it.

That said, you're right that there's no way to know if the person is an op without being in the channel. However, since you're doing this with specific ops in mind, just give those ops access levels and use that.

Code:
ON safeinvite:INVITE:#: {
  join $chan
}


Then, in your Users List tab, enter the nicks/addresses like this:

safeinvite:nick1
safeinvite:nick2
safeinvite:nick3

or:

safeinvite:nick1!ident@host
safeinvite:nick2!ident@host
safeinvite:nick3!ident@host

You can use various masks for this, such as *!*@host if you want.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
I had had an idea similiar to that before.
However the problem was if they were any status in a differnt channel they could invite the bot.

If there is no way around this then i suppose I shall have to live.

Thanks for the help.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Limit it to only channels that you want the bot it, or limit it to only people who you actually want to allow to invite it. Trust those people to only invite when they are ops and let them know that you'll remove the priveledge of inviting the bot if they do it when they are not ops.

You really shouldn't give any control over a bot to anyone you don't trust anyhow.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
OK thats a good idea. Thanks.
Lastly if someone could please help me with this new script i am working on. Its a scirpt where after saying something like !setevent (provided you are op'd) you can set a "message". Then anyone can say !event then it would say w/e the op'd person said following !setevent. I thought this would work but it doesnt:
ON *:TEXT:$1:#: {
if ($nick isop $chan) {
else (/msg $nick you are not op'd in this channel) {
if ($1 == !setevent *|echo -a new event set. {

}
}
}
}
ON *TEXT:!event:#: {/msg $nick $1}

I"m still kinda new at this (obviously)

Can you guys help me out?

Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Code:
on *:TEXT:!setevent*:#:{
  if ($nick isop $chan) {
    set %event-text $2
    msg $chan Event stored successfully.
  }
}

on *:TEXT:!event:#:{
  msg $chan %event-text
}


Ok, this will do what you asked.
But in this format it will remember only one "setevent" at the time.

Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
Very nice it works thanks a lot. But is there anyway to make the script work so that it wil work with spaces. like if i type this

!setevent test. test. test.

Then type

!event

I get test.

It stops after the first space. Anyway to correct that?

Joined: Jul 2007
Posts: 19
O
Old Offline
Pikka bird
Offline
Pikka bird
O
Joined: Jul 2007
Posts: 19
Code:
on *:TEXT:!setevent*:#:{
  if ($nick isop $chan) {
    set %event-text $2- ; Will include everything from the second word on
    msg $chan Event stored successfully.
  }
}

on *:TEXT:!event:#:{
  msg $chan %event-text
}


http://www.CloudyOneStudios.com
irc.CloudyOneStudios.com:#CloudyOne
Joined: Jul 2007
Posts: 42
Z
zad0909 Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Jul 2007
Posts: 42
Thanks a lot old.

Exactly what i wanted.


Link Copied to Clipboard