Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!hit*:#:{
- if ($2) && (%hit.time == on) {
- set %file pliki\test.txt
- set %hit.channel #
- hit $replacecs($2-,$chr(32),$chr(37) $+ 20)
- unset %hit.time
- }
- else {
- msg # Wait
- }
- }
- alias hit {
- set %hit.if on
- set %hit.nick $1
- sockopen hit api.erepublik.com 80
- write -c %file
- msg %hit.channel Przetwarzanie danych o $replacecs(%hit.nick,$chr(32),$chr(37) $+ 20) $+ ...
- }
- on *:sockopen:hit:{
- sockwrite -n $sockname GET /v2/feeds/citizen_by_name/xml/ $+ %hit.nick HTTP/1.1
- sockwrite -n $sockname Host: api.erepublik.com $+ $str($crlf,2)
- }
- on *:SOCKREAD:hit:{
- if (%hit.if == on) { set %hit.if off | timer 1 2 hit2 }
- sockread %hit.txt
- write %file %hit.txt
- }
- alias hit2 {
- 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 }
- 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)))
- msg %hit.channel Q0: %q0
- sockclose hit
- set %hit.time on
- }
Advertisement
Add Comment
Please, Sign In to add comment