on *:TEXT:!start*:#:{ if (!%register) { msg #Castle 14The Game will now start, type 4!REG14 to register, The first 8 Players will be the ones playing, you have4 1 minute14 to register, starting now! } if (!%register) { set %register ON } else { msg #Castle 14The game has already started, Type 4!reg14 to Register } set %1health 3 set %2health 3 set %dur $ctime set %1wall good set %2wall good set %status2 loaded set %status1 loaded timer 1 60 unset %register timer 1 60 /start timer 1 60 mode #team-1 +m | timer 1 60 mode #team-2 +m | timer 1 60 mode #Castle +m } alias start { msg #Castle 14Registration has now ended there are a total of4 %reg 14people, The game is now starting! | /go } On *:TEXT:!reg*:#:{ if (%register = ON) { if (!%yes [ $+ [ $nick ] ]) { set %team [ $+ [ $nick ] ] $nick $rand(1,2) | mode #Castle +v $nick } inc %reg if (%reg == 8) { set %register NO } if (%register == NO) { notice $nick 14Sorry the game has already started, please wait for it to end. } set %yes [ $+ [ $nick ] ] if (%reg == 8) { msg # 14Registration has now ended, Looks like you4 8 14are ready to war, join your respective clan rooms, the game is now starting! } if (%reg == 8) { /timers off } if (%team [ $+ [ $nick ] ] == $nick 1) { notice $nick 14 Congratulations, You are on team4 114! Please join4 #Team-1 } if (%team [ $+ [ $nick ] ] == $nick 2) { notice $nick 14 Congratulations, You are on team4 214! Please join4 #Team-2 } if (%team [ $+ [ $nick ] ] == $nick 1) { invite $nick #team-1 } if (%team [ $+ [ $nick ] ] == $nick 2) { invite $nick #team-2 } } } alias go { unset %team-1 | unset %team-2 timer 1 5 msg #Team-1 14Please discuss as a group what you want to do, whoever picks the option, 4it will be final14, Discuss it now. timer 1 5 msg #Team-2 14Please discuss as a group what you want to do, whoever picks the option, 4it will be final14, Discuss it now. timer 1 7 msg #Team-1 14So Team-1? You have 20 seconds to reach a desision. Do you want to 4!attack, 6!defend,7 !repair14 or 12!reload14 your cannons? | timer 1 9 mode #team-1 -m timer 1 7 msg #Team-2 14So Team-2? You have 20 seconds to reach a desision. Do you want to 4!attack, 6!defend,7 !repair14 or 12!reload14 your cannons? | timer 1 9 mode #team-2 -m } alias yessir { if (%team-1 == attack && %team-2 == attack) { msg #Castle 14You have both come to a desision4.14.4.14. | dec %1health | dec %2health | timer 1 7 msg #Castle 14Because you both 4attacked14 eachother you both loose a point. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | set %1wall bad | set %2wall bad | timer 1 17 /go } if (%team-1 == attack && %team-2 == reload) { msg #Castle 14You have both come to a desision4.14.4.14. | dec %2health | timer 1 7 msg #Castle 14While Team-2 was 4reloading14, they were 4attacked14 by Team-1, Team-2 looses 1 health, now4 %2health $+ /314. | set %2wall bad | timer 1 17 /go } if (%team-1 == attack && %team-2 == defend) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14Team-1 was aggressive and 4attacked14 Team-2, However, Team-2 was prepared and 4defended14 against the attack, they have lost no health. Team-1 has4 %1health $+ /314, and Team-2 has4 %2health $+ /314. | timer 1 17 /go } if (%team-1 == reload && %team-2 == attack) { msg #Castle 14You have both come to a desision4.14.4.14. | dec %1health | timer 1 7 msg #Castle 14Team-2 was the aggressive one here, they 4attacked14 Team-1 whilst Team-1 4reloaded14, Succesfully hit and Team-1 looses one health point. Team-1 has4 %1health $+ /314, and Team-2 has4 %2health $+ /314. | set %1wall bad | timer 1 17 /go } if (%team-1 == reload && %team-2 == reload) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14As you can see, you both 4reloaded14, now you are ready to fight. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == reload && %team-2 == defend) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14You seemed to have wasted a turn Team-2, Whilst Team-1 was 4reloading14, you should have attacked. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == defend && %team-2 == attack) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14Team-2 4shot there cannons14 at Team-1, but Team-1 was ready for the attack and 4defended14 themselves. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == defend && %team-2 == reload) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14Team-1 wasted their turn foolishly, because they tried to 4defend14 against a 4reload14, what loosers. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == defend && %team-2 == defend) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14You both had nothing to fear, and 4defended14 against nothing. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == repair && %team-2 == attack) { msg #Castle 14You have both come to a desision4.14.4.14. | dec %1health | timer 1 7 msg #Castle 14While Team-1 was repairing their castle they were attacked by Team-2, and lost a health. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | set %1wall bad | timer 1 17 /go } if (%team-1 == repair && %team-2 == reload) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14 While Team-1 4repaired14 their walls, Team-2 4reloaded14. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == repair && %team-2 == defend) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14 While Team-1 4souped-up their walls14, Team-2 defended14, I guess they were afraid of falling debris. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == attack && %team-2 == repair) { msg #Castle 14You have both come to a desision4.14.4.14. | dec %2health | timer 1 7 msg #Castle 14While Team-2 was repairing their castle they were attacked by Team-1, and lost a health. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | set %2wall bad | timer 1 17 /go } if (%team-1 == reload && %team-2 == repair) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14 While Team-2 4repaired14 their walls, Team-1 4reloaded14. Team-2 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == defend && %team-2 == repair) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14 While Team-2 4souped-up their walls14, Team-1 defended14, I guess they were afraid of falling debris. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%team-1 == repair && %team-2 == repair) { msg #Castle 14You have both come to a desision4.14.4.14. | timer 1 7 msg #Castle 14 You both used your time to 4repair14 your castles walls, and can now defend. Team-1 Has4 %1health $+ /3 14hp, and Team-2 has4 %2health $+ /3 14health. | timer 1 17 /go } if (%1health == 0 && %2health > 0) { timer 1 10 msg #Castle 14 Ahaha BshES 4Team-214 Wins. They just DESTROYED you whilst you4 %team-1 $+ ed | inc %2games | inc %total | timer 1 10 /end } if (%2health == 0 && %1health > 0) { timer 1 10 msg #Castle 14 Ahaha BshES 4Team-114 Wins. They just k0ed you whilst you4 %team-2 $+ ed | inc %1games | inc %total | timer 1 10 /end } if (%1health == 0 && %2health == 0) { timer 1 10 msg #Castle 14 G.F. You both Destroyed eachother, it is a 4TIE14! | inc %tie | inc %total | timer 1 10 /end } } on *:TEXT:!repair*:#team-1:{ if (%1wall == good) { msg # 14Your wall is already 4FINE14 use a different option! } elseif (%1wall == bad) { mode # +m | set %team-1 repair | timer 1 3 msg # 14Now 4repairing14 your castle walls. | set %1wall good } if (%team-1 && %team-2) { /yessir } } on *:TEXT:!repair*:#team-2:{ if (%2wall == good) { msg # 14Your wall is already 4FINE14 use a different option! } elseif (%2wall == bad) { mode # +m | set %team-2 repair | timer 1 3 msg # 14Now 4repairing14 your castle walls. | set %2wall good } if (%team-1 && %team-2) { /yessir } } On *:TEXT:!attack*:#Team-1:{ if (%status1 == reload) { msg # 14 You must 4reload14 before you shoot again. | HALT } elseif (%status1 == loaded) { mode #team-1 +m | timer 1 3 msg #Team-1 14So you want to 4attack14 Team-2? Sounds good. | set %Team-1 attack } set %status1 reload if (%team-1 && %team-2) { /yessir } } On *:TEXT:!attack*:#Team-2:{ if (%status2 == reload) { msg # 14 You must 4reload14 before you shoot again. | halt } elseif (%status2 == loaded) { mode #team-2 +m | timer 1 3 msg #Team-2 14So you want to 4attack14 Team-1? Sounds good. | set %Team-2 attack } set %status2 reload if (%team-1 && %team-2) { /yessir } } on *:TEXT:!reload*:#Team-1:{ if (%Status1 == loaded) { msg # You have are already loaded. } else { mode #team-1 +m | set %status1 loaded | set %team-1 reload | timer 1 3 msg #team-1 14You are now 4reloading14 your cannons... } if (%team-1 && %team-2) { /yessir } } on *:TEXT:!reload*:#Team-2:{ if (%Status2 == loaded) { msg # You have are already loaded. } else { mode #team-2 +m | set %status2 loaded | set %team-2 reload | timer 1 3 msg #team-2 14You are now 4reloading14 your cannons... } if (%team-1 && %team-2) { /yessir } } on *:TEXT:!defend*:#Team-1:{ if (%1wall == bad) { msg # 14You have to 4repair14 your wall, its broken and doesn't stand a chance. } else { mode #team-1 +m | set %team-1 defend | timer 1 3 msg #team-1 14You are now 4defending14 your castle. } if (%team-1 && %team-2) { /yessir } } on *:TEXT:!defend*:#Team-2:{ if (%2wall == bad) { msg # 14You have to 4repair14 your wall, its broken and doesn't stand a chance. } else { mode #team-2 +m | set %team-2 defend | timer 1 3 msg #team-2 14You are now 4defending14 your castle. } if (%team-1 && %team-2) { /yessir } } On *:TEXT:!end*:#:{ if ($nick isop $Chan || $nick == PuReStR || $nick ishop $chan) { end } } alias end { unset %register | unset %1health | unset %2health | unset %status1 | unset %status2 | unset %yes* | unset %team* | unset %reg | unset %dur | unset %1wall | unset %2wall /timers off devoice mode #team-1 -m mode #team-2 -m mode #Castle -m var %x = 1 while (%x <= $nick(#team-1,0)) { if ($nick(#team-1,%x) isreg #team-1) { timer 1 2 kick #team-1 $nick(#team-1,%x) Game ended } inc %x } var %y = 1 while (%y <= $nick(#team-2,0)) { if ($nick(#team-2,%y) isreg #team-2) { timer 1 2 kick #team-2 $nick(#team-2,%y) Game ended } inc %y } } on *:TEXT:!dur*:#:{ if (%dur) { notice $nick 14This game has been going on for4 $duration($calc($ctime - %dur)) $+ 14. } else { notice $nick 14There is no game currently in progress. } } on *:TEXT:!stats*:#:{ notice $nick 14There has been a total of4 %total 14game(s) played. Team-1 has won4 %1games 14game(s), and Team-2 has won4 %2games 14game(s). There has been4 %tie 14tie(s). } on *:TEXT:!commands:*:{ msg $nick 4This is a game relative to CastleWars, created by iCheck. | msg $nick 7The objective is to Destroy your opponents castle. | msg $nick 8You can either !attack, !defend, or !reload each round. | msg $nick 9You start out with 3 health, the first Team too destroy the other teams castle wins! | msg $nick 11Other commands: | msg $nick 12!dur: To iCheck, Send a memo. on *:CONNECT:{ /ns id yarlyfucker /mode $me +pTB /join #castle /cs invite #team-1 /cs invite #team-2 /join #team-1 /join #team-2 on *:TEXT:!restart:#:{ if ($nick isop #Castle) { /server irc.swiftirc.net