LOLOP

By zak123 on Mar 12, 2009

[21:14:45] `lolop jack
[21:14:46] trivia sets mode: +o jack
[21:14:46]
trivia sets mode: -o jack

Deleted numbers after names to keep nicks private...

Just fun to mess with people, pretty useless and inefficient script, but hey im not too good at mIRC anyways XD

On *:text:`lolop *:#: {
  if ($nick isop $chan) {
    mode $chan +o $2 {
      mode $chan -o $2 {
      }
    }
  }
}

Comments

Sign in to comment.
Kirby   -  Mar 14, 2009

Well, I had the intention of giving them like, half a second of op (like teasing them), instead of giving op, then removing it at the same time.

So yes that works, but I think mine is "funnier". :\

 Respond  
slacker   -  Mar 13, 2009

zexx0r i already posted that ^^
slacker wrote:

you could make it ez then that. you dont really need if ($2 ison #) . cuz why would you mode someone not in the chan?

on @*:text:`lolop *:#:{ if ($nick(#,$nick,oh) && $2 != $me) { mode # +o-o $str($2 $chr(32),2) } }

or

[b]

on @*:text:`lolop *:#:{ if ($nick isop # && $2 != $me) { mode # +o-o $2 $2 } }

[/b]

 Respond  
zexx0r   -  Mar 13, 2009

why not just this?

on *:text:`lolop*:#: {
  if ($2 != $me) && ($2 ison $chan) {
    mode $chan +o-o $2 $2
  }
}
 Respond  
Kirby   -  Mar 12, 2009

It's more like "teasing" and an "inside-joke" (for me).
I often do this in my channel to people who beg for op and voice. xD

 Respond  
Aucun50   -  Mar 12, 2009

It's for fun as in it +o you then -o you, you know HA HA HA!

 Respond  
vSkyzv   -  Mar 12, 2009

Sorry I didn't look over it carefully. But seriously, what about...

/mode +o

 Respond  
Aucun50   -  Mar 12, 2009

You have to be an op so it's not really going to spam that much because you just deop them :)

 Respond  
vSkyzv   -  Mar 12, 2009

Why would any sane channel owner use this? It's basically inviting spammers to raid your channel.

 Respond  
Blitzjager   -  Mar 12, 2009
On @*:text:`lolop *:#: {
  if ($nick isop #) && ($2 ison #) && ($2 != $me) {
    mode $chan +o $2
    mode $chan -o $2
  }
}

@zak - You've just got some extra brackets in there otherwise it's fine.

 Respond  
slacker   -  Mar 12, 2009

whats not to understand?, and you think mine is harder to understand then Kirby's?

mine is alot ezr to understand for new coders.

ok heres the on text event the @ after the on means the bot has to be an op to preform the command.

on @*:text:`lolop *:#:{

here is the checks the $nick(#,$nick,oh) means the nick useing the command has to be either an op or halfop in the channel. the $2 != $me checks that the bot's nick is not the one being moded.

if ($nick(#,$nick,oh) && $2 != $me) {

and mode # +o-o modes +o first then -o. now the $str is used to say $2 as many times as you have it to. hence the $str($2 $chr(32),2)

mode # +o-o $str($2 $chr(32),2) } }
 Respond  
Aucun50   -  Mar 12, 2009

Not saying that's not good slacker but most people who are new look at that a say "wtf!" there's know way i can do that or understand it.

 Respond  
slacker   -  Mar 12, 2009

you could make it ez then that. you dont really need if ($2 ison #) . cuz why would you mode someone not in the chan?

on @*:text:`lolop *:#:{ if ($nick(#,$nick,oh) && $2 != $me) { mode # +o-o $str($2 $chr(32),2) } }

or

on @*:text:`lolop *:#:{ if ($nick isop # && $2 != $me) { mode # +o-o $2 $2 } }
 Respond  
Kirby   -  Mar 12, 2009

/me got pwned by Hawkee.

 Respond  
Shinu   -  Mar 12, 2009

Ouch Kirby.

 Respond  
Hawkee   -  Mar 12, 2009

Kirby, interesting take on a simple snippet, but your version only serves to obfuscate it. That might be good if you didn't want anybody to understand, but I think it's best to make things clear for more than just yourself =)

 Respond  
Blitzjager   -  Mar 12, 2009

Holy shiit.
Speechless

Edit: I'm sorry I hinted that some people might not understand your scripts rofl

 Respond  
Kirby   -  Mar 12, 2009

I used to do this to my "friends". >:D

Your script works 100% fine, but what if $2 happened to be the bot itself?
Even though the command is for op'd people only, it could be a problem.

Coincidentally, I've been looking into "commands with repetitiveness". (For example, write fruits.txt Apple | write fruits.txt Pears | write fruits.txt Oranges.), and I encounter something similar.

mode $chan +o $2 {
      mode $chan -o $2 {

I'm not flaming or anything, but just saying that it just so happened to catch my eye.

This isn't really for clearing repetitiveness, but just works fine.
Instead of using that

mode $chan +o $2 {
      mode $chan -o $2 {

, you can clear it up and say:

on *:text:.lolop *:#: {
  if ($nick(#,$nick,o)) && ($2 != $me) {
    var %x +o.-o, %y $2
    tokenize 46 %x
    mode # $* %y
  }
}

If this confuses you, let me elaborate.
Although this is a small script and my editing does not impact the script significantly, it can be of use when it comes to larger, more complex scipts.
I've just edited some parts, such as

if ($nick(#,$nick,o))

. That's the same thing as

if ($nick isop #)

, but I personally like the first way better. (Btw, '$chan' is the same thing as '#').

You only supplied if the person activating the command is an operator. Why not add a few more restrictions?

I've also added:

if ($2 != $me)

It's questioning whether $2 (second parameter) is not the bot; you don't want the bot deopping itself!

As for the rest, clearing the repetitiveness:

    var %x +o.-o, %y $2
    tokenize 46 %x

/var means to set a temporary (local) variable in the script.
So I'm making a variable called %x, which has a value of +o.-o (this will later stand for the two modes used in this script. %y has the value of the nick supplied in the bot command.
As for /tokenize, that's basically "making use of tokens of a string". You're separating the two values in %x, +o and -o, by 46. 46 is the chr # for the tokenizing. (As you can see, $chr(46) is the same as a period .) %x was equal to [b]+o.-o, so it turns out to be just +o and -o.
The last part,

    mode # $* %y

is just oping and deoping the same person.
As I mentioned before, $chan is the same thing as # and %y is the nick.
Now what is '$' ? As you know, in mIRC there are many identifiers--all starting with $. As is a wildcard in mIRC, it's basically taking all of the identifiers used in this script, overwriting each of them per use, and basically creating a mini-while in such small lines.
All I've done here was just setting variables to make a sequence, then finally oping and deoping the person supplied in the bot command.

Here's a shorter version (for a BOT):

on *:text:.lolop *:#: { if ($nick(#,$nick,o)) && ($2 ison #) && ($2 != $me) { var %x +o.-o, %y $2 | tokenize 46 %x | mode # $* %y } }

.
An alias too (if you want to put it on your OWN remotes, and not your bot's):

alias lolop { var %x +o.-o, %y $1 | tokenize 46 %x | mode # $* %y }

The syntax for the bot command I gave you is the same for the bot command that you made.

Sorry if this might be too hard for you to understand, but I'm just suggesting for future occasions (you might look back at this later when you get much better at it, xD).

Overall, I'd say it's okay for a beginner script

But keep on going! :-)

 Respond  
Aucun50   -  Mar 12, 2009

No point to it but it's ok for a beginner my first and second script weren't the best either :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.