SHARE
TWEET

Untitled

a guest Jun 19th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dialog queries {
  2.   title "Waiting Queries"
  3.   size -1 -1 111 128
  4.   option dbu
  5.   list 1, 2 13 106 82, size
  6.   button "Accept", 2, 2 95 52 12
  7.   button "Decline", 3, 56 95 52 12
  8.   edit "", 4, 2 116 107 10, read
  9.   text "Their message", 5, 2 108 39 8
  10.   text "Waiting Queries", 6, 2 2 65 8
  11. }
  12. on *:dialog:queries:init:0:{
  13.   did -r queries 1
  14.   var %a 1
  15.   while (%a <= $lines(queryaccept.txt)) {
  16.     did -a queries 1 $gettok($read(Queryaccept.txt,%a),1,32)
  17.     inc %a
  18.   }
  19. }
  20. on *:open:?: {
  21.   write queryaccept.txt $nick $1-
  22.   window -h $nick
  23.   msg $nick %Risen  15_/°9Lucian's Personal Query Script15°\_ 15_/°9Please Wait For Me To Accept/Deny Your Query15°\_
  24.  
  25.  
  26.   $iif($dialog(queries) == $null, dialog -dm queries queries, $null)
  27.   did -r queries 1
  28.   var %a 1
  29.   while (%a <= $lines(queryaccept.txt)) {
  30.     did -a queries 1 $gettok($read(Queryaccept.txt,%a),1,32)
  31.     inc %a
  32.   }
  33. }
  34. on *:dialog:queries:sclick:1:{
  35.   did -ra queries 4 $gettok($read(queryaccept.txt,$did(1).sel),2-,32)
  36. }
  37. on *:dialog:queries:sclick:2:{
  38.   msg $did(1).seltext %Risen  15_/°9Lucian's Personal Query Script15°\_ 15_/°9I Have Accepted Your Query15°\_
  39.   window -w $did(1).seltext
  40.   write -dl $+ $did(1).sel queryaccept.txt
  41.   did -r queries 1
  42.   var %a 1
  43.   while (%a <= $lines(queryaccept.txt)) {
  44.     did -a queries 1 $gettok($read(Queryaccept.txt,%a),1,32)
  45.     inc %a
  46.   }
  47. }
  48. on *:dialog:queries:sclick:3:{
  49.   .msg $did(1).seltext %Risen 15_/°9Lucian's Personal Query Script15°\_ 15_/°9I Have Declined Your Query15°\_
  50.   window -c $did(1).seltext
  51.   write -dl $+ $did(1).sel queryaccept.txt
  52.   did -r queries 1
  53.   var %a 1
  54.   while (%a <= $lines(queryaccept.txt)) {
  55.     did -a queries 1 $gettok($read(Queryaccept.txt,%a),1,32)
  56.     inc %a
  57.   }
  58. }
RAW Paste Data
Top