Back to Topic Index

The !setevent idea

By Troll84 on 04/07/2008
Thought i'd just put this here as an option. It's the script i made and used for my bot in Rampage. It's a !setevent, !setworld, !unsetevent, !unsetworld, !event, !disableworld, !disableevent, !enableworld, !enableevent and !world script. Would be used by halfops+ to set events + the world the even is on so that users could type !event.

Just pasting this here as it's big and i wouldn't want to put it in the Suggestion forum topic of it (Found Here)

CODE
;SetWorld written by Mugger84
on $*:TEXT:/^[@.!](SetWorld|SetPcW)/Si:#: {
 if (*$* iswm $2-) || (*|* iswm $2-) {  halt }
 if ($nick isop $chan) || ($nick ishop $chan) {
   if (%Event. [ $+ [ $Chan ] ] == $Null) {
     notice $nick 12Please Set The Event First By Typing !SetEvent <4Event2>
     HALT
   }
   if ($2 isnum 1-144) {
     set %World. [ $+ [ $Chan ] ] $2
     msg $chan 1[-4World Updated!1-] 12New World Set By4 $nick $+ 12 $+ ! Type !World To View The Updated Event World (You Must Be At Least Voice!!)
   }
   else {
     notice $nick 4ERROR:12 Please use a valid world number.
   }
 }
}

;UnSetWorld
on $*:TEXT:/^[@.!](UnsetWorld|UnsetPcW|DelWorld|DelPcW)/Si:#: {
 if (*$* iswm $2-) || (*|* iswm $2-) { halt }
 if ($nick isop $chan) || ($nick ishop $chan) {
   unset %World. [ $+ [ $Chan ] ]
   msg $chan 1[-4World Unset!1-] 12The Current World Has Been UnSet By 4 $+ $nick $+ 12 $+ !
 }
}

;SetEvent
on $*:TEXT:/^[@.!](SetEvent|NewEvent|SetNewEvent)/Si:#: {
 if (*$* iswm $2-) || (*|* iswm $2-) { halt }
 if ($nick isop $chan) || ($nick ishop $chan) {
   if ($2 == pc) || ($2 == pest) {
     set %Event. [ $+ [ $Chan ] ] Pest Control
     set %PcWorldNick. [ $+ [ $Chan ] ] $nick
     set %PcCTime. [ $+ [ $Chan ] ] $ctime
     msg $chan 1[-4Event Updated!1-] 12Type !Event To View Current Event (You Must Be Voiced Or Higher)
     notice $(+($chan)) 1[4Event Updated!1] 12Event Now Set As4 %Event. [ $+ [ $Chan ] ]
     set %EventOn. [ $+ [ $Chan ] ] 1
   }
   else {
     set %Event. [ $+ [ $Chan ] ] $2-
     set %PcWorldNick. [ $+ [ $Chan ] ] $nick
     set %PcCTime. [ $+ [ $Chan ] ] $ctime
     msg $chan 1[-4Event Updated!1-] 12Type !Event To View Current Event (You Must Be Voiced Or Higher)
     notice $+(+,$chan) 1[-4Event Updated!1-] 12Event Now Set As4 %Event. [ $+ [ $Chan ] ]
     set %EventOn. [ $+ [ $Chan ] ] 1
   }
 }
}

;UnSetEvent
on $*:TEXT:/^[@.!](UnSetEvent|DelEvent)/Si:#: {
 if (*$* iswm $2-) || (*|* iswm $2-) { halt }
 if ($nick isop $chan) || ($nick ishop $chan) {
   unset %Event. [ $+ [ $Chan ] ]    
   msg $chan 1[-4Event UnSet!1-] 12The Current Event Has Been UnSet By4 $nick $+ 12 $+ !
 }
}

;View World + Event
on $*:TEXT:/^[@.!](World|Event)/Si:#: {
 if ($2) { halt }
 if (*$* iswm $2-) || (*|* iswm $2-) { halt }
 inc %PcCount
 if (%EventOn. [ $+ [ $Chan ] ] == 1) {
   if ($nick !isreg $chan) {
     if (%Event. [ $+ [ $Chan ] ] == $Null) {
       notice $nick 12No Event Is Currently Set On Channel4 $Chan $+ 12 $+ .
       HALT
     }
     else {
       if (%World. [ $+ [ $Chan ] ] == $Null) {
       notice $nick 12Current4 %Event. [ $+ [ $Chan ] ] 12World Has Not Yet Been Set. Last Updated By4 %PcWorldNick. [ $+ [ $Chan ] ] , $duration($calc($ctime - %PcCTime. [ $+ [ $Chan ] ] $ctime)) 12Ago. This Command Has Been Used4 %PcCount 12Times. | HALT }
     }
     if (%World. [ $+ $Chan ] ] != $Null) && (%Event. [ $+ [ $Chan ] ] != $Null) {
     notice $nick 12Current12 %Event. [ $+ [ $Chan ] ] 2World Has Been Set As4 %World. [ $+ [ $Chan ] ] $+ 12 $+ . Last Updated By4 %PcWorldNick. [ $+ [ $Chan ] ] , $duration($calc($ctime - %PcCTime. [ $+ [ $Chan ] ] $ctime)) 12Ago. This Command Has Been Used4 %PcCount 12Times. | HALT }
   }
 }
}

;Enable World
on $*:TEXT:/^[@.!](EnableWorld|EnableEvent)/Si:#: {
 if (*$* iswm $2-) || (*|* iswm $2-) { halt }
 if ($nick isop $chan) || ($nick ishop $chan) {
   if (%EventOn. [ $+ [ $Chan ] ] == 1) {
   notice $nick 12Pest Control Command Already Enabled On4 $chan $+ 12 $+ ! } { HALT }
   set %EventOn. [ $+ [ $Chan ] ] 1
   msg $chan 1[-4World Enabled!1-] 12The !World Command Has Been Enabled By 4 $+ $nick $+ 12 $+ !
 }
}

;Disable World
on $*:TEXT:/^[@.!](DisableWorld|DisableEvent)/Si:#: {
 if (*$* iswm $2-) || (*|* iswm $2-) { halt }
 if ($nick isop $chan) || ($nick ishop $chan) {
   if (%EventOn. [ $+ [ $Chan ] ] == 0) {
   notice $nick 12Pest Control Command Already Disabled On4 $chan $+ 12 $+ ! } { HALT }
   set %EventOn. [ $+ [ $Chan ] ] 0
   unset %World. [ $+ [ $Chan ] ]
   unset %Event. [ $+ [ $chan ] ]
   unset %PcCTime. [ $+ [ $Chan ] ]
   unset %PcWorldNick. [ $+ [ $Chan ] ]
   msg $chan 1[-4World Disabled!1-] 12The !World Command Has Been Disabled By 4 $+ $nick $+ 12 $+ !
 }
}


Note: It's an IRC Script

By Robertw56 on 04/07/2008
Looks good, I say we try it.

By George on 04/07/2008
I say we should definately do it.
Especially since Mugger has already made the script for it.

Tell me though Cheyney, if I set an event, host it, then after the event has finished do i have to !unset it before I set the next one, or can I just set straight away?

By Buzzard1985 on 04/07/2008
If you want I can throw it into mIRC for you. I'm usually on.

By Troll84 on 04/07/2008
You can set a new event straight away, but only one event can be set at a time. If necessary the script could be easily adapted to have two events set.

~Mugger84

By Troll84 on 04/07/2008
QUOTE (Buzzard1985 @ July 04, 2008 10:34 pm)
If you want I can throw it into mIRC for you. I'm usually on.

+1 - I could add in to the begining if (Buzz ison $chan) { halt } and host it on myself too. That way the script would likely be up 24/7 as the chances of both of us being off are miniscule as we both tend to leave our computers on 24/7 (i think tongue.gif)

Let's see what all of the staff thing of the idea first though smile.gif And see if there's a way for Robbie to simply script it from the site which would remove all hasstle.

~Mugger84



Back to Topic Index

Developed by Mojo.