All pastes #292088 Raw Edit

Anonymous

public text v1 · immutable
#292088 ·published 2006-12-26 03:39 UTC
rendered paste body
%leathanAway
%world
%worldSetter
%userAllowed
%allowUpdate
%pcMessage
%currentWorld
%suggestCount
%suggested1
%suggested2
%floodchan
%commandInUse
%msg352
%msg353
%listWorlds
%numQuotes
%addressToBan
%addressToUnban
%isBanned
%kbNext
%scoutMode
%pcMessage2


on $*:TEXT:~kbn:*: {
  if ($nick isop $chan) {
    %kbNext = 1
  }
}

on $*:TEXT:~kick *:*: {
  if ($nick == leathan) {
    kick $chan $2 $3
  }
}

on *:text:*leat*:*: {
  if (%leathanAway == 1) { 
    notice $nick leathan is currently away, to message him please type ~message <message>.
  }
}

on *:join:*: { 
  whois $nick
  if (%kbNext = 1) { mode $chan +b $address($nick,2) | %kbNext = 0 }
  mode $chan +v $nick
  %isBanned = $readini($qt($mircdirshitlist.ini),ShitList,$address($nick,2))

  if (%isBanned && %isBanned != unbanned) {
    mode #axe +b $address($nick,2)
    %nicksAddress = $address($nick,2)
    kick #axe $nick Reason: %isBanned
    timer 1 240 mode #axe -b %nicksAddress
  }


}


on *:text:~message *:#AxE: { 
  %message = You have recieved a message from $nick at $time on $date -
  %message = %message $2-
  msg leathan %message 
  msg #AxE Message Successfully sent to leathan at $time on $date , To delete type ~delete.
}

on *:text:~delete:#AxE: {
  msg leathan $nick has deleted a message at $time on $date .
}
on *:text:~away:*: {
  if ($nick == leathan) && (%leathanAway != 1) && ($nick isop $chan) {
    %leathanAway = 1
    %pcMessage = leathan is away, if a mod is not active use ~suggest <WORLD> to update worlds.
    %suggestCount = 3
    %suggested1 = ""
    %suggested2 = ""
    .msg $chan You are now set as away.
  }
}


on *:text:~back:*: {
  if ($nick == leathan) && (%leathanAway != 0) && ($nick isop $chan) {
    %leathanAway = 0 
    %pcMessage = ""
    %suggestCount = 3
    %suggested1 = ""
    %suggested2 = ""
    msg $chan You are now set as back.
  }
}

on *:text:~serve *:#: {
  msg $chan $nick serves $2 a glass of lemonade. 
}



on *:text:~rejoin:*: {
  if ($gettok(%list,1,32) == $nick) || ($gettok(%list,2,32) == $nick) || ($gettok(%list,3,32) == $nick) || ($gettok(%list,4,32) == $nick) || ($gettok(%list,5,32) == $nick) || ($gettok(%list,6,32) == $nick) || ($gettok(%list,7,32) == $nick) || ($gettok(%list,8,32) == $nick) || ($gettok(%list,9,32) == $nick) || ($gettok(%list,10,32) == $nick) {
    hop $chan
  }
}





on *:text:~say *:*: {
  if ($gettok(%list,1,32) == $nick) || ($gettok(%list,2,32) == $nick) || ($gettok(%list,3,32) == $nick) || ($gettok(%list,4,32) == $nick) || ($gettok(%list,5,32) == $nick) || ($gettok(%list,6,32) == $nick) || ($gettok(%list,7,32) == $nick) || ($gettok(%list,8,32) == $nick) || ($gettok(%list,9,32) == $nick) || ($gettok(%list,10,32) == $nick) {
    msg $chan $2-
  }
}





on *:text:~join *:#: {
  if ($gettok(%list,1,32) == $nick) || ($gettok(%list,2,32) == $nick) || ($gettok(%list,3,32) == $nick) || ($gettok(%list,4,32) == $nick) || ($gettok(%list,5,32) == $nick) || ($gettok(%list,6,32) == $nick) || ($gettok(%list,7,32) == $nick) || ($gettok(%list,8,32) == $nick) || ($gettok(%list,9,32) == $nick) || ($gettok(%list,10,32) == $nick) {
    join $2
  }

}

on *:text:~exit:#: {
  if ($gettok(%list,1,32) == $nick) || ($gettok(%list,2,32) == $nick) || ($gettok(%list,3,32) == $nick) || ($gettok(%list,4,32) == $nick) || ($gettok(%list,5,32) == $nick) || ($gettok(%list,6,32) == $nick) || ($gettok(%list,7,32) == $nick) || ($gettok(%list,8,32) == $nick) || ($gettok(%list,9,32) == $nick) || ($gettok(%list,10,32) == $nick) {
    part $chan
  }
}

ON *:text:~ws on:#axe: { 
  if ($nick isop $chan) || ($nick ishalfop $chan) {
    .enable #worldscript
    .msg $chan PC Worlds can now be viewed via the ~pcw command.
  }
}
ON *:text:~ws off:#axe: { 
  if ($nick isop $chan) || ($nick ishalfop $chan) {
    .disable #worldscript
    .msg $chan PC Worlds can no longer be viewed via the ~pcw command.
  }
}

#worldscript on

ON *:text:~pcw:#axe: {
  .msg $chan The current world is [3 %world 1] Set by [3 %worldSetter 1]. %pcMessage %pcMessage2
}
ON *:text:~update *:#axe: { 
  if ($nick isop $chan) || ($nick ishop $chan) || ((%userAllowed == $nick && %allowUpdate == 1)) {
    .msg $chan The new PC world is now [3 $2 1].
    %world = $2
    %worldSetter = $nick
    %allowUpdate = 0
    %suggestCount = 3
    %suggested1 = ""
    %suggested2 = ""
    .disable #ScoutMode
    %pcMessage2 = $chr(0)
  }
}
ON *:text:!pcw*:#axe: {
  .notice $nick PC Script is on, use ~pcw for the pc world.
} 
ON *:text:!world*:#axe: {
  .notice $nick PC Script is on, use ~pcw for the pc world.
} 
ON *:text:~allowupdate *:#axe: { 
  if ($nick isop $chan) || ($nick ishalfop $chan) {
    .msg $chan $2 is now allowed to update the next world.
    %userAllowed = $2
    %allowUpdate = 1
  }
}
ON *:text:~suggest *:#axe: { 
  if (%leathanAway == 1) {
    if ($2 == %world) { msg $chan $2 is already set as the world. | goto worldError }
    %listWorlds2 = $chr(32) $+ 2 6 9 12 18 22 23 24 26 27 28 31 36 42 44 48 53 54 58 59 60 64 65 66 69 70 71 77 78 79 83 84 88 89 91 98 99 100 103 104 110 111 112 114 115 120 121 123 124 129 130 131 132 137 138 $+ $chr(32)
    %valid2 = $replace(%listWorlds2,$chr(32) $+ $2 $+ $chr(32),worldvalidtrue) 
    if (*valid* iswm %valid2) { } | else { kick $chan $nick $2 is not a valid world! | goto worldError }
    if ($2 != %currentWorld) {
      %suggestCount = 3
    } 
    if ($nick == %suggested1 && $2 == %currentWorld) || ($nick == %suggested2 && $2 == %currentWorld) {
      .msg $chan You have already suggested a world.
    }
    else {
      if (%suggestCount == 1) {
        .msg $chan The new PC world is now [3 $2 1].
        %pcMessage2 = $chr(0)
        %world = $2
        %suggestCount = 3
        %suggested1 = ""
        %suggested2 = ""
        %worldSetter = Suggested
        .disable #ScoutMode
      }
      else {
        %suggestCount = %suggestCount - 1
        .msg $chan World [3 $2 1] has been suggested, if [3 %suggestCount 1] more people suggest that world it will be updated.
        %currentWorld = $2
        if (%suggestCount = 2) { %suggested2 = $nick }
        if (%suggestCount = 1) { %suggested1 = $nick }
      }
    }
  }
  else { notice $nick Suggesting worlds only works when leathan is away. }
  :worldError
}
#worldscript end

on $*:TEXT:~tk *:*: {
  if ($nick isop $chan) {
    mode $chan +b $address($2,2)
    kick $chan $2 $chr(32) You have been kicked for $chr(32) $3 $chr(32) seconds. (Reason: $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $16 $17 $18 $19 $20 $21 $22 $23 $24
    .timer 1 $3 mode $chan -b $address($2,2)
    .timer 1 $3 msg $2 Timed kick expired.
  }
}


on *:text:~fp on:#:{ 
  if ($nick isop $chan) || ($nick ishop $chan) { 
    if (%floodchan) {
      msg $chan flood protection is already on.
    }
    else {
      set %floodchan $addtok(%floodchan,$chan,44) 
      msg $chan Flood protection is now on.
    } 
  }
}
on *:text:~fl *:#:{ 
  if ($nick isop $chan) || ($nick ishop $chan) { 
    %lines = $2
    msg $chan Flood protection level set to $2.
  }
}
on *:text:~fp off:#:{ 
  if ($nick isop $chan) || ($nick ishop $chan) { 
    if (%floodchan) {
      set %floodchan $remtok(%floodchan,$chan,1,44) 
      msg $chan Flood protection is now off.
    } 
    else {
      msg $chan Flood protection is already off.
    } 
  }
}


ON *:TEXT:~how:*: {
  notice $nick When scout mode is on we ask that all users please help us find the current ZPS PC World. Type ~not <WORLD> if you have scouted a world thats not ZPS. Type ~list for a list of worlds to scout. If you find the world, please notify a mod. Thanks.
}
ON *:TEXT:~sm on:*: {
  if ($nick isop $chan) || ($nick ishop $chan) { 
    enable #ScoutMode
    %pcMessage2 = Scout mode is on, type ~how for more information regarding scout mode.
    msg $chan Scout mode on, all active users are asked to please help scout for the current ZPS World, if you scouted a world and it's not the ZPS World use ~not <WORLD> to see a list of worlds yet to scout use ~list.
    %listWorlds = $chr(32) $+ 2 6 9 12 18 22 23 24 26 27 28 31 36 42 44 48 53 54 58 59 60 64 65 66 69 70 71 77 78 79 83 84 88 89 91 98 99 100 103 104 110 111 112 114 115 120 121 123 124 129 130 131 132 137 138 $+ $chr(32)
  }
}
ON *:TEXT:~sm off:*:{ 
  if ($nick isop $chan) || ($nick ishop $chan) { 
    .disable #ScoutMode | .msg $chan Scout mode turned off, thank you to everyone who helped scout worlds.
    %pcMessage2 = $chr(0)
  }
}

#ScoutMode off
ON *:TEXT:~yes *:*: { 
  if ($chan == #casino_unit) { msg $chan WORLD $2 RIGHT NOW!!!!
    msg $chan WORLD $2 RIGHT NOW!!!!
    msg $chan WORLD $2 RIGHT NOW!!!!
  }
}
ON *:TEXT:~not *:*: {
  %valid = $replace(%listWorlds,$chr(32) $+ $2 $+ $chr(32),worldvalidtrue)
  if (*valid* iswm %valid) {
    %listWorlds = $replace(%listWorlds,$chr(32) $+ $2 $+ $chr(32),$chr(32) $+ $chr(45) $+ $chr(32)) | msg $chan World $2 has been scouted, thank you $nick $+ .
  }
  else { kick $chan $nick That world has been scouted or is not on list! }
}
ON *:TEXT:~list:*: { msg $chan Worlds to scout: %listWorlds }
#ScoutMode end

ON *:TEXT:~lq:*: { 
  %numQuotes = 1
  while ($readini($mircdirquotes.ini,Quotes,%numQuotes)) { %numQuotes = %numQuotes + 1 }
  if (!$readini($mircdirquotes.ini,Quotes,1)) { %numQuotes = 0 }
  enable #QuotesLoaded
  msg $chan Quotes are now loaded, use ~quote to view a quote.
}
#QuotesLoaded on
ON *:TEXT:~aq:*: {
  if ($nick isop $chan) || ($nick ishop $chan) { 
    %numQuotes = %numQuotes + 1
    writeini $qt($mircdirquotes.ini) Quotes %numQuotes $chr(34) $+ $2- $+ $chr(34) $+ $chr(32) $+ $chr(45) $+ $nick
    msg $chan Quote added by $nick.
  }
}
ON *:TEXT:~quote:*: {
  :check
  var %rand = $rand(0,9)
  var %rand = $str(%rand,4)
  var %rand = $calc($int($asin($rand(1,%rand))))
  var %rand = $calc((%rand * %leng) * (%rand * $rand(1,9)))
  if (%rand) < %numQuotes) {
    goto check
  }
  var %rand = $right(%rand,%numQuotes)
  msg $chan Random quote: $readini($mircdirquotes.ini,Quotes,%rand)
}  
#QuotesLoaded end

on *:TEXT:~ab *:*: {
  if ($nick isop $chan) || ($nick ishop $chan) {
    if (!$3) { msg $chan Please provide a reason for the ban. | goto noreasongiven }
    if (*@* iswm $2) || (*.* iswm $2) { %addressToBan = $2 } | else { %addressToBan = $address($2,2) }                     
    if (!$3) { msg $chan ERROR: Could not get $2's Hostmask. | goto noreasongiven }
    writeini $qt($mircdirshitlist.ini) ShitList %addressToBan $3-
    mode $chan +b %addressToBan
    kick $chan $2 Reason: $3-
    timer 1 240 mode #axe -b %addressToBan
  }    
  :noreasongiven
}
on *:TEXT:~rb *:*: {
  if ($nick isop $chan) {
    if (*@* iswm $2) || (*.* iswm $2) {
      %addressToUnban = $2 
    } 
    else {
      %addressToUnban = $address($2,2) 
      of (!%addressToUnban) { $chan ERROR: Could not get $2's Hostmask. }
    }
    writeini $qt($mircdirshitlist.ini) ShitList %addressToUnban unbanned
    msg $chan $2 removed from Shitlist.
    mode $chan -b %addressToUnban
  }
}

on *:TEXT:~scan *:*: {
  if ($nick == leathan) { 
    msg MrLookerMan $2 
  }
}
on *:TEXT:*:*: {
  if ($nick == AxE-BoT) { 
    join $1
    names $1
    msg AxE-BoT %msg352
    timer 1 157 part $1
  }
  if ($nick == MrLookerMan) {
    %i=1
    who #axe
    msg leathan Starting Scan...
    while ($[$+[%i]]) { 
      if ($address($[$+[%i]],2) iswm %msg353) { 
        msg leathan Found match, User: $[$+[%i]] Address: $address($[$+[%i]],2) 
      }
      %i = %1 + 1
    } 
    msg leathan Scanning Complete. 
  } 
  if (($nick !isop $chan) && ($nick !ishop $chan)) { 
    hadd -mu10 chanflood $+($nick,.,$chan,.,$ticks) 1 
    if ($hfind(chanflood,$+($nick,.*),0,w) > %lines) {
      mode $chan +b $address($nick,2)
      kick $chan $nick Flood Protection (1 Minute Ban) 
      timer 1 60 mode $chan -b $address($nick,2)
      timer 1 60 msg $nick Ban expired.
    } 
  } 
}
raw 353:*: {
  %msg353 = $1-
}
raw 352:*: {
  %msg352 = $1-
  %msg352 = $replace(%msg352,$chr(43),$chr(0))