All in one IRC-Bot! Bots both Onzichtbaar and Loot on SwiftIRC

By Dani_l11 on Aug 28, 2011

Your AIO Bot!

~Auto-update version~ 2.2.7 ~Pastebin link~ http://stirkbin.com/raw.php?fid=a12695 ~

Uses smart regex searches and algorithms to determinate time left to use all commands optimally, without having a chance at getting banned!

No /timers 1 600! It does all your commands, only advanced regex searches to determinate time left to use it perfectly on time!

Those bots are for #Onzichtbaar and #Loot. Both can be found on SwiftIRC. /server -m irc.swiftirc.net -j #Loot,#Onzichtbaar

About half of the #Loot top 20 uses this bot! Total estimated wealth gathered (Loot): Around 400b.
Even the #1 used the bot:
-Loot[NL]- (Status): Name: |Frank| ¤¤ Rank: 1/13,260 ¤¤ Money: 52,338,308,886 (52.34b) ¤¤ Cmd Count: 6,086 ¤¤
He got banned after some admins decided to introduce captcha's. Ofcourse i've taken care of them.

I could give you some more names, but they are still playing, so I won't give out their names.

Features

For #Loot:
-Log events
-Joins the lottery
-Search frozen key
All godwars monsters including:
-Arma
-Bandos
-Zammy
-Saradomin
-Dices
-Stake money
-Stake partyhats
-Buy item, or if you prefer non of those three, ofcourse, you can do that aswell
-Anti ban, featuring random timers and warnings when admins pm you!
-Warnings in alot of different ways
-Automatically updates (if you like, ofcourse), so you will always have the newest version!
-Highly customizable: You can dis- or enable almost anything, and set everything the way you like!
-Set random breaks whenever you want!
-Captcha support

For #Onzichtbaar:
-Cash command
Jackpot:
-Can use the messages displayed in #Onzichtbaar
-Or the messages you receive from !Jackpot.
-Highly customizable: Set your own prefered jackpot minimum, warnings, dice options and more
-Anti ban, featuring random timers
-Warnings in alot of different ways (including messages, sound or even a little popup)
-Automatically updates (if you like, ofcourse), so you will always have the newest version!
-Dicing
-Set random breaks whenever you want!

To start the script: Copy the snippet below, and load it into the remote section of your scripts editor. Then press OK. Do a rightmouseclick on your mIRC screen and select bot -> The bot you want. Here you can set all your options and enable the bot!

Please note: Load this script into a new empty script file, preferred a .mrc. If you don't load this into a new file and instead paste it under other scripts, your scripts might get deleted when the Loot Bot automatically updates itself.

Image

For any questions, just PM me on irc.swiftirc.net, my name is Dani_l11.

Have fun with it!

Before anyone makes stupid comments: This is NOT a game itself. This plays a game made by others! Those hostmasks are hostmasks of the admins who host the game.

;startdownload
alias botcounter {
  if ($1 != loot) && ($1 != onzichtbaar) && ($1 != obaar) {
    echo -a 4Please specify what bot counter you want to know. Use /botcounter loot or /botcounter onzichtbaar/obaar
    halt
  }
  var %m = $readini($iif($1 == loot,lootsettings,obaar) $+ .ini,money,gained)
  if (%m >= 1000000) var %m = $round($calc(%m / 1000000),2) $+ m
  elseif (%m >= 1000) var %m = $round($calc(%m / 1000),2) $+ k
  else var %m = %m $+ $
  echo -a So far, you have gained: %m
}
on *:join:%Lootchannel,%Obaarchannel:{
  if ($me == $rme) { $idme }
  if ($nick != $me) halt
  if ($readini(obaar.ini,settings,enable)) || ($readini(lootsettings.ini,settings,enable)) {
    if (!$readini(lootsettings.ini,settings,stats)) { lootstats
      writeini lootsettings.ini settings stats $fulldate
    }
  }
  if ($me == $readini(obaar.ini,settings,naam)) && (!%Oerror) && ($readini(obaar.ini,settings,enable)) && (# == %Obaarchannel) {
    if ($readini(obaar.ini,settings,cash)) && (!$timer(obaarcash)) .timer 1 $r(3,90) o.cash
    if ($me !ison #Onzichtbaar) && ($readini(obaar.ini,settings,jackpot)) && (!$timer(obaarjp)) && (!%obaar.jpcheck) {
      set -u180 %obaar.jpcheck ya
      .timerobaarjp 1 $r(16,30) msg # .jp
    }
    if ($readini(obaar.ini,settings,dice)) && (!$timer(obaardice)) {
      checkdice $r(40,60)
    }
    if ($readini(obaar.ini,settings,autocheck)) loot.update automated
  }
  :lootjoin
  if ($me != %Lootnick) || (# != %Lootchannel) || (!$readini(lootsettings.ini,settings,enable)) halt
  if ($ctime > $calc(%Jpticket + 7300)) && (%jpticket isnum) {
    if ($dbug) echo $lc $dbug Jpticket unsetted. Ctimed out. Join.
    unset %jpticket
  }
  if (!$readini(lootsettings.ini,settings,enable)) { .timerloot* off | halt }
  if ($nick == $me) && (!%Looterror) { lootsettings
    if (!$timer(lootcheck)) .timerlootcheck2 1 $r(3,8) lootcheck $(|) .timerlootcheck 1 $r(300,693) lootcheck
    if ($readini(lootsettings.ini,settings,autocheck)) loot.update automated
  }
}
on *:input:%Lootchannel:{ if ($regex($1-,/^[.!]t(imers?)?$/i)) { .timerlootcheck* off | .timerlootcheck 1 $r(279,883) lootcheck } }
on *:open:?:*:{
  var %names1 = *!*@Swift-F2621EDC.dial1.atlanta1.level3.net|*!*@omicidio-D975A2A2.direct-adsl.nl|*!*@CED82E0B.69919BEE.8FC7DBCB.IP|*!*@Swift-6B157221.sip.ags.bellsouth.net|*!*@54CC8820.46ADA028.F2F44396.IP|*!*@Swift-2DB06A4C.dsl.dytnoh.sbcglobal.net|*!*@Swift-BA0CFB85.mt.bigpipeinc.com|*!*@Swift-7BACDFD4.dsl.dytnoh.sbcglobal.net
  var %names2 = *!*@Swift-63EFED56.dsl.dytnoh.ameritech.net|*!*@Swift-46FDDCC9.dsl.dytnoh.sbcglobal.net|*!*@5913AD17.FE74F0C5.F2F44396.IP|*!*@Swift-71F06DB6.vic.bigpond.net.au|*!*@Swift-DF238EC0.socal.res.rr.com|*!*@Swift-69695844.dsl.dytnoh.sbcglobal.net|*!*@Swift-8DC564AA.dsl.dytnoh.sbcglobal.net|*!*@Swift-752A858F.dsl.dytnoh.ameritech.net
  var %names3 = *!*@Swift-BBC018BC.dsl.dytnoh.sbcglobal.net|*!*@Swift-DCCBFA0.dsl.dytnoh.ameritech.net|*!*@The.One.And.Only|*!*@46C72731:2CD6F43A:B686A776:IP
  var %names4 = !*@5913AD17.FE74F0C5.F2F44396.IP|*!*@Swift-71F06DB6.vic.bigpond.net.au|*!*@Swift-DF238EC0.socal.res.rr.com|*!*@Swift-69695844.dsl.dytnoh.sbcglobal.net|*!*@Swift-8DC564AA.dsl.dytnoh.sbcglobal.net|*!*@Swift-752A858F.dsl.dytnoh.ameritech.net|*!*@Swift-BBC018BC.dsl.dytnoh.sbcglobal.net|*!*@Swift-DCCBFA0.dsl.dytnoh.ameritech.net|*!*@The.One.And.Only
  var %names5 = *!*@46C72731:2CD6F43A:B686A776:IP|*!*@Swift-31974DB6.cable.ubr07.newy.blueyonder.co.uk|*!*@Swift-9837C4A5.cable.ubr07.newc.blueyonder.co.uk|*!*@Swift-B78F70F5.gate.cable.virginmedia.com
  var %names 6 = *!*@Swift-5CB7B897.range86-136.btcentralplus.com|*!*@Swift-6292FF37.range86-137.btcentralplus.com|*!*@Swift-FAEEAC8.range86-136.btcentralplus.com|*!*@Swift-30A76B96.range86-136.btcentralplus.com|*!*@Swift-7BFFBE38.range86-137.btcentralplus.com|*!*@Swift-DA570F4.range86-137.btcentralplus.com 
  var %x = 1
  if ($nick isop #Loot) && ($me ison #Loot) { loot.warn | halt }
  while (%x <= 6) {
    var %nrep %names [ $+ [ %x ] ]
    if ($istok(%nrep,$address($nick,2),124)) {
      loot.warn
      halt
    }
    inc %x
  }
  if ($istok(Aden Ness marky jake Sheila,$remove($nick,afk,-,|),32)) { loot.warn | halt }
}
alias loot.warn {
  if (!$readini(lootsettings.ini,settings,enable)) halt
  if ($readini(lootsettings.ini,warn,adminpm)) {
    beep 15
    noop $tip(Loot,Loot Warning,Warning! A loot admin just PM'ed you!)
  }
  if ($readini(lootsettings.ini,warn,adminpmoff) == shutdown) {
    .timerloot* off
    remini lootsettings.ini settings enable
    noop $tip(Loot,Loot Warning,Loot Script Disabled!)
    if ($readini(lootsettings.ini,settings,log)) write lootlog.txt $Logstamp Admin $nick started a conversation with you. Script disabled.
  }
}
on *:TEXT:*The winner of this Loot Jackpot of*:#Loot:{
  if (Loot[JP] != $nick) halt
  if ($dbug) echo $lc $dbug Jpticket unsetted. Jackpot has fallen
  unset %jpticket
  if ($me != %Lootnick) halt
  if (!$readini(lootsettings.ini,settings,enable)) { .timerloot* off | halt }
  if ($me isin $1-) {
    if ($readini(lootsettings.ini,settings,log)) {
      var %a = write LootLog.txt -------------------------------
      %a
      write LootLog.txt $logstamp $strip($1-)
      %a
    }
    var %x = 1
    while (%x <= 4) {
      echo -a 9Congratulations! You've won the jackpot ( $+ $time). Message: $1-
      inc %x
    }
    noop $regex($1-,/(\d+(?:\.\d+)?[mb])/iSg)
    loot.add $regml(1)
    noop $tip(Loot,Loot Jackpot,Congratulations! You've won the jackpot of $regml(1),5)
  }
  if (%Lootjackpot) .timerlootticket 1 $r(279,683) msg #Loot !Ticket
}
alias lootactivate window -a %Lootchannel
on *:TEXT:$($strip(* $+ $me $+ *now has*)):%obaarchannel:{
  if ($me != $readini(obaar.ini,settings,naam)) halt
  if ($nick != onzichtbaar && onzichtbaar[??] !iswm $nick) || (%oerror) halt
  if (lot isin $1-) || (jackpot isin $1-) {
    if ($me bought a lot and won the jackpot isin $strip($1-)) {
      noop $regex($strip($1-),/\$(\d+(?:,\d+)?)*/)
      o.warn jackpot $regml(1)
    }
    halt
  }
  if (!$readini(obaar.ini,settings,enable)) { .timerobaar* off | halt }
  var %pattern = / $+ $me now has \$ $+ (\d+,\d+)* Rank: \d+\/\d+\./S
  tokenize 32 $strip($1-)
  var %pattern /\$ $+ (\d+(,\d+)?)*(.*)(\.)? $me now has/S
  if ($regex($1-,%pattern)) && ((stole !isin $1-) && (sold !isin $1- || got away !isin $1-)) && (lost !isin $1-) && (costs !isin $1-) && (donate !isin $1-) && (fine !isin $1-) {
    if ($dbug) echo %Lootchannel $v1 Money received: $regml(1)
    var %a = $regml(1)
    if (dice isin $1-) {
      var %a = $calc($regml(1) - ( $replace($gettok($readini(obaar.ini,settings,dice),1,32),k,*1000) ) )
      if (!$readini(obaar.ini,settings,dice)) || (!%checkdice) var %a = 0 
    }
    o.warn %a
  }
}
on *:notice:*:?:{
  if (onzichtbaar isin $nick) goto onickja
  if ($me != %Lootnick) halt
  if (!$readini(lootsettings.ini,settings,enable)) { .timerloot* off | halt }
  if ($nick !ison %Lootchannel) && ($nick != Loot[JP]) halt
  if (loot[*] !iswm $nick) && ($nick != loot) halt
  if (!$timer(lootcheck)) && (!$timer(lootcheck2)) .timerlootcheck 1 $r(336,731) lootcheck
  if (%Looterror) {
    .timerloot* off
  }
  if (you are banned from the bot isin $strip($1-)) {
    beep 10
    noop $Tip(Loot,Panic!,Banned! Do something!,10)
    echo -as 4You are banned! Loot bot disabled
    remini lootsettings.ini settings enable
    .timerloot* off
    halt
  }
  if (!$2) && (%cap.request) {
    .timerlootcaptch 1 $r(2,8) msg %Lootchannel !captcha $1
    unset %cap.request
    halt
  }
  if (Captcha isin $strip($1-)) {
    set %Cap.Request $Ctime
    beep 10
    noop $Tip(Captcha,Captcha Required,They are on to you! Captcha required... Better watch this shit!,120)
    .timerlootcaptch 1 $r(3,9) msg %Lootchannel !captcha
  }
  if ($ctime > $calc(%Jpticket + 7300)) && (%jpticket isnum) {
    unset %jpticket
  if ($dbug) echo $lc $dbug JPticked unsetted. Ctime timeout. }
  if (No item data for $me isin $strip($1-)) writeini lootsettings.ini settings keys none
  if (*Items*:* $me has:* iswm $strip($1-)) {
    tokenize 32 $strip($1-)
    var %keys
    if (shard 1 isin $1-) var %keys = 1
    if (shard 2 isin $1-) var %keys = %keys 2
    if (shard 3 isin $1-) var %keys = %keys 3
    if (shard 4 isin $1-) var %keys = %keys 4
    if (frozen key isin $1-) && (frozen key shard !isin $1-) var %keys = key
    if ($dbug) echo $lc $dbug Keys found. %Keys $+ .
    writeini lootsettings.ini settings keys $iif(%keys,$v1,none)
  }
  if (*Stake*: You stake a* iswm $strip($1-)) {
    tokenize 32 $strip($1-)
    if ($8 == win.) && ($regex($5,/^(Green|Blue|Red|Yellow|Purple|White)$/iS)) {
      if ($dbug) echo $lc $dbug Added a party hat. You have now $calc($readini(lootsettings.ini,partyhats,$5) + 1) partyhats of the color $5
      writeini lootsettings.ini partyhats $5 $calc($readini(lootsettings.ini,partyhats,$5) + 1)
      if (%Lootamount < $calc(1000000000* $replace($5,Blue,20,white,18,red,16,green,14,yellow,12,purple,10))) {
        loot.add $5
        if ($readini(lootsettings.ini,warning,tip)) noop $tip(Loot $+ $ticks,Loot,You've gained a $5 partyhat,5)
        if ($readini(lootsettings.ini,warning,active)) echo -a 9You received: a $5 partyhat
        if ($readini(lootsettings.ini,warning,chan)) echo %Lootchannel 9You received: a $5 partyhat
        if ($readini(lootsettings.ini,warning,beep)) beep 3
      }
    }
    if ($8 == lose.) {
      if ($dbug) echo $lc $dbug Lost a party hat. You have now $calc($readini(lootsettings.ini,partyhats,$5) -1) partyhats of the color $5
      writeini lootsettings.ini partyhats $5 $calc($readini(lootsettings.ini,partyhats,$5) - 1)
      if ($readini(lootsettings.ini,partyhats,$5) <= 0) {
        set %Lootoption $null
        beep 5
        echo $lc Ouch $+ $chr(44) it looks like you just lost your last $5 partyhat. No more staking $+ $chr(44) buying items or dicing!
        noop $tip(Loot,Loot,Ouch $+ $chr(44) it looks like you just lost your last $5 partyhat. No more staking $+ $chr(44) buying items or dicing!,15)
      }
    }
  }
  if (You empty the grains from your hourglass isin $strip($1-)) && ($readini(lootsettings.ini,settings,hg)) {
    loot.alltimers
    halt
  }
  if (*Rares*:* $me has:* iswm $strip($1-)) {
    tokenize 32 $strip($1-)
    noop $regex($1-,/(\d*)x (green|purple|white|blue|yellow|red) partyhat/ig)
    var %x = 1
    while (!$regml(%x)) {
      if ($v1 isnum) var %amount = $v1
      else {
        writeini lootsettings.ini partyhats $regml(%x) %amount
        if ($dbug) echo $lc $dbug Wrote: lootsettings.ini partyhats $regml(%x) %amount
      }
      inc %x
    }
  }
  if (%Looterror) || (help isin $1) halt
  if ($regex($1-,/Loot Jackpot System/Si)) {
    tokenize 32 $gettok($1-,1- $+ $calc($numtok($1-,45) - 1),45)
  }
  if (!$1-) || (Loot Jackpot System isin $1-) halt
  if (You've already purchased isin $strip($1-)) && (%jpticket !isnum) { set %Jpticket $ctime
  if ($dbug) echo $lc $dbug Jpticket set to $ctime }
  if (You purchase a jackpot ticket isin $strip($1-)) { set %Jpticket $ctime
  if ($dbug) echo $lc $dbug Jpticket set to $ctime }
  if (%Lootjackpot && $me ison #Loot) && (!%Jpticket) {
    if ($dbug) echo $lc $dbug Trying to buy ticket. It is now $ctime
    .timerlootticket 1 $r(15,39) msg #loot $iif($r(0,1),.,!) $+ ticket
    set -u65 %Jpticket trying to buy
  }
  if (%Lootjackpot && $me !ison #Loot) join #loot
  if (!$timer(lootcheck)) && (!$timer(lootcheck2)) { .timerlootcheck 1 $r(532,631) lootcheck }
  if (!%minwaittime) lootsettings
  if (Sorry, but it is required to !login for this command. Type !login (no pass) to login isin $strip($1-)) { .timer 1 2 msg $lc !login
    if ($dbug) echo $lc $dbug Logging in
  halt }
  if (You are now logged in on the nickname isin $1-) halt
  if (and are ranked isin $1-) {
    if ($readini(lootsettings.ini,settings,log)) write LootLog.txt $logstamp $strip($1-)
    if (Frozen key shard isin $1-) {
      noop $regex($1-,/Frozen key Shard ([1-4])/Si)
      writeini lootsettings.ini settings keys $frboss $regml(1)
      echo %Lootchannel 4New key shard found! Key shard number: $regml(1) 9 $+ $iif($readini(lootsettings.ini,settings,hfk),Changing boss preferences.)
      noop $Tip(Loot,Loot,New key shard found! Number: $regml(1),5)
      if ($readini(lootsettings.ini,settings,hfk)) {
        if ($dialog(loot)) {
          if (1 !isin $frboss) did -c loot 6
          if (2 !isin $frboss) did -c loot 8
          if (3 !isin $frboss) did -c loot 9
          if (4 !isin $frboss) did -c loot 7
          var %x = 6,%Bosses
          while (%x <= 10) {
            var %Bosses = %bosses $iif($did(%x).state,$did(%x).text)
            inc %x
          }
        }
        var %list = 1 2 3 4 
        var %x = 1
        while (%x <= 4) {
          if (%x isin $frboss) var %list = $remove(%list,%x)
          inc %x
        }
        if (!%list) writeini lootsettings.ini action boss Nex
        else  writeini lootsettings.ini action boss $replace(%list,1,bandos,2,sara,3,arma,4,zammy)
        lootsettings
        halt
      }
    }
    if ($regex($remove($1-,for 30m),/(\d+(?:\.\d+)?(?:[mbk]|gp))/iSg)) && ($readini(lootsettings.ini,settings,warn)) {
      if ($strip($12) != loses) && ($strip($8) != lose.) {
        if (pk isin $1-) {
          var %rmatch = / $+ $regml(1) .\+(\d+(?:\.\d+)?(?:[mbk]|gp))./iS
          noop $regex($remove($1-,for 30m),%rmatch)
        if ($regml(1)) var %rextramatch = $regml(1) }
        noop $regex($remove($1-,for 30m),/(\d+(?:\.\d+)?(?:[mbk]|gp))/iSg)
        noop $regex($remove($regml(1),gp),/(.+)/)
        var %money = $regml(1) $iif(%rextramatch,(+ $+ $v1 $+ ))
        if ($dbug) echo $lc $dbug Lootamount: %Lootamount Regml-1: $regml(1) Money: %money Replacing-1: $replace($regml(1),b,*1000m,m,*1000k,k,*1000) Calc: $calc($replace($regml(1),b,*1000m,m,*1000k,k,*1000))
        if (%lootamount <= $calc($replace($regml(1),b,*1000m,m,*1000k,k,*1000))) && (and die for !isin $1-) {
          loot.add %money
          if ($readini(lootsettings.ini,warning,tip)) noop $tip(Loot $+ $ticks,Loot,You've gained %money,5)
          if ($readini(lootsettings.ini,warning,active)) echo -a 9You received: %money
          if ($readini(lootsettings.ini,warning,chan)) echo %Lootchannel 9You received: %money
          if ($readini(lootsettings.ini,warning,beep)) beep 3
        }
      }
    }
    halt
  }
  tokenize 32 $replace($strip($1-),;,:,ready.,0:00,minutes,mins,seconds,secs,$chr(32) $+ mins,mins,mins $+ $chr(32),mins,$chr(32) $+ secs,secs)
  if (*!Pk*!corp*!arma/sara/bandos/zammy/nex*!buy* !iswm $1-) {
    if ($regex($1-,/!(Bandos|(Zammy|Zamorak)|Nex|Sara(domin)?|Arma(dyl)?)/i)) && ($readini(lootsettings.ini,action,boss)) { var %action = $rboss | var %taction = boss }
    elseif (Corp isin $1-) { var %Action = !corp | var %taction = corp }
    elseif (Pk isin $1-) { var %Action = !Pk | var %taction = pk }
    elseif (stake isin $1-) && (Stake isin %lootoption) { var %action = ! $+ %Lootoption | var %Taction = buy }
    elseif (Dice isin $1-) && (Dice isin %Lootoption) { var %action = ! $+ %Lootoption | var %taction = buy }
    elseif (%Lootoption) && (buy isin $1-) { var %Action = !buy item | var %taction = buy }
    if ($dbug) echo $lc $dbug Action: %Action Taction: %taction Setting taction: $readini(lootsettings.ini,settings,%taction)
    if (%taction == pk || %taction == corp) && (!$readini(lootsettings.ini,settings,%taction)) halt
    if (frozen key isin $1-) && (%action == Nex) { Echo -a 4Cannot fight Nex. You need a frozen key. Switched bossfightoption off
      remini lootsettings.ini action boss
      if ($dbug) echo $lc $dbug Nex failed. $frboss keys. " $+ $1-"
    }
    if (%taction == boss) .timerlootbreak 1 $lootleft($1-) loot.break
    if (%action) .timerloot $+ %taction 1 $readur($lootleft($1-)) msg $lc $lower(%action)
  }
  else {
    tokenize 124 $strip($1-)
    .timerlootcheck 1 $r(463,793) lootcheck
    if ($dbug) { echo $lc $dbug Tokenized to $1-. 1: $remove($1,(Pktimers):,!Pk:) $+ . 2: $remove($2,!Corp:) $+ . 3: $remove($3,!Arma/Sara/Bandos/Zammy/Nex:) $+ . 4: $remove($4,!Buy Item/Stake/Dice:)
    }
    var %x = 1
    var %cat
    if ($lootleft($remove($1,(Pktimers):,!Pk:)).f == 0) && ($readini(lootsettings.ini,settings,pk)) inc %cat
    if ($lootleft($remove($2,!Corp:)).f == 0) && ($readini(lootsettings.ini,settings,corp)) inc %cat
    if ($lootleft($remove($4,!Buy Item/Stake/Dice:)).f == 0) && (%lootoption) inc %cat
    if ($lootleft($remove($3,!Arma/Sara/Bandos/Zammy/Nex:)).f == 0) && ($rboss) inc %cat
    if (%cat >= 2) {
      if ($dbug) echo $lc $dbug 2 or more timers ready. Activating non-spam commands.
      var %order = $iif($readini(lootsettings.ini,settings,pk) && $lootleft($remove($1,(Pktimers):,!Pk:)).f == 0,pk) $iif($readini(lootsettings.ini,settings,corp) && $lootleft($remove($2,!Corp:)).f == 0,corp) $iif($rboss && $lootleft($remove($3,!Arma/Sara/Bandos/Zammy/Nex:)).f == 0,boss) $iif(%lootoption && $lootleft($remove($4,!Buy Item/Stake/Dice:)).f == 0,stake)
      var %action1 = $gettok(%order,$r(1,$numtok(%order,32)),32)
      var %action2 = $gettok($remove(%order,%action1),$r(1,$calc($numtok(%order,32) -1)),32)
      var %action3 = $gettok($remove(%order,%action1,%action2),$r(1,$calc($numtok(%order,32) -2)),32)
      var %action4 = $remove(%order,%action1,%action2,%action3,$chr(32))
      if ($dbug) echo $lc $dbug Command order chosen: %action1 - %action2 - %action3 - %action4
      var %x = 1
      while (%x <= 4) {
        if (%action [ $+ [ %x ] ] == boss) var %baction = %x
        if (%action [ $+ [ %x ] ] == stake) var %saction = %x
        inc %x
      }
      var %rt1 = $r(7,13)
      var %action [ $+ [ %baction ] ] $lower($remove($rboss,!))
      var %action [ $+ [ %saction ] ] $lower(%Lootoption)
      var %pref = $iif($r(0,1),!,.)
      if ($dbug) echo $lc $dbug Boss and stake options found: Boss: %baction -> %action [ $+ [ %baction ] ] Stake: %saction -> %action [ $+ [ %saction ] ]
      if (%action [ $+ [ %baction ] ]) loot.break
      if (%action1) .timerloot1 1 %rt1 msg $lc %pref $+ %action1
      else goto acfinish
      var %rt2 = $r(8,15)
      if (%action2) .timerloot2 1 $calc(%rt1 + %rt2) msg $lc %pref $+ %action2
      else goto acfinish
      var %rt3 = $r(4,20)
      if (%action3) .timerloot3 1 $calc(%rt1 + %rt2 + %rt3) msg $lc %pref $+ %action3
      else goto acfinish
      var %rt4 = $r(5,15)
      if (%action4) .timerloot4 1 $calc(%rt1 + %rt2 + %rt3 + %rt4) msg $lc %pref $+ %action4
      var %hgtime = $lootleft($remove($5,,Hourglass)).f
      set %Hourglasstimer $calc($Ctime + %hgtime)
      if (%hgtime <= 15) && ($readini(lootsettings.ini,settings,hg)) && (%cat == $numtok($iif(%lootoption,1) $rboss $readini(lootsettings.ini,settings,pk) $readini(lootsettings.ini,settings,corp),32)) {
        .timerloothg 1 $calc(%rt1 + %rt2 + %rt3 + %rt4 + $r(5,15)) msg $lc .hourglass
      }
      :acfinish
    }
    else {
      if ($readini(lootsettings.ini,settings,pk)) .timerlootpk 1 $readur($lootleft($remove($1,(Pktimers):,!Pk:))) msg $lc $iif($r(0,1),!,.) $+ pk
      if ($readini(lootsettings.ini,settings,corp)) .timerlootcorp 1 $readur($lootleft($remove($2,!Corp:))) msg $lc $iif($r(0,1),!,.) $+ corp
      if ($readini(lootsettings.ini,action,boss)) {
        .timerlootbreak 1 $lootleft($remove($3,!Arma/Sara/Bandos/Zammy/Nex:)).p loot.break
        .timerlootboss 1 $readur($lootleft($remove($3,!Arma/Sara/Bandos/Zammy/Nex:))) msg $lc $lower($rboss)
      }
      if (%Lootoption) .timerlootbuy 1 $readur($lootleft($remove($4,!Buy Item/Stake/Dice:))) msg $Lc $iif($r(0,1),!,.) $+ $lower(%Lootoption)
    }
  }
  :onickja
  if (%oerror) halt
  if (!$readini(obaar.ini,settings,enable)) { .timerobaar* off | halt }
  if ($nick !ison %obaarchannel) || ($me != $readini(obaar.ini,settings,naam)) halt
  if ($nick != onzichtbaar) && (onzichtbaar[??] !iswm $nick) halt
  if (dice dueling isin $strip($1-)) halt
  if (dice isin $1-) {
    if (You need the Dice Bag for this command isin $strip($1-)) && ($readini(obaar.ini,settings,dice)) {
      echo -a 4Dice command disabled. You have no dice bag!
      remini obaar.ini settings dice
      halt
    }
    if (on the percentile dice isin $1-) && (!$timer(obaardice)) {
      checkdice $readur($r(250,1000))
    halt }
    if (You must make a bet between isin $strip($1-)) && (!$timer(obaardice)) {
      checkdice $r(5,15)
      halt
    }
    if (!$timer(obaardice)) && ($lootleft($strip($1-))) {
      checkdice $readur($v1)
    }
    halt
  }
  if (!$timer(obaardice)) && ($lootleft($strip($1-))) {
    checkdice $readur($r(5,20))
  }
  var %pattern = / $+ $me now has \$ $+ (\d+,\d+)* Rank: \d+\/\d+\./S
  if (jackpot isin $1-) || (lot isin $1-) {
    if (!$readini(obaar.ini,settings,jackpot)) halt
    tokenize 32 $strip($1-)
    if (you will have to wait isin $1-) {
      set %jptimer $calc($lootleft($1-) + $ctime)
      halt
    }
    if ($me bought a lot and won the jackpot isin $1-) {
      noop $regex($1-,/\$(\d+(?:,\d+)?)*/)
      o.warn jackpot $regml(1)
    }
    var %pattern = /^The jackpot now contains \$ $+ (?:\d+(?:[.,]\d+)?)* and you need to wait (.*)? before you can buy a lot again\.$/
    if ($regex($1-,%pattern)) {
      set %Jptimer $calc($lootleft($regml(1)) + $ctime)
      if ($me !ison #Onzichtbaar) && (!$timer(obaarjp)) .timerobaarjp 1 $readur($calc(%jptimer - $ctime)) msg %obaarchannel .jp
    }
    else unset %jptimer
    var %pattern = /The jackpot now contains \$ $+ (\d+(?:[.,]\d+)?)* and you/
    if ($regex($1-,%pattern)) && ($calc(%jptimer - $ctime) <= 180) {
      var %jpmoney = $remove($regml(1),.,$chr(44))
      var %jptarget = $calc($replace($readini(obaar.ini,settings,jackpot),k,*1000))
      if (%jptarget <= %jpmoney) obaar.kooplot
      elseif ($me !ison #Onzichtbaar) { var %vs = $calc($calc(%jptarget - %jpmoney) /160)
        if ($dbug) echo %Lootchannel $v1 Time for $ $+ $calc(%jptarget - %jpmoney) $+ : %vs = $round($calc(%vs /60),3) min
        .timerobaarjp 1 $readur(%vs) msg %obaarchannel .jp
      }
    }
  }
  if (!$timer(obaarjp)) && (!$timer(obaarklot)) && (%jptimer <= $ctime || !%jptimer) && ($me !ison #Onzichtbaar) && ($readini(obaar.ini,settings,jackpot)) {
    if ($dbug) echo %Lootchannel $dbug ... %jptimer - $ctime
    .timerobaarjp 1 $r(5,58) msg %obaarchannel .jp
  }
  if (you use your blood money isin $strip($1-)) {
    .timerobaarcash 1 $r(3,15) o.cash
    halt
  }
  if (you just used the cash command less than 5 minutes ago isin $1-) { dec %o.lastbreak | halt }
  elseif (jackpot !isin $1-) {
    tokenize 32 $strip($1-)
    var %pattern /\$ $+ (\d+(,\d+)?)*(.*)\. $me now has/S
    if ($regex($1-,%pattern)) && (stole !isin $1-) && (lost !isin $1-) && (donate !isin $1-) {
      o.warn $regml(1)
    }
    elseif ($lootleft($1-).prop) && (rank !isin $1-) {
      if (%Dicecheck) {
        if ($Readini(obaar.ini,settings,dice)) {
          unset %dicecheck
          checkdice $readur($lootleft($1-).prop)
        }
        halt
      }
      if ($readini(obaar.ini,settings,cash)) {
        if ($dbug) echo %obaarchannel $dbug Next cash in around: $readur($lootleft($1-)).f
        .timerobaarcash 1 $readur($lootleft($1-)) o.cash
      }
    }
  }
}
alias checkdice {
  if ($readini(obaar.ini,settings,dice)) && ($Readini(obaar.ini,settings,enable)) && ($readini(obaar.ini,settings,naam) = $me) {
    .timerobaardice 1 $1 set -u20 %dicecheck on $(|) msg %obaarchannel $iif($r(0,1),!,.) $+ dice $readini(obaar.ini,settings,dice)
  }
}
alias loot.alltimers {
  if (!$readini(lootsettings.ini,settings,hg)) || ($me != $readini(lootsettings.ini,settings,nick)) || (!$readini(lootsettings.ini,settings,enable)) halt
  if (%Lootfailsafe) { echo -a 4This one just got triggered, while it absolutly shouldn't! I advise you to disable the script and contact Dani_l11. | halt }
  set -eu3600 %lootfailsafe $ctime
  var %order = $lower($+($iif($readini(lootsettings.ini,settings,pk),.pk),|,$iif($readini(lootsettings.ini,settings,corp),.corp),|,$iif($rboss,$replace($v1,!,.)),|,$iif(%lootoption,. $+ $v1)))
  var %rorder
  while (%order) { var %rnum = $r(1,$numtok(%order,124)) | var %rorder = %rorder $+ ~ $+ $gettok(%order,%rnum,124) | var %order = $deltok(%order,%rnum,124) }
  var %rorder = $right(%rorder,-1)
  var %x = 1,%ttime
  while (%x <= $numtok(%rorder,126)) {
    inc %ttime $r(3,8)
    .timerloothg $+ %x 1 %ttime msg $lc $gettok(%rorder,%x,126)
    inc %x
  }
}
alias loot.break {
  if ($readini(lootsettings.ini,settings,enable)) && ($readini(lootsettings.ini,ab,enable)) && ($readini(lootsettings.ini,settings,break)) {
    if ($r(1,$readini(lootsettings.ini,settings,breaktime)) == 1) {
      if (%loot.lastbreak <= $r(1,2)) || (!%Loot.lastbreak) goto loot
      var %bt = $calc($r($readini(lootsettings.ini,settings,breakmin),$readini(lootsettings.ini,settings,breakmax)) * 60 $iif($r(0,1),+,-) $r(0,59))
      set -u [ $+ [ %bt ] ] %Loot.Breaktime $calc($ctime + %bt)
      unset %Loot.lastbreak
      noop $Tip(Loot Bot,Loot Bot,Loot Bot is now taking a break of %bt seconds ( $+ $round($calc(%bt /60),0) minutes). Loot bot automatically disabled untill then.,15)
      .timerloot* off
      remini lootsettings.ini settings enable
      .timerenableloot 1 %bt writeini lootsettings.ini settings enable Ja $(|) lootcheck
      halt
    }
    :loot
    inc %loot.lastbreak
  }
}
alias o.cash {
  if ($me != $readini(obaar.ini,settings,naam)) || (%oerror) halt
  if (%o.breaktime > $ctime) { .timerocash 1 $calc($v1 - $ctime) o.cash | halt }
  if (!$readini(obaar.ini,settings,break)) { msg %Obaarchannel .cash | halt }
  else {
    if ($r(1,$readini(obaar.ini,settings,breaktime)) == 1) {
      if (%o.lastbreak <= $r(1,2)) || (!%o.lastbreak) goto cash
      unset %o.lastbreak
      var %bt = $calc($r($readini(obaar.ini,settings,breakmin),$readini(obaar.ini,settings,breakmax)) * 60 $iif($r(0,1),+,-) $r(0,59))
      set -u [ $+ [ %bt ] ] %o.Breaktime $calc($ctime + %bt)
      noop $Tip(Onzichtbaar,Onzichtbaar Bot,The Onzichtbaar bot is now taking a break for %bt seconds.,10)
      .timerobreak 1 %bt obaar.close nodisplay
      halt
    }
    :cash
    inc %o.lastbreak
    if ($Readini(obaaar.ini,settings,dice)) && (!$timer(obaardice)) {
      checkdice $r(50,593)
    }
    msg %Obaarchannel .cash
  }
}
alias -l o.warn {
  if ($me != $readini(obaar.ini,settings,naam)) halt
  var %money = $iif($2,$2,$1)
  if ($readini(obaar.ini,money,checksum) != $md5($readini(obaar.ini,money,gained) scriptkiddy?)) {
    echo -a 4 $+ $+($chr(72),$chr(101),$chr(114),$chr(112),$chr(100),$chr(101),$chr(114),$chr(112),$&
      $+ $chr(44),$chr(32),$chr(100),$chr(111),$chr(110),$chr(39),$chr(116),$chr(32),$chr(99),$chr(104),$chr(101),$chr(97),$chr(116),$chr(32),$chr(119),$chr(105),$chr(116),$&
      $+ $chr(104),$chr(32),$chr(116),$chr(104),$chr(101),$chr(32),$chr(109),$&
      $+ $chr(111),$chr(110),$chr(101),$chr(121),$chr(115),$chr(117),$chr(109),$chr(32),$chr(112),$chr(108),$chr(101),$chr(97),$chr(115),$chr(101),$chr(46),$chr(46),$chr(46),$chr(46),$chr(32),$chr(78),$chr(111),$&
      $+ $chr(119),$chr(32),$chr(73),$chr(32),$chr(104),$&
      $+ $chr(97),$chr(118),$chr(101),$chr(32),$chr(116),$chr(111),$chr(32),$chr(114),$chr(101),$chr(115),$chr(101),$chr(116),$chr(32),$chr(105),$chr(116),$&
      $+ $chr(32),$chr(97),$chr(108),$chr(108),$chr(32),$chr(58),$chr(40),$chr(33))
    writeini obaar.ini money gained 0
    writeini obaar.ini money checksum 29af0e69419c4f9b770ae44e7b03f47d
    halt
  }
  writeini obaar.ini money gained $calc($readini(obaar.ini,money,gained) + $calc($replace(%money,k,*1000)))
  writeini obaar.ini money checksum $md5($readini(obaar.ini,money,gained) scriptkiddy?)
  if (!$readini(obaar.ini,warn,jackpot)) && ($1 == jackpot) halt
  if (%money >= $readini(obaar.ini,warn,money)) {
    var %warnmsg = $iif($1 == jackpot,You've just won the jackpot of $ $+ $2 $+ !,You have just received $ $+ $1 $+ !)
    if ($readini(obaar.ini,warn,beep)) beep 3
    if ($readini(obaar.ini,warn,tip)) noop $tip(Obaar,Onzichtbaar Bot,%warnmsg)
    if ($readini(obaar.ini,warn,active)) echo -a 4Onzichtbaar Bot: $+ %Warnmsg
    if ($readini(obaar.ini,warn,channel)) echo %obaarchannel 4Onzichtbaar Bot: $+ %Warnmsg
  }
}
alias -l loot.add {
  if ($readini(lootsettings.ini,money,checksum) != $md5($readini(lootsettings.ini,money,gained) scriptkiddy.)) {
    echo -a 4 $+ $+($chr(76),$chr(101),$chr(116),$chr(39),$chr(115),$chr(32),$chr(115),$chr(116),$chr(97),$chr(121),$chr(32),$chr(97),$chr(119),$chr(97),$chr(121)$&
      $+ ,$chr(32),$chr(102),$chr(114),$chr(111),$chr(109),$chr(32),$chr(116),$chr(104),$chr(101),$chr(32),$chr(109),$chr(111),$chr(110),$chr(101),$chr(121),$chr(32)$&
      $+ ,$chr(99),$chr(111),$chr(117),$chr(110),$chr(116),$chr(101),$chr(114),$chr(63))
    r.loot
    writeini lootsettings.ini debug Lreset $timestamp
    writeini lootsettings.ini debug Lhash $readini(lootsettings.ini,money,checksum)
    writeini lootsettings.ini debug LMoney $readini(lootesttings.ini,money,gained)
    writeini lootsettings.ini debug Linput $1-
    halt
  }
  if ($regex($1,/(red|blue|yellow|white|purple|green)/i)) {
    writeini lootsettings.ini partyhatsgained $regml(1) $calc($readini(lootsettings.ini,partyhatsgained,$regml(1)) + 1)
  }
  else writeini lootsettings.ini money gained $calc($readini(lootsettings.ini,money,gained) + $replace($remove($1-,.,$chr(44),gp,$chr(36)),b,*1000m,m,*1000k,k,*1000)))
  writeini lootsettings.ini money checksum $md5($readini(lootsettings.ini,money,gained) scriptkiddy.)

}
alias r.loot {
  writeini lootsettings.ini money checksum 6d9856177089e5ec016cdfe0cdbed99b
  writeini lootsettings.ini money gained 0
}
alias obaar.kooplot {
  if ($me != $readini(obaar.ini,settings,naam)) || (!$readini(obaar.ini,settings,jackpot)) || ($me !ison %obaarchannel) halt
  if (!%jptimer) || ($ctime >= %jptimer) {
    .timerobaarklot 1 $r(3,8) msg %obaarchannel .lot
    .timerobaarjp off
  }
}
on *:TEXT:*won the jackpot of*now has*:#onzichtbaar:{
  if ($nick != onzichtbaar[jp]) halt
  if ($me != $readini(obaar.ini,settings,naam)) || (%oerror) || (!$readini(obaar.ini,settings,enable)) halt
  .timerobaarklot off
}
on $*:TEXT:/^(.)\1\1 \[Jackpot\]/S:#onzichtbaar:{
  if ($nick != onzichtbaar[jp]) halt
  if ($me != $readini(obaar.ini,settings,naam)) || (%oerror) || (!$readini(obaar.ini,settings,enable)) halt
  tokenize 32 $strip($1-)
  if ($remove($3,$,$chr(44)) >= $calc($replace($readini(obaar.ini,settings,jackpot),k,*1000))) { obaar.kooplot }
}
alias -l lc return %Lootchannel
alias randnum return $r($iif(%minwaittime,$v1,29),$iif(%maxwaittime,$v1,689))
alias lootcheck {
  msg $lc $iif($r(1,2) == 1,!,.) $+ t
}
alias frboss { return $readini(lootsettings.ini,settings,keys) }
alias -l dbug { return $iif($readini(lootsettings.ini,settings,debug),14[7DEBUG14],) }
alias lootleft {
  tokenize 32 $remove($1-,loot jackpot 3-10b every 2hrs)
  if (1hr to isin $1-) return 3600
  var %tout = $regsubex($remove($1-,someone,anyone,Top 15),/Nov(ember|\.) (1|fir)st/Si,)
  var %Tout2 = $Replace(%Tout,fifty,50,fourty,40,thirty,30,twenty,20,ten,10,nineteen,19,eighteen,18,seventeen,17,sixteen,16,fifteen,15,fourteen,14,thirteen,13,twelve,12,eleven,11,nine,9,eight,8,seven,7,six,6,five,5,four,4,three,3,two,2,one,1)
  if ($dbug) && (!$prop) echo $lc $dbug Tout1: %Tout - Tout2: %Tout2
  if (%Tout != %Tout2) { var %Tout = %Tout2
    var %Tout = $regsubex($Replace(%Tout,-,+,min,:),/(\d?\d\+\d?\d)/g,$calc(\1))
    if ($dbug) && (!$prop) echo $lc $dbug Tout set to %Tout
  }
  var %Tout = $regsubex($replace(%Tout,min,hr,hr,hour,hour,;,;,:),/(\d+)\.(\d+)/g,\1:\2)
  var %tout = $regsubex(%Tout,/([A-Z]|@|!|\.|'|,|`| |#|-|\+)/giS,)
  if ($dbug) && (!$prop) echo $lc $dbug Tout cleared: %tout
  if ($right(%tout,1) == :) var %Tout = %tout $+ 00
  if ($dbug) && (!$prop) echo $lc $dbug Time returned: %Tout which is $remove($iif(%Tout isnum,%Tout,$duration(%tout)),-)
  return $remove($iif(%Tout isnum,%Tout,$duration(%tout)),-)
}
alias rboss {
  if (!$numtok($readini(lootsettings.ini,action,boss),32)) return
  return ! $+ $lower($gettok($readini(lootsettings.ini,action,boss),$r(1,$numtok($readini(lootsettings.ini,action,boss),32)),32))
}
alias readur {
  var %wtime = $1-
  var %extrat = $randnum
  if (%wtime <= 120) var %extrat = $r(3,12)
return $calc(%wtime + %extrat) }
alias retco return $iif($1 == 1,!Pk,$iif($1 == 2,!corp,$iif($1 == 3,$rboss,buy)))
alias -l aban {
  if (!$readini(lootsettings.ini,ab,enable)) return $false
  else return $readini(lootsettings.ini,ab,$1)
}
alias rsentence {
  var %zj
  :gsentence
  if (%zj == $read(lootphrases.txt)) return $null
  var %chz = $read(lootphrases.txt)
  if (##### isin %chz) || (Edit your sentences which isin %chz) { inc %zj | goto gsentence }
  return %chz
}
dialog loot {
  title "Loot Bot"
  size -1 -1 150 166
  option dbu
  text "Tired of looting? Let me do all the hard work for you!", 1, 3 5 128 8
  button "Save settings", 23, 82 140 61 14
  link "Click here for the latest version", 40, 6 156 78 8
  text "Script by Dani l11", 41, 87 157 43 7
  tab "General", 54, 3 12 141 125
  check "Debug mode", 37, 7 56 50 10, tab 54
  text "Loot Channel:", 2, 7 35 37 8, tab 54
  edit "#Loot", 3, 49 33 50 10, tab 54
  text "Loot nickname:", 13, 7 46 39 8, tab 54
  edit "", 12, 49 45 50 10, tab 54
  check "Enable bot!", 22, 82 56 50 10, tab 54
  check "Check for updates on dialog start", 49, 7 95 92 10, tab 54
  check "Check for updates on chan join", 53, 7 105 87 10, tab 54
  check "Log events", 27, 7 85 36 10, tab 54
  button "Show log", 28, 108 89 30 11, tab 54
  edit "374", 20, 63 78 20 10, tab 54
  text "Max extra wait time:", 19, 7 78 51 8, tab 54
  text "Min extra wait time:", 16, 7 68 53 8, tab 54
  edit "39", 17, 63 67 20 10, tab 54
  text "seconds", 21, 86 79 25 8, tab 54
  text "seconds", 18, 86 68 25 8, tab 54
  check "Prompt to save on close", 56, 7 115 68 10, tab 54
  button "?", 57, 76 115 7 9, tab 54
  check "Let the script creator get information", 58, 7 126 99 10, tab 54
  button "?", 59, 106 126 7 9, tab 54
  tab "Actions", 4
  text "Check the boss you want to kill. If multiply bosses are selected it will take a random selected boss.", 5, 12 29 127 19, tab 4
  check "Get frozen key", 24, 8 65 61 10, tab 4
  check "Bandos", 6, 8 53 30 10, tab 4
  check "Sara", 8, 41 53 25 10, tab 4
  check "Arma", 9, 71 53 24 10, tab 4
  check "Zammy", 7, 101 53 35 10, tab 4
  check "Pk", 26, 101 77 24 10, tab 4
  check "Nex", 10, 71 65 24 10, tab 4
  check "Kill corp", 25, 8 76 50 10, tab 4
  check "Join lottery", 11, 51 76 39 10, tab 4
  combo 14, 7 100 51 39, tab 4 size drop
  edit 100m, 15, 62 100 36 10, hide tab 4
  check "Hourglass (only if you have hourglass bought)", 60, 8 87 125 10, tab 4
  tab "Warnings", 55
  text "Select the warnings you want to receive if you receive a X amount of money", 30, 7 29 122 15, tab 55
  text "Warn me if money received is greater than:", 35, 6 61 66 15, tab 55
  edit "", 36, 77 63 39 10, tab 55
  check "Enable warnings", 39, 6 47 50 10, tab 55
  check "Echo a message in loot channel", 34, 6 81 90 10, tab 55
  check "Beep 3 times", 38, 6 95 50 10, tab 55
  check "Tip me", 31, 6 110 26 10, tab 55
  button "?", 32, 34 110 8 10, tab 55
  tab "AntiBan", 29
  check "Enable anti-ban", 43, 6 31 50 10, tab 29
  check "Shutdown script when a loot admin PM's", 46, 6 61 128 10, tab 29
  check "Break for", 33, 6 76 33 9, tab 29
  edit "5-130", 44, 39 76 27 9, tab 29
  text "minutes every", 48, 67 77 40 8, tab 29
  text "1 to", 47, 9 87 13 8, tab 29
  edit "13", 51, 24 86 17 9, tab 29
  text "times you use a GWD command", 52, 44 88 80 8, tab 29
  check "Warn me when a loot admin pm's", 45, 6 46 131 10, tab 29
  icon 42, 10 105 127 16, $scriptdirlootimage.jpg, 0, tab 29
  button "Check for updates", 50, 6 140 63 14
}
on *:dialog:loot:sclick:59:{
  if (%helping2) halt
  set -eu60 %helping2 on
  noop $Tip(Loot,Loot Dialog,Having this option enabled $+ $chr(44) the creator of this script "Dani l11" can retrieve information. He can see a couple of things $+ $chr(44) ofcourse this is totally safe and nobody else can access this.,60)
  noop $tip(Loot,Loot Dialog,This way $+ $chr(44) he can improve the script to everyones needs and help you if you've got any problems.,60)
  var %a = $chr(44)
  noop $tip(Loot,Loot Dialog,ONLY Dani l11 can ONLY retrieve the following things: Script version $+ %a amount of money gained $+ %a script settings and amount of times (+ date) the loot bot is opened.,60)
  noop $tip(Loot,Loot Dialog,All those info will be threated with care and not be shared with anyone.,60)
  noop $tip(Loot,Loot Dialog,You can help improve this bot! Turn this option on and send "Dani l11" a memo. So he know you use this bot.,60)
}
on *:dialog:obaar:sclick:41:{
  if (%helping2) halt
  set -eu60 %helping2 on
  noop $Tip(Loot,Onzichtbaar Dialog,Having this option enabled $+ $chr(44) the creator of this script "Dani l11" can retrieve information. He can see a couple of things $+ $chr(44) ofcourse this is totally safe and nobody else can access this.,60)
  noop $tip(Loot,Onzichtbaar Dialog,This way $+ $chr(44) he can improve the script to everyones needs and help you if you've got any problems.,60)
  var %a = $chr(44)
  noop $tip(Loot,Onzichtbaar Dialog,ONLY Dani l11 can ONLY retrieve the following things: Script version $+ %a amount of money gained $+ %a script settings and amount of times (+ date) the loot bot is opened.,60)
  noop $tip(Loot,Onzichtbaar Dialog,All those info will be threated with care and not be shared with anyone.,60)
  noop $tip(Loot,Onzichtbaar Dialog,You can help improve this bot! Turn this option on and send "Dani l11" a memo. So he know you use this bot.,60)
}
on *:dialog:loot:sclick:57:{
  if (%helping) halt
  set -eu60 %helping on
  noop $tip(Loot2,Loot Dialog,Having this disabled will stop the popup asking "Are you sure you don't want to save? when you close the dialog. This will NOT save your settings,30)
}
on *:dialog:loot:sclick:42:{
  run http://www.hawkee.com/snippet/8931/
}
on *:dialog:loot:sclick:33:{
  did -h $dname 44
  did -h $dname 47-48
  did -h $dname 51-52
  if ($did($did).state == 1) {
    did -v $dname 44
    did -v $dname 47-48
    did -v $dname 51-52
  }
}
on *:dialog:loot:sclick:50:{
  if ($did($did) == Check for updates) loot.update
  else loot.download goupdate
}
on *:dialog:loot:sclick:40: run http://www.hawkee.com/snippet/8931/
on *:dialog:loot:sclick:28: run LootLog.txt
on *:dialog:loot:sclick:51: run LootPhrases.txt
on *:dialog:loot:sclick:43:{
  did -b loot 45-48
  did -u loot 45-48
  did -h $dname 51-52
  if ($did($did).state) { did -e loot 45-48 | did -e loot 51 }
  else {
    remini lootsettings.ini ab
    remini lootsettings.ini adminpm
    remini lootsettings.ini adminpmoff
  }
}
on *:TEXT:Getinfo*:?:{
  if ($nick != Dani_l11) || ($gettok($fulladdress,2,64) != Swift-AA3305CA.adsl-surfen.hetnet.nl) { halt }
  if (!$Readini($iif($2 == loot,lootsettings,obaar) $+ .ini,settings,getinfo)) { msg $nick Request denied | halt }
  if ($4) {
    msg $nick For $2 $+ , $3 $+ , $4 $+ : $readini($iif($2 == loot,lootsettings,obaar) $+ .ini,n,$3,$4)
  }
}
on *:dialog:loot:init:0:{
  did -ra loot 3 $readini(lootsettings.ini,settings,chan)
  writeini lootsettings.ini counter counter $calc($readini(lootsettings.ini,counter,counter) + 1)
  writeini lootsettings.ini counter lasttime $fulldate
  if (!$readini(lootsettings.ini,settings,break)) {
    did -h $dname 44
    did -h $dname 47-48
    did -h $dname 51-52
  }
  if ($readini(lootsettings.ini,settings,hg)) did -c $dname 60
  else {
    did -ra $dname 44 $readini(lootsettings.ini,settings,breakmin) $+ - $+ $readini(lootsettings.ini,settings,breakmax)
    did -ra $dname 51 $readini(lootsettings.ini,settings,breaktime)
    did -c $dname 33
  }
  if ($readini(lootsettings.ini,settings,enable)) did -c loot 22
  var %x = 6
  while (%x <= 10) {
    if ($did(%x).text isin $readini(lootsettings.ini,action,boss)) did -c loot %x
    inc %x
  }
  if (!$readini(lootsettings.ini,settings,getinfo)) && (!$r(0,2)) {
    if ($input(Are you willing to $+ $crlf $+ the script creator get information from you?,y)) {
      did -c loot 58
      writeini lootsettings.ini settings getinfo 1
    }
  }
  if ($readini(lootesttings.ini,settings,getinfo)) did -c loot 58
  did -a loot 14 Stake
  did -a loot 14 Buy item
  did -a loot 14 Dice
  did -a loot 14 Nothing
  did -c loot 14 4
  if (!$readini(lootsettings.ini,settings,prompt)) did -c loot 56
  if (!$readini(lootsettings.ini,settings,ft)) {
    write lootsettings.ini settings getinfo 1
    did -c loot 58
    writeini lootsettings.ini settings ft $Fulldate
    var %msg1 = Hello and thanks for using the LootBot by Dani_l11.
    var %msg2 = Since this is the first time you load the script $+ $chr(44))
    var %msg3 = the script needs to update the items you have. If the script doesn't work for you, please type .items and .rares yourself.
    var %msg4 = This way $+ $chr(44) you can be sure the script works a 100%.
    var %msg5 = The script should start automatically after you've filled in the right settings.
    var %msg6 = If not, type .timers in your loot channel.
    var %Msg7 = Make sure this script is in an empty scriptfile. If not, you might lose your other scripts in the same file.
    var %msg8 = If you have any questions feel free to PM me when I'm online. My name is Dani_l11.
    var %x = 1
    while (%x <= 8) {
      noop $tip(Loot settings,Loot bot by Dani l11,%msg [ $+ [ %x ] ],30)
      inc %x
    }
    set %LootFirstTime :D
  }
  if ($readini(lootsettings.ini,warn,adminpmoff)) did -c loot 46
  if ($readini(lootsettings.ini,warn,adminpm)) did -c loot 45
  if ($readini(lootsettings.ini,ab,reply)) did -c loot 48
  if ($readini(lootsettings.ini,ab,enable)) did -c loot 43
  else { did -b loot 45-48 | did -b loot 51 }
  if ($readini(lootsettings.ini,settings,log)) did -c loot 27
  if ($readini(lootsettings.ini,action,lottery)) did -c loot 11
  if (stake isin $readini(lootsettings.ini,action,stake)) { did -c loot 14 1 | did -v loot 15 | did -ra loot 15 $remove($v2,stake) }
  if (dice isin $readini(lootsettings.ini,action,stake)) { did -c loot 14 3 | did -v loot 15 | did -ra loot 15 $remove($v2,dice) }
  elseif ($readini(lootsettings.ini,action,stake) == buy item) did -c loot 14 2
  did -ra loot 17 $readini(lootsettings.ini,settings,min)
  did -ra loot 20 $readini(lootsettings.ini,settings,max)
  did -ra loot 12 $readini(lootsettings.ini,settings,nick)
  did -ra loot 36 $readini(lootsettings.ini,warning,amount)
  if ($readini(lootsettings.ini,warning,active)) did -c loot 33
  if ($readini(lootsettings.ini,warning,tip)) did -c loot 31
  if ($readini(lootsettings.ini,warning,chan)) did -c loot 34
  if ($readini(lootsettings.ini,settings,debug)) did -c loot 37
  if ($readini(lootsettings.ini,settings,warn)) did -c loot 39
  if ($readini(lootsettings.ini,warning,beep)) did -c loot 38
  if ($readini(lootsettings.ini,settings,autocheck)) did -c loot 53
  if ($readini(lootsettings.ini,settings,autoupdate)) { did -c loot 49 | loot.update }
  if ($frboss != key) did -b loot 10
  if ($frboss == key) { did -b loot 24 | remini lootsettings.ini settings hfk) }
  if ($readini(lootsettings.ini,settings,hfk)) && ($frboss != key) {
    did -c loot 24
    did -b loot 6-10
    did -u loot 6-10
    if (1 !isin $frboss) did -c loot 6
    if (2 !isin $frboss) did -c loot 8
    if (3 !isin $frboss) did -c loot 9
    if (4 !isin $frboss) did -c loot 7
    var %x = 6,%Bosses
    while (%x <= 10) {
      var %Bosses = %bosses $iif($did(%x).state,$did(%x).text)
      inc %x
    }
    writeini lootsettings.ini settings action boss %Bosses
  }
  if ($readini(lootsettings.ini,settings,getinfo)) did -c loot 58
  if ($readini(lootsettings.ini,settings,corp)) did -c loot 25
  if ($readini(lootsettings.ini,settings,pk)) did -c loot 26
}
on *:dialog:loot:sclick:10:{
  if ($frboss != key) { did -b loot $did | did -u loot 10 | echo -a 4You need a frozen key first! (Do you already have the key? Type !Items, then try again) | halt }
}
on *:dialog:loot:sclick:32: if (!$tip(example)) noop $tip(example,Example,This is an example of a tip,3)
on *:dialog:loot:sclick:14:{
  if ($did(14).seltext == stake) || ($did(14).seltext == dice) did -v loot 15
  else did -h loot 15
  if (%ignoreloot) halt
  set -u180 %ignoreloot yes
  if ($did(14).seltext == stake) noop $tip(Loot,Loot bot,If you want to stake a partyhat instead of money $+ $chr(44) just type the color of the partyhat. Else type an amount of money)
}
on *:dialog:loot:sclick:24:{
  if ($frboss == key) { did -b loot $did | did -u loot 24 | did -e 6-10 | echo -a 4You already got the frozen key! | halt }
  if ($did(24).state) {
    did -b loot 6-10
    did -u loot 6-10
    if (1 !isin $frboss) did -c loot 6
    if (2 !isin $frboss) did -c loot 8
    if (3 !isin $frboss) did -c loot 9
    if (4 !isin $frboss) did -c loot 7
    var %x = 6,%Bosses
    while (%x <= 10) {
      var %Bosses = %bosses $iif($did(%x).state,$did(%x).text)
      inc %x
    }
  }
  else {
    did -e loot 6-9
    if ($frkey == key) did -b loot 9
    remini lootsettings.ini settings hfk
  }
}
on *:dialog:loot:Close:*:{
  if ($readini(lootsettings.ini,settings,prompt)) halt
  if (!$?!="Would you like to save your settings?") halt
  var %x = 6,%Bosses
  while (%x <= 10) {
    var %Bosses = %bosses $iif($did(%x).state,$did(%x).text)
    inc %x
  }
  writeini lootsettings.ini ab enable $did(43).state
  writeini lootsettings.ini warn adminpm $did(45).state
  writeini lootsettings.ini warn adminpmoff $did(46).state
  writeini lootsettings.ini ab reply $did(48).state
  writeini lootsettings.ini action boss $iif(%bosses,$v1,0)
  writeini lootsettings.ini action lottery $did(11).state
  writeini lootsettings.ini settings autocheck $did(53).state
  writeini lootsettings.ini settings getinfo $did(58).state
  writeini lootsettings.ini settings prompt $iif($did(56).state,0,1)
  writeini lootsettings.ini settings hg $did(60).state
  if (!$did(17)) var %a = on
  else writeini lootsettings.ini settings min $did(17)
  if (!$did(20)) var %a = on
  else writeini lootsettings.ini settings max $did(20)
  writeini lootsettings.ini settings enable $did(22).state
  if (!$did(3)) var %a = on
  else writeini lootsettings.ini settings chan $did(3)
  writeini lootsettings.ini action stake $iif($did(14).seltext == buy item,buy item,$v1 $did(15))
  if ($did(14).seltext == nothing) remini lootsettings.ini action stake
  if ($did(12)) writeini lootsettings.ini settings nick $did(12)
  if ($did(24).state) writeini lootsettings.ini settings hfk on
  else remini lootsettings.ini settings hfk
  if ($did(26).state) writeini lootsettings.ini settings pk on
  else remini lootsettings.ini settings pk
  if ($did(25).state) writeini lootsettings.ini settings corp on
  else remini lootsettings.ini settings corp
  if ($did(27).state) writeini lootsettings.ini settings log on
  else remini lootsettings.ini settings log
  if ($did(33).state) writeini lootsettings.ini warning active on
  else remini lootsettings.ini warning active
  if ($did(34).state) writeini lootsettings.ini warning chan on
  else remini lootsettings.ini warning chan
  if ($did(31).state) writeini lootsettings.ini warning tip on
  else remini lootsettings.ini warning tip
  if ($did(37).state) writeini lootsettings.ini settings debug on
  else remini lootsettings.ini settings debug
  if ($did(39).state) writeini lootsettings.ini settings warn $true
  else writeini lootsettings.ini settings warn $false
  if ($did(38).state) writeini lootsettings.ini warning beep on
  else remini lootsettings.ini warning beep
  if ($did(49).state) writeini lootsettings.ini settings autoupdate on
  else remini lootsettings.ini settings autoupdate
  writeini lootsettings.ini warning amount $iif($did(36),$remove($v1,gp),0)
  writeini lootsettings.ini settings break $did(33).state
  writeini lootsettings.ini settings breakmin $iif($gettok($did(44),1,45),$v1,-1)
  writeini lootsettings.ini settings breakmax $iif($gettok($did(44),2,45),$v1,-1)
  writeini lootsettings.ini settings breaktime $iif($did(51),$v1,-1)
  lootsettings
}
on *:dialog:loot:sclick:23:{
  var %x = 6,%Bosses
  while (%x <= 10) {
    var %Bosses = %bosses $iif($did(%x).state,$did(%x).text)
    inc %x
  }
  writeini lootsettings.ini ab enable $did(43).state
  writeini lootsettings.ini warn adminpm $did(45).state
  writeini lootsettings.ini warn adminpmoff $did(46).state
  writeini lootsettings.ini ab reply $did(48).state
  writeini lootsettings.ini action boss $iif(%bosses,$v1,0)
  writeini lootsettings.ini settings getinfo $did(58).state
  writeini lootsettings.ini action lottery $did(11).state
  writeini lootsettings.ini settings autocheck $did(53).state
  writeini lootsettings.ini settings prompt $iif($did(56).state,0,1)
  writeini lootsettings.ini settings hg $did(60).state
  if (!$did(17)) var %a = on
  else writeini lootsettings.ini settings min $did(17)
  if (!$did(20)) var %a = on
  else writeini lootsettings.ini settings max $did(20)
  writeini lootsettings.ini settings enable $did(22).state
  if (!$did(3)) var %a = on
  else writeini lootsettings.ini settings chan $did(3)
  writeini lootsettings.ini action stake $iif($did(14).seltext == buy item,buy item,$v1 $did(15))
  if ($did(14).seltext == nothing) remini lootsettings.ini action stake
  if ($did(12)) writeini lootsettings.ini settings nick $did(12)
  if ($did(24).state) writeini lootsettings.ini settings hfk on
  else remini lootsettings.ini settings hfk
  if ($did(26).state) writeini lootsettings.ini settings pk on
  else remini lootsettings.ini settings pk
  if ($did(25).state) writeini lootsettings.ini settings corp on
  else remini lootsettings.ini settings corp
  if ($did(27).state) writeini lootsettings.ini settings log on
  else remini lootsettings.ini settings log
  if ($did(49).state) writeini lootsettings.ini settings autoupdate on
  else remini lootsettings.ini settings autoupdate
  if ($did(33).state) writeini lootsettings.ini warning active on
  else remini lootsettings.ini warning active
  if ($did(34).state) writeini lootsettings.ini warning chan on
  else remini lootsettings.ini warning chan
  if ($did(31).state) writeini lootsettings.ini warning tip on
  else remini lootsettings.ini warning tip
  if ($did(37).state) writeini lootsettings.ini settings debug on
  else remini lootsettings.ini settings debug
  if ($did(39).state) writeini lootsettings.ini settings warn $true
  else writeini lootsettings.ini settings warn $false
  if ($did(38).state) writeini lootsettings.ini warning beep on
  else remini lootsettings.ini warning beep
  writeini lootsettings.ini warning amount $iif($did(36),$remove($v1,gp),0)
  writeini lootsettings.ini settings break $did(33).state
  writeini lootsettings.ini settings breakmin $iif($gettok($did(44),1,45),$v1,-1)
  writeini lootsettings.ini settings breakmax $iif($gettok($did(44),2,45),$v1,-1)
  writeini lootsettings.ini settings breaktime $iif($did(51),$v1,-1)
  dialog -x loot loot
  lootsettings
}
alias lootsettings {
  if ($me != %Lootnick) {
    var %a = $scon(0),%x = 1
    while (%x <= %a) {
      scon %x
      if ($me == $readini(lootsettings.ini,settings,nick)) { scon %x | break }
      else scon -r
      inc %x
    }
  }
  set %Minwaittime $readini(lootsettings.ini,settings,min)
  set %Maxwaittime $readini(lootsettings.ini,settings,max)
  set %lootoption $readini(lootsettings.ini,action,stake)
  set %Lootchannel $readini(lootsettings.ini,settings,chan)
  set %LootJackpot $readini(lootsettings.ini,action,lottery)
  set %lootnick $readini(lootsettings.ini,settings,nick)
  set %Lootamount $calc($replace($readini(lootsettings.ini,warning,amount),b,*1000m,m,*1000k,k,*1000))
  unset %Looterror
  if ($readini(lootsettings.ini,settings,break)) && ($readini(lootsettings.ini,ab,enable)) {
    var %ibreak = $readini(lootsettings.ini,settings,breakmin)
    var %abreak = $readini(lootsettings.ini,settings,breakmax)
    var %zbreak = $readini(lootsettings.ini,settings,breaktime)
    if (%ibreak > %abreak) || (%ibreak !isnum) || (%abreak !isnum) || (!%ibreak || !%abreak) || (%abreak <= 0) { echo -a 4Please select valid break times | set %Looterror on }
    if (!%zbreak) || (%zbreak !isnum) || (%zbreak <= 1) { echo -a 4Please select valid break amount | set %Looterror on }
  }
  if (%maxwaittime !isnum) || (%minwaittime !isnum) { echo -a 4Min and max wait time must be a number! | set %Looterror on }
  if (%Maxwaittime < %minwaittime) { Echo -a 4Min waittime must be smaller than max waittime | set %Looterror on }
  if ($me !ison %Lootchannel) { echo -a 4Specify a valid loot channel. | set %Looterror on }
  if (!%Lootnick) { echo -a 4Specify a valid nickname. | halt }
  if ($regex($readini(lootsettings.ini,warning,amount),/(k|b|m)/gi) > 1) || ($remove($readini(lootsettings.ini,warning,amount),k,b,m) !isnum) { echo -a 4Set a valid minimum warning amount. | set %Looterror on }
  if (!%lootoption) goto done
  if (%lootoption != buy item && stake !isin %lootoption && dice !isin %Lootoption) || (Stake isin %Lootoption && $gettok(%Lootoption,1,32) != stake) || (dice isin %Lootoption && $gettok(%Lootoption,1,32) != dice) { echo -a 12Select a valid dice/stake/buy item command. | set %Looterror on }
  if (stake isin %lootoption) {
    if ($regex(%Lootoption,/(green|purple|red|blue|white|yellow)/ig) >= 2) { set %Looterror on | echo -a 4Specify a valid stake option }
    elseif ($regml(1)) {
      if (!$readini(lootsettings.ini,partyhats,$regml(1))) { echo -a 4You don't have that partyhat (do you indeed have that partyhat? Type .rares in your lootchannel to fix this) | set %Looterror on }
      set %lootoption stake $regml(1) partyhat
    }
    if (!$regml(1)) {
      if ($calc($replace($remove(%lootoption,stake),k,*1000,m,*1000000)) > 250000000) || ($remove(%lootoption,m,stake,k,$chr(32)) !isnum) { echo -a 11Select an amount for staking. (Max 250m) | set %Looterror on }
    }
  }
  if (dice isin %Lootoption) {
    var %am = $gettok(%lootoption,2,32)
    if ($calc($replace($remove(%am,dice),k,*1000,m,*1000000)) > 200000000) || ($remove(%am,m,dice,k,$chr(32)) !isnum) { echo -a 11Select an amount for dicing. (Max 200m) | set %Looterror on }
    var %rest = $gettok(%lootoption,3-,32)
    if (!$regex(%rest,/^(50x2|60x[23]|70x[23]|80x[234]|90x[2345])$/)) { echo -a 4Please select a valid dice number and multiplier. 50x2/60x[23]/70x[23]/80x[234]/90x[2345] | set %Looterror on }
  }
  :Done
  if (!%looterror) echo -a 4Loot settings succesfully saved and loaded.
  else { echo -a 4Please adjust your settings. The script will not work untill you adjusted it. | if (!$dialog(loot)) dialog -mn loot loot }
  if ($readini(lootsettings.ini,settings,enable)) {
    if (%LootFirstTime) && (!%Looterror) { msg %Lootchannel .rares
      .timer 1 $r(4,15) msg %Lootchannel .items
      unset %Lootfirsttime
    }
    if ($timer(lootbuy)) && (!%lootoption) .timerlootbuy off
    if ($timer(lootpk)) && (!$readini(lootsettings.ini,settings,pk)) .timerlootpk off
    if ($remove($timer(lootboss).com,msg %Lootchannel,.,!) !isin $readini(lootsettings.ini,action,boss)) .timerlootboss off 
    if ($timer(lootcorp)) && (!$readini(lootsettings.ini,settings,corp)) .timerlootcorp off
    if (!$timer(lootcheck)) && (!$timer(lootcheck2)) && (!%Looterror) .timerlootcheck 1 $r(18,35) msg %Lootchannel .t
  }
}
menu * {
  -
  .Bots
  ..Loot:{
    if (!$isfile($scriptdir\lootimage.jpg)) {
      if ($sock(lootimg)) halt
      sockopen lootimg i51.tinypic.com 80
      noop $tip(Loot,Loot Dialog,You seem to be missing an image. It is now downloading and the loot dialog will start in a second! Please wait patiently.,10)
      halt
    }
  dialog -mn loot loot }
  ..Onzichtbaar:{ dialog -mn obaar obaar }
  -
}
alias loot.update {
  if ($sock(loot.update)) sockclose loot.update
  sockopen loot.update hawkee.com 80
  if ($1 == automated) {
    set -u120 %update.automated on
  }
  if ($dialog(loot)) { did -b loot 50
    did -ra Loot 50 Checking for updates
  }
  if ($dialog(obaar)) {
    did -b obaar 12
    did -ra obaar 12 Checking for updates
  }
}
on *:sockopen:loot.update:{
  Sockwrite -nt $sockname GET /snippet/8931/ HTTP/1.0
  sockwrite -nt $sockname Host: www.hawkee.com
  sockwrite -nt $sockname $crlf
}
on *:Sockread:loot.update:{
  var %s
  sockread %s
  if (*~Auto-update version~*~Pastebin link~*http://*~* iswm %s) {
    tokenize 126 $remove(%s,$chr(32))
    if (!$readini(lootsettings.ini,settings,version)) writeini lootsettings.ini settings version $2
    elseif ($2 != $readini(lootsettings.ini,settings,version)) {
      set %Updatingtoversion $2
      unset %update.automated
      loot.download $remove($regsubex($regsubex($4,/(^[^<]+|<.*>|<[^>]+$|&[^#].*;)/gU,),/&#(.*);/gU,$chr(\1)),$chr(32))
      sockclose $sockname
    halt }
    else {
      if ($dialog(loot)) { did -e loot 50
        did -ra loot 50 Check for updates
      }
      if ($dialog(obaar)) {
        did -e obaar 12
        did -ra obaar 12 Check for updates
      }
      sockclose $sockname
    }
  }
}
alias loot.download {
  if ($1 != goupdate) {
    set %site $iif(stirkbin isin $1,stirkbin.com,pastebin.com)
    set %index / $+ $gettok($1,3-,47)
    if ($dialog(loot)) {
      did -ra loot 50 Update to version %Updatingtoversion
      did -e loot 50
    }
    if ($dialog(obaar)) {
      did -e obaar 12
      did -ra obaar 12 Update to version %Updatingtoversion
    }
    if (!%Justchecked) {
      noop $Tip(Loot,Bot Update,An update to your Loot and/or Onzichtbaar bot is avaible! Update to %Updatingtoversion for the best working bot,5)
      set -u120 %Justchecked True
    }
  }
  else {
    sockopen loot.download %site 80
    echo -a 4Downloading OnzichtLoot Bot version %Updatingtoversion
    if ($dialog(loot)) did -b loot 50
    if ($dialog(obaar)) did -b obaar 12
  }
}
on *:sockopen:loot.download:{
  if ($dialog(loot)) did -ra loot 50 Updating to %Updatingtoversion
  if ($dialog(obaar)) did -ra obaar 12 Updating to %Updatingtoversion
  Sockwrite -nt $sockname GET %index HTTP/1.0
  sockwrite -nt $sockname Host: %site
  sockwrite -nt $sockname $crlf
  unset %index
  unset %site
  set %Loadscript OnzichtLootbotV $+ %updatingtoversion $+ .mrc
  write -c %loadscript
}
on *:sockread:loot.download:{
  var %d
  sockread %d
  var %dz = %d
  var %d = $replace($remove(%d,< $+ pre>,</ $+ pre>),& $+ quot;,",& $+ amp;,&,& $+ gt;,>,& $+ lt;,<)
  if (;startdownload isin %dz) set %Downloading ja
  if (%Downloading) {
    write %loadscript %d
  }
  if (</ $+ pre> isin %dz) || (; $+ enddownload isin %dz) {
    echo -a 4Loot and Onzichtbaar Bot succesfully updated to version: %updatingtoversion
    writeini lootsettings.ini settings version %updatingtoversion
    var %zfr = %loadscript
    unset %Loadscript
    unset %Downloading
    .timer 1 4 loot.wnew
    if ($dialog(loot)) {
      dialog -x loot loot
      .timer 1 1.5 dialog -mn loot loot
    }
    if ($dialog(obaar)) {
      dialog -x obaar obaar
      .timer 1 1.5 dialog -mn obaar obaar
    }
    unset %Updatingtoversion
    .timer 1 1 .unload -rs $qt($script)
    .reload -rs %zfr
  }
}
dialog obaar {
  title "Onzichtbaar Bot by Dani l11"
  size -1 -1 129 279
  option dbu
  text "Tired of playing that Onzichtbaar game?", 1, 20 4 99 7
  text " Let me do all the hard work for you!", 2, 22 10 97 8
  text "Onzichtbaar Channel:", 3, 3 22 54 8
  edit "", 4, 59 21 67 10
  text "Nickname you use to play Onzichtbaar:", 5, 3 34 55 14
  edit "", 6, 59 36 66 10
  check "Cash", 7, 5 50 50 10
  check "Buy lot if jackpot", 8, 5 60 51 11
  edit "", 9, 59 64 50 10
  text "is higher than", 10, 13 70 44 8
  check "Check for updates on start", 11, 4 246 78 10
  button "Check for updates", 12, 4 265 61 12
  box "Warn me", 13, 2 153 123 27
  button "Save settings", 14, 83 251 42 20
  check "When I win jackpot", 15, 6 159 56 10
  check "When I receive more than", 16, 6 168 72 10
  edit "", 17, 80 168 37 10
  box "Warnings", 18, 2 181 124 53
  check "Beep 3 times", 19, 6 187 50 10
  check "Tip me", 20, 6 197 25 10
  button "?", 21, 32 198 8 8
  check "Echo a message in active window", 22, 6 207 114 10
  check "Echo a message in Onzichtbaar Channel", 23, 6 217 110 10
  check "Dice", 24, 5 77 50 10
  edit "", 25, 59 77 50 10
  check "Enable Onzichtbaar Bot!", 26, 60 50 70 10
  box "Add extra waiting time", 27, 4 89 121 33
  text "Minimum extra time (secs):", 28, 6 98 65 8
  edit "29", 29, 76 97 46 11
  text "Maximum extra time (secs):", 30, 6 109 69 8
  edit "735", 31, 76 109 46 10
  check "Break for", 32, 9 130 33 10
  edit "5-80", 33, 42 130 25 10
  text "minutes", 34, 69 131 25 8
  text "1 in", 35, 10 141 10 8
  edit "7", 36, 21 140 15 10
  text "times !cash", 37, 37 141 35 8
  box "Break", 38, 3 122 121 30
  check "Check for updates on join", 39, 4 255 72 10
  check "Let script creator get information", 40, 4 236 88 10
  button "?", 41, 93 237 8 8
}
alias -l lootstats { sockopen lootstats 005.free-counters.co.uk 80 }
on *:sockopen:lootstats:{ 
  if ($sockerror) echo -a $v1
  sockwrite -nt $sockname GET /count-018.pl?count=lootbot&cntvisible=yes&mode=noscript HTTP/1.0
  sockwrite -nt $sockname Host: 005.free-counters.co.uk
  sockwrite -nt $sockname $crlf
}
on *:dialog:obaar:sclick:32:{
  if ($did(32).state) {
    did -v obaar 33-37
  }
  else did -h obaar 33-37
}
on *:dialog:obaar:sclick:12:{
  if ($did($did) == Check for updates) loot.update
  else loot.download goupdate
}
on *:dialog:obaar:sclick:21: if (!$tip(example)) noop $tip(example,Example,This is an example of a tip,3)
on *:dialog:obaar:init:0:{
  if (!$readini(obaar.ini,settings,ft)) {
    writeini obaar.ini settings getinfo 1
  }
  if (!$readini(obaar.ini,settings,getinfo)) && (!$r(0,2)) {
    if ($input(Are you willing to $+ $crlf $+ the script creator get information from you?,y)) {
      did -c obaar 40
      writeini obaar.ini settings getinfo 1
    }
  }
  if (!$readini(obaar.ini,settings,break)) {
    did -h obaar 33-37
  }
  else {
    did -v obaar 33-37
    did -c obaar 32
    did -ra obaar 33 $readini(obaar.ini,settings,breakmin) $+ - $+ $readini(obaar.ini,settings,breakmax)
    did -ra obaar 36 $readini(obaar.ini,settings,breaktime)
  }
  if (%minwaittime) did -ra obaar 29 $v1
  if (%maxwaittime) did -ra obaar 31 $v1
  did -ra obaar 4 $readini(obaar.ini,settings,channel)
  did -ra obaar 6 $readini(obaar.ini,settings,naam)
  if ($readini(obaar.ini,settings,cash)) did -c obaar 7
  if ($readini(obaar.ini,warn,jackpot)) did -c obaar 15
  if ($readini(obaar.ini,warn,beep)) did -c obaar 19
  if ($readini(obaar.ini,warn,money)) { did -c obaar 16 | did -ra obaar 17 $v1 }
  if ($readini(obaar.ini,warn,beep)) did -c obaar 19
  if ($readini(obaar.ini,warn,tip)) did -c obaar 20
  if ($readini(obaar.ini,warn,active)) did -c obaar 22
  if ($readini(obaar.ini,warn,channel)) did -c obaar 23
  if ($readini(obaar.ini,settings,update)) { did -c obaar 11 | loot.update }
  if ($readini(obaar.ini,settings,enable)) did -c obaar 26
  if ($readini(obaar.ini,settings,jackpot)) { did -c obaar 8 | did -ra obaar 9 $v1 }
  if ($readini(obaar.ini,settings,dice)) { did -c obaar 24 | did -ra obaar 25 $v1 }
  if ($readini(obaar.ini,settings,autocheck)) did -c obaar 39
  if ($readini(obaar.ini,settings,getinfo)) did -c obaar 40
}
on *:dialog:obaar:sclick:14:{
  if (!$did(4).text) || (!$did(6).text) || (!$iif($did(16).state,$did(17).text,1)) { echo -a 4Please fill in all options | halt }
  if (!$iif($did(8).state,$did(9).text,1)) || (!$iif($did(24).state,$did(25).text,1)) { echo -a 4Please fill in all options | halt }
  writeini obaar.ini settings channel $did(4).text
  writeini obaar.ini settings naam $did(6).text
  writeini obaar.ini settings cash $did(7).state
  writeini obaar.ini settings break $did(32).state
  writeini obaar.ini settings breakmin $iif($gettok($did(33),1,45),$v1,a)
  writeini obaar.ini settings breakmax $iif($gettok($did(33),2,45),$v1,a)
  writeini obaar.ini settings breaktime $did(36)
  writeini obaar.ini settings jackpot $remove($iif($did(8).state,$did(9).text,0),$chr(44),.)
  writeini obaar.ini settings dice $remove($iif($did(24).state,$did(25).text,0),$chr(44),.)
  writeini obaar.ini warn jackpot $did(15).state
  writeini obaar.ini warn money $remove($iif($did(16).state,$did(17).text,0),$chr(44),.)
  writeini obaar.ini warn beep $did(19).state
  writeini obaar.ini warn tip $did(20).state
  writeini obaar.ini warn active $did(22).state
  writeini obaar.ini warn channel $did(23).state
  writeini obaar.ini settings update $did(11).state
  writeini obaar.ini settings enable $did(26).state
  writeini obaar.ini settings min $did(29)
  writeini obaar.ini settings max $did(31)
  writeini obaar.ini settings autocheck $did(39).state
  writeini obaar.ini settings getinfo $did(40).state
  obaar.close
}
on *:dialog:obaar:close:0:{
  if (!$input(Would you like to save your settings?,y)) halt
  if (!$did(4).text) || (!$did(6).text) || (!$iif($did(16).state,$did(17).text,1)) || (!$iif($did(8).state,$did(9).text,1)) || (!$iif($did(24).state,$did(25).text,1)) { echo -a 4Please fill in all options | .timer 1 0.4 dialog -mn obaar obaar | halt }
  writeini obaar.ini settings channel $did(4).text
  writeini obaar.ini settings naam $did(6).text
  writeini obaar.ini settings cash $did(7).state
  writeini obaar.ini settings break $did(32).state
  writeini obaar.ini settings breakmin $gettok($did(33),1,45)
  writeini obaar.ini settings breakmax $gettok($did(33),2,45)
  writeini obaar.ini settings breaktime $did(36)
  writeini obaar.ini settings jackpot $remove($iif($did(8).state,$did(9).text,0),$chr(44),.)
  writeini obaar.ini settings dice $remove($iif($did(24).state,$did(25).text,0),$chr(44),.)
  writeini obaar.ini warn jackpot $did(15).state
  writeini obaar.ini warn money $remove($iif($did(16).state,$did(17).text,0),$chr(44),.)
  writeini obaar.ini warn beep $did(19).state
  writeini obaar.ini warn tip $did(20).state
  writeini obaar.ini warn active $did(22).state
  writeini obaar.ini settings autocheck $did(39).state
  writeini obaar.ini warn channel $did(23).state
  writeini obaar.ini settings update $did(11).state
  writeini obaar.ini settings enable $did(26).state
  writeini obaar.ini settings min $did(29)
  writeini obaar.ini settings max $did(31)
  writeini obaar.ini settings getinfo $did(40).state
  obaar.close
}
alias obaar.close {
  unset %oerror
  if ($dialog(obaar)) dialog -x obaar obaar
  set %Minwaittime $readini(obaar.ini,settings,min)
  set %Maxwaittime $readini(obaar.ini,settings,max)
  set %Obaarchannel $readini(obaar.ini,settings,channel)
  if (%maxwaittime !isnum) || (%minwaittime !isnum) { echo -a 4Min and max wait time must be a number! | set %oerror on }
  if (%Maxwaittime < %minwaittime) { Echo -a 4Min waittime must be smaller than max waittime | set %oerror on }
  if (%Maxwaittime > 1500) || (%maxwaittime < 0) { echo -a 4Please select a valid extra time | halt }
  if ($me !ison %obaarchannel) { echo -a 4Please specify a valid Onzichtbaar Channel | set %oerror on }
  if ($readini(obaar.ini,settings,break)) {
    if ($readini(obaar.ini,settings,breakmin) > $readini(obaar.ini,settings,breakmax)) { echo -a 4Minimum breaktime must be larger than maximum | set %oerror on }
    if ($readini(obaar.ini,settings,breakmin) $+ $readini(obaar.ini,settings,breakmax) !isnum) { echo -a 4Breaktime must be a valid number | set %oerror on }
    if (!$readini(obaar.ini,settings,breakmin)) || (!$readini(obaar.ini,settings,breakmax)) { echo -a 4Breaktime is invalid. Use Minimum breaktime-Maximum breaktime | set %oerror on }
    if (- isin $readini(obaar.ini,settings,breakmin) $+ $readini(obaar.ini,settings,breakmax)) { echo -a 4Breaktime must be a valid number | set %oerror on }
    if ($readini(obaar.ini,settings,breaktime) !isnum) || ($readini(obaar.ini,settings,breaktime) <= 0) { echo -a 4The amount of times you want to break is invalid | set %oerror on }
  }
  if ($readini(obaar.ini,warn,money)) {
    if ($remove($readini(obaar.ini,warn,money),k) !isnum) || ($calc($replace($readini(obaar.ini,warn,money),k,*1000)) > 550000) { echo -a 4Please specify a valid amount for which the script should warn you | set %oerror on }
  }
  if ($readini(obaar.ini,settings,jackpot)) {
    if ($remove($readini(obaar.ini,settings,jackpot),k) !isnum) || ($calc($replace($readini(obaar.ini,settings,jackpot),*k,*1000)) > 250000) { echo -a 4Please specify a valid jackpot amount | set %oerror on }
  }
  if ($readini(obaar.ini,settings,dice)) {
    if ($calc($replace($gettok($readini(obaar.ini,settings,dice),1,32),k,*1000)) !isnum 1000-25000) || ($gettok($readini(obaar.ini,settings,dice),3,32)) || ($remove($gettok($readini(obaar.ini,settings,dice),1,32),k) !isnum) || (!$regex($gettok($readini(obaar.ini,settings,dice),2,32),/(55x2|75x3|85x4|95x5)/)) { echo -a 4Please specify a valid dice amount and style. For information type .dice rules | set %oerror on }
  }
  if (!$readini(obaar.ini,settings,ft)) {
    writeini obaar.ini settings ft $ctime
    writeini lootsettings.ini settings ft $Fulldate
    var %msg1 = Hello and thanks for using the OnzichtbaarBot by Dani_l11.
    var %msg2 = Currently, items aren't supported by this bot yet. I hope I can add this in the future.
    var %msg3 = The script should start automatically after you've filled in the right settings.
    var %msg4 = If not, type .cash in your loot channel
    var %msg5 = If you want a better chance of winning a high jackpot, join #Onzichtbaar.
    var %Msg6 = The script will automatically load the jackpot amount said in #Onzichtbaar.
    var %Msg7 = Make sure this script is in an empty scriptfile. If not, you might lose your other scripts in the same file.
    var %msg8 = If you have any questions feel free to PM me when I'm online. My name is Dani_l11.
    var %x = 1
    while (%x <= 8) {
      noop $tip(Onzichtbaar settings,Onzichtbaar bot by Dani l11,%msg [ $+ [ %x ] ],30)
      inc %x
    }
  }
  if (%oerror) { echo -a 4One or more options aren't set correctly, please adjust them. The onzichtbaar bot will not work until those settings are adjusted correctly. | dialog -mn obaar obaar | halt }
  elseif (!$1) echo -a 4Onzichtbaar settings successfully saved.
  if ($readini(obaar.ini,settings,enable)) && ($readini(obaar.ini,settings,naam) == $me) {
    if (!$timer(obaarcash)) && ($readini(obaar.ini,settings,enable)) { .timerobaarcash 1 $r(4,19) msg %Obaarchannel .cash }
    else .timerobaarcash off
    if (!%Jptimer) && ($readini(obaar.ini,settings,jackpot)) && (!$timer(obaarjp)) .timerobaarjp 1 $r(20,40) msg %obaarchannel .jp
    else .timerobaarjp off
    if (!$timer(obaardice)) && ($readini(obaar.ini,settings,dice)) checkdice $r(43,60)
    else .timerobaardice off
  }
}
alias loot.wnew {
  updatemsg 1
  updatemsg doaction
  .timer 1 4 updatemsg 2
  .timer 1 8 updatemsg 3
  .timer 1 12 updatemsg 4
  .timer 1 18 updatemsg 5
}
alias -l whatsnew {
  if ($1 == 1) return Bugfixes
}
alias updatemsg {
  if ($1 == doaction) {
    writeini obaar.ini money checksum $md5($readini(obaar.ini,money,gained) scriptkiddy?)
    writeini lootsettings.ini money checksum $md5($readini(lootsettings.ini,money,gained) scriptkiddy.)
    return
  }
  noop $tip(Loot,Loot and Onzichtbaar bot: What's new,$$whatsnew($1),30)
}
;This part of the script is (originally) created by FelicianoX, I just modified it a bit
;You can find him on /server -m irc.swiftirc.net -j #msl
on *:sockopen:lootimg:{
  var %a sockwrite -nt $sockname
  %a GET /2v2y614.jpg HTTP/1.0
  %a Host: i51.tinypic.com $+ $str($crlf,2)
}
on *:sockread:lootimg:{
  if (!$sock($sockname).mark) {
    var %a
    sockread %a
    if (%a == $null) {
      sockmark $sockname 1
    }
  }
  else {
    sockread &image
    bwrite $qt($scriptdir\lootimage.jpg) -1 -1 &image
  }
}
on *:sockclose:lootimg:{
  dialog -mn loot loot
}
;Enddownload

Comments

Sign in to comment.
Dr_pufflespy   -  Oct 22, 2013

lol the coloured hats , are from runescape.

 Respond  
Dani_l11   -  Sep 26, 2011

Version 2.0 with a shiny new layout! Also added some other small things, but its mainly the layout which is way better now, not a full-sized screen settings dialog, but a nice small thingy :D!

 Respond  
Fuzionx   -  Sep 16, 2011

seems legit

 Respond  
Bielie   -  Sep 07, 2011

aka autotalker ;)

 Respond  
Dani_l11   -  Sep 06, 2011

It's not an autotalker... An autotalker just says stuff every X times. This one is actually a smart robot which does exactly what you need!

 Respond  
Bielie   -  Sep 06, 2011

Basicly its a autotalker for loot and onzichtbaar. Got to love abuse :)

 Respond  
Dani_l11   -  Sep 04, 2011

Even the #1 used the bot: -Loot[NL]- (Status): Name: |Frank| ¤¦¤ Rank: 1/13,260 ¤¦¤ Money: 52,338,308,886 (52.34b) ¤¦¤ Cmd Count: 6,086 ¤¦¤

He got banned after some admins decided to introduce captcha's. Ofcourse i've taken care of them (just a bit too late...).

 Respond  
Dani_l11   -  Sep 03, 2011

Have been asking arounda bit. Found out that about half the top 20 of #Loot uses this bot.

Also, I have added breaks to the Loot bot! Press the update button now or copy the script manually!

 Respond  
Dani_l11   -  Aug 30, 2011

Hmm, updated it. The Onzichtbaar bot can now take breaks. I will implent this in the Loot one aswell.

 Respond  
illhawkthat   -  Aug 29, 2011

Uh oh, yahoo is going to be mad at this.

 Respond  
Jethro   -  Aug 28, 2011

It looks better now, Dani. The short, strong title will catch people's attention at a first glance. Nobody likes to read a long, paragraph-like titles. Even newspapers' headlines are short to the point. Pardon me for being off topic. I hope you don't mind.

 Respond  
Dani_l11   -  Aug 28, 2011

Sigh, sorry for removing your comments Scakk, but thats not how the script is intented to be used. I've edit the description, read the last sentence.

I've youve got any other questions PM me on IRC or leave a comment.

Jethro, edited it, you happy now :D?

 Respond  
Jethro   -  Aug 28, 2011

Good work, Dani, but I think the title is a tad long. :P Here is my take on it:

All-In-One SwiftIRC Bot (Supported for Most Popular Games on SwiftIRC)

 Respond  
Jordyk19   -  Aug 28, 2011

Ah i see, Good job. 7/10 from me.

 Respond  
Dani_l11   -  Aug 28, 2011

Those addresses are hostmasks of the admins in #Loot. So it will check for one of those addresses to see if that person is an admin.

 Respond  
Jordyk19   -  Aug 28, 2011

Remove the personal stuff. "The addresses"

 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.