Public feed #893959

Stuff

public text v1 · immutable
Raw Edit
·published 2008-02-06 16:06 UTC
rendered paste body
on *:TEXT:!fight*:#maffia: {
  if ($timer($+(jail,$nick))) { notice $nick You are in the Jail, you must wait till they let you free! | halt }
  var %maffia = $readini(maffia.ini,register,$nick)
  if (!%maffia) { notice $nick You haven't registered yet, type !register to register. | halt } 
  var %maffia2 = $readini(maffia.ini,register,$2)
  if (!%maffia2) { notice $nick $2 isn't registered. | halt }
  if (%mlogin [ $+ [ $2 ] ] != 1) { notice $nick $2 isn't logged in. | halt }
  if (%fightuse [ $+ [ $nick ] ] == 1) { notice $nick You can only fight someone every 5 minutes. | halt }
  set %fighnum $r(1,2)
  set %fightuse [ $+ [ $nick ] ] 1 | /.timerfightuse $+ $nick 1 300 unset %fightuse [ $+ [ $Nick ] ]
  if (!$2) { notice $nick Please enter a person to fight with }
  if ($2) { 
    msg # $nick VS $2 $+ !
    msg # $nick has %level [ $+ [ $nick ] ] $+ % muscles, and $2 has %level [ $+ [ $2 ] ] $+ % muscles. 
  }
  if ((%level [ $+ [ $Nick ] ] == %level [ $+ [ $2 ] ]) && (%fightnum == 1)) { msg # $2 wins the fight. } 
  if ((%level [ $+ [ $Nick ] ] == %level [ $+ [ $2 ] ]) && (%fightnum == 2)) { msg # $nick wins the fight. }
  elseif (%level [ $+ [ $Nick ] ] > %level [ $+ [ $2 ] ]) { .timer 1 1 { msg #  $nick wins the fight. } }
  elseif (%level [ $+ [ $Nick ] ] < %level [ $+ [ $2 ] ]) { .timer 1 1 { msg # $2 wins the fight. } }
}