Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 15th, 2012  |  syntax: None  |  size: 2.16 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. on *:text:`Info *:%chan,?:{
  2.   chklog $nick
  3.   if ($target == %chan) { var %send = bnotice }
  4.   if ($target == $me) { var %send = bmsg }
  5.  
  6.   if ($2 !isnum) { tokenize 32 $orep($2-) }
  7.   else {
  8.     if ($data($nick,Data,Command;Menu) == Chocolina) {
  9.  
  10.       var %tier = $data($nick,Data,Tier)
  11.       var %shops = Items Weapons Accessories Monster;Materials
  12.       var %z = 0
  13.       var %totitem = 0
  14.       ;This loop goes through each type of shop
  15.       while (%z != $numtok(%shops,32)) {
  16.         inc %z
  17.         var %shop = $gettok(%shops,%z,32)
  18.         var %complement = $gettok(%complements,%z,32)
  19.         var %columns = $gettok(%scolumns,%z,32)
  20.         var %x = 0
  21.         var %q = 0
  22.         var %totaltiers = $gdata(Chocolina,%shop,0)
  23.         ;This loop goes through each section in a category
  24.         while (%x != %totaltiers) {
  25.           inc %x
  26.           var %shoptier = $gdata(Chocolina,%shop,%x)
  27.           if (%shoptier > %tier) { break }
  28.           var %items = $data(Chocolina,%shop,%shoptier)
  29.           var %w = 0
  30.           ;This loop goes through each token in each section
  31.           while (%w != $numtok(%items,32)) {
  32.             inc %w
  33.             inc %totitem
  34.             if (%totitem == $2) { tokenize 32 $gettok(%items,%w,32) | break }
  35.           }
  36.         }
  37.       }
  38.     }
  39.     elseif ($data($nick,Data,Command;Menu) == Inventory) {
  40.       var %item;types = Items Weapons Accessories Monster;Materials Monster;Components
  41.       var %x = 0
  42.       var %totitems = 0
  43.       while (%x != $numtok(%item;types,32)) {
  44.         inc %x
  45.         var %cat = $gettok(%item;types,%x,32)
  46.         var %color = $gettok(%colors,%x,32)
  47.         var %w = 0
  48.         while (%w != $gdata($nick,%cat,0)) && ($v2) {
  49.           inc %w
  50.           inc %totitems
  51.           var %item = $gdata($nick,%cat,%w)
  52.           if (%totitems == $2) { tokenize 32 %item | break }
  53.         }
  54.       }
  55.     }
  56.   }
  57.   if (!$exist($1)) { %send $nick Unknown parameter. | halt }
  58.   %send $nick ———— $+ $bu(INFORMATION FOR $upper($1),9) $+ ————
  59.   var %info = $leinfo($nick,$1)
  60.   var %req = $areq($nick,$1)
  61.   %send $nick %info
  62.   if (%req) { %send $nick $u(Required Items,11) $+ : $p(%req) }
  63. }