Guest User

Untitled

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