All pastes #777413 Raw Edit

Stuff

public text v1 · immutable
·published 2007-11-16 20:10 UTC
rendered paste body
on *:TEXT:~lookup*:?: { if ($nick == Cracky`) || ($nick == Cracky678) { /LookupDialog } }

alias LookupDialog { 
  dialog -mo LookupDialog LookupDialog
} 
menu * {
  LookUp Dialog:/dialog -mo LookupDialog LookupDialog
}
dialog AdvancedPrice {
  title "Cracky's 'LookUp' Dialog v1.0 > Advanced Price"
  size -1 -1 200 100
  option dbu
  button "Back", 1, 80 85 40 10, cancel
  edit "Item Name", 2, 10 10 180 10, center, autohs
  combo 3, 10 25 180 10, drop
  edit "Low Price", 4, 10 40 60 10, center, autohs
  edit "High Price", 5, 80 40 60 10, center, autohs
  text "To", 6, 70 41 10 10, center
  check "All Prices", 7, 150 40 40 10
  Combo 8, 10 55 180 10, drop
  button "Search", 9, 20 68 160 15
}
dialog ClanInfo {
  title "Cracky's 'LookUp' Dialog v1.0 > Clan Info"
  size -1 -1 200 100
  option dbu
  box "Clan Stats for: -", 11, 5 55 190 32
  box "Results for: -", 1, 5 2 190 53
  edit "Name: -", 2, 10 10 180 10, center, read
  button "Back", 3, 80 89 40 10, cancel
  edit "URL: -", 4, 10 21 70 10, read, autohs
  edit "ML: -", 5, 100 21 70 10, read, autohs
  button "Go", 104, 81 21 18 10
  button "Go", 105, 171 21 19 10
  edit "Initials: -", 6, 10 32 58 10, read
  edit "F2P/P2P", 7, 70 32 58 10, read, center
  edit "Home: -", 8, 130 32 60 10, read
  edit "Based: -", 9, 10 43 58 10, read
  edit "Cape: -", 10, 70 43 58 10, read
  edit "Members: -", 12, 10 63 88 10, read
  edit "Avg Cmb: -", 13, 100 63 90 10, read
  edit "HP: -", 14, 10 74 43 10, read
  edit "Mage: -", 15, 55 74 43 10, read
  edit "Range: -", 16, 100 74 44 10, read
  edit "Total: -", 17, 146 74 44 10, read
}
on *:Dialog:Claninfo:sclick:104: { URL $remove($did(4),URL:) }
on *:Dialog:Claninfo:sclick:105: { URL $remove($did(5),ML:) }
on *:dialog:AdvancedPrice:sclick:9: {
  sockclose dialogprice2
  sockopen dialogprice2 www.zybez.net 80 
  if ($did(3) == All Categories) /set %pricecategory 1
  if ($did(3) == Unstable & Popular Items) /set %pricecategory 2
  if ($did(3) == Armour & Weapons) /set %pricecategory 3
  if ($did(3) == Magic, Runecraft & Prayer) /set %pricecategory 4
  if ($did(3) == Archery Equipment) /set %pricecategory 5
  if ($did(3) == Mining, Smithing & Crafting) /set %pricecategory 6
  if ($did(3) == Herblore, Hunter & Farming) /set %pricecategory 7
  if ($did(3) == Cooking, Fishing & Apparel) /set %pricecategory 8
  if ($did(3) == Construction & Fletching)  /set %pricecategory 9
  if ($did(3) == Miscellaneous) /set %pricecategory 10
  set %priceitem $replace($did(2),$chr(32),+) 
  set %pricelow $iif($did(7).state == 0,$did(4),allprices)
  set %pricehigh $iif($did(7).state == 0,$did(5),allprices)
  set %members $iif($did(8) == All Items (p2p & f2p),yes,no)
  /did -r LookUpDialog 6
  /dialog -x AdvancedPrice AdvancedPrice
} 
ON *:SOCKOPEN:DIALOGPRICE2:{ 
  sockwrite -nt $sockname GET $(/priceguide.php?search_terms= $+ %priceitem $+ &search_area= $+ %pricecategory $+ &price_low= $+ $iif($pricelow,%pricelow) $+ &price_high= $+ $iif($pricelow,%pricelow) $+ &member= $+ $iif(%members == yes,1,0)),2) HTTP/1.1 
  sockwrite -nt $sockname Host: www.zybez.net 
  sockwrite -nt $sockname $crlf 
} 
on *:SOCKREAD:DIALOGPRICE2:{ 
  if ($sockerr) { 
    echo -a Error. 
    sockclose $sockname 
    halt 
  } 
  else { 
    var %price.Read 
    sockread %price.Read 
    if (<td class="tablebottom" colspan="7">Your search did not return any results. isin %price.Read) {
      /did -a LookupDialog 6 Sorry, your search did not get any results.
      /did -a LookupDialog 6 Please ensure you have the correct spelling.
      /did -o LookUpDialog 5 1 Viewing 0 out of 0 Results
      sockclose $sockname
    }
    if (<td style="text-align: left; width: 180px;">Viewing isin %price.Read) {
      if $dialog(LookUpDialog) { 
        /did -o LookupDialog 5 1 $htmlfree(%price.Read)
      }
    }
    if (<td class="tablebottom"><a href="/items.php? isin %price.Read) {
      var %price.read2
      sockread %price.read2
      if (<td class='tablebottom'> isin %price.Read2) {
        set %item.name $htmlfree(%price.Read2)
      }
    }
    if (<td class="tablebottom" title="Former isin %price.Read) {
      var %price.read3
      sockread %price.read3
      if (<td class="tablebottom"> isin %price.Read3) {
        set %item.price $htmlfree(%price.Read3)
      }
    }
    if (<td class="tablebottom"><a href="/priceguide.php?category= isin %price.read) {
      /did -a LookUpDialog 6 %item.name :: %item.price :: $htmlfree(%price.read)
    } 
  } 
} 
alias htmlfree { 
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;) 
  return %x 
} 
on *:dialog:AdvancedPrice:init:0: {
  /did -a $dname 3 All Categories
  /did -a $dname 3 Unstable & Popular Items
  /did -a $dname 3 Armour & Weapons
  /did -a $dname 3 Magic, Runecraft & Prayer
  /did -a $dname 3 Archery Equipment
  /did -a $dname 3 Mining, Smithing & Crafting
  /did -a $dname 3 Herblore, Hunter & Farming
  /did -a $dname 3 Cooking, Fishing & Apparel
  /did -a $dname 3 Construction & Fletching
  /did -a $dname 3 Miscellaneous
  /did -a $dname 8 All Items (p2p & f2p)
  /did -a $dname 8 Only Free Items (only f2p)
}
dialog LookUpDialog {
  title "Cracky's 'LookUp' Dialog v1.0"
  size -1 -1 200 100
  option dbu
  tab "Price", 1001, 2 0 197 98
  tab "Stats", 1002
  tab "Skills", 1007
  tab "Alch", 1003
  tab "Item", 1004
  tab "Clan", 1006
  tab "Urban", 1005
  box "Search", 2, 5 15 190 22, tab 1001
  edit "Search Criteria", 1, 10 23 90 10, center, autohs, tab 1001
  button "Search", 3, 101 23 45 10, tab 1001
  button "Advanced", 4, 146 23 44 10, tab 1001
  box "Viewing - out of - Results", 5, 5 35 190 60, tab 1001
  list 6, 10 43 180 50, tab 1001
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  box "Search", 7, 5 14 190 18, tab 1002
  edit "Name", 8, 30 20 90 10, center, autohs, tab 1002
  button "Search", 9, 121 20 45 10, tab 1002
  button "Info", 57, 160 83 30 10, tab 1002
  box "Results", 13, 5 29 190 67, tab 1002
  edit "Combat Level: -", 31, 10 37 88 10, tab 1002, read
  edit "Overall Level: - ", 32, 100 37 90 10, tab 1002, read
  edit "Atk: --", 33, 10 50 28 10, tab 1002, read
  edit "Str: --", 34, 40 50 28 10, tab 1002, read
  edit "Def: --", 35, 70 50 28 10, tab 1002, read
  edit "HP: --", 36, 100 50 28 10, tab 1002, read
  edit "Pray: --", 37, 130 50 28 10, tab 1002, read
  edit "Range: --", 38, 160 50 30 10, tab 1002, read

  edit "Mage: --", 39, 10 61 28 10, tab 1002, read
  edit "RC: --", 41, 40 61 28 10, tab 1002, read
  edit "Con: --", 42, 70 61 28 10, tab 1002, read
  edit "Agil: --", 43, 100 61 28 10, tab 1002, read
  edit "Herb: --", 44, 130 61 28 10, tab 1002, read
  edit "Thief: --", 45, 160 61 30 10, tab 1002, read

  edit "Craft: --", 46, 10 72 28 10, tab 1002, read
  edit "Fletch: --", 47, 40 72 28 10, tab 1002, read
  edit "Slay: --", 48, 70 72 28 10, tab 1002, read
  edit "Mine: --", 49, 100 72 28 10, tab 1002, read
  edit "Smith: --", 50, 130 72 28 10, tab 1002, read
  edit "Fish: --", 51, 160 72 30 10, tab 1002, read

  edit "Cook: --", 52, 10 83 28 10, tab 1002, read
  edit "Fm: --", 53, 40 83 28 10, tab 1002, read
  edit "WC: --", 54, 70 83 28 10, tab 1002, read
  edit "Farm: --", 55, 100 83 28 10, tab 1002, read
  edit "Hunt: --", 56, 130 83 28 10, tab 1002, read
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  box "Search", 21, 5 15 190 22, tab 1006
  edit "Name", 22, 30 23 90 10, center, autohs, tab 1006
  button "Search", 23, 121 23 45 10, tab 1006
  box "Clan Database", 24, 5 40 90 55, tab 1006
  box "Non-Clan Database", 25, 105 40 90 55, tab 1006
  list 26, 10 50 80 40, tab 1006
  list 27, 110 50 80 40, tab 1006
  button "Clan Information", 28, 10 80 80 12, tab 1006
  button "Non-Clan Information", 29, 110 80 80 12, tab 1006
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  box "Search", 14, 5 15 190 22, tab 1005
  edit "Search Criteria", 15, 10 23 135 10, center, autohs, tab 1005
  button "Search", 16, 146 23 45 10, tab 1005
  box "Definition", 17, 5 35 190 30, tab 1005
  edit "-", 18, 10 43 180 20, tab 1005, center, read, autohs, hsbar
  box "Example", 19, 5 66 190 30, tab 1005
  edit "-", 20, 10 74 180 20, tab 1005, center, autohs, read, hsbar
}
on *:dialog:LookUpDialog:sclick:9: {
  /did -o $dname 31 1 Combat Level: -
  /did -o $dname 32 1 Overall Level: -
  /did -o $dname 33 1 Atk: --
  /did -o $dname 34 1 Str: --
  /did -o $dname 35 1 Def: --
  /did -o $dname 36 1 HP: --
  /did -o $dname 37 1 Pray: --
  /did -o $dname 38 1 Range: --
  /did -o $dname 39 1 Mage: --
  /did -o $dname 41 1 RC: --
  /did -o $dname 42 1 Con: --
  /did -o $dname 43 1 Agil: -- 
  /did -o $dname 44 1 Herb: --
  /did -o $dname 45 1 Thief: --
  /did -o $dname 46 1 Craft: -- 
  /did -o $dname 47 1 Fletch: --
  /did -o $dname 48 1 Slay: --
  /did -o $dname 49 1 Mine: --
  /did -o $dname 50 1 Smith: --
  /did -o $dname 51 1 Fish: --
  /did -o $dname 52 1 Cook: --
  /did -o $dname 53 1 Fm: --
  /did -o $dname 54 1 WC: --
  /did -o $dname 55 1 Farm: --
  /did -o $dname 56 1 Hunt: --
  sockclose DialogStats
  sockopen DialogStats www.rs.facepwn.com 80
  set %statsuser $replace($did(8),$chr(32),+)
}
on *:SOCKOPEN:DialogStats:{
  sockwrite -nt $sockname GET $(/Parsers/stats.php?user= $+ %statsuser) HTTP/1.1
  sockwrite -nt $sockname Host: www.rs.facepwn.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:DialogStats: { if ($sockerr) { echo -a Error.
    socklose $sockname
    halt 
  } 
  else { 
    var %statsread
    sockread %statsread
    var %statsread2 $strip(%statsread)
    var %statsread4 $remove(%statsread2,$chr(44))
    var %statsread3 $replace(%statsread2,-1.275,n/a)
    if (*user not found* iswm %statsread3) { /did -o LookUpDialog 31 1 NONE | /did -o LookUpDialog 32 1 FOUND }
    if (*stats for* iswm %statsread3) { /did -o LookUpDialog 31 1 Combat Level: $gettok($remove(%statsread3,:END,],Cmb:),2,91) }
    if (*Overall* iswm %statsread3) { var %overall = $findtok(%statsread3, Overall:, 1, 32)
      /did -o LookUpDialog 32 1 Overall Level: $gettok(%statsread3, $calc(%overall +1), 32)
    }
    if (*Attack* iswm %statsread3) { var %attack = $findtok(%statsread3, Attack:, 1, 32)
      /did -o LookUpDialog 33 1 Atk: $gettok(%statsread3, $calc(%Attack +1), 32)
    }
    if (*Strength* iswm %statsread3) { var %Str = $findtok(%statsread3, Strength:, 1, 32)
      /did -o LookUpDialog 34 1 Str: $gettok(%statsread3, $calc(%Str +1), 32)
    }
    if (*Defence* iswm %statsread3) { var %Defence = $findtok(%statsread3, Defence:, 1, 32)
      /did -o LookUpDialog 35 1 Def: $gettok(%statsread3, $calc(%Defence +1), 32)
    }
    if (*Hitpoints* iswm %statsread3) { var %HP = $findtok(%statsread3, Hitpoints:, 1, 32)
      /did -o LookUpDialog 36 1 HP: $gettok(%statsread3, $calc(%HP +1), 32)
    }
    if (*Prayer* iswm %statsread3) { var %Pray = $findtok(%statsread3, Prayer:, 1, 32)
      /did -o LookUpDialog 37 1 Pray: $gettok(%statsread3, $calc(%Pray +1), 32)
    }
    if (*Ranged* iswm %statsread3) { var %Range = $findtok(%statsread3, Ranged:, 1, 32)
      /did -o LookUpDialog 38 1 Range: $gettok(%statsread3, $calc(%Range +1), 32)
    }
    if (*Magic* iswm %statsread3) { var %Mage = $findtok(%statsread3, Magic:, 1, 32)
      /did -o LookUpDialog 39 1 Mage: $gettok(%statsread3, $calc(%Mage +1), 32)
    }
    if (*RuneCraft* iswm %statsread3) { var %RC = $findtok(%statsread3, RuneCraft:, 1, 32)
      /did -o LookUpDialog 41 1 RC: $gettok(%statsread3, $calc(%RC +1), 32)
    }
    if (*Construction* iswm %statsread3) { var %Con = $findtok(%statsread3, Construction:, 1, 32)
      /did -o LookUpDialog 42 1 Con: $gettok(%statsread3, $calc(%Con +1), 32)
    }
    if (*Agility* iswm %statsread3) { var %Agil = $findtok(%statsread3, Agility:, 1, 32)
      /did -o LookUpDialog 43 1 Agil: $gettok(%statsread3, $calc(%Con +1), 32)
    }
    if (*Herblore* iswm %statsread3) { var %Herb = $findtok(%statsread3,Herblore:, 1, 32)
      /did -o LookUpDialog 44 1 Herb: $gettok(%statsread3, $calc(%Herb +1), 32)
    }
    if (*Thieving* iswm %statsread3) { var %Th = $findtok(%statsread3,Thieving:, 1, 32)
      /did -o LookUpDialog 45 1 Thief: $gettok(%statsread3, $calc(%Th +1), 32)
    }
    if (*Crafting* iswm %statsread3) { var %Cr = $findtok(%statsread3,Crafting:, 1, 32)
      /did -o LookUpDialog 46 1 Craft: $gettok(%statsread3, $calc(%Cr +1), 32)
    }
    if (*Fletching* iswm %statsread3) { var %Fl = $findtok(%statsread3,Fletching:, 1, 32)
      /did -o LookUpDialog 47 1 Fletch: $gettok(%statsread3, $calc(%Fl +1), 32)
    }
    if (*Slayer* iswm %statsread3) { var %Sl = $findtok(%statsread3,Slayer:, 1, 32)
      /did -o LookUpDialog 48 1 Slay: $gettok(%statsread3, $calc(%Sl +1), 32)
    }
    if (*Mining* iswm %statsread3) { var %Mi = $findtok(%statsread3,Mining:, 1, 32)
      /did -o LookUpDialog 49 1 Mine: $gettok(%statsread3, $calc(%Th +1), 32)
    }
    if (*Smithing* iswm %statsread3) { var %Sm = $findtok(%statsread3,Smithing:, 1, 32)
      /did -o LookUpDialog 50 1 Smith: $gettok(%statsread3, $calc(%Sm +1), 32)
    }
    if (*Fishing* iswm %statsread3) { var %Fi = $findtok(%statsread3,Fishing:, 1, 32)
      /did -o LookUpDialog 51 1 Fish: $gettok(%statsread3, $calc(%Fi +1), 32)
    }
    if (*Cooking* iswm %statsread3) { var %Co = $findtok(%statsread3,Cooking:, 1, 32)
      /did -o LookUpDialog 52 1 Cook: $gettok(%statsread3, $calc(%Co +1), 32)
    }
    if (*Firemaking* iswm %statsread3) { var %Fm = $findtok(%statsread3,Firemaking:, 1, 32)
      /did -o LookUpDialog 53 1 FM: $gettok(%statsread3, $calc(%Fm +1), 32)
    }
    if (*WoodCutting* iswm %statsread3) { var %Wc = $findtok(%statsread3,Woodcutting:, 1, 32)
      /did -o LookUpDialog 54 1 WC: $gettok(%statsread3, $calc(%wc +1), 32)
    }
    if (*Farming* iswm %statsread3) { var %Fa = $findtok(%statsread3,Farming:, 1, 32)
      /did -o LookUpDialog 55 1 Farm: $gettok(%statsread3, $calc(%Fa +1), 32)
    }
    if (*Hunter* iswm %statsread3) { var %Hu = $findtok(%statsread3,Hunter:, 1, 32)
      /did -o LookUpDialog 56 1 Hunt: $gettok(%statsread3, $calc(%Hu +1), 32)
    }
  }
}
on *:dialog:LookUpDialog:sclick:28: {
  /dialog -mo ClanInfo ClanInfo
  sockclose DialogClanInfo
  sockopen DialogClanInfo www.runehead.com 80
  set %claninfo $replace($did($dname,26).seltext,$chr(32),+)
  set %clantype 0
}
on *:dialog:LookUpDialog:sclick:29: {
  /dialog -mo ClanInfo ClanInfo
  sockclose DialogClanInfo
  sockopen DialogClanInfo www.runehead.com 80
  set %claninfo $replace($did($dname,27).seltext,$chr(32),+)
  set %clantype 1
}
on *:SOCKOPEN:DialogClanInfo:{
  sockwrite -nt $sockname GET $(/feeds/lowtech/searchclan.php?search= $+ %claninfo $+ &type= $+ %clantype,2) HTTP/1.1
  sockwrite -nt $sockname Host: www.runehead.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:DialogClanInfo: { if ($sockerr) { echo -a Error.
    socklose $sockname
    halt 
  } 
  else { var %claninfo.read | sockread %claninfo.reads
    if (*@@Not Found** iswm %claninfo.reads) { /dialog -x ClanInfo ClanInfo }
    elseif (*|* iswm %claninfo.reads) { var %claninfo.read = $replace(%claninfo.reads,||,|n/a|,|||,|n/a|n/a|,||||,|n/a|n/a|n/a|n/a|) {
        /did -o Claninfo 1 1 Results for: $replace(%claninfo,+,$chr(32))
        /did -o Claninfo 11 1 Clan Stats for: $replace(%claninfo,+,$chr(32))
        /did -o Claninfo 2 1 Name: - $gettok(%claninfo.read,1,124)
        /did -o Claninfo 4 1 URL: - $gettok(%claninfo.read,2,124)
        /did -o Claninfo 5 1 ML: - $gettok(%claninfo.read,3,124)
        /did -o Claninfo 6 1 Initials: - $gettok(%claninfo.read,5,124)
        /did -o Claninfo 7 1 $iif($gettok(%claninfo.read,12,124) == P2P,Members,Free)
        /did -o Claninfo 8 1 Home: - $gettok(%claninfo.read,15,124)
        /did -o Claninfo 9 1 Based: - $gettok(%claninfo.read,13,124)
        /did -o Claninfo 10 1 Cape: - $gettok(%claninfo.read,14,124)
        /did -o Claninfo 12 1 Members: - $gettok(%claninfo.read,6,124)
        /did -o Claninfo 13 1 Avg Cmb: - $gettok(%claninfo.read,7,124)
        /did -o Claninfo 14 1 HP: - $gettok(%claninfo.read,8,124)
        /did -o Claninfo 15 1 Mage: - $gettok(%claninfo.read,10,124)
        /did -o Claninfo 16 1 Range: - $gettok(%claninfo.read,11,124)
        /did -o Claninfo 17 1 Total: - $gettok(%claninfo.read,9,124)
      }
    }
  }
}
on *:dialog:LookUpDialog:sclick:23: {
  /did -r $dname 26
  /did -r $dname 27
  set %clanname $replace($did(22),$chr(32),+)
  sockclose dialogonlyclan
  sockclose dialognonclan
  sockopen dialogonlyclan www.runehead.com 80
  sockopen dialognonclan www.runehead.com 80
}
on *:SOCKOPEN:Dialogonlyclan:{
  sockwrite -nt $sockname GET $(/feeds/lowtech/searchuser.php?user= $+ %clanname $+ &type=0,2) HTTP/1.1
  sockwrite -nt $sockname Host: www.runehead.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKOPEN:Dialognonclan:{
  sockwrite -nt $sockname GET $(/feeds/lowtech/searchuser.php?user= $+ %clanname $+ &type=1,2) HTTP/1.1
  sockwrite -nt $sockname Host: www.runehead.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:DIALOgnonclan: { if ($sockerr) { echo -a Error.
    socklose $sockname
    halt 
  } 
  else { var %nonclan.read | sockread %nonclan.read 
    if (*@@Not Found** iswm %nonclan.read) { /did -a LookupDialog 27 - | /did -a LookupDialog 27 None found | /did -a LookupDialog 27 - }
    elseif (*|* iswm %nonclan.read) { /did -a LookupDialog 27 $deltok(%nonclan.read,2,124) }
  }
}
on *:SOCKREAD:DIALOgonlyclan: { if ($sockerr) { echo -a Error.
    socklose $sockname
    halt 
  } 
  else { var %onlyclan.read | sockread %onlyclan.read 
    if (*@@Not Found** iswm %onlyclan.read) { /did -a LookupDialog 26 - | /did -a LookupDialog 26 None found | /did -a LookupDialog 26 - }
    elseif (*|* iswm %onlyclan.read) { /did -a LookupDialog 26 $deltok(%onlyclan.read,2,124) }
  }
}
on *:dialog:LookUpDialog:sclick:16: {
  sockclose dialogurban
  sockopen dialogurban www.rs.facepwn.com 80
  set %urbanword $replace($did(15),$chr(32),+)
}
on *:SOCKOPEN:DIALOGURBAN:{
  sockwrite -nt $sockname GET $(/Parsers/urban.php?word= $+ %urbanword,2) HTTP/1.1
  sockwrite -nt $sockname Host: www.rs.facepwn.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:DIALOGURBAN: {  if ($sockerr) { echo -a Error.
    socklose $sockname
    halt 
  } 
  else { var %urban.read
    sockread %urban.read
    if ([URBAN]: isin %urban.read) { tokenize 32 %urban.read
      /did -o LookUpDialog 18 1 $remove($htmlfree(%urban.read),$chr(03),[URBAN]:,| END)
    }
    if ([EXAMPLE]: isin %urban.read) { tokenize 32 %urban.read
      /did -o LookUpDialog 20 1 $replace($remove($htmlfree(%urban.read),$chr(03),| END,[EXAMPLE]:),&quot;,")
    }
  }
}
on *:dialog:LookUpDialog:init:0: {
  var %c = 1 | while (%c <= $lines(skills.txt)) { /did -a $dname 10 $read(skills.txt, %c) | inc %c }
}
on *:dialog:LookUpDialog:sclick:4: {
  dialog -mo AdvancedPrice AdvancedPrice
}
on *:dialog:LookUpDialog:sclick:3: {  
  sockclose dialogprice
  sockopen dialogprice www.zybez.net 80 
  set %priceitem $replace($did(1),$chr(32),+) 
  /did -r LookUpDialog 6
} 
ON *:SOCKOPEN:DIALOGPRICE:{ 
  sockwrite -nt $sockname GET $(/priceguide.php?search_terms= $+ %priceitem $+ &search_area=1&price_low=&price_high=&member=1),2) HTTP/1.1 
  sockwrite -nt $sockname Host: www.zybez.net 
  sockwrite -nt $sockname $crlf 
} 
on *:SOCKREAD:DIALOGPRICE:{ 
  if ($sockerr) { 
    echo -a Error. 
    sockclose $sockname 
    halt 
  } 
  else { 
    var %price.Read 
    sockread %price.Read 
    if (<td class="tablebottom" colspan="7">Your search did not return any results. isin %price.Read) {
      /did -a LookupDialog 6 Sorry, your search did not get any results.
      /did -a LookupDialog 6 Please ensure you have the correct spelling.
      /did -o LookUpDialog 5 1 Viewing 0 out of 0 Results
      sockclose $sockname
    }
    if (<td style="text-align: left; width: 180px;">Viewing isin %price.Read) {
      if $dialog(LookUpDialog) { 
        /did -o LookupDialog 5 1 $htmlfree(%price.Read)
      }
    }
    if (<td class="tablebottom"><a href="/items.php? isin %price.Read) {
      var %price.read2
      sockread %price.read2
      if (<td class='tablebottom'> isin %price.Read2) {
        set %item.name $htmlfree(%price.Read2)
      }
    }
    if (<td class="tablebottom" title="Former isin %price.Read) {
      var %price.read3
      sockread %price.read3
      if (<td class="tablebottom"> isin %price.Read3) {
        set %item.price $htmlfree(%price.Read3)
      }
    }
    if (<td class="tablebottom"><a href="/priceguide.php?category= isin %price.read) {
      /did -a LookUpDialog 6 %item.name :: %item.price :: $htmlfree(%price.read)
    } 
  } 
} 
alias htmlfree { 
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;) 
  return %x 
}