Famous Deaths mIRC Script v1

By OrFeAsGr on Dec 29, 2016

This mIRC script will check www.dpsinfo.com for the latest famous people that died.
To enable/disable the checking simply execute /dpscheck
There's more to it though!
Users can also use a text command to see the 5 latest deaths or the people that have died in the past 60 years this time of year.
For latest deaths type: !dps
And for people that have died in the past 60 years this time of year type: !dps remember
One last thing to know is you have to insert the channels you want the script to work in, in the alias adpschans, seperate multiple channels with a comma. (Do not erase "return")
v1 Small fixes @ 03/01/2017
-Fixed a bug which stopped the announcing
-Fixed a typo (of the site) which prints Actorr instead of Actor

ON *:SOCKOPEN:dpsinfo*: {
  sockwrite -nt $sockname GET $iif($istok(dpsinfolatest dpsinfoall,$sockname,32), /dps/deadpeopleserver.rss.xml, /dps/dpsweekindeath.rss.xml) HTTP/1.1 
  sockwrite -nt $sockname Host: www.dpsinfo.com
  sockwrite $sockname $crlf
}

ON *:SOCKREAD:dpsinfo*: {
  var %dps | sockread %dps | tokenize 32 %dps
  if (*title*/title* iswm %dps) { 
    if (!%dpstitle) { 
      inc -u10 %dpstitle 1 
    }
    elseif (%dpstitle) {
      set -u10 %dpsname $remove($remove(%dps,<title>,</title>),$gettok(%dps,$numtok(%dps,32),32))
      if ($sockname == dpsinfolatest) {
        if (!%adpslastname) || (%adpslastname != %dpsname) { set %adpslastname %dpsname }
        elseif (%adpslastname == %dpsname) { sockclose $sockname | unset %dps* }
      }
    }
  }
  if (%dpsname) { 
    if (*description*/description* iswm %dps) { 
      set -u10 %dpsdesc $iif($gettok($gettok(%dps,2,62),1,60) == Actorr, Actor, $v1)
    }
    if (*link*/link* iswm %dps) {
      set -u10 %dpslink www.dpsinfo.com/ $+ $gettok($gettok($gettok(%dps,2,62),1,60),3-,47)
      if ($sockname == dpsinfo60thisweek) { 
        msg %cdpschan %dpsdesc %dpsname > %dpslink R.I.P
      }
    }
    if (*pubDate*/pubdate* iswm %dps) {
      if ($istok(dpsinfoall dpsinfolatest,$sockname,32)) {
        msg $iif($sockname == dpsinfoall, %cdpschan, $adpschans) $iif($sockname == dpsinfolatest, ***DPS Script***, $null) %dpsdesc %dpsname left us on $remove(%dps,<pubDate>,</pubDate>) > %dpslink R.I.P
      }
      if ($sockname == dpsinfolatest) { 
        sockclose $sockname | unset %dps* 
      }
    }
  }
  if (</channel> == %dps) { sockclose $sockname | unset %dps* }
}

ON *:TEXT:*:#: {
  if ($1 == !dps) && ($istok($adpschans,$chan,44)) {
    if (!%adpscool) {
      set -u120 %adpscool 1
      set -u60 %cdpschan $chan
      if (!$strip($2)) {
        if (!$sock(dpsinfolatest)) && (!$sock(dpsinfoall)) {
          sockopen dpsinfoall www.dpsinfo.com 80
        }
        else {
          if ($sock(dpsinfolatest)) || ($sock(dpsinfoall)) {
            .timer 1 1 msg $chan Please wait a sec... Latest deaths Checking In Progress... Retrying In 10 Seconds
            .timer 1 10 sockopen dpsinfoall www.dpsinfo.com 80
          }
        }
      }
      elseif ($strip($2) == remember) {
        if (!$sock(dpsinfolatest)) && (!$sock(dpsinfoall)) && (!$sock(dpsinfo60thisweek)) {
          sockopen dpsinfo60thisweek www.dpsinfo.com 80
          msg $chan People that died the last 60 years this time of year...
        }
        else {
          if ($sock(dpsinfolatest)) || ($sock(dpsinfoall)) || ($sock(dpsinfo60thisweek)) {
            .timer 1 1 notice $nick Please wait a sec... Latest deaths Checking In Progress... Retrying In 10 Seconds
            .timer 1 10 sockopen dpsinfo60thisweek www.dpsinfo.com 80
            .timer 1 11 msg $chan People that died the last 60 years this time of year...
          }
        }
      }
    }
  }
}

alias dpscheck {
  if (!%dpscheck) { set %dpscheck 1 | echo -at DPS Script Will Now Check For famous peoples' deaths. Type !dps to see all latest deseased celebrities/ famous people | .timerdpscheck 0 550 sockopen dpsinfolatest www.dpsinfo.com 80 }
  elseif (%dpscheck) { .timerdpscheck off | unset %dpscheck | echo -at DPS Script Will Now Stop Checking For famous peoples' deaths. Do /dpscheck to turn it back on or type !dps to see all latest deaths. }
}

alias adpschans {
  return INSERT YOUR CHANNELS HERE SEPERATED WITH COMMA ( example: #chan1,#chan2,#chan3 )
}

Do you want to earn me some cents without paying for anything? Visit http://humanity.ucoz.com after turning your adblock off, watch a short ad by shorte.st and turn it back on.
Or do you want to donate some bucks because you like my scripts??? Visit https://www.paypal.me/OrFeAsGr
Thx! ^_^

Comments

Sign in to comment.
dma   -  Feb 13, 2017

i have this loaded and did what you said to the channels and did /dpscheck and its on did !dps and its not working HALP!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.