mIRC Homepage
Posted By: blk Rewriting Script - 10/02/06 01:00 AM
I wanted to make a script like Russian Roulette...
But you slap people... lol.. so im trying to rewrite a Russian Roulette Script..
I've done only the simple commands...
all I need done is the recording part.. smirk
Code:
on *!:TEXT:!slap *:*: {
  if ( $me !isop # ) {
    .msg $chan 12,15 I am not an Op on this Channel. I must be Opped to Play this game
    .halt
  }
  else {
    .inc $+(%,russ.roul.,$nick) 1
    var %roulette.random = $rand(1,6)
    inc %spins.roulette 1
    if ( %roulette.random === 1 ) {
      .msg $chan $nick Trys To Slap $2 ...
      .msg $chan 8Slap!!!!!! 
      { .kick $chan $nick } { .msg $chan $nick Slaps $2 ! }
      inc %roulette.dead 1
      .set %latest.death $nick
      .unset $+(%,russ.roul.,$nick)
      goto advert
    }
    else {
      .msg $chan $nick Trys To Slap $2 ...
      .msg $chan 14And $2 Blocks The Slap 
      if ( %record.nick.att == $null ) {
        .set %record.nick.att $($+(%,russ.roul.,$nick),2)
        .set %record.nick $nick
        goto advert
      }
      elseif ( $($+(%,russ.roul.,$nick),2) > %record.nick.att ) {
        .set %record.nick.att $($+(%,russ.roul.,$nick),2)
        .set %record.nick $nick
        goto advert
      }
      else {
        goto advert
      }
    }
    :advert
    .set %percent.dead $calc(%roulette.dead / %spins.roulette )
    .msg $chan Record Attempts: %record.nick %record.nick.att Total Blocked: %spins.roulette Total Slaps: %roulette.dead Slap Percent: %percent.dead Last Slap: %latest.death
  } 
}

on *!:TEXT:!rr record:#: {
  if ( $2 == record ) {
    .notice $nick The Slap Records are: Record Attempts: %record.nick %record.nick.att Total Spins: %spins.roulette Death Percent: %percent.dead Total Deaths: %roulette.dead Last Dead: %latest.death
  }
  else {
    .notice $nick The commands are: !slap <nick> to play the game and !slaprec record to see the records
    .halt
  }
  .halt
} 
Posted By: genius_at_work Re: Rewriting Script - 10/02/06 01:39 AM
Try changing:

on *!:TEXT:!rr record:#: {

to:

on *!:TEXT:!slaprec*:#: {

-genius_at_work
Posted By: blk Re: Rewriting Script - 10/02/06 04:08 AM
I'm just going to let them share the same records,
seens too complicated (for me ) to fix it...
( dont really need it anyways ) :tongue:
© mIRC Discussion Forums