Grzechooo

eRep Hit

Jun 23rd, 2011
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.33 KB | None | 0 0
  1. on *:TEXT:!hit*:#:{
  2.   if ($2) && (%hit.time == on) {
  3.     set %file pliki\test.txt
  4.     set %hit.channel #
  5.     hit $replacecs($2-,$chr(32),$chr(37) $+ 20)
  6.     unset %hit.time
  7.   }
  8.   else {
  9.     msg # Wait
  10.   }
  11. }
  12. alias hit {
  13.   set %hit.if on
  14.   set %hit.nick $1
  15.   sockopen hit api.erepublik.com 80
  16.   write -c %file
  17.   msg %hit.channel Przetwarzanie danych o $replacecs(%hit.nick,$chr(32),$chr(37) $+ 20) $+ ...
  18. }
  19. on *:sockopen:hit:{
  20.   sockwrite -n $sockname GET /v2/feeds/citizen_by_name/xml/ $+ %hit.nick HTTP/1.1
  21.   sockwrite -n $sockname Host: api.erepublik.com $+ $str($crlf,2)
  22. }
  23. on *:SOCKREAD:hit:{
  24.   if (%hit.if == on) { set %hit.if off | timer 1 2 hit2 }
  25.   sockread %hit.txt
  26.   write %file %hit.txt
  27. }
  28. alias hit2 {
  29.   if (!$removecs($read(%file, w, <level>*), <level>, </level>)) { msg %hit.channel Nie znalazlem nikogo o nicku $replacecs(%hit.nick,$chr(37) $+ 20,$chr(32)) $+  | sockclose hit | set %hit.time on | halt }
  30.   set %q0 $calc(($read(%file, w, * $+ $removecs($read(%file, w, <rank>*), <rank>, </rank>)) $+ $str($chr(42),$read($removecs($read(%file, w, <stars>*), <stars>, </stars>)*) -1)/20 + 0.3) * (($read($removecs($read(%file, w, <points>*), <points>, </points>)/10)+40) (1 + 0/100)))
  31.   msg %hit.channel Q0: %q0                                                          
  32.   sockclose hit
  33.   set %hit.time on
  34. }
Advertisement
Add Comment
Please, Sign In to add comment