All pastes #514705 Raw Edit

Miscellany

public text v1 · immutable
#514705 ·published 2007-05-27 21:30 UTC
rendered paste body
on *:QUIT:#:{
  if ($readini(Dm.ini,$chan,Status) != $null) {
    if ($readini(Dm.Players.ini,$chan,Player-1) == $nick) || ($readini(Dm.Players.ini,$chan,Player-2) == $nick) {
      enddm $chan
      msg $chan  $+ $nick has quit IRC so their DM for $+  $chan automatically ends.
    }
  }
}

-----------------

on *:TEXT:!DmHp:#:{  
  if ($readini(Dm.ini,$chan,Status) == $null) {
    msg $chan There is no DM currently in $+  $chan $+ . To start one, type !Dm. 
    halt
  }
  if ($readini(Dm.ini,$chan,Status) == Start) {
    if ($readini(Dm.Players.ini,$chan,Player-1) != $nick) {
      notice $nick  $+ $readini(Dm.Players.ini,$chan,Player-1) is waiting to be challenged. To join the DM just type !Dm.
      halt
    }
    if ($readini(Dm.Players.ini,$chan,Player-1) == $nick) {
      notice $nick You don't have anyone to face!
      halt
    }
  }
  if ($readini(Dm.ini,$chan,Status) == On) {
    if ($readini(Dm.Players.ini,$chan,Player-1) != $nick) && ($readini(Dm.Players.ini,$chan,Player-2) != $nick) {
      notice $nick You're not in the DM for $+  $chan $+ !
      halt
    }

    if ($readini(Dm.Players.ini,$chan,Player-1) == $nick) {
      notice $readini(Dm.Players.ini,$chan,Player-1) Here is your HP: $hpbar( $readini(Dm.Hp.ini,$chan,Player-1) )
      halt
    }
    if ($readini(Dm.Players.ini,$chan,Player-2) == $nick) {
    notice $readini(Dm.Players.ini,$chan,Player-2)  Here is your HP: $hpbar( $readini(Dm.Hp.ini,$chan,Player-2) )    }
  }
}
on *:TEXT:!DmSpec:#:{
  if ($readini(Dm.ini,$chan,Status) == $null) {
    msg $chan There is no DM currently in $+  $chan $+ . To start one, type !Dm. 
    halt
  }
  if ($readini(Dm.ini,$chan,Status) == Start) {
    if ($readini(Dm.Players.ini,$chan,Player-1) != $nick) {
      notice $nick  $+ $readini(Dm.Players.ini,$chan,Player-1) is waiting to be challenged. To join the DM just type !Dm.
      halt
    }
    if ($readini(Dm.Players.ini,$chan,Player-1) == $nick) {
      notice $nick You don't have anyone to face!
      halt
    }
  }
  if ($readini(Dm.ini,$chan,Status) == On) {
    if ($readini(Dm.Players.ini,$chan,Player-1) != $nick) && ($readini(Dm.Players.ini,$chan,Player-2) != $nick) {
      notice $nick You're not in the DM for $+  $chan $+ !
      halt
    }

    if ($readini(Dm.Players.ini,$chan,Player-1) == $nick) {
      notice $readini(Dm.Players.ini,$chan,Player-1) You have $+  $readini(Dm.Spec.ini,$chan,Player-1) $+ % Special Bar left.
      halt
    }
    if ($readini(Dm.Players.ini,$chan,Player-2) == $nick) {
    notice $readini(Dm.Players.ini,$chan,Player-2)  You have $+  $readini(Dm.Spec.ini,$chan,Player-2) $+ % Special Bar left.    }
  }
}


------------------


on *:TEXT:!Sell*:*:{
  if ($2 == $null) {
    msg $nick You must specify what to sell. E.g: !Sell Guthans
    halt
  }
  if ($2 == Guthans) {
    if ($readini(D-Coins.ini,$nick,Guthans) == Sold) {
      writeini D-Coins.ini $nick Coins $calc( $readini(D-Coins.ini,$nick,Coins) + 2000)
      remini D-Coins.ini $nick Guthans 
      msg $nick You have just sold Guthans and now have $+  $readini(D-Coins.ini,$nick,Coins) D-Coins Left.  
      halt    

    }
    if ($readini(D-Coins.ini,$nick,Guthans) != Sold) {
      msg $nick You havn't even bought Guthans! To buy, type !Buy Guthans
      halt
    }
  }
  if ($2 == DMace) {
    if ($readini(D-Coins.ini,$nick,DMace) == Sold) {
      writeini D-Coins.ini $nick Coins $calc( $readini(D-Coins.ini,$nick,Coins) + 500)
      remini D-Coins.ini $nick DMace 
      msg $nick You have just sold DMace Special and now have $+  $readini(D-Coins.ini,$nick,Coins) D-Coins Left.  
      halt    
    }
    if ($readini(D-Coins.ini,$nick,DMace) != Sold) {
      msg $nick You havn't even bought DMace Special! To buy, type !Buy DMace
      halt
    }
  }
  if ($2- == Blue Phat) {
    if ($readini(D-Coins.ini,$nick,BPhat) == Sold) {
      remini D-Coins.ini $nick BPhat
      writeini D-Coins.ini $nick Coins $calc( $readini(D-Coins.ini,$nick,Coins) + 1000000)
      msg $nick You have just sold Blue Phat and now have $+  $readini(D-Coins.ini,$nick,Coins) D-Coins Left.
      halt
    }
    if ($readini(D-Coins.ini,$nick,BPhat) != Sold) {
      msg $nick You don't even have a Blue Phat! To buy, type !Buy Cracker and type !Open to see if you got a Blue Phat.
      halt
    }
  }
  if ($2- == Green Phat) {
    if ($readini(D-Coins.ini,$nick,GPhat) == Sold) {
      remini D-Coins.ini $nick GPhat
      writeini D-Coins.ini $nick Coins $calc( $readini(D-Coins.ini,$nick,Coins) + 1000000) 
      msg $nick You have just sold Green Phat and now have $+  $readini(D-Coins.ini,$nick,Coins) D-Coins Left.
      halt
    }
    if ($readini(D-Coins.ini,$nick,GPhat) != Sold) {
      msg $nick You don't even have a Green Phat! To buy, type !Buy Cracker and type !Open to see if you got a Green Phat.
      halt
    }
  }
  if ($2- == Red Phat) {
    if ($readini(D-Coins.ini,$nick,RPhat) == Sold) {
      remini D-Coins.ini $nick RPhat
      writeini D-Coins.ini $nick Coins $calc( $readini(D-Coins.ini,$nick,Coins) + 1000000) 
      msg $nick You have just sold Red Phat and now have $+  $readini(D-Coins.ini,$nick,Coins) D-Coins Left.
      halt
    }
    if ($readini(D-Coins.ini,$nick,RPhat) != Sold) {
      msg $nick You don't even have a Red Phat! To buy, type !Buy Cracker and type !Open to see if you got a Red Phat.
      halt
    }
  }
}
on *:TEXT:!Market*:*:{
  msg $nick ****D-Coins Market**** You have $+  $iif($readini(D-Coins.ini,$nick,Coins) == $null, 0, $v1) D-Coins (To buy, type !Buy Item [The buy code is the underlined part in the Market])
  msg $nick DMace Spec - $iif($readini(D-Coins.ini,$nick,DMace) == Sold, SOLD!, For Sale - $+  500 D-Coins)
  msg $nick Guthans - $iif($readini(D-Coins.ini,$nick,Guthans) == Sold, SOLD!, For Sale - $+  2000 D-Coins)
  msg $nick Christmas Cracker - $iif($readini(D-Coins.ini,$nick,CCracker) == Sold, SOLD!, For Sale - $+  250 D-Coins)  
  msg $nick Blue/Green/Red PHat - $iif($readini(D-Coins.ini,$nick,BPhat) == Sold, Blue PHat Bought! 1M D-Coins)  $iif($readini(D-Coins.ini,$nick,GPhat) == Sold, Green PHat Bought!  1M D-Coins)  $iif($readini(D-Coins.ini,$nick,RPhat) == Sold, Red PHat Bought!  1M D-Coins) Only obtainable through !Buy Cracker  
}
on *:TEXT:!Open:*:{
  if ($readini(D-Coins.ini,$nick,Cracker) != Sold) {
    msg $nick You havn't even bought a Christmas Cracker! To buy one, type !Buy Cracker
    halt
  }
  else {
    remini D-Coins.ini $nick Cracker 
    set %phat? [ $+ [ $nick ] ] $rand(1,20)
    if (%phat? [ $+ [ $nick ] ] == 3) && ($readini(D-Coins.ini,$nick,BPhat) == $null) {
      writeini D-Coins.ini $nick BPhat Sold
      msg $nick You open your cracker and.... ITS A BLUE PHAT!!!
      msg #KirbyBot  $+ $nick just got a Blue Phat!
      unset %phat? [ $+ [ $nick ] ]
      halt
    }
    if (%phat? [ $+ [ $nick ] ] == 12) && ($readini(D-Coins.ini,$nick,RPhat) == $null) {
      writeini D-Coins.ini $nick RPhat Sold
      msg $nick You open your cracker and.... ITS A RED PHAT!!!
      msg #KirbyBot  $+ $nick just got a Red Phat!
      unset %phat? [ $+ [ $nick ] ]
      halt
    }    
    if (%phat? [ $+ [ $nick ] ] == 7) && ($readini(D-Coins.ini,$nick,GPhat) == $null) {
      writeini D-Coins.ini $nick GPhat Sold
      msg $nick You open your cracker and.... ITS A GREEN PHAT!!!
      msg #KirbyBot  $+ $nick just got a Green Phat!
      unset %phat? [ $+ [ $nick ] ]
      halt
    }    
    else {
      msg $nick You open your cracker and.... You got nothing....
      unset %phat? [ $+ [ $nick ] ]      
      halt
    }  
  }
}
on *:TEXT:!DCoin Status*:*:{
  msg $nick Here is your D-Coins Status: $iif($readini(D-Coins.ini,$nick,BPhat) == Sold, $+(\,$chr(124),/), §) $+ $iif($readini(D-Coins.ini,$nick,RPhat) == Sold, $+(\,$chr(124),/), §) $+ $iif($readini(D-Coins.ini,$nick,GPhat) == Sold, $+(\,$chr(124),/), §) D-Coins: $iif($readini(D-Coins.ini,$nick,Coins) == $null, 0, $v1) ~~ Guthans? $iif($readini(D-Coins.ini,$nick,Guthans) == Sold, Yes, No) ~~ DMace? $iif($readini(D-Coins.ini,$nick,DMace) == Sold, Yes, No) ~~ Cracker? $iif($readini(D-Coins.ini,$nick,Cracker) == Sold, Yes, No) ~~   
}
on *:TEXT:!Buy*:*:{
  if ($2 == $null) {
    msg $nick You must specify what to buy. E.g: !Buy Guthans
    halt
  }
  if ($2 == Guthans) {
    if ($readini(D-Coins.ini,$nick,Guthans) == Sold) {
      msg $nick You have already bought the Guthans!
      halt
    }    
    if ($readini(D-Coins.ini,$nick,Coins) >= 2000) {
      writeini D-Coins.ini $nick Coins $calc( $readini(D-Coins.ini,$nick,Coins) - 2000)
      writeini D-Coins.ini $nick Guthans Sold
      msg $nick You have just bought Guthans and now have $+  $readini(D-Coins.ini,$nick,Coins) D-Coins Left.  
      halt    
    }
    else {
      msg $nick Guthans costs $+  2000 D-Coins and you only have $+  $iif($readini(D-Coins.ini,$nick,Coins) == $null, 0, $v1) D-Coins.
      halt    
    }
  }
  if ($2 == DMace) {
    if ($readini(D-Coins.ini,$nick,DMace) == Sold) {
      msg $nick You have already bought the DMace Special!
      halt
    }    
    if ($readini(D-Coins.ini,$nick,Coins) >= 500) {
      writeini D-Coins.ini $nick Coins $calc( $readini(D-Coins.ini,$nick,Coins) - 500)
      writeini D-Coins.ini $nick DMace Sold
      msg $nick You have just bought The DMace Special and now have $+  $readini(D-Coins.ini,$nick,Coins) D-Coins Left.
      halt
    }
    else {
      msg $nick DMace Special costs $+  500 D-Coins and you only have $+  $iif($readini(D-Coins.ini,$nick,Coins) == $null, 0, $v1) D-Coins.
      halt
    }
  }
  if ($2 == Cracker) {
    if ($readini(D-Coins.ini,$nick,Cracker) == Sold) {
      msg $nick You have already bought the Christmas Cracker!
      halt    
    }
    if ($readini(D-Coins.ini,$nick,Coins) >= 250) {
      writeini D-Coins.ini $nick Cracker Sold
      writeini D-Coins.ini $nick Coins $calc( $readini(D-Coins.ini,$nick,Coins) - 250)
      msg $nick You have just bought A Christmas Cracker and now have $+  $readini(D-Coins.ini,$nick,Coins) D-Coins Left. (To Open, type !Open
      halt
    }
    else {
      msg $nick A Christmas Cracker costs $+  250 D-Coins and you only have $+  $iif($readini(D-Coins.ini,$nick,Coins) == $null, 0, $v1) D-Coins.
      halt   
    }
  }
}
on *:TEXT:!DCoin Commands:*:{
  msg $nick ****D-Coins Commands****  
  msg $nick !Market - To see whats up for sale
  msg $nick !Buy Item - To buy an item
  msg $nick !Sell Item - To sell an item
  msg $nick !DCoin Status - To see your D-Coin Status (D-Coins, What you have, ect. ect.)
  msg $nick !Open - To open a Christmas Cracker
}