All pastes #903944 Raw Edit

Paul's noobish scriptage

public text v1 · immutable
·published 2008-02-14 16:35 UTC
rendered paste body
raw 439:*: {
  haltdef
  quit Restarting.
  server $serverip 
}

on *:text:!pcwoff:#pc: {
  if ($nick !isreg $chan) {
    set %pcwscript off
    msg $chan 2PCW Commands are now 5[ OFF ]2
  }
}

on *:text:!pcwon:#pc: {
  if ($nick !isreg $chan) {
    set %pcwscript on
    msg $chan 2PCW Commands are now 5[ ON ]2. Type 5!pcwcommands2 to see my pest control commands.
  }
}

ctcp *:sayworld:*: {
  if (%pcwscript == off) { halt }
  if ($nick !isreg $chan) {
    msg #pc 240+world is 5[ %40 ]2. 70+ world is 5[ %70 ]2. 100+ world is 5[ %100 ]. 
  }
}

on *:text:!suggest *:#pc:{
  if ($3 !isnum 2-144) { notice $nick That is not a legitimate world. | halt } 
  if (%pcwscript == on)  {
    if ($2 == 40+) {
      if (%40 == $3) { notice $nick That is already the 40+ world! | halt }
      if ($readini(40pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 40+ world! | halt }
      /writeini 40pcwsuggested.ini $3 suggested $calc($readini(40pcwsuggested.ini, $3, suggested) +1)
      /writeini 40pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 40+ world!    
      /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $3 ]2 for levels 5[ 40+ ]2.    
      if ($readini(40pcwsuggested.ini, $3, suggested) >= 5) {
        /remove 40pcwnicksuggested.ini     
        /remove 40pcwsuggested.ini 
        set %40 $3
        set %40nick Suggestions
        set %40time $ctime
      msg $chan 2The 40+ Pest Control World has been 5[ UPDATED ]2 to 5[ %40 ]2 by 5[ %40nick ]2 $+ }
    }
    if ($2 == 70+) {
      if (%70 == $3) { notice $nick That is already the 70+ world! | halt }    
      if ($readini(70pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 70+ world! | halt }
      /writeini 70pcwsuggested.ini $3 suggested $calc($readini(70pcwsuggested.ini, $3, suggested) +1)
      /writeini 70pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 70+ world!    
      /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $3 ]2 for levels 5[ 70+ ]2.    
      if ($readini(70pcwsuggested.ini, $3, suggested) >= 5) {
        /remove 70pcwnicksuggested.ini     
        /remove 70pcwsuggested.ini 
        set %70 $3
        set %70nick Suggestions
        set %70time $ctime
      msg $chan 2The 70+ Pest Control World has been 5[ UPDATED ]2 to 5[ %70 ]2 by 5[ %70nick ]2 $+ }
    }
    if ($2 == 100+) {
      if (%100 == $3) { notice $nick That is already the 100+ world! | halt }  
      if ($readini(100pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 100+ world! | halt }
      /writeini 100pcwsuggested.ini $3 suggested $calc($readini(100pcwsuggested.ini, $3, suggested) +1)
      /writeini 100pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 100+ world!    
      /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $3 ]2 for levels 5[ 100+ ]2.        
      if ($readini(100pcwsuggested.ini, $3, suggested) >= 5) {
        /remove 100pcwnicksuggested.ini     
        /remove 100pcwsuggested.ini 
        set %100 $3
        set %100nick Suggestions
        set %100time $ctime
      msg $chan 2The 100+ Pest Control World has been 5[ UPDATED ]2 to 5[ %100 ]2 by 5[ %100nick ]2 $+ }
    }
  }
  if (%pcwscript == off) {
    if ($2 == 40+) {
      if (%40 == $3) { notice $nick That is already the 40+ world! | halt }
      if ($readini(40pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 40+ world! | halt }
      /writeini 40pcwsuggested.ini $3 suggested $calc($readini(40pcwsuggested.ini, $3, suggested) +1)
      /writeini 40pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 40+ world!    
      /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $3 ]2 for levels 5[ 40+ ]2.    
      if ($readini(40pcwsuggested.ini, $3, suggested) >= 5) {
        /remove 40pcwnicksuggested.ini     
        /remove 40pcwsuggested.ini 
        set %40 $3
        set %40nick Suggestions
        set %40time $ctime 
      }
    }
    if ($2 == 70+) {
      if (%70 == $3) { notice $nick That is already the 70+ world! | halt }    
      if ($readini(70pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 70+ world! | halt }
      /writeini 70pcwsuggested.ini $3 suggested $calc($readini(70pcwsuggested.ini, $3, suggested) +1)
      /writeini 70pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 70+ world!    
      /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $3 ]2 for levels 5[ 70+ ]2.    
      if ($readini(70pcwsuggested.ini, $3, suggested) >= 5) {
        /remove 70pcwnicksuggested.ini     
        /remove 70pcwsuggested.ini 
        set %70 $3
        set %70nick Suggestions
        set %70time $ctime 
      }
    }
    if ($2 == 100+) {
      if (%100 == $3) { notice $nick That is already the 100+ world! | halt }  
      if ($readini(100pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 100+ world! | halt }
      /writeini 100pcwsuggested.ini $3 suggested $calc($readini(100pcwsuggested.ini, $3, suggested) +1)
      /writeini 100pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 100+ world!    
      /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $3 ]2 for levels 5[ 100+ ]2.        
      if ($readini(100pcwsuggested.ini, $3, suggested) >= 5) {
        /remove 100pcwnicksuggested.ini     
        /remove 100pcwsuggested.ini 
        set %100 $3
        set %100nick Suggestions
        set %100time $ctime
      }
    }
  }
}

on *:TEXT:!suggest40+ *:#pc:{
  if (%pcwscript == on) {
    if ($2 !isnum 2-144) { notice $nick That is not a legitimate world. | halt }
    if (%40 == $2) { notice $nick That is already the 40+ world! | halt }
    if ($readini(40pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 40+ world! | halt }
    /writeini 40pcwsuggested.ini $2 suggested $calc($readini(40pcwsuggested.ini, $2, suggested) +1)
    /writeini 40pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 40+ world!    
    /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $2 ]2 for levels 5[ 40+ ]2.      
    if ($readini(40pcwsuggested.ini, $2, suggested) >= 5) {
      /remove 40pcwnicksuggested.ini     
      /remove 40pcwsuggested.ini 
      set %40 $2
      set %40nick Suggestions
      set %40time $ctime
    msg $chan 2The 40+ Pest Control World has been 5[ UPDATED ]2 to 5[ %40 ]2 by 5[ %40nick ]2 $+ }
  }
  if (%pcwscript == off) {
    if ($2 !isnum 2-144) { notice $nick That is not a legitimate world. | halt }
    if (%40 == $2) { notice $nick That is already the 40+ world! | halt }
    if ($readini(40pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 40+ world! | halt }
    /writeini 40pcwsuggested.ini $2 suggested $calc($readini(40pcwsuggested.ini, $2, suggested) +1)
    /writeini 40pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 40+ world!    
    /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $2 ]2 for levels 5[ 40+ ]2.      
    if ($readini(40pcwsuggested.ini, $2, suggested) >= 5) {
      /remove 40pcwnicksuggested.ini     
      /remove 40pcwsuggested.ini 
      set %40 $2
      set %40nick Suggestions
      set %40time $ctime
    }
  }
}

on *:TEXT:!suggest70+ *:#pc:{
  if (%pcwscript == on) {
    if ($2 !isnum 2-144) { notice $nick That is not a legitimate world. | halt }
    if (%70 == $2) { notice $nick That is already the 70+ world! | halt }
    if ($readini(70pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 70+ world! | halt }
    /writeini 70pcwsuggested.ini $2 suggested $calc($readini(70pcwsuggested.ini, $2, suggested) +1)
    /writeini 70pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 70+ world!    
    /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $2 ]2 for levels 5[ 70+ ]2.      
    if ($readini(70pcwsuggested.ini, $2, suggested) >= 5) {
      /remove 70pcwnicksuggested.ini     
      /remove 70pcwsuggested.ini 
      set %70 $2
      set %70nick Suggestions
      set %70time $ctime
    msg $chan 2The 70+ Pest Control World has been 5[ UPDATED ]2 to 5[ %70 ]2 by 5[ %70nick ]2 $+ }
  }
  if (%pcwscript == off) {
    if ($2 !isnum 2-144) { notice $nick That is not a legitimate world. | halt }
    if (%70 == $2) { notice $nick That is already the 70+ world! | halt }
    if ($readini(70pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 70+ world! | halt }
    /writeini 70pcwsuggested.ini $2 suggested $calc($readini(70pcwsuggested.ini, $2, suggested) +1)
    /writeini 70pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 70+ world!    
    /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $2 ]2 for levels 5[ 70+ ]2.      
    if ($readini(70pcwsuggested.ini, $2, suggested) >= 5) {
      /remove 70pcwnicksuggested.ini     
      /remove 70pcwsuggested.ini 
      set %70 $2
      set %70nick Suggestions
      set %70time $ctime
    }
  }
}

on *:text:!suggest100+ *:#pc:{
  if (%pcwscript == on) {
    if ($2 !isnum 2-144) { notice $nick That is not a legitimate world. | halt }
    if (%100 == $2) { notice $nick That is already the 100 world! | halt }
    if ($readini(100pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 100+ world! | halt }
    /writeini 100pcwsuggested.ini $2 suggested $calc($readini(100pcwsuggested.ini, $2, suggested) +1)
    /writeini 100pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 100+ world!    
    /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $2 ]2 for levels 5[ 100+ ]2.      
    if ($readini(100pcwsuggested.ini, $2, suggested) >= 5) {
      /remove 100pcwnicksuggested.ini     
      /remove 100pcwsuggested.ini 
      set %100 $2
      set %100nick Suggestions
      set %100time $ctime
    msg $chan 2The 100+ Pest Control World has been 5[ UPDATED ]2 to 5[ %100 ]2 by 5[ %100nick ]2 $+ }
  }
  if (%pcwscript == off) {
    if ($2 !isnum 2-144) { notice $nick That is not a legitimate world. | halt }
    if (%100 == $2) { notice $nick That is already the 100 world! | halt }
    if ($readini(100pcwnicksuggested.ini, suggestppl, $address($nick,2))) { notice $nick You have already suggested a 100+ world! | halt }
    /writeini 100pcwsuggested.ini $2 suggested $calc($readini(100pcwsuggested.ini, $2, suggested) +1)
    /writeini 100pcwnicksuggested.ini SuggestPpl $address($nick,2) 1 | notice $nick Thank you for suggesting a 100+ world!    
    /msg #pcstaff 5[ $nick ]2 has suggested world 5[ $2 ]2 for levels 5[ 100+ ]2.      
    if ($readini(100pcwsuggested.ini, $2, suggested) >= 5) {
      /remove 100pcwnicksuggested.ini     
      /remove 100pcwsuggested.ini 
      set %100 $2
      set %100nick Suggestions
      set %100time $ctime
    }
  }
}

on *:text:!change *:#pc: {
  if (%pcwscript == on) && ($nick !isreg $chan) && ($3 isnum 2-144) {
    if ($2 == 40+) {
      set %40 $3
      set %40nick $nick
      msg $chan 2The 40+ Pest Control World has been 5[ UPDATED ]2 to 5[ %40 ]2 by 5[ $nick ]2
      set %40time $ctime
      remove 40pcwsuggested.ini
      remove 40pcwnicksuggested.ini
    }    
    if ($2 == 70+) {
      set %70 $3
      set %70nick $nick
      msg $chan 2The 70+ Pest Control World has been 5[ UPDATED ]2 to 5[ %70 ]2 by 5[ $nick ]2
      set %70time $ctime
      remove 70pcwsuggested.ini
      remove 70pcwnicksuggested.ini
    }
    if ($2 == 100+) {
      set %100 $3
      set %100nick $nick
      msg $chan 2The 100+ Pest Control World has been 5[ UPDATED ]2 to 5[ %100 ]2 by 5[ $nick ]2
      set %100time $ctime
      remove 100pcwsuggested.ini
      remove 100pcwnicksuggested.in
    }
  }
  if (%pcwscript == off) && ($nick !isreg $chan) && ($3 isnum 2-144) {
    if ($2 == 40+) {
      set %40 $3
      set %40nick $nick
      set %40time $ctime
      remove 40pcwsuggested.ini
      remove 40pcwnicksuggested.ini
    }
    if ($2 == 70+) {
      set %70 $3
      set %70nick $nick
      set %70time $ctime
      remove 70pcwsuggested.ini
      remove 70pcwnicksuggested.ini
    }
    if ($2 == 100+) {
      set %100 $3
      set %100nick $nick
      set %100time $ctime
      remove 100pcwsuggested.ini
      remove 100pcwnicksuggested.ini
    }
  }
}

on *:text:!change40+ *:#pc: {
  if (%pcwscript == on) && ($nick !isreg $chan) && ($2 isnum 2-144) {
    set %40 $2
    set %40nick $nick
    msg $chan 2The 40+ Pest Control World has been 5[ UPDATED ]2 to 5[ %40 ]2 by 5[ $nick ]2
    set %40time $ctime
    remove 40pcwsuggested.ini
    remove 40pcwnicksuggested.ini
  }
  if (%pcwscript == off) && ($nick !isreg $chan) && ($2 isnum 2-144) {
    set %40 $2
    set %40nick $nick
    set %40time $ctime
    remove 40pcwsuggested.ini
    remove 40pcwnicksuggested.ini
  }
}

on *:text:!change70+ *:#pc: {
  if (%pcwscript == on) && ($nick !isreg $chan) && ($2 isnum 2-144) {
    set %70 $2
    set %70nick $nick
    msg $chan 2The 70+ Pest Control World has been 5[ UPDATED ]2 to 5[ %70 ]2 by 5[ $nick ]2
    set %70time $ctime
    remove 70pcwsuggested.ini
    remove 70pcwnicksuggested.ini
  }
  if (%pcwscript == off) && ($nick !isreg $chan) && ($2 isnum 2-144) {
    set %70 $2
    set %70nick $nick
    set %70time $ctime
    remove 70pcwsuggested.ini
    remove 70p2cwnicksuggested.ini
  }
}

on *:text:!change100+ *:#pc: {
  if (%pcwscript == on) && ($nick !isreg $chan) && ($2 isnum 2-144) {
    set %100 $2
    set %100nick $nick
    msg $chan 2The 100+ Pest Control World has been 5[ UPDATED ]2 to 5[ %100 ]2 by 5[ $nick ]2
    set %100time $ctime
    remove 100pcwsuggested.ini
    remove 100pcwnicksuggested.ini
  }
  if (%pcwscript == off) && ($nick !isreg $chan) && ($2 isnum 2-144) {
    set %100 $2
    set %100nick $nick
    set %100time $ctime
    remove 100pcwsuggested.ini
    remove 100pcwnicksuggested.ini
  }
}

on *:TEXT:!pcw:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /notice $nick 2Official world is 5[ 88 ]2. 40+ world is 5[ %40 ]2. 70+ world is 5[ %70 ]2. 100+ world is 5[ %100 ].
  }
}

on *:TEXT:!world:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /notice $nick 2Official world is 5[ 88 ]2. 40+ world is 5[ %40 ]2. 70+ world is 5[ %70 ]2. 100+ world is 5[ %100 ].
  }
}

on *:TEXT:!pcw40+:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /notice $nick 2The current 40+ Pest Control World is 5[ %40 ]2 set 5[ $duration($calc($ctime - $($+(%,40time),2))) ]2 ago by 5[ %40nick ].2 Command used 5[ %pcwcount ]2 times.
  }
}

on *:TEXT:!pcw70+:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /notice $nick 2The current 70+ Pest Control World is 5[ %70 ]2 set 5[ $duration($calc($ctime - $($+(%,70time),2))) ]2 ago by 5[ %70nick ].2 Command used 5[ %pcwcount ]2 times.
  }
}

on *:TEXT:!pcw100+:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /notice $nick 2The current 100+ Pest Control World is 5[ %100 ]2 set 5[ $duration($calc($ctime - $($+(%,100time),2))) ]2 ago by 5[ %100nick ].2 Command used 5[ %pcwcount ]2 times.
  }
}

on *:TEXT:@pcw:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /msg $chan 2Official world is 5[ 88 ]2. 40+ world is 5[ %40 ]2. 70+ world is 5[ %70 ]2. 100+ world is 5[ %100 ].
  }
}

on *:TEXT:@world:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /msg $chan 2Official world is 5[ 88 ]2. 40+ world is 5[ %40 ]2. 70+ world is 5[ %70 ]2. 100+ world is 5[ %100 ].
  }
}

on *:TEXT:@pcw40+:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /msg $chan 2The current 40+ Pest Control World is 5[ %40 ]2 set 5[ $duration($calc($ctime - $($+(%,40time),2))) ]2 ago by 5[ %40nick ].2 Command used 5[ %pcwcount ]2 times.
  }
}

on *:TEXT:@pcw70+:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /msg $chan 2The current 70+ Pest Control World is 5[ %70 ]2 set 5[ $duration($calc($ctime - $($+(%,70time),2))) ]2 ago by 5[ %70nick ].2 Command used 5[ %pcwcount ]2 times.
  }
}

on *:TEXT:@pcw100+:#pc: { 
  if (%pcwscript == off) { halt } {
    inc %pcwcount 1
    /msg $chan 2The current 100+ Pest Control World is 5[ %100 ]2 set 5[ $duration($calc($ctime - $($+(%,100time),2))) ]2 ago by 5[ %100nick ].2 Command used 5[ %pcwcount ]2 times.
  }
}

on *:text:!pcwrepeaton *:#pc: {
  if (%pcwscript == off) { halt }
  if ($nick !isreg $chan) {
    /msg $chan 2The World Repeat is now 5[ ON ].2 The world will repeat every 5[ $2 ]2 seconds.
  }
}

on *:text:!pcwrepeatoff:#pc: {
  if (%pcwscript == off) { halt }
  if ($nick !isreg $chan) {
    /msg $chan 2The World Repeat is now 5[ OFF ]2
  }
}

on *:text:!pcwcommands:#: {

  if ($nick !isreg $chan) {

    msg $nick To turn the Pest Control World script and World Repeat on at the same time = !pcwon number of seconds to delay between repeats

    msg $nick To turn only the Pest Control World script on= !pcwon

    msg $nick To turn only the World Repeat on = !pcwrepeaton number of seconds to delay between repeats

    msg $nick To see all the current Pest Control Worlds = !pcw

    msg $nick To see individual Pest Control Worlds = !pcw40+/70+/100+

    msg $nick To suggest a Pest Control World (5 suggests required to change the world) = !suggest40+/70+/100+ world

    msg $nick To turn the World Repeat off = !pcwrepeatoff

    msg $nick To turn the Pest Control World script off = !pcwoff
  }
}