Year of the Dragon: Through April 23rd, claim the adventure pack Slice of Life for free! Speak to Xatheral in the Hall of Heroes.
Game mechanics • Newbie guide • In development • DDO Store • Social Media
Challenges • Classes • Collectables • Crafting • Enhancements • Epic Destinies • Favor • Feats
Glossary • Items • Maps • Monsters • Places • Quests • Races • Reincarnation • Skills • Spells
Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!
User:Technical 13/SandBox/mIRC scripts/Trap Game
< User:Technical 13 | SandBox | mIRC scripts
Jump to navigation
Jump to search
|
SandBox | mIRC scripts | Notepad++ UDLs | AutoHotKey |
---|
;-- Trap Game --
on *:text:!Trap*:#: {
if ($1 == !Trapgame) {
if ((($nick isop $chan) || ($nick ishop $chan)) && ($2 == on)) {
/msg $chan The trap game has been �enabled�. To start the game, type !trap.
/set %Game.Trapgame on
}
elseif ((($nick !isop $chan) || ($nick !ishop $chan)) && ($2 == on)) {
/ame doesn't know $nick well enough to allow them to turn on the trap game. Sorry. :(
}
elseif ((($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice $chan)) && ($2 == off) && (%Game.Trapgame == on)) {
/msg $chan The trap game has been �disabled� by $nick $+ .
/set %Game.Trapgame off
/unset %Trap*
}
elseif ((($nick isop $chan) || ($nick ishop $chan) || ($nick isvoice $chan)) && ($2 == off) && (%Game.Trapgame == off)) {
/ame thinks $nick is foolish trying to turn off something not on.. 0.o
}
else {
/ame doesn't know $nick well enough to allow them to turn off the trap game. Sorry. :(
}
}
else {
if (%Game.Trapgame == on) {
/msg $chan There is a Trap on the channel!!!! We need someone to disable it, so all you have to do is disable one of these boxes: red, blue, yellow, green. Type !disarm (color) to disable the box and see if you successfully disabled the trap.
/set -u15 %TrapCrit $rand(1,10)
/set -u15 %TrapFail $rand(1,6)
/set -u15 %TrapBox $rand(1,4)
while ((%TrapFail == %TrapBox) || (%TrapCrit == %TrapFail)) {
/set -u15 %TrapFail $rand(1,6)
}
while ((%TrapBox == %TrapCrit) || (%TrapFail == %TrapBox)) {
/set -u15 %TrapBox $rand(1,4)
}
if (%TrapBox == 1) { /set %Trapped Red }
elseif (%TrapBox == 2) { /set %Trapped Blue }
elseif (%TrapBox == 3) { /set %Trapped Green }
else { /set %Trapped Yellow }
if (%TrapFail == 1) { /set %TrapKick Red }
elseif (%TrapFail == 2) { /set %TrapKick Blue }
elseif (%TrapFail == 3) { /set %TrapKick Green }
elseif (%TrapFail == 4) { /set %TrapKick Yellow }
else { /set %TrapKick None }
if (%TrapCrit == 1) { /set %TrapCritFail Red }
elseif (%TrapCrit == 2) { /set %TrapCritFail Blue }
elseif (%TrapCrit == 3) { /set %TrapCritFail Green }
elseif (%TrapCrit == 4) { /set %TrapCritFail Yellow }
else { /set %TrapCritFail None }
/notice $me %Trapped -- %TrapKick -- %TrapCritFail
}
else {
/msg $chan The Trapgame is currently �disabled� by a room (half-)op. Please ask them to turn it on for you.
}
}
}
on *:text:!disarm*:#: {
if ((%Trapped == $null) || (%TrapKick == $null) || (%TrapCritFail == $null)) {
/msg $chan What are you trying to disarm? There have been no traps spotted. Type: �!Trap� to search one out.
}
elseif ($2 == %Trapped) {
if (($nick !isprotect $chan) && ($nick !isop $chan) && ($nick !ishop $chan)) {
/msg $chan Disarming the %Trapped box was a good idea! You saved the channel by successfully disabling the bomb. Hooray for $nick $+ ! Here's a reward!
/mode $chan +v $nick
/timer 1 600 /mode $chan -v $nick
/unset %Trap*
}
else { /msg $chan Disarming the %Trapped box was a good idea! You saved the channel by successfully disabling the bomb. Hooray for $nick $+ ! }
}
elseif ($2 == %TrapKick) {
/msg $chan you have failed in disabling the trap! The correct box was %Trapped
if (($nick !isprotect $chan) && ($nick !isop $chan) && ($nick !ishop $chan)) { /kick $chan $nick Boom! You failed, correct box was %Trapped $+ ! :) }
else { /msg $chan �BOOM!� $nick failed, correct box was %Trapped $+ ! :D }
}
elseif ($2 == %TrapCritFail) {
/msg $chan OH NO!!! ROOM GO BOOOM!!!!!
/set %TrapCritFail_Loop $nick($chan,0)
/set %TrapCritFail_Nick $nick($chan,%TrapCritFail_Loop)
/set %TrapCritFail_Kicked 0
while (%TrapCritFail_Loop > 0) {
if ((%TrapCritFail_Nick !isprotect $chan) && (%TrapCritFail_Nick !isop $chan) && (%TrapCritFail_Nick !ishop $chan) && (%TrapCritFail_Nick != $nick)) {
/kick $chan %TrapCritFail_Nick Boom! $nick attempted to disarm the %TrapCritFail box, but the correct box was %Trapped $+ ! :)
/inc %TrapCritFail_Kicked
}
/dec %TrapCritFail_Loop
/set %TrapCritFail_Nick $nick($chan,%TrapCritFail_Loop)
}
/set %TrapCritFail_Person person
if (%TrapCritFail_Kicked > 1) { /set %TrapCritFail_Person people }
if (($nick !isop $chan) && ($nick !ishop $chan)) { /kick $chan $nick Boom! You took out %TrapCritFail_Kicked other %TrapCritFail_Person attempting to disarm the %TrapCritFail box when the correct box was %Trapped $+ ! :) }
else { /msg $chan Boom! $nick took out %TrapCritFail_Kicked other %TrapCritFail_Person attempting to disarm the %TrapCritFail box when the correct box was %Trapped $+ ! :) }
/unset %Trap*
}
else {
/msg $chan .........nothing happened, proceed to disarm another box.
}
}