mIRC Home    About    Download    Register    News    Help

Topic Options
#182045 - 03/08/07 08:11 PM A little more help if you please.
zad0909 Offline
Ameglian cow

Registered: 30/07/07
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?

Top
#182046 - 03/08/07 08:15 PM Re: A little more help if you please. [Re: zad0909]
OrionsBelt Offline
Fjord artisan

Registered: 25/04/06
Posts: 464
Loc: Amsterdam, NL
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.

Top
#182067 - 04/08/07 02:14 AM Re: A little more help if you please. [Re: OrionsBelt]
zad0909 Offline
Ameglian cow

Registered: 30/07/07
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?

Top
#182070 - 04/08/07 02:46 AM Re: A little more help if you please. [Re: zad0909]
LostShadow Offline
Fjord artisan

Registered: 12/01/04
Posts: 509
Loc: Chicago, Illinois, U.S.A.
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..


Edited by LostShadow (04/08/07 02:48 AM)

Top
#182071 - 04/08/07 03:09 AM Re: A little more help if you please. [Re: LostShadow]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
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

Top
#182073 - 04/08/07 03:37 AM Re: A little more help if you please. [Re: Riamus2]
zad0909 Offline
Ameglian cow

Registered: 30/07/07
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.

Top
#182087 - 04/08/07 02:56 PM Re: A little more help if you please. [Re: zad0909]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
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

Top
#182092 - 04/08/07 03:42 PM Re: A little more help if you please. [Re: Riamus2]
zad0909 Offline
Ameglian cow

Registered: 30/07/07
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?

Top
#182106 - 04/08/07 08:58 PM Re: A little more help if you please. [Re: zad0909]
OrionsBelt Offline
Fjord artisan

Registered: 25/04/06
Posts: 464
Loc: Amsterdam, NL
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.

Top
#182646 - 12/08/07 07:10 PM Re: A little more help if you please. [Re: OrionsBelt]
zad0909 Offline
Ameglian cow

Registered: 30/07/07
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?

Top
#182648 - 12/08/07 07:53 PM Re: A little more help if you please. [Re: zad0909]
Old Offline
Pikka bird

Registered: 10/07/07
Posts: 19
Loc: US
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

Top
#182656 - 12/08/07 09:19 PM Re: A little more help if you please. [Re: zad0909]
zad0909 Offline
Ameglian cow

Registered: 30/07/07
Posts: 42
Thanks a lot old.

Exactly what i wanted.

Top