mIRC Homepage
Posted By: zad0909 A little more help if you please. - 03/08/07 07:11 PM
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?
Posted By: OrionsBelt Re: A little more help if you please. - 03/08/07 07:15 PM
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.
Posted By: zad0909 Re: A little more help if you please. - 04/08/07 01:14 AM
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?
Posted By: LostShadow Re: A little more help if you please. - 04/08/07 01:46 AM
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..
Posted By: Riamus2 Re: A little more help if you please. - 04/08/07 02:09 AM
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.
Posted By: zad0909 Re: A little more help if you please. - 04/08/07 02:37 AM
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.
Posted By: Riamus2 Re: A little more help if you please. - 04/08/07 01:56 PM
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.
Posted By: zad0909 Re: A little more help if you please. - 04/08/07 02:42 PM
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?
Posted By: OrionsBelt Re: A little more help if you please. - 04/08/07 07:58 PM
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.
Posted By: zad0909 Re: A little more help if you please. - 12/08/07 06:10 PM
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?
Posted By: Old Re: A little more help if you please. - 12/08/07 06:53 PM
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
}
Posted By: zad0909 Re: A little more help if you please. - 12/08/07 08:19 PM
Thanks a lot old.

Exactly what i wanted.
© mIRC Discussion Forums