All pastes #490338 Raw Edit

Something

public text v1 · immutable
·published 2007-05-15 23:29 UTC
rendered paste body
on *:text:!coin-toss*:#: {
  set %wins1 0
  set %wins2 0
  if ($nick == %player1) { 
    .msg $chan 3Pfft? 4Are you An Idiot3 $nick ,4 You Cant Play Yourself
    /halt 
  } 
  if (%coin1 == active) { 
    msg $chan a duel is already active please wait for it to end.
    /halt 
  } 
  if (%toss1 == active) { 
    set %player2 $nick 
    msg $chan 4The Match Has Been Decided,3 %player1 4VS3 %player2
    set %coin1 active  
    /set %turn $rand(1,2)
    if (%turn == 1) {
      .msg $chan 4Randomly Selected: %player1 Will Call The Toss
    } 
    if (%turn == 2) {
      .msg $chan 4Randomly Selected: %player2 Will Call The Toss
    } 
  } 
  else { 
    set %toss1 active 
    set %player1 $nick 
    msg $chan 3 $nick 4Wants To Play The Game:3 Coin Toss!4 To Play Type3 !coin-toss
  } 
}
on *:text:!heads*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) {  
      set %head $rand(1,2) 
      msg $chan 3 %player1 4Has Called:3 Heads!
      if (%head == 1) { 
        .msg $chan 4The Result Is:3 Heads!3 %player1 4Wins!!!!
        if (%wins1 == 0) {
          set %wins1 1
          .msg $chan 3 %player1 4First Win! -3 %player2 4Turn To Toss
          set %turn 2
        /halt }
        if (%wins1 == 1) {
          set %wins1 2
          .msg $chan 3 %player1 4Second Win! -3 %player2 4Turn To Toss
          set %turn 2
        /halt }
        if (%wins1 == 2) {
          set %wins1 3
          .msg $chan 3 %player1 4WINS THE GAME!!! WOOT
          unset %wins1
          unset %wins2
          unset %toss1 
          unset %player1 
          unset %player2 
          unset %coin1 
          unset %turn
          unset %head
          unset %tails 
        }
      }
    }
  }
  if (%head == 2) {
    .msg $chan 4OMG!!3 %player1 4Has Called The Toss: 3WRONG!!
    if (%wins2 == 0) {
      set %wins2 1
      .msg $chan 3 %player2 4First Win! -3 %player1 4Turn To Toss
      set %turn 1
    /halt }
    if (%wins2 == 1) {
      set %wins2 2
      .msg $chan 3 %player2 4Second Win! -3 %player1 4Turn To Toss
      set %turn 1
    /halt }
    if (%wins2 == 2) {
      set %wins2 3
      .msg $chan 3 %player2 4WINS THE GAME!!! WOOT
      unset %wins1
      unset %wins2 
      unset %toss1 
      unset %player1 
      unset %player2 
      unset %coin1 
      unset %turn
      unset %head
      unset %tails 
    }
  }
  else { 
  }  
  if (%turn == 2) { 
    if ($nick == %player2) {  
      set %head $rand(1,2) 
      msg $chan 3 %player2 4Has Called:3 Heads!
      if (%head == 1) { 
        .msg $chan 4The Result Is:3 Heads!3 %player2 4Wins!!!!
        if (%wins1 == 0) {
          set %wins1 1
          .msg $chan 3 %player1 4First Win! -3 %player2 4Turn To Toss
          set %turn 2
        /halt }
        if (%wins1 == 1) {
          set %wins1 2
          .msg $chan 3 %player1 4Second Win! -3 %player2 4Turn To Toss
          set %turn 2
        /halt }
        if (%wins1 == 2) {
          set %wins1 3
          .msg $chan 3 %player1 4WINS THE GAME!!! WOOT
          unset %wins1
          unset %wins2 
          unset %toss1 
          unset %player1 
          unset %player2 
          unset %coin1 
          unset %turn
          unset %head
          unset %tails 
        }
      }
    }
  }
  if (%head == 2) {
    .msg $chan 4OMG!!3 %player2 4Has Called The Toss: 3WRONG!!
    if (%wins1 == 0) {
      set %wins1 1
      .msg $chan 3 %player1 4First Win! -3 %player1 4Turn To Toss
      set %turn 1
    /halt }
    if (%wins1 == 1) {
      set %wins1 2
      .msg $chan 3 %player1 4Second Win! -3 %player1 4Turn To Toss
      set %turn 1
    /halt }
    if (%wins1 == 2) {
      set %wins1 3
      .msg $chan 3 %player1 4WINS THE GAME!!! WOOT
      unset %wins1
      unset %wins2
      unset %toss1
      unset %player1 
      unset %player2 
      unset %coin1
      unset %turn
      unset %head
      unset %tails 
    }
  } 
  else { 
  }
} 
on *:text:!tails*:#: { 
  if (%turn == 1) { 
    if ($nick == %player1) {  
      set %tails $rand(1,2) 
      msg $chan 3 %player1 4Has Called:3 Tails!
      if (%tails == 1) { 
        .msg $chan 4The Result Is:3 Tails!3 %player1 4Wins!!!!
        if (%wins1 == 0) {
          set %wins1 1
          .msg $chan 3 %player1 4First Win! -3 %player2 4Turn To Toss
          set %turn 2
        /halt }
        if (%wins1 == 1) {
          set %wins1 2
          .msg $chan 3 %player1 4Second Win! -3 %player2 4Turn To Toss
          set %turn 2
        /halt }
        if (%wins1 == 2) {
          set %wins1 3
          .msg $chan 3 %player1 4WINS THE GAME!!! WOOT
          unset %wins1
          unset %wins2
          unset %toss 
          unset %player1 
          unset %player2 
          unset %coin1 
          unset %turn
          unset %head
          unset %tails 
        }
      }
    }
  }
  if (%tails == 2) {
    .msg $chan 4OMG!!3 %player1 4Has Called The Toss: 3WRONG!!
    if (%wins2 == 0) {
      set %wins2 1
      .msg $chan 3 %player2 4First Win! -3 %player1 4Turn To Toss
      set %turn 1
    /halt }
    if (%wins2 == 1) {
      set %wins2 2
      .msg $chan 3 %player2 4Second Win! -3 %player1 4Turn To Toss
      set %turn 1
    /halt }
    if (%wins2 == 2) {
      set %wins2 3
      .msg $chan 3 %player2 4WINS THE GAME!!! WOOT
      unset %wins1
      unset %wins2  
      unset %toss1 
      unset %player1 
      unset %player2 
      unset %coin1 
      unset %turn
      unset %head
      unset %tails 
    }
  } 
  else { 
  }  
  if (%turn == 2) { 
    if ($nick == %player2) {  
      set %tails $rand(1,2) 
      msg $chan 3 %player2 4Has Called:3 Tails!
      if (%tails == 1) { 
        .msg $chan 4The Result Is:3 Heads!3 %player1 4Wins!!!!
        if (%wins1 == 0) {
          set %wins1 1
          .msg $chan 3 %player1 4First Win! -3 %player2 4Turn To Toss
          set %turn 2
        /halt }
        if (%wins1 == 1) {
          set %wins1 2
          .msg $chan 3 %player1 4Second Win! -3 %player2 4Turn To Toss
          set %turn 2
        /halt }
        if (%wins1 == 2) {
          set %wins1 3
          .msg $chan 3 %player1 4WINS THE GAME!!! WOOT
          unset %wins1
          unset %wins2
          unset %toss1 
          unset %player1 
          unset %player2 
          unset %coin1 
          unset %turn
          unset %head
          unset %tails 
        }
      }
    }
  }
  if (%tails == 2) {
    .msg $chan 4OMG!!3 %player2 4Has Called The Toss: 3WRONG!!
    if (%wins1 == 0) {
      set %wins1 1
      .msg $chan 3 %player1 4First Win! -3 %player1 4Turn To Toss
      set %turn 1
    /halt }
    if (%wins1 == 1) {
      set %wins1 2
      .msg $chan 3 %player1 4Second Win! -3 %player1 4Turn To Toss
      set %turn 1
    /halt }
    if (%wins1 == 2) {
      set %wins1 3
      .msg $chan 3 %player1 4WINS THE GAME!!! WOOT
      unset %wins1
      unset %wins2
      unset %toss1 
      unset %player1 
      unset %player2 
      unset %coin1 
      unset %turn
      unset %head
      unset %tails 
    }
  }
  else { 
  }
} 
on *:text:!stop-toss*:#: {
  if ($nick isop $chan || $nick ishop $chan) {
    .msg $chan 4Coin Toss Stop By:3 $nick 
    unset %wins1
    unset %wins2
    unset %toss 
    unset %player1 
    unset %player2 
    unset %coin1 
    unset %turn
    unset %toss1
    unset %tails
    unset %head
  }
}