Tous les collages #523838 Brut Modifier

Untitled

public text v1 · immuable
#523838 ·publié 2007-05-30 22:27 UTC
corps du collage affiché
alias Jcfc { 
  dialog -m Jcfc Jcfc 
} 
dialog Jcfc {
  title "JcDialog"
  size -1 -1 235 210
  option dbu
  icon C:\Documents and Settings\Owner\My Documents\My Pictures\kyl3.bmp, 0
  icon 1, 175 0 60 51,  C:\Documents and Settings\Owner\My Documents\My Pictures\Signatures\Jcfc1.jpg, 0
  icon 16, 0 0 60 51,  C:\Documents and Settings\Owner\My Documents\My Pictures\Signatures\Jcfc1.jpg, 0
  icon 17, 63 8 108 37,  C:\Documents and Settings\Owner\My Documents\My Pictures\Signatures\12ic3.png, 0
  tab "General", 21, 78 196 70 13
  button "OK", 5, 29 179 37 12, tab 21 ok
  button "Cancel", 6, 159 179 37 12, tab 21 cancel
  text "Channels", 4, 192 69 25 8, tab 21
  button "#k-chat", 7, 183 80 37 12, tab 21
  button "#Jcfc", 8, 183 95 37 12, tab 21
  button "#Redbladehunters", 9, 175 110 54 12, tab 21
  button "#FishingGuild", 10, 183 125 37 12, tab 21
  text "Links", 3, 15 69 25 8, tab 21
  button "RBH forum", 14, 9 125 37 12, tab 21
  button "Add Note", 2, 96 53 37 12, tab 21
  edit "Monkfish Count", 18, 68 181 70 10, tab 21 center
  button "Add", 19, 138 180 18 12, tab 21
  text "Monkfish Count", 20, 84 173 52 8, tab 21
  combo 15, 54 66 118 98, tab 21 size
  button "RuneScape", 11, 9 80 37 12, tab 21
  button "Tip.it", 12, 9 95 37 12, tab 21
  button "Tip.it forum", 13, 9 110 37 12, tab 21
  tab "Price", 22
  text "Price script", 23, 93 47 32 8
  text "Item you want to lookup:", 24, 15 3 62 8 
  list 25, 15 19 187 124, size 
  edit "", 26, 95 3 50 9 
  button "Lookup", 27, 165 3 37 9 
  button "Close", 28, 90 146 37 12, cancel
}


on *:dialog:Jcfc:sclick:*: {
  if ($did == 7) { join #k-chat }
  if ($did == 8) { join #jcfc }
  if ($did == 9) { join #redbladehunters }
  if ($did == 10) { join #FishingGuild }
  if ($did == 11) { /run http://runescape.co.uk }
  if ($did == 12) { /run http://tip.it/runescape }
  if ($did == 13) { /run http://forum.tip.it }
  if ($did == 14) { /run http://z12.invisionfree.com/redbladehunters }
  if ($did == 2) { /did -a $dname 15 $did(15) }
  if ($did == 5) {
    if ($numtok(%data,64) == $did(15).lines) { /dialog -x Jcfc Jcfc }
    unset %data
    var %lines = $did(15).lines
    var %it = 1
    while (%it <= %lines) {
      set %data %data @ $did(15,%it)
      inc %it
    }
  }
  if ($did == 19) {
    set %monkfishcount $did(18)
    /did -r Jcfc 18
    /did -a Jcfc 18 %monkfishcount
  }
}

on *:dialog:Jcfc:init:0: {
  /did -r Jcfc 18
  /did -a Jcfc 18 %monkfishcount
  var %toks = $numtok(%data,64)
  var %it = 1
  while (%it <= %toks) {
    /did -a $dname 15 $gettok(%data,%it,64)
    inc %it
  }
}
menu * { 
  Price Dialog:/dialog -md price price 
} 
alias price { 
  dialog -md price price 
  did -a price 2 $1- 
} 
dialog price { 
  title "Price Dialog" 
  size -1 -1 218 162 
  option dbu 

  text "Item you want to lookup:", 1, 15 3 62 8 
  list 4, 15 19 187 124, size 
  edit "", 2, 95 3 50 9 

  button "Lookup", 3, 165 3 37 9 
  button "Close", 5, 90 146 37 12, cancel 

} 
On *:dialog:price:sclick:3: { 
  if (!$did(2)) { did -a price 4 Please specify the name of an item you want to look up. } 
  else { 
    if ($sock(price)) sockclose price 
    set %priceitem $replace($did(2),$chr(32),$chr(43)) 
    sockopen zybez-price www.zybez.net 80 
  } 
} 
On *:sockopen:zybez-price: { 
  sockwrite -nt $sockname GET /priceguide.php?search_terms= $+ %priceitem $+ &search_area=1&price_low=&price_high=&member=1 HTTP/1.1 
  sockwrite -nt $sockname Host: www.zybez.net 
  sockwrite -nt $sockname $crlf 
} 
On *:sockread:zybez-price: { 
  if ($sockerr) { 
    did -a price 4 Socket Error: $sockname $+ . 
    halt 
  } 
  else { 
    var %read 
    sockread %read 
    if (*<!--name--><td class='tablebottom'>* iswm %read) set %price1 $htmlfree(%read) 
    if (*<!--price--><td class="tablebottom">* iswm %read) set %price2 $htmlfree(%read) 
    if (*<td class="tablebottom"><a href="/priceguide.php?category=* iswm %read) { 
      set %price3 $htmlfree(%read) 
      did -a price 4 [Price] You searched for: %price1 $chr(124) Price: %price2 $chr(124) 
      did -a price 4 Category: $gettok(%price3,1,124) 
      sockclose $sockname 
      unsetall 
    } 
  } 
} 
alias -l htmlfree { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,amp;) | return %x }