Funny luck script ;)

Release your script here.
State:
- Author
- What it does
- Perhaps a little guide.
- Also, if the snippet is of any use to the community, it has a chance of getting posted on the main page, so don't hesitate to submit/ask!

Funny luck script ;)

Postby Zodac0de » Tue Nov 17, 2009 10:21 pm

Hey!

Sorry, the "script" is in swedish. If someone wich, they can translate it :)

Command .luck hjälp or version will get you some information, in swedish tho.

Well, this script works like this:
(23:19:15) (@NP|Ahlkvist) .luck
(23:19:15) (MYME) NP|Ahlkvist: 89
(23:19:15)  -› [notice from MYME]: Grattis! Du fick ett nummer över eller lika med 80! Därmed vinner du +v! (5 sekunder spamfilter)

If you get over the number 80, you'll get voice in that channel. =)
And if you already have +v and get under 80, you'll lose voice!
Have fun!

Code: Select all
##############################
#    Script by Ahlkvist!     #
#    Copyright (c)           #
##############################
 
// Luck
 
on *:text:.luck*:#channel: {
  if (!$2) {
    if (%spam) { halt } | else {
      %luck = $rand(1,100)
      msg $chan $nick $+ : %luck
      if (%luck >= 80) {
        if ($nick isvoice $chan) { notice $nick Du har redan voice! (5 sekunder spamfilter)  }
        else { 
        mode $chan +v $nick | notice $nick Grattis! Du fick ett nummer över eller lika med 80! Därmed vinner du +v! (5 sekunder spamfilter)   }
      }
      if (%luck < 80) {
        if ($nick isvoice $chan) { mode $chan -v $nick | notice $nick Synd! Vill du ha tillbaka ditt +v måste du fösöka igen och få över nummer 80! (5 sekunder spamfilter)  }
        else {
        notice $nick Synd! Försök igen! (5 sekunder spamfilter)  }
      }
      set -u5 %spam 1
    }
  }
  elseif ($2 = hjälp || version) {
    Notice $nick Luck script av Ahlkvist. Version: 1.0
    Notice $nick Det går ut på att få ett nr över 80, när du får det får du +v.
    Notice $nick Om du kommer under 80, förlorar du ditt +v. Lycka till!
Zodac0de
 

Re: Funny luck script ;)

Postby zNigel- » Tue Nov 17, 2009 11:01 pm

A quick translation.

Also added the 2 missing brackets.

Code: Select all
##############################
#    Script by Ahlkvist!     #
#    Copyright (c)           #
##############################

// Luck

on *:text:.luck*:#channel: {
  if (!$2) {
    if (%spam) { halt } | else {
      %luck = $rand(1,100)
      msg $chan $nick $+ : %luck
      if (%luck >= 80) {
        if ($nick isvoice $chan) { notice $nick You are already voiced! (5 sec antispam)  }
        else { 
        mode $chan +v $nick | notice $nick Congratulations! You got a number above or equal to 80! You win +v! (5 sec antispam)   }
      }
      if (%luck < 80) {
        if ($nick isvoice $chan) { mode $chan -v $nick | notice $nick Pity! If you want your +v back, you must try to get a number above 80! (5 sec antispam)  }
        else {
        notice $nick Pity! Try again! (5 sec antispam)  }
      }
      set -u5 %spam 1
    }
  }
  elseif ($2 = help || version) {
    Notice $nick Luck script by Ahlkvist. Version: 1.0
    Notice $nick It is to get a number above 80, when you get there, you get +v.
    Notice $nick If you get below 80, you will loose your +v. Good luck!
  }
}
zNigel-
 

Re: Funny luck script ;)

Postby Zodac0de » Wed Nov 18, 2009 11:05 am

Thanks, missed those when i copy.

well, here's a little update :P
Must get over 70 now, not 80.

Code: Select all
on *:text:.luck:#channel: {
  if (%spam) { halt }
  set -u5 %spam 1
  set %tag (5 sekunder spamfilter)
  %luck = $rand(1,100)
  msg $chan $nick $+ : %luck
  %m = $iif(%luck >= 70,$iif($nick isvoice $chan,Du har redan voice!,Grattis! Du fick ett nummer över eller lika med 70! Därmed vinner du +v!),$iif($nick isvoice $chan,Synd! Vill du ha tillbaka ditt +v måste du fösöka igen och få över nummer 70!,Synd! Försök igen!))
  mode $chan $iif(%luck >= 70,+,-) $+ v $nick
  notice $nick %m %tag
}


And btw, this code is done by r0t3n. Thanks!
Zodac0de
 


Return to Mirc Scripting Release

Who is online

Users browsing this forum: No registered users and 1 guest

cron