mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2015
Posts: 1
B
Brobba Offline OP
Mostly harmless
OP Offline
Mostly harmless
B
Joined: May 2015
Posts: 1
Hey guys.. Hopefully someone might find a solution to my problem.
When my Link Protection is above my poins-system the link-timeout works.
But my point system doesn't work..
Pasteing all my code:
Click to reveal..
Code:
//LINK PROTECTION//
on @*:text:*:#brobba:linkpost $1-
on @*:action:*:#brobba:linkpost $1-
on @*:notice:*:#brobba:linkpost $1-
alias -l linkpost {
  if (%p) || ($hfind(permit,$nick)) { return }

  inc -u4 %p
  var %purge /^!(link\so(n|ff)|(permit))\b/iS
  var %domain com|edu|gov|mil|net|se|nu|org|biz|info|name|museum|us|ca|uk
  var %link /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domain $+ )\b/iS

  if ($findtok(%chanon1,#,1,32)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) {
    timeout # $nick | /mode # -b $nick
    msg # $nick You did not have permission to post a link. Ask a mod to !permit you!
    msg # /timeout $nick 1
  }
  elseif ($regex($1-,%purge)) && ($regml(1) == permit) && ($nick isop #) && ($$2 ison #) {
    hadd -mz permit $v1 30 | notice $v1 You have 30 seconds to post a link. Starting now!
    msg # You now have 30 seconds to post a link!
  }
  elseif ($regml(1) == link on) && ($nick isop #) {
    if (!$istok(%chanon1,#,32),a,b) {
      set %chanon1 $addtok(%chanon,#,32)
      .msg # My Link Protection Is Now on in: $+($chr(2),#)
      halt
    }
    else {
      .msg # $nick $+ , my link protection is already on in $+($chr(2),#,$chr(2),!)
    }
  }
  elseif ($regml(1) == link off) && ($nick isop #) {
    if ($istok(%chanon1,#,32),c,d) {
      set %chanon1 $remtok(%chanon,#,1,32)
      .msg # My Link Protection Is Now off in: $+($chr(2),#)
      halt
    }
    else {
      .msg # $nick $+ , My link protection is already off!
    }
  }
}

//SCRIPTS//
on *:text: !omg:#: { msg $chan /me omg guys!! BabyRage }
on *:text: !youtube:#Brobba: { msg $chan /me My youtube: http://youtube.com/channel/UCxjOr9oE1ydX28hwLibwaBA Subscribe if you enjoy the videos! :) }
on *:text: !config:#Brobba: { msg $chan CFG: http://pastebin.com/t8iyTpbz Autoexec: http://pastebin.com/bAmwmRFb }
on *:text: !facebook:#Brobba: { msg $chan I got an facebook group, check it out!: http://www.facebook.com/br0bba }
on *:text: !fb:#Brobba: { msg $chan I got an FB page, check it out!: http://www.facebook.com/br0bba }
on *:text: !loc:#Brobba: { msg $chan Use /loc in-game and write your x & z cords on http://www.h1z1basecamp.com/Map That way you can see what direction you're heading! :) }
on *:text: !p2w:#Brobba: { msg $chan Is H1Z1 a Pay-2-Win $nick :o? Imo: NO! The "P2W"items you get is 3x Airdrop. It's not certain that you will recieve the drop at all. Other players can hear and see the plane and can easily grab your loot before you do so or kill you. When you get the loot-crate it can contain pure shit or military loot (plus the crate spawns with 20+ zombies around it). }
on *:text: !stream:#Brobba: { msg $chan $nick I use Open Broadcaster Software to stream. My settings are: Quality: 10, 720p, 60fps, Max Bitrate: 3200, Buffer size: 3200, linked below aswell (FAQ) }
on *:text: !music:#Brobba: { msg $chan $nick You can grab my playlists on spotify below! :) }
on *:text: !hi:#: { msg $chan Well.. Hello there $nick HeyGuys }
on *:text: !donate:#Brobba: { msg $chan Wan't to support me? :) https://streamtip.com/t/brobba }
on *:text: !cfg:#Brobba: { msg $chan My CFG: http://pastebin.com/t8iyTpbz My Autoexec: http://pastebin.com/bAmwmRFb }
on *:text: !rank:#Brobba: { msg $chan $nick I'm currently Legendary Eagle Master :) (LEM) }
on *:text: !yt:#Brobba: { msg $chan /me My youtube: http://youtube.com/channel/UCxjOr9oE1ydX28hwLibwaBA Subscribe if you enjoy the videos! :) }
on *:text: !trade:#Brobba: { msg $chan /me Wan't to give me cases,games or skins? Use this link: https://steamcommunity.com/tradeoffer/new/?partner=17821028&token=W3k8k3Vf :) }
on *:text: !mmr:#widdz: { msg $chan Widdz MMR = around 4k }
on *:text: !profile:#widdz: { msg $chan http://www.dotabuff.com/players/53479291 }
on *:text: !g2a:#thecourtcast: { msg $chan https://www.g2a.com/?reflink=thecourtcast }
on *:text: !clan:#aptass: { msg $chan /me $nick the current clan lineup: r'o'vardotter,kasafoa,iNo!,fragaria,eiZi }
on *:text: !giveaway:#aptass: { msg $chan Don't wan't to miss my next giveaway? Make sure to like my facebook page! :)http://fb.com/rovardottergaming }
on *:text: !trade:#aptass: { msg $chan If you want to donate cases/items for giveaways etc. https://steamcommunity.com/tradeoffer/new/?partner=167505556&token=Q1BiK3rN :) }
on *:text: !donate:#aptass: { msg $chan If you wan't to donate money to me and support me? :) https://streamtip.com/t/aptass <3 }
on *:text: !crew:#Brobba: { msg $chan If you wan't to join my crew: http://socialclub.rockstargames.com/crew/we_are_kaoz }
on *:text: !g2a:#thecourtcast: { msg $chan Support TCC by purchasing your games through this link! https://www.g2a.com/?reflink=thecourtcast <3 }
on *:text: !nicke:#: { msg $chan WutFace Nicke.. Bollnäsarn som gick på Höghammar och blev csproffs Kappa gunslingerbob @twitch }
on *:text: !hår:#gunslingerbob: { msg $chan 15-05-05 00:02 Nicke:" Fan.. Hår överallt :/" }
on *:text: !tagg:#: { msg $chan Du kan vinna, du kan ta dom! Du kan göra pärmos av dom! Hejja Hejja Hejja! KAPOW }
on *:text: !res:#gunslingerbob: { msg $chan 640x480 50HZ don't listen to moobot Kappa }
on *:text: !cfg:#gunslingerbob: { msg $chan HeatoNs cfg from 2002 Kappa }
on *:text: !creator:#: { msg $chan Bot Created By: Brobba }
on *:text: !skaffaliv:#: { msg $chan Laddar ner liv.. [XXXX[] Nerladdningen misslyckades Kappa }
on *:text: !getlife:#: { msg $chan Downloading a life.. [XXXX[]] Download failed Kappa }
on *:text: !cyka:#: { msg $chan CY KAPOW ER Kappa }
on *:text: !duckqt:#vekinqt: { msg $chan http://prntscr.com/74qfry Vekinqt does a duckface Kappa }
on *:text: !duckface:#vekinqt: { msg $chan http://prntscr.com/74qfry Vekinqt does a duckface Kappa }
on *:text: !lan:#: { msg $chan Nickepicke är så girig, så istället för att nöja sig med sin egna tp-kabel så knyckte han ribbans kabel på lanorama WutFace }
on *:text: !case:#theofficialdaddy: { msg $chan I'm going to have a 24h stream + caseopening and some giveaways, The 10th of June! }
on *:text: !24:#theofficialdaddy: { msg $chan I'm going to have a 24h stream + caseopening and some giveaways, The 10th of June! }
on *:text: !24h:#theofficialdaddy: { msg $chan I'm going to have a 24h stream + caseopening and some giveaways, The 10th of June! }
on *:text: !tradelink:#: { msg $chan http://imgur.com/a/3BvxP Follow this to find your trade-link }
on *:text: !viewmodel:#Brobba: { msg $chan viewmodel_presetpos "0" viewmodel_fov "100" viewmodel_offset_x "0" viewmodel_offset_y "100" viewmodel_offset_z "-3" }
on *:text: xD:#Brobba: { msg $chan LOOOL EXXDEE }


//TIMEOUT//
on *:text:!timeout*:#: {
  if ($nick isop #) {
    msg $chan /timeout $2
  }
}

//WELCOME//

alias -l ajwelcome {
  if ($($+(%,ajwelcome.,$cid,$1),2)) {
    msg $1 welcome $v1 $+ , to my channel enjoy your nuggets!!.
    unset $+(%,ajwelcome.,$cid,$1)
  }
}

//
on !@*:JOIN:#vekinqt:{
  if ($mid(#,2) ison $chan) {
    if ($nick == $mid(#,2)) { return }
    set -e $+(%,ajwelcome.,$cid,#) $addtok($($+(%,ajwelcome.,$cid,#),2),$nick,44)
    if (!$timer($+(.ajw.,$cid,#))) { $+(.timer.ajw.,$cid,#) 1 3 ajwelcome # }
  }
}
on !@*:JOIN:#theofficialdaddy:{
  if ($mid(#,2) ison $chan) {
    if ($nick == $mid(#,2)) { return }
    set -e $+(%,ajwelcome.,$cid,#) $addtok($($+(%,ajwelcome.,$cid,#),2),$nick,44)
    if (!$timer($+(.ajw.,$cid,#))) { $+(.timer.ajw.,$cid,#) 1 3 ajwelcome # }
  }
}


///POINTS & RAFFLE///
alias -l addPoints {
  if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
  var %topic $+($chan,.,$nick)
  var %points $calc($readini(Points.ini,%topic,Points) + $1)
  writeini -n Points.ini %topic Points %points
  return %points
}
alias -l feedPoints {
  if ($4 !isnum) { echo 2 -st $4 is not a number. It needs to be a number. | halt }
  var %topic $+($chan,.,$nick)
  var %points $calc($readini(Points.ini,%topic,Points) + $4)
  var %remove = %user - $4
  writeini -n Points.ini %user Points %points
  writeini -n Points.ini %topic Points %remove
  return %points
}
alias -l lookUpPoints {
  var %topic $+($chan,.,$nick)
  var %points $readini(Points.ini,%topic,Points)
  return %points
}
alias doaddpoints {
  if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
  var %topic $+($1,.,$2)
  var %points $calc($readini(Points.ini,%topic,Points) + $3)
  writeini -n Points.ini %topic Points %points
  echo -a Added points for %topic
}
alias dorempoints {
  var %topic $+($1,.,$2)
  remini -n Points.ini %topic Points
  echo -a Removed points for %topic
}

on *:text:!points help:#brobba: { msg $chan Points will be used during raffles (giveaways) :) . 1 ticket = 10points. 5 points every 15min Online & Offline. }
on *:TEXT:!points:#brobba:{ msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points. }
on $*:TEXT:/!points (add|remove)/Si:#brobba:{
  if ($nick = Brobba) {
    if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
    writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
    { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
  }
  else { msg $chan /me Only Brobba can give you more points! Slaps $nick }
}
on *:text:!points feed*:#brobba: {
  if ($0 != 4) || ($4 !isnum) {
    msg $chan Insufficient or incorrect parameters: use !points feed [user] [number]
    Halt
  }
  if ($4 <= 0) {
    msg $chan $nick you cannot give someone less than 1 point.
    halt
  }
  if ($readini(Points.ini,$+(#,.,$3),Points) = $null) {
    msg $chan $nick That person isn't registered to Brobba's Army, please check your spelling or that you have the correct name and try again.
    Halt
  }
  else {
    if ($readini(Points.ini,$+(#,.,$nick),Points) >= $4) {
      writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) + $4)
      writeini -n Points.ini $+(#,.,$nick) Points $calc($readini(Points.ini,$+(#,.,$nick),Points) - $4)
      msg $chan $nick has given $4 of their points to $3, $3 now has $readini(Points.ini,$+(#,.,$3),Points) points and $nick now has $readini(Points.ini,$+(#,.,$nick),Points).
      halt
    }
    elseif ($readini(Points.ini,$+(#,.,$nick),Points) < $4) {
      msg $chan $nick you do not have that many points to give.
      halt
    }
  }
}



ON !*:join:#Brobba:{
  $+(.timerpoints.,#,.,$nick) 0 900 add.pts $+(#,.,$nick)
  add.pts $+(#,.,$nick)
  if ((%floodjoin) || ($($+(%,floodjoin.,$nick),2))) { return }
  set -u5 %floodjoin On
  set -u30 %floodjoin. $+ $nick On
  msg $chan /ME Welcome $nick ! You are now earning 5 points every 15min (Online & Offline).
}
ON !*:part:#:$+(.timerpoints.,#,.,$nick) off
alias -l add.pts {
  writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 5)
}


on *:TEXT:!ticket &:#Brobba:{
  if (%open == 1) {
    if ($2 > 10) {
      msg $chan $nick $+ , you cannot buy that many tickets!
    }
    if ($2 < 11) {
      var %i = 0
      var %count = $2
      var %topic = $+(#,.,$nick)
      var %user = $readini(Points.ini,%topic,Points)
      var %final = 10 * %count
      var %remove = %user - %final
      if (%remove > 0) {
        writeini -n Points.ini %topic Points %remove
        while (%i < %count) {
          write Raffle.txt $nick
          %i = %i + 1
        }
        msg $chan $nick $+ , has bought %count tickets spending %final points!
      }
      if (%remove < 0) {
        msg $chan Sorry $nick but you don't have enough points to buy %count tickets!
      }
    }
  }
}
on *:TEXT:*:#Brobba:{
  if ($nick isop #) {
    if ($1 == !raffle) {
      if ($2 == open) {
        msg $chan /me [RAFFLE STARTED] Type !ticket <number 1-10> to enter! 
        msg $chan /me 1ticket = 10points.
        set %open 1
        write -c Raffle.txt
        echo -a Raffle Started
      }
      if ($2 == close) {
        msg $chan /me [RAFFLE CLOSED]
        set %open 0
        write -c Raffle.txt
        echo -a Raffle Closed
      }
    }
    if ($1 == !winner) {
      if (%open == 1) {
        var %user = $read(Raffle.txt,n)
        write -c Raffle.txt
        set %open 0
        msg $chan /me And the winner is... %user $+ !!! Well Done!
        echo -a Raffle Closed
      }
    }
  }
  if ($1 == !rafflers) {
    if (%open == 1) {
      msg $chan There are currently $lines(Raffle.txt) tickets entered into the raffle!
    }
  }
}

//UPTIME//
on *:text:!uptime*:#Brobba:{
  if ((%flooduptime) || ($($+(%,flooduptime.,$nick),2))) { return }
  set -u5 %flooduptime On
  set -u10 %flooduptime. $+ $nick On
  if (!$2) { set %target $remove($chan,$chr(35))
    else set %target $iif($2,$2,$mid(#,2-))
    set %channel #
    uptime
  }

  alias uptime {
    sockclose uptime
    sockopen uptime nightdev.com 80
  }

  on *:sockopen:uptime:{
    if ($sockerr) { sockclose $sockname | halt }
    sockwrite -n $sockname GET /hosted/uptime.php?channel=Brobba $+ %target HTTP/1.1
    sockwrite -n $sockname Host: www.nightdev.com
    sockwrite -n $sockname $crlf
  }

  on *:sockread:uptime:{
    if ($sockerr) { sockclose $sockname | halt }
    var %data
    sockread %data
    tokenize 32 %data
    if ($1 isnum) && ($2) { msg %channel %target has been online for $1- }
    elseif (%data == The channel is not live.) msg %channel %target is currently not online.

  }

  on *:sockclose:uptime:{
    unset %channel
    unset %target
  }
}

//END OF THE WORLD


Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Your script is set to trigger on any text. on *:text:*:#:
leaving any code underneath never able to trigger, as it's already been triggered.

Put the different projects in different files by pressing File > New and then paste different scripts that belong together in those.

Thay way you can have multiple matching any text scripts.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Link Copied to Clipboard