Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dialog roulette {
- title "Boss Monster Roulette"
- size -1 -1 220 240
- option dbu
- edit "", 1, 10 10 80 12
- button "Roll", 2, 10 30 35 12
- button "Clear", 3, 55 30 35 12
- Box "Information", 4, 10 50 80 80
- text "Time: --", 5, 15 70 70 10
- text "Monster: --", 6, 15 90 70 12
- Box "Rules", 8, 100 7 115 123
- text "(1) All drops MUST have picture proof.", 9, 105 20 110 10
- text "(2) All drops MUST show on your Alog. ", 10, 105 35 110 10
- text "(3) Images must be submitted BEFORE the", 11, 105 50 115 10
- text "deadline.", 12, 113 57 115 10
- text "(4) You must Solo or Duo.", 13, 105 72 110 10
- text "(5) No Lootshare or Coinshare.", 14, 105 87 110 10
- text "(6) You must receive the drop if Duoing.", 15, 105 103 110 10
- Box "Enter Drop Below", 16, 60 134 80 25
- edit "", 17, 62 142 75 13
- Box "ALOG Confirmation", 18, 60 160 80 25
- edit "", 19, 62 168 75 13
- Box "Enter Image Link Below", 20, 60 191 120 25
- edit "", 21, 62 199 114 13
- button "Submit", 22, 70 220 35 12
- button "Clear Fields", 23, 120 220 35 12
- }
- on *:DIALOG:roulette:*:*:{
- if ($devent = init) {
- did -b $dname 1,19
- if ($readini(Roulette.ini,Stats,Monster)) {
- did -b $dname 2
- did -o $dname 6 1 Monster: $v1
- .timer 0 1 did -o $dname 5 1 Time: $!duration( $!calc( $!ctime - $readini(Roulette.ini,Stats,Time) ) )
- }
- }
- if ($devent = close) { timers off }
- if ($devent = sclick) {
- if ($did == 2) {
- var %a $randtok(Tormented Demons.Armadyl.Bandos.Zamorak.Saradomin.Dagannoth Kings.Kalphite Queen.Goldeneyes Grandmother,46)
- writeini -n Roulette.ini Stats Monster %a
- writeini -n roulette.ini Stats Time $ctime
- did -o $dname 1 1 %a
- did -o $dname 6 1 Monster: %a
- .timer 0 1 did -o $dname 5 1 Time: $!duration( $!calc( $!ctime - $readini(Roulette.ini,Stats,Time) ) )
- did -b $dname 2
- }
- if ($did == 3) {
- did -e $dname 2
- did -r $dname 1
- did -o $dname 6 1 Monster: --
- did -o $dname 5 1 Time: --
- remini Roulette.ini Stats
- timers off
- }
- if ($did == 22) {
- if ($sock(acheck)) sockclose acheck
- sockopen acheck services.runescape.com 80
- }
- }
- }
- on *:SOCKOPEN:acheck:{
- sockwrite -nt $sockname GET /m=adventurers-log/rssfeed?searchName=iForeplayy HTTP/1.1
- sockwrite -nt $sockname Host: services.runescape.com
- sockwrite -nt $sockname $crlf
- }
- on *:SOCKREAD:acheck:{
- sockread %ee
- if ($regex(%ee,<title>Item found:(.*)</title>)) {
- if ($did(roulette,17) isin $regml(1)) {
- hadd -m $sockname date $true
- echo -a $regml(1)
- }
- }
- if ($hget($sockname,date) = $true && $regex(%ee,<pubDate>(.*)</pubDate>)) {
- hadd -m $sockname date $false
- echo -a $regml(1)
- sockclose $sockname
- }
- }
- alias bmr { dialog $+(-,$iif($dialog(roulette),x,m roulette)) roulette }
- alias randtok { return $gettok($1,$rand(1,$numtok($1,$2)),$2) }
Add Comment
Please, Sign In to add comment