Another Mock Snuffy

By Epic on Jan 12, 2012

So last night i got bored on irc, hanging with friends. They pointed out some issues with a bot they played, namely snuffy. iv posted a mock script of it b4 as sort of a introduction to making bots for myself, so this time i put some effort into it, copying the bot as much as i could, fixing errors on their end i saw. This is the end result Thus-far, any comments welcomed, criticism isn't.

alias botname return Botnamehere
alias logo return $+($c1($chr(164)),$c2($chr(40)),$c1($1-),$c2($chr(41)),$c1($chr(164)))
Alias c1 { return $+($chr(3),4,$1-,$chr(3)) }
Alias c2 { return $+($chr(3),6,$1-,$chr(3)) }

alias rank {
  var %n 1,%x @Rank,%nick $$1,%total 0
  window -hn %x
  clear %x
  while ($ini(sex.ini,%n)) {
    aline %x $v1 $readini(sex.ini,n,$v1,karma)
    inc %n
    if ($readini(sex.ini,n,$v1,karma)) {
      inc %total 1
    }
  }
  filter -cteuww 2 32 %x %x
  if ($1 == top5 && $prop) {
    var %line 0
    while (%line < 6) {
      tokenize 32 $line(%x,%line)

      if ($0 == 2) {
        var %string %string $ord(%line) $1 $$bytes($2,bd) $sn($2) -
      }
      inc %line
    }
    var %numdiv $numtok(%string,124),%remdiv $remtok(%string,$chr(124),%numdiv,124)
    return $iif(%remdiv,$v1,There are currently no ranked users... Someone should use some commands)
  }
}

alias drank {
  var %d = 1, %w = @Drank
  window -h %w
  clear %w
  while $ini(sex.ini,%d) {
    aline %w $v1 $readini(sex.ini,$v1,Karma)
    inc %d
  }
  filter -cteuww 2 32 %w %w
  var %drank $iif($1 isnum,$gettok($line(%w,$1),1,32),$1)
  return ranked $+($iif($1 isnum,$1,$fline(%w,$1 *)),/,$ini(sex.ini,0)) with $readini(sex.ini,%Drank,karma)) Karma!
}

alias thing {
  var %output $iif($left($3,1) == @,.msg #,.notice $nick)
  var %k $readini(sex.ini,$2,karma)
  if ($1 == sex) {
    var %newk $r(50,600)
    var %tk $calc(%k + %newk)
    writeini -n sex.ini $2 karma %tk
    var %t $gettok(a squirril.a homeless person.a watermelon.a glory hole.XxPapuchixx.a Porn Star,$r(1,6),46)
    %output $c1($2) has sex with: $c2(%t) - Gaining %newk Karma. You now have $bytes(%tk,bd) Karma and are $drank($2)
  }
  if ($1 == wank) {
    var %w $r(1,5)
    var %t $r(1,15)
    if (%w == 1) {
      %output $c1($2) 4Fails to cum after wanking for: %t Minutes! $drank($2)
    }
    else {
      var %newk $r(500,1600)
      var %tk $calc(%k + %newk)
      writeini -n sex.ini $2 Karma %tk
      %output $c1($2) Successfully cums after wanking for: %t Minutes Gaining %newk Karma. You now have $bytes(%tk,bd) Karma and are $drank($2)
    }
  }
  if ($1 == rape) {
    var %w $r(1,6)
    var %t $gettok(a hippy.a porn star.$nick(#,$r(1,$nick(#,0))).a blow up doll.a school girl.the president.your mother,$r(1,7),46)
    if (%w == 1) {
      var %ft $gettok(He/She isn't Ready.You Cant Get it up.$nick(#,$r(1,$nick(#,0))) rapes you instead.A Shemale cums in your face.A Stray Dog bites your dick off.A hobo jumps in.A 15 year old Pervert is staring,$r(1,7),46)
      var %kl $r(100,200)
      var %tk $calc(%k - %kl)
      writeini -n sex.ini $2 karma %tk
      %output $c1($nick) Failed to rape a: %t because %fl $+ . They lose %kl Karma. Total Karma %tk and $drank($2)
    }
    else {
      var %kw $r(400,600)
      var %tk $calc(%k + %kw)
      writeini -n sex.ini $2 karma %tk
      %output $c1($nick) Succedes in raping a: %t  $+ . You gain %kw Karma. Total Karma %tk and $drank($2)
    }
  }
  if ($1 == bj) {
    var %w $r(1,7)
    var %wut $gettok(Blows $nick(#,$r(1,$nick(#,0))) $+ s Dick.Licks $nick(#,$r(1,$nick(#,0))) $+ s pussy,$r(1,2),46)
    if (%w == 1) {
      var %kl $r(100,200)
      var %tk $calc(%k - %kl)
      writeini -n sex.ini $2 Karma %tk
      %output $c1($2) %wut but fails to make them cum, losing %kl Karma. Total Karma %tk and $drank($2)
    }
    else {
      var %kw $r(400,600)
      var %tk $calc(%k - %kw)
      writeini -n sex.ini $2 Karma %tk
      %output $c1($2) %wut and makes them cum everywhere, Gaining %kw Karma. Total Karma %tk and $drank($2)
    }
  }
}
;####################

on $*:Text:/^[@!.]/Si:#: {
  if ($me == $botname) {
    var %output $iif($left($1,1) == @,.msg #,.notice $nick)
    var %k $readini(sex.ini,$nick,karma)
    if $regex($1,/ktop/) {
      var %rank $rank(top5).prop
      %output  %rank
    }
    elseif $regex($1,/krank/) {
      var %who $iif(!$2,$nick,$2)
      %output $logo(Rank) $drank(%who)
    }
    elseif $regex($1,/commands/) {
      %output $logo(Commands) !sex - !wank - !rape - !bj/pl - .buy (dildo|strapon) - .ktop - .krank - .klogin
    }
    elseif $regex($1,/timeleft/) {
      var %sex $iif($hget($nick,sextime),$duration($v1),Now)
      var %rape $iif($hget($nick,rapetime),$duration($v1),Now)
      var %wank $iif($hget($nick,wanktime),$duration($v1),Now)
      var %bj $iif($hget($nick,bj),$duration($v1),Now)
      %output $logo(Timers) -> $nick -> !Sex %sex - !Rape %rape - !Wank %wank - !Bj/Pl %bj
    }
    elseif $regex($1,/sex/) {
      if (!$hget($nick,sextime)) {
        $thing(sex,$nick,$1)
        hadd -mz $nick sextime $r(70,140)
      }
      else {
        .notice $nick $logo(Timers!) - > You need to wait $duration($hget($nick,sextime)) to $c2(.sex) again!
      }
    }
    elseif $regex($1,/wank/) {
      if (!$hget($nick,wanktime)) {
        $thing(wank,$nick,$1)
        hadd -mz $nick wanktime $r(540,740)
      }
      else {
        .notice $nick $logo(Timers!) - > You need to wait $duration($hget($nick,wanktime)) to $c2(.wank) again!
      }
    }
    elseif $regex($1,/rape/) {
      if (!$hget($nick,rapetime)) {
        hadd -mz $nick rapetime $r(340,540)
        .notice $nick Attempting to Rape Something...
        .timer 1 1 $thing(rape,$nick,$1)
      }
      else {
        .notice $nick $logo(Timers!) - > You need to wait $duration($hget($nick,rapetime)) to $c2(.wank) again!
      }
    }
    elseif $regex($1,(bj|pl)) {
      if (!$hget($nick,bj)) {
        $thing(bj,$nick,$1)
        hadd -mz $nick bj $r(280,420)
      }
      else {
        .notice $nick $logo(Timers!) - > You need to wait $duration($hget($nick,bj)) to $c2(.wank) again!
      }
    }
    elseif $regex($1,/buy/) {
      var %k $readini(sex.ini,$nick,karma)
      if (!$2) {
        %output please specify something to buy - .buy dildo/strapon
        halt
      }
      if (%k < 12500) {
        %output Sorry but you need at least 12k karma to buy something.
        halt
      }
      if ($gettok(dildo.strapon,$2,32)) {
        if ($2 == strapon) && (%k < 25700) {
          %output sorry but you need more karma to buy a Strapon Cost (25700) Karma
        }
        else {
          var %buy $2
          var %amt $replace($2,dildo,12500,strapon,25700)
          var %newk $calc(%k - %amt)
          writeini -n sex.ini $nick karma %newk
          writeini -n sex.ini $nick %buy $calc($readini(sex.ini,$nick,%buy) + 1)
          %output You buy a %buy for %amt Karma - you have %newk left and are $drank($nick)
        }
      }
      else {
        %output sorry but you either you spelt $2 wrong or we dont sell $2 here.
      }
    }
    elseif $regex($1,/dildo/) {
      if ($readini(sex.ini,$nick,dildo)) {
        var %p $r(98,99)
        var %thing $calc(%k / %p)
        var %newk $calc(%k + %thing)
        writeini -n sex.ini $nick karma %newk
        writeini -n sex.ini $nick dildo $calc($readini(sex.ini,$nick,dildo) - 1)
        %output You use your dildo and it grants you %thing Karma, you now have %newk Karma and $drank($nick)
      }
      else {
        .notice $nick sorry but you dont have a dildo to play with! try buying one
      }
    }
    elseif $regex($1,/strapon/) {
      if ($readini(sex.ini,$nick,strapon)) {
        var %p $r(95,96)
        var %thing $calc(%k / %p)
        var %newk $calc(%k + %thing)
        writeini -n sex.ini $nick karma %newk
        writeini -n sex.ini $nick strapon $calc($readini(sex.ini,$nick,strapon) - 1)
        %output You use your Strapon and it grants you %thing Karma, you now have %newk Karma and $drank($nick)
      }
      else {
        .notice $nick sorry but you dont have a Strapon to play with! try buying one
      }
    }
    elseif $regex($1,/store/) {
      %output $logo(Store) Dildo - 12.5k Karma $(|) Strapon - 27.5k Karma -- to buy .buy (item)
    }
    elseif $regex($1,/kstats/) {
      %output $logo(Stats) $c1($nick) $(|) Karma - %k $(|) $drank($nick) $(|) Items - Dildos $iif($readini(sex.ini,$nick,dildo),$v1,0) - StrapOn $iif($readini(sex.ini,$nick,strapon),$v1,0)
    }
  }
}

Comments

Sign in to comment.
Epic   -  Jan 19, 2012

lol @ fact that i did it to the extent even original couldnt, with consistancy, and a working rank which iv seen it being faulty, figured ud see this so thought hey, why not help someone for once ;)

 Respond  
Bielie   -  Jan 19, 2012

lol @
Someone remaking my bot :)
Even added my new commands :)
Even used my amounts and colours :)
Even used basicly anything he couldnt come up with by him self :)

 Respond  
Epic   -  Jan 12, 2012

lol evil you already know me ;o and jethro i dont really mind things that'll help my scripting improve, its just more then less people just say stuff to claim superiority rather then actually help, or with redundant things, eitherway your a respected person here so anything you is welcome :p

 Respond  
Arigateaux   -  Jan 12, 2012

I like how clean it is, how easily readable it is. While I've not tested it, and I don't really feel like I need to because it's not something I play, I assume you've tested and worked most of the major bugs out, yes? :)

Either way, good job.

 Respond  
Jethro   -  Jan 12, 2012

any comments welcomed, criticism isn't.What about constructive criticism?

 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.