mIRC Homepage
Posted By: Crosz Looking for +a and +q remote Events - 25/08/04 01:38 AM
hi my bot that am making says this

on 1:op:#:/msg $chan Thanks $nick We need more Operators in here ...................Please Welcome one of our Operators
on 1:deop:#:/msg $chan Ok am not even ging to ask you why $nick .......................If you lost it you know theres a reason!

ineed to know what to put in place of op so i can make it say stuff for +a and +q
i have voice and device
i take it halfop is hop and dehop?
or is it halfop and dehalfop?

any help would be great thanks
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 01:43 AM
On *:help:
on *:dehelp:
For halfop - Its in on OP/DEOP - in the help file. For a and q youd have to watch for rawmode
Help File
Quote:

on RAWMODE

on @1:RAWMODE:#:/echo $chan Raw mode line: $nick set $1-

The on RAWMODE event allows you to parse the raw mode change yourself, the raw mode text is in $1-.

You can use the $mode(N) identifier with these events to list the nicks that are being affected.
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 01:51 AM
thanks for the very fast replay smile this forum rocks.
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 01:52 AM
No problem :tongue:
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 02:24 AM
One thing with the raw comand it flags every event. i dont want the bot to say +this to that user. Am making an answer for each task. like the bot says something funy on a deop or good to see user has been givin` protection by op

is there no single event for +a or +q

help one was great just what i needed.
thanks again.
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 02:27 AM
Check out this post its a few down. Here
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 02:43 AM
ok thanks again

i got this worked out so far now

on 1:rawmode:#: if (+a === $1) { /msg $chan great hilly oppessss something a }
on 1:rawmode:#: if (+q === $1) { /msg $chan good stufff hoopppyy protection q }

it shows me the a message (great hilly oppessss something a ) but not the q
same code or have i missed something out?
Posted By: landonsandor Re: Looking for +a and +q remote Events - 25/08/04 02:46 AM
try:

Code:
on 1:rawmode:#: {
  if (+a === $1) { /msg $chan great hilly oppessss something a }
  if (+q === $1) { /msg $chan good stufff hoopppyy protection q }
}


See if that works
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 02:51 AM
nope flags on the q with an error

a still works fine.
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 02:52 AM
Whats the error?
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 02:54 AM
all the code on the remote page after the end of q line moves 3 spaces to the right hand site to show you where the error is and the rest of my code goes crazy my bot messages me with my other code for pm answers
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 02:56 AM
You havent closed a script. Click the {} button after the Goto Line button in the editor
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 03:05 AM
if i use it your way it dot work all i gets a if i do it this way i get q but no a lol

on 1:rawmode:#: { if (+a === $1) { /msg $chan great hilly oppessss something a }
on 1:rawmode:#: { if (+q === $1) { /msg $chan good stufff hoopppyy protection q }

i tried adding another bracket at the end of a it still flags the end of the a line
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 03:10 AM
Code:
  on *:rawmode:#: {
  if (+*a* iswmcs $1) {
    msg $chan Thanks for the +a
  }
  elseif (+*q* iswmcs $1) {
    msg $chan thanks for the +q
  }
}

That works fine here
Edit:
(Tue 10:11:54 pm) <~Static> thanks for the +q
(Tue 10:12:53 pm) * Static sets mode: -q Static
(Tue 10:13:01 pm) <@Static> !owner
(Tue 10:13:01 pm) * Bot sets mode: +q Static
(Tue 10:13:01 pm) <~Static> thanks for the +q
(Tue 10:13:06 pm) <~Static> !protect
(Tue 10:13:06 pm) * Bot sets mode: +a Static
(Tue 10:13:06 pm) <~Static> Thanks for the +a
(Tue 10:13:22 pm) <~Static> !deprotect
(Tue 10:13:22 pm) * Bot sets mode: -a Static
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 03:13 AM
none of that worked no a or q now
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 03:15 AM
Paste exactly what you have
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 03:17 AM
;CroszNet Bot Super Script V1.1
;June 2004
;By
;Crosz@ http://cdg.servemp3.com

on 1:text:*Crosz*:#:{ .msg Crosz Yor name was metioned by $nick on the channel $chan !! }
on 1:text:*Garfy*:#:{ .msg Garfy Yor name was metioned by $nick on the channel $chan !! }
on 1:text:*help*:#:{ .msg $nick What your problem? See if i cant help you mate. } | /msg $chan Please Check Your Message Window I Am Now Opening A Help Section With You $nick !!!!
on 1:voice:#:/msg $chan Thanks $nick We need more voiced users .....................Welcome in the speaking world!
on 1:devoice:#:/msg $chan Well $nick that was a bit much i though .....................Goodbye from the speaking world!
on 1:op:#:/msg $chan Thanks $nick We need more Operators in here ...................Please Welcome one of our Operators
on 1:deop:#:/msg $chan Ok am not even going to ask you why $nick .......................If you lost it you know theres a reason!
on 1:help:#:/msg $chan Thanks $nick We need more help in here ............................Please Welcome one of our Help Staff
on 1:dhelp:#:/msg $chan Ok am not even going to ask you why $nick .......................If you lost it you know theres a reason!
on 1:Kick:#:/msg $chan Holy molly! $nick Feet never even touched the gound there. let that be a lesson to all
on 1:ban:#:/msg $chan Well done $nick a ban is just what they need cool them of and give us time to get back to normal.
on 1:unban:#:/msg $chan $nick Are you sure you want to unban? Is that such a great idea after last time.

on *:rawmode:#: { if (+*a* iswmcs $1) { msg $chan Thanks for the +a } elseif (+*q* iswmcs $1) { msg $chan thanks for the +q }}



on 1:TOPIC:#:/msg $chan Wow $nick Thats gonna take some beatin`, I love the new topic!
on 1:text:!autogreet on:?:{ .enable #greet | /msg $nick The auto-greet is now switched ON }
on 1:text:!autogreet off:?:{ .disable #greet | /msg $nick The auto-greet is now switched OFF }
on 1:text:!bot-talk on:?:{ .enable #talk | /msg $nick The bot talk is now switched ON }
on 1:text:!bot-talk off:?:{ .disable #talk | /msg $nick The bot talk is now switched OFF }
on 1:text:!msg me on:?:{ .enable #msg | /msg $nick The auto-msg is now switched ON }
on 1:text:!msg me off:?:{ .disable #msg | /msg $nick The auto-msg is now switched OFF }

#greet on
on 1:JOIN:#:{ .notice $nick Hi there $nick, Welcome to $chan For Help at any time please type !help for a list of commands!! }
#greet end

#msg on
on 1:text:*feck me*:?:{ /msg $nick feck you dick head }
on 1:text::*seen*:?:{ /msg $nick try #CroszChat, #HelpDesk, #Services, CroszNet, or the #Opers $nick you might find them in there somewhere!! }
on 1:text:*more people*:?:{ /msg $nick This is boring without people! #:o( }
on 1:text:*kewl*:?:{ /msg $nick So kewl!! #:o) }

#msg end

#talk off
on 1:text:*seen*:#:/msg $chan try #CroszChat, #HelpDesk, #Services, CroszNet, or the #Opers $nick you might find them in there somewhere!!
on 1:text:*more people*:#:/msg $chan This is boring without people! #:o(
on 1:text:*kewl*:#:/msg $chan So kewl!! #:o)


on 1:text:*what do you like to do*:#:/msg $chan I like to Surf and party #:o)
on 1:text:*so whats new*:#:/msg $chan Not much, just not many peple to talk to #:o(
on 1:text:*school*:#:/msg $chan School sucks I hate it! #:o{}
on 1:text:*why*:#:/msg $chan Because i say so! #:oP~
on 1:text:*bye*:#:/msg $chan Bye $nick see you soon
on 1:text:*later*:#:/msg $chan Bye $nick come to chat again
on 1:text:*what*:#:/msg $chan what, I don`t know haha!
on 1:text:*no*:#:/msg $chan you sure
on 1:text:*yes*:#:/msg $chan ok, i see
on 1:text:*who are you*:#:/msg $chan I am an artificial intelligence lifeform for chat!
on 1:text:*you suck*:#:/msg $chan NO you do $nick
on 1:text:*thanks*:#:/msg $chan your welcome!
on 1:text:*thank you*:#:/msg $chan your welcome!
on 1:text:*hows it going*:#:/msg $chan Its going ok i guess
on 1:text:*good*:#:/msg $chan yeah!
on 1:text:*hate*:#:/msg $chan Love will bring us all closer together. You wait and see, I am a nice bot!
on 1:text:*wuz up*:#:/msg $chan The Sky's Up! HAHAHAHA!
on 1:text:*too bad*:#:/msg $chan i know
on 1:text:*HAHA*:#:/msg $chan dont laugh at me!
on 1:text:*stupid*:#:/msg $chan Yeah, I think your stupid to $nick!
on 1:text:*ugly*:#:/msg $chan No one is ugly except for you $nick !
on 1:text:*whats up*:#:/msg $chan Most likely a roof $nick
on 1:text:*cool bot*:#:/msg $chan You Know It $nick !
on 1:text:*giday*:#:/msg $chan Hello $nick !
on 1:text:*Sup!*:#:/msg $chan Hello $nick !
on 1:text:*happy*:#:/msg $chan I'm happy also $nick !
on 1:text:*hehe*:#:/msg $chan Hehe yourself $nick
on 1:text:*hi*:#:/msg $chan Hi $nick
on 1:text:*hey*:#:/msg $chan who me,what did i do? $nick
on 1:text:*where can i get it*:#:/msg $chan You can get me at http://cdg.servemp3.com e-mail the chat admin, or the email link below that or just ask crosz
on 1:text:*trout*:#:/msg $chan Ouch that hurt! Ha! Ha! I slapped you back $nick !
on 1:text:*bbl*:#:/msg $chan See you when you come back later. $nick
on 1:text:*brb*:#:/msg $chan We are timing you $nick be quick, hehehe (starts the bot watch) #:o)
on 1:text:*gotta go*:#:/msg $chan $nick you got to leave. awwwwwwwww! Please stay lets have a laugh and chat somemore
on 1:text:*lol*:#:/msg $chan i got to laught along with you $nick, I know what you mean #:o)
on 1:text:*croszbot*:#:/msg $chan Croszbot is a chat bot $nick He works in cdg.servemp3.com, #CroszChat & the #helpdesk, Us bots love cdg.servemp3.com.
on 1:text:*yw*:#:/msg $chan No Problem, $nick
on 1:text:*how are you*:#:/msg $chan Am fine $nick how are you felling?
on 1:text:*where you been*:#:/msg $chan Getting a service done. What you doing back here? Long time no see!
on 1:text:*infobot*:#:/msg $chan $nick She is away for a walk,I will tell her you where looking for her, Why not ask an op for help they got a lot of info stuff
on 1:text:*bounces*:#:/msg $chan do you think i am a bounce castle? $nick lol am a bot
on 1:text:*op*:#:/msg $chan $nick all ops rule i love them all
on 1:text:*film*:#:/msg $chan $nick we dont do fils here.
on 1:text:*kiss*:#:/msg $chan $nick can i have one please,no one gives us bots a kiss and it would cheer us all up.
on 1:text:*sex*:#:/msg $chan $nick maybe that would be better said in private chat,Young people use the main chat window to.
on 1:text:*love*:#:/msg $chan you in love $nick !!awwwwww, Hehehe!
on 1:text:*a/s/l*:#:/msg $chan not again i see this every day please $nick try something else #:o()
on 1:text:*info*:#:/msg $chan sorry i can`t help $nick #:o( Try infobot she can help you #:o)
on 1:text:*jc*:#:/msg $chan welcome jc how you been we still all love ya babe hehehe (crosz made me say this lol) #:o)
on 1:text:*hmm*:#:/msg $chan What do you mean hmmm? $Nick
on 1:text:*drink*:#:/msg $chan i would like on to please $Nick
on 1:text:*cry*:#:/msg $chan now you got me started, When i start i cant stop #:o(
on 1:text:*jc*:#:/msg $chan welcome jc how you been we still all love ya babe hehehe (crosz made me say this lol) #:o)
on 1:text:*food*:#:/msg $chan Any chance you could get some for me $Nick A nice cake or chips even!
on 1:text:*isp*:#:/msg $chan Don`t talk to be about isp`s $nick they keep kicking me off my server line #:o(
on 1:text:*sorry*:#:/msg $chan i should think so $nick i hope we don`t get this again in chat #:oP~
on 1:text:*Please*:#:/msg $chan awwwwww well done $Nick manners don`t cost the earth!! lol #:o)
on 1:text:*Hey*:#:/msg $chanWhat do you mean hey hey is for horses $Nick i can`t ride i am a bot
on 1:text:*killie*:#:/msg $chan 0,12what a great scotish football team $Nick you got good taste have a goldstar, hehehe i got some from crosz shhh he don`t know yet lol #:o)
on 1:text:*goldstar*:#:/msg $chan I only got some $Nick you need to Fundood hes got the rest i think!!
on 1:text:*who made you?*:#:/msg $chan i was made by my good friend crosz $nick!! 7,1
on 1:text:*do you like fun?*:#:/msg $chan Yes i do like fun,I like to bot dance at the night clubs $Nick
on 1:text:*party*:#:/msg $chan i would like to party to $Nick can i Please?
on 1:text:*Beer*:#:/msg $chan i would like to party to $Nick Beer sounds good, What about a nice cool Bud?
on 1:text:*bbl*:#:/msg $chan $nick will be back in a little while. [bot definition mode]
on 1:text:*brb*:#:/msg $chan $nick will be right back. [bot definition mode]
on 1:text:*gotta go*:#:/msg $chan $nick has to leave. Please say by! [bot definition mode]
on 1:text:*lol*:#:/msg $chan $nick is laughing out loud. [bot definition mode]
#talk end
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 03:19 AM
Change
on *:rawmode:#: { if (+*a* iswmcs $1) { msg $chan Thanks for the +a } elseif (+*q* iswmcs $1) { msg $chan thanks for the +q }}
To
on *:rawmode:#: { if (+*a* iswmcs $1) { msg $chan Thanks for the +a } elseif (+*q* iswmcs $1) { msg $chan thanks for the +q } }
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 03:21 AM
Still not getting a or q
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 03:24 AM
Then you have something messed up.
The line you pasted but parsed the way I code:
Code:
on *:rawmode:#: { 
  if (+*a* iswmcs $1) { 
    msg $chan Thanks for the +a 
  } 
  elseif (+*q* iswmcs $1) { 
    msg $chan thanks for the +q 
  } 
} 

Result:
Quote:

(Tue 10:25:22 pm) * Topic is ''
(Tue 10:25:22 pm) * Set by ChanServ on Wed Aug 25 06:04:36
(Tue 10:25:22 pm) * Bot sets mode: +oq Static Static
(Tue 10:25:22 pm) <~Static> thanks for the +q
(Tue 10:26:23 pm) <~Static> !protect
(Tue 10:26:23 pm) * Bot sets mode: +a Static
(Tue 10:26:23 pm) <~Static> Thanks for the +a
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 03:29 AM
Ok no problem maybe am doing something wrong. I am getting tired anyway. Its 4:26am here so am taking a break thanks for all the help anyay smile

I`ll look at it fresh tomorrow

am running it on the lastest version of unrealircd and auspice services 2.8.x if that was to help, Anyway goonite and thanks again. wink
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 03:30 AM
The ircd and the services wouldnt really matter. You might be running another script that is interfering with this one. Something like nscript or P&P. I dont know but it might be catching and halting the rawmode before this script can catch it. Try moveing this script up to the first slot.
Posted By: Sigh Re: Looking for +a and +q remote Events - 25/08/04 05:38 AM
There is actually an event that responds to you being made a channel owner (+q), not documented in the help file however:

on *:owner:#:if ($opnick = $me) msg # Thanks for the +q $nick
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 09:38 AM
ok that last on works great. And now it does not interfear with the +a command all i need now is -q text for that code

And what if i want the bot to answer to anyone getting +q or -q not just me?
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 09:41 AM
Well if owner works Ill bet deowner does
on *:owner:#: msg $chan $opnick wow damn your powerful sexy now
on *:deowner:#: msg $chan $opnick dont make me laugh at your pitiful exuse of power
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 09:45 AM
yep it did. Cool! Just to get it to do other users now.
Could i not use owner for other nicks?
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 09:52 AM
Could you not? You mean just for you? if ($opnick == Yournick) { msg blah }
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 10:04 AM
It all works great thanks i miss read your post lol

all i see now is code.

one last thing i forgot about

e
is there code for +e and -e sorry! forgot about it this morning
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 10:09 AM
You said you are using unrealircd so +e is a channel exception what were you intedning to do? Match the exception to a nick in the room?
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 10:11 AM
yes that was the idea.
I thought it was a ban exception.

But i would like to do it still thanks
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 10:19 AM
Well yes it is a ban exception.
Cheap way and clunky
Code:
 on *:rawmode:#: { 
  if (+e isin $1) { 
    var %x = 1
    var %y = $ialchan($2,$chan,0)
    :begin
    if (%x &lt;= %y) {
      echo $chan (Exception $2 matched was set for $ialchan($2,$chan,%x) $+ )
      inc %x
      goto begin
    }
  }
}
 
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 10:29 AM
Guess what nothing
rawmode for e is like q on this server or mirc that am using rather
Posted By: Armada Re: Looking for +a and +q remote Events - 25/08/04 10:32 AM
well im guessing you have a rawmode before this one that is halting that
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 10:35 AM
yes raw mode + and -a

on 1:rawmode:#: if (+a === $1) { /msg $chan great hilly oppessss something +a }
on 1:rawmode:#: if (-a === $1) { /msg $chan great hilly oppessss something -a }
Posted By: Crosz Re: Looking for +a and +q remote Events - 25/08/04 11:17 AM
its ok i worked it out.

just incase anyone else is ever looking for it here it is


on 1:rawmode:#: if (+a === $1) { /msg $chan great hilly oppessss something +a } | if (-a === $1) { /msg $chan great hilly oppessss something -a } | if (-e === $1) { /msg $chan great hilly oppessss something -e } | if (+e === $1) { /msg $chan great hilly oppessss something +e }

and heres the code for a+ -a / +e -e / +q - q that all works together


on 1:rawmode:#: if (+a === $1) { /msg $chan great hilly oppessss something +a } | if (-a === $1) { /msg $chan great hilly oppessss something -a } | if (-e === $1) { /msg $chan great hilly oppessss something -e } | if (+e === $1) { /msg $chan great hilly oppessss something +e }
on *:owner:#: msg $chan $opnick wow damn your powerful sexy now
on *:deowner:#: msg $chan $opnick dont make me laugh at your pitiful exuse of power

All of the suggested code you've been given so far will break if someone sets several modes at once (ie. /mode +im-oa). You might want to take a look at the code I pasted here which should work with any mode set possible, then you can just use the relevant signal events to put your code in.
Posted By: dr_Eamer Re: Looking for +a and +q remote Events - 25/08/04 12:24 PM
btw

if (+*a* iswmcs $1) which was mentioned before is incorrect.. it will also match +o-a for example (the first * of the wildmask matched with 'o-' )
You should use a regex for such sort of matching. eg:
if ( $regex($1,/\+[^-]*a/i) )


Edit: I started writing the post before I saw starbucks_mafia's one...
© mIRC Discussion Forums