All pastes #742079 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-10-19 06:23 UTC
rendered paste body
alias playerone return $readini(deathmatch.ini, start, one)
alias playertwo return $readini(deathmatch.ini, start, two)
alias dmon return $readini(deathmatch.ini, on, $chan)
alias dmoff return $readini(deathmatch.ini, off, $chan)
alias dmchan return $readini(deathmatch.ini, chan, dmchan)
alias turn return $readini(deathmatch.ini, turn, $chan)
alias whip return $readini(deathmatch.ini, whip, whip)
alias dds1 return $readini(deathmatch.ini, dds, dds1)
alias dds2 return $readini(deathmatch.ini, dds, dds2)
alias stopdm msg $dmchan canceling deathmatch. | remini deathmatch.ini on | remini deathmatch.ini start | remini deathmatch.ini turn | remini deathmatch.ini chan | remini deathmatch.ini shark | remini deathmatch.ini health

on $*:text:/^[@!]dm|deathmatch/i:#kingskrown: {
  if ($dmon != on) {
    writeini deathmatch.ini on $chan on
    writeini deathmatch.ini start one $nick
    writeini deathmatch.ini chan dmchan $chan
    msg $chan $playerone has requested a deathmatch in $+($dmchan,.) type $qt(!dm) within 25 seconds to accept $+($playerone,',s) request, otherwise the dm will be halted.
    timerstopdm 1 25 stopdm
  }
  elseif ($dmon == on) && ($playerone != $nick) && (!$playertwo) {
    timerstopdm off
    writeini deathmatch.ini start two $nick
    msg $chan $playertwo has accepted $+($playerone,',s) dm request. type $qt(!dmcommands) if you want to view the deathmatch commands, and $qt(!turn) to view who's turn it is.
    notice $+($playerone,$chr(44),$playertwo) you have 7 shark, and 99 hitpoint
  }
  elseif ($playerone == $nick) {
    notice $nick you can't dm yourself.
  }
  elseif ($dmon == on) && ($playerone) && ($playertwo) {
    notice $nick a dm is already active. please wait for it to finish, or you can type $qt(!stopdm)
  }
}
on $*:text:/^[@!]turn/i:#kingskrown: {
  if (!$turn) && ($dmon == on) && ($playerone) && ($playertwo) {
    $iif($rand(1,2) == 1, writeini deathmatch.ini turn $chan $playerone, writeini deathmatch.ini turn $chan $playertwo)
    writeini deathmatch.ini shark $playerone 20
    writeini deathmatch.ini health $playerone 99
    writeini deathmatch.ini shark $playertwo 20
    writeini deathmatch.ini health $playertwo 99
    writeini deathmatch.ini whip whip $rand(0,40)
    writeini deathmatch.ini dds dds1 $rand(0,30)
    writeini deathmatch.ini dds dds2 $rand(0,30)
    notice $nick the current turn for the active deathmatch in $chan is $turn
  }
  elseif (!$turn) && ($dmon != on) {
    notice $nick there is no dm in progress. please type $qt(!dm) inorder to start one.
  }
  elseif ($turn) && ($dmon == on) {
    notice $nick the current turn for the active deathmatch in $chan is $turn
  }
  elseif ($dmon == on) && (!$playertwo) || (!$playerone) {
    notice $nick there is a dm request in request. please type $qt(!dm) to accept the request.
  }
} 
on $*:text:/^[@!]whip|slash|flick/i:#kingskrown: {
  if (!$turn) && ($dmon == on) && ($playerone) && ($playertwo) {
    notice $nick please type $qt(!turn) inorder to see who's turn it is, because it may not be your turn.
  }
  elseif (!$turn) && ($dmon != on) {
    notice $nick there is no dm in progress. please type $qt(!dm) inorder to start one.
  }
  elseif ($dmon == on) && (!$playertwo) || (!$playerone) {
    notice $nick there is a dm request in request. please type $qt(!dm) to accept the request.
  }
  elseif ($dmon == on) && ($turn != $nick) {
    notice $nick it isn't your turn. type $qt(!turn) to see who's turn it is.
  }
  elseif ($dmon == on) && ($turn == $nick) {
    $iif($playerone == $turn, msg $chan $turn hit $whip on $playertwo using a abyssal whip. $playertwo now has $calc($readini(deathmatch.ini, health, $playertwo) $+(-,$whip)) hp left., msg $chan $turn hit $whip on $playerone using a abyssal whip. $playerone now has $calc($readini(deathmatch.ini, health, $playerone) $+(-,$whip)) hp left.)
    $iif($playertwo == $turn, writeini deathmatch.ini health $playerone $calc($readini(deathmatch.ini, health, $playerone) $+(-,$whip)), writeini deathmatch.ini health $playertwo $calc($readini(deathmatch.ini, health, $playertwo) $+(-,$whip)))
    $iif($turn == $playerone, writeini deathmatch.ini turn $chan $playertwo, writeini deathmatch.ini turn $chan $playerone)
    msg $dmchan it is now $+($turn,',s) turn!
    writeini deathmatch.ini whip whip $rand(0,40)
  }
  elseif ($dmon == on) && ($playerone != $nick) || ($playertwo != $nick) {
    notice $nick you are not a player of the active dm. please wait until the dm is over, or you can type $qt(!stopdm)
  }
} 
on $*:text:/^[@!]dds|dagger/i:#kingskrown: {
  if (!$turn) && ($dmon == on) && ($playerone) && ($playertwo) {
    notice $nick please type $qt(!turn) inorder to see who's turn it is, because it may not be your turn.
  }
  if ($readini(deathmatch.ini, health, $playerone) == *0) || ($readini(deathmatch.ini, health, $playertwo) == *0) {
    $iif($readini(deathmatch.ini, health, $playerone) == *0, msg $dmchan $playertwo has beat $playerone, $playerone has beat $playertwo)
  }
  elseif (!$turn) && ($dmon != on) {
    notice $nick there is no dm in progress. please type $qt(!dm) inorder to start one.
  }
  elseif ($dmon == on) && (!$playertwo) || (!$playerone) {
    notice $nick there is a dm request in request. please type $qt(!dm) to accept the request.
  }
  elseif ($dmon == on) && ($turn != $nick) {
    notice $nick it isn't your turn. type $qt(!turn) to see who's turn it is.
  }
  elseif ($dmon == on) && ($turn == $nick) {
    var %dds $calc($dds1 + $dds2)
    $iif($playerone == $turn, msg $chan $turn hit $dds1 and $dds2 on $playertwo using a dragon dagger. $playertwo now has $calc($readini(deathmatch.ini, health, $playertwo) $+(-,%dds)) hp left., msg $chan $turn hit $dds1 and $dds2 on $playerone using a dragon dagger. $playerone now has $calc($readini(deathmatch.ini, health, $playerone) $+(-,%dds)) hp left.)
    $iif($playertwo == $turn, writeini deathmatch.ini health $playerone $calc($readini(deathmatch.ini, health, $playerone) $+(-,%dds))), writeini deathmatch.ini health $playertwo $calc($readini(deathmatch.ini, health, $playertwo) $+(-,%dds)))
    $iif($turn == $playerone, writeini deathmatch.ini turn $chan $playertwo, writeini deathmatch.ini turn $chan $playerone)
    msg $dmchan it is now $+($turn,',s) turn!
    writeini deathmatch.ini dds dds1 $rand(0,30)
    writeini deathmatch.ini dds dds2 $rand(0,30)
  }
  elseif ($dmon == on) && ($playerone != $nick) || ($playertwo != $nick) {
    notice $nick you are not a player of the active dm. please wait until the dm is over, or you can type $qt(!stopdm)
  }
}
on $*:text:/^[@!]status/i:#kingskrown: {
  if (!$readini(deathmatch.ini, status, won) && (!$readini(deathmatch.ini, status, loss) {
    notice $nick you do not have a status file created for $+($nick,.) type $qt(!dm) and win/lose one inorder to have your file created.
  }
  elseif ($readini(deathmatch.ini, status, won) == $nick) && ($readini(deathmatch.ini, status, loss) == $nick) {
    notice $nick you have won $won deathmatches, and you have lost $loss deathmatches.
  }
}
on $*:text:/^[@!]dmcommands|deathmatchcommands/i:#kingskrown: {
  if ($dmon == on) && ($playerone == $nick) || ($playertwo == $nick) || ($address($me,2) == $wildsite) {
    msg $nick - deathmatch commands -
    msg $nick - !dm -
    msg $nick - !whip -
    msg $nick - !dds -
    msg $nick - !shark -
    msg $nick - !turn -
    msg $nick - !status -
    msg $nick - !stopdm -
  }
  elseif ($dmon == on) && ($playerone != $nick) || ($playertwo != $nick) || ($address($me,2) != $wildsite) {
    notice $nick sorry, but you'll have to be in the deathmatch inorder to use this command.
  }
  elseif ($dmon == on) && (!$playerone) || (!$playertwo) {
    notice $nick there is a dm in progress. please type $qt(!dm) to accept the request.
  }
  elseif ($dmon != on) {
    notice $nick you'll have to start a deathmatch inorder to use this command. type $qt(!dm)
  }
}
on $*:text:/^[@!]stopdm|stopdeathmatch/i:#kingskrown {
  if ($dmon == on) && ($playerone == $nick) || ($playertwo == $nick) || ($address($me,2) == $wildsite) {
    msg $dmchan canceling deathmatch on request of $+($nick,.) | remini deathmatch.ini on | remini deathmatch.ini start | remini deathmatch.ini turn | remini deathmatch.ini chan | remini deathmatch.ini shark | remini deathmatch.ini health
  }
  elseif ($dmon != on) && ($playerone == $nick) || ($playertwo == $nick) || ($address($me,2) == $wildsite) {
    notice $nick there is no dm in progress to halt. please type $qt(!dm) to start one.
  }
  elseif ($dmon == on) && ($playerone != $nick) || ($playertwo != $nick) || ($address($me,2) != $wildsite) {
    notice $nick you cannot stop the deathmatch in progress. you should ask a player who is participating in the current dm to halt it, otherwise, you'll have to wait until its over.
  }
}