;;;;Buzz-Zyrus SoulFly Multi-Gamer by d33j4y™  ©2010 EvolutionScriptz d0t c0m;;;;
;;;;;;;;;;;;Evolution Scriptz Website http://www.evolutionscriptz.com;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;Profile Reader by Travis;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:unload:remini soulfly.ini version $nopath($script)
on *:start:writeini soulfly.ini version $nopath($script) 1.62

dialog pro_rdr {
  title "Profile Reader"
  size -1 -1 104 155
  option dbu
  icon %tbar
  text "", 100, 0 -1 33 12
  text "", 101, 33 -1 71 2
  icon 99, 18 -5 100 22, imgs\sf1.jpg, 0, noborder
  button "close", 1, 2 -2 26 14
  combo 2, 2 14 99 80, drop size
  list 3, 1 40 45 102, extsel size
  list 80, 49 40 54 46, extsel size
  list 81, 49 88 54 54, extsel size
  button "Add", 4, 2 27 24 11
  button "Remove", 5, 29 27 27 11
  combo 11, 61 27 40 60, drop size
  check "", 12, 0 144 104 10, push
  check "Kick", 13, 6 156 20 10
  check "Ban", 14, 41 156 20 10
  combo 15, 62 156 28 60, drop size edit
  text "min", 16, 92 158 24 10
  text "older than", 17, 71 174 34 8, center
  combo 18, 44 182 24 60, drop size edit
  text "younger than", 19, 38 174 32 8, center
  check "Age", 20, 6 170 20 10
  check "Sex", 21, 6 199 24 10
  button "Males", 22, 33 197 28 13
  check "No Gender", 23, 65 199 38 10
  combo 24, 76 182 24 60, drop size edit
  check "None", 25, 17 183 20 10
}
on *:dialog:pro_rdr:init:*:{
  did -f pro_rdr 99
  mdx_head
  xmdx SetDialog pro_rdr bgcolor $rgb(255,255,255)
  xmdx SetColor pro_rdr 100,101,102 background $rgb(224,223,228)
  xmdx SetColor pro_rdr 16,17,19 textbg $rgb(255,255,255)
  xmdx SetColor pro_rdr 4,5,13,14,16,17,19,20,21,23,25 background $rgb(255,255,255)
  xmdx SetFont pro_rdr 3,17,19,25,80,81 12 500 Tahoma
  xmdx SetFont pro_rdr 2,4,5,11,12,13,14,16,20,21,22,23 14 500 arial bold
  xmdx SetFont pro_rdr 1 24 500 Trebuchet MS bold
  xmdx SetControlMDX pro_rdr 3,80,81 ListView nosortheader showsel rowselect grid single labeltip report > dlls\views.mdx
  did -i pro_rdr 3 1 headerdims 28:1 58:2
  did -i pro_rdr 80,81 1 headerdims 28:1 76:2
  did -i pro_rdr 81 1 headertext +c 0 ( $+ $chr(149) $+ ) $+ $chr(9) $+ + 0 Links
  did -i pro_rdr 3,80 1 headertext +c 0 ( $+ $chr(149) $+ ) $+ $chr(9) $+ + 0 Field
  pro_stat | pro_init
  didtok pro_rdr 15 32 $str($chr(176),2) 1440 1 5 10 300
  didtok pro_rdr 24 44 18,21,30,40,50,60,125
  didtok pro_rdr 18 44 16,18,21,30,40,50,60
  if ($hget(prot,prok_b)) did -ca pro_rdr 15 $ifmatch
  pro_kick.init init 1
}
on *:dialog:pro_rdr:close:*:pro_kick.save $did(15).text $did(18).text $did(24).text
alias pro_ {
  if (!$1) return
  elseif ($1 = M) return Male
  elseif ($1 = F) return Female
  elseif ($1 = U) return No Gender
  elseif ($1 = msg) return 1
  elseif ($1 = describe) return 2
  elseif ($1 = echo) return 3
}
alias pro_kick.save {
  if ($1 != $hget(prot,prok_b)) hadd prot prok_b $1
  if ($2 != $hget(prot,pro_k-)) hadd prot pro_k- $2
  if ($3 != $hget(prot,pro_k+)) hadd prot pro_k+ $3
}
alias pro_kick.init {
  if (!$dialog(pro_rdr)) return
  if ($1 = init) {
    if ($dialog(pro_rdr).h != 448) {
      if (!%k-b) && ($2) { did -ra pro_rdr 12 Kick $str($chr(160),3) -(open)- $str($chr(160),4) Ban | return }
      did -ra pro_rdr 12 Kick $str($chr(160),3) -(close)- $str($chr(160),4) Ban
      dialog -s pro_rdr -1 -1 208 422
    }
    else {
      did -ra pro_rdr 12 Kick $str($chr(160),3) -(open)- $str($chr(160),4) Ban
      dialog -s pro_rdr -1 -1 208 309
    }
  }
  if (%k-b) {
    did -c pro_rdr 13
    if (%k-ban) { did -c pro_rdr 14 | did -e pro_rdr 15,16 }
    else { did -u pro_rdr 14 | did -b pro_rdr 15,16 }
    did -e pro_rdr 14,20,21,23
  }
  else { did -b pro_rdr 14,15,16,17,18,19,20,21,22,23,24,25 | return }
  if ($hget(prot,prokick_age)) {
    did -c pro_rdr 20 | did -e pro_rdr 17,18,19,24,25
    if ($hget(prot,prokick_age.none)) did -c pro_rdr 25
  }
  else { did -u pro_rdr 20 | did -b pro_rdr 17,18,19,24,25 }
  if ($hget(prot,pro_k-)) && ($did(pro_rdr,18) != $ifmatch) did -ca pro_rdr 18 $v2
  if ($hget(prot,pro_k+)) && ($did(pro_rdr,24) != $ifmatch) did -ca pro_rdr 24 $v2
  if ($hget(prot,prokick_sex)) {
    did -c pro_rdr 21
    did -e pro_rdr 22,23
    if ($hget(prot,prokick_nogender)) did -c pro_rdr 23
  }
  else { did -u pro_rdr 21 | did -b pro_rdr 22,23 }
  if ($hget(soulfly,prokick_sex) = F) did -ra pro_rdr 22 Females
  else did -ra pro_rdr 22 Males
}
on *:dialog:pro_rdr:sclick:*:{
  did -f pro_rdr 99
  if ($did = 4) {
    did -f pro_rdr 99
    var %pp4 = $input(Enter Correct Channel Name To Read,e,SoulFly Profile Reader,$active)
    if (%pp4 isin $hget(soulfly,profile)) { error -e SoulFly Profile Reader $crlf $crlf %pp4 already exists | return }
    hpp soulfly profile %pp4 | pro_init
  }
  elseif ($did = 1) { pro_kick.save $did(15).text $did(18).text $did(24).text | dialog -x pro_rdr pro_rdr }
  elseif ($did = 5) { did -f pro_rdr 99 | hpp soulfly profile $did(2).seltext | pro_init }
  elseif ($did = 11) {
    did -f pro_rdr 99
    var %px = $did(11).seltext
    if (%px = message) set %pro_msg msg
    elseif (%px = action) set %pro_msg describe
    else set %pro_msg echo
  }
  elseif ($did = 12) pro_kick.init init
  elseif ($did = 13) { hvp k-b $true | pro_kick.init }
  elseif ($did = 14) {
    hvp k-ban $true
    if (!%k-ban) did -b pro_rdr 15,16
    else did -e pro_rdr 15,16
  }
  elseif ($did = 15) hadd prot prok_b $did(15).text
  elseif ($did = 18) hadd prot pro_k- $did(pro_rdr,18).text
  elseif ($did = 20) { hpp prot prokick_age $true | goto init }
  elseif ($did = 21) { hpp prot prokick_sex $true | goto init }
  elseif ($did = 22) { hadd soulfly prokick_sex $iif($left($did(22).text,1) = F,M,F) | goto init }
  elseif ($did = 23) { hpp prot prokick_nogender $true | pro_kick.init }
  elseif ($did = 24) hadd prot pro_k+ $did(pro_rdr,24).text
  elseif ($did = 25) { hpp prot prokick_age.none $true | goto init }
  return
  :init
  pro.kick.init
}
on *:dialog:pro_rdr:dclick:3:{
  var %sl = $did(3).sel
  if (%sl = 2) hvp pro.mg.sex $true
  elseif (%sl = 3) hvp pro.msx.age $true
  elseif (%sl = 4) hvp pro.msx.nm $true
  elseif (%sl = 5) hvp pro.msx.email $true
  elseif (%sl = 6) hvp pro.msx.pic $true
  elseif (%sl = 7) hvp pro.msx.url $true
  elseif (%sl = 8) hvp pro.msx.int $true
  elseif (%sl = 9) hvp pro.msx.loc $true
  elseif (%sl = 10) hvp pro.msx.hob $true
  elseif (%sl = 11) hvp pro.msx.fav $true
  $iif($var(pro.ms*,0),set,unset) %pro.chk $true
  pro_stat 3
}
on *:dialog:pro_rdr:dclick:80:{
  var %sl = $did(80).sel
  if (%sl = 2) hvp pro.msx.mar $true
  elseif (%sl = 3) hvp pro.msx.about $true
  elseif (%sl = 4) hvp pro.msx.mov $true
  elseif (%sl = 5) hvp pro.msx.aud $true
  $iif($var(pro.ms*,0),set,unset) %pro.chk $true
  pro_stat 80
}
on *:dialog:pro_rdr:dclick:81:{
  var %sl = $did(81).sel
  if (%sl = 2) hvp pro.msl.blog $true
  elseif (%sl = 3) hvp pro.msl.link $true
  elseif (%sl = 4) hvp pro.msl.friend $true
  elseif (%sl = 5) hvp pro.msl.fav $true
  elseif (%sl = 6) hvp pro.msl.album $true
  $iif($var(pro.ms*,0),set,unset) %pro.chk $true
  pro_stat 81
}
alias pro_msg {
  var %tri = % [ $+ [ $1 ] ], %prn = $left($gettok(%tri,3,32),-2)
  if (%prn !ison $gettok(%tri,2,32)) { unset %pro_ [ $+ [ $1 ] ] | return }
  if (%pro_a. [ $+ [ %prn ] ]) set %pro_ [ $+ [ $1 ] ] $addtok(%pro_ [ $+ [ $1 ] ],$+($chr(91),Sex: $ifmatch,] [br]),32)
  %tri Profile: %pro_ [ $+ [ $1 ] ]
  unset %pro_ [ $+ [ $1 ] ]
}
on *:sockopen:pro.*:sockwrite -n $sockname GET $+(/spacedom/,$mid($sockname,5),/profile.php HTTP/1.0,$crlf,User-Agent: SoulFly,$me,$crlf,Accept: */*,$crlf,Host: www.buzzen.com,$crlf,$crlf,$crlf)
on *:sockread:pro.*:{
  if ($sockerr > 0) return
  sockread -fn &pro
  tokenize 32 $bvar(&pro,1-).text
  if (%pro.mov = 1) { inc %pro.mov | return }
  elseif (%pro.aud = 1) { inc %pro.aud | return }
  elseif (%pro.mov = 2) {
    %pro.mov = $calc($bfind(&pro,1-,yer/" src=") + 11)
    var %p_a = $calc($bfind(&pro,$+(%pro.mov,-),") - %pro.mov)
    q_ $sock($sockname).mark Movie Clip: $iif(%p_a <= 0,None,$bvar(&pro,%pro.mov,%p_a).text)
    unset %pro.mov
  }
  elseif (%pro.aud = 2) {
    %pro.aud = $calc($bfind(&pro,1-,yer/" src=") + 11)
    var %p_a = $calc($bfind(&pro,$+(%pro.aud,-),") - %pro.aud)
    q_ $sock($sockname).mark Sound Clip: $iif(%p_a = 0,None,$bvar(&pro,%pro.aud,%p_a).text)
    unset %pro.aud
  }
  elseif ($bfind(&pro,1-,\'Picture\')) {
    var %pr.pic = $calc($ifmatch - 3)
    if (!%pro.msx.pic) return
    if (%pro.pic) { unset %pro.pic | return }
    var %pr.pix = $calc($bfind(&pro,1-,.open) + 8), %pr.p = $calc(%pr.pic - %pr.pix), %pr.end = $iif(no_picture isin $bvar(&pro,%pr.pix,%pr.p).text,No Picture,$+(http://www.buzzen.com/,$gettok($v2,3-,47)))
    q_ $sock($sockname).mark Picture: %pr.end
    set %pro.pic $true
  }
  elseif (%pro.nm) {
    set %pro_ [ $+ [ $sockname ] ] $addtok(%pro_ [ $+ [ $sockname ] ],$+($chr(91),Name: $1-,] [br]),32)
    unset %pro.nm
    .timerpro $+ $sockname 1 1 /pro_msg $sockname
  }
  elseif (%pro.loc) {
    set %pro_ [ $+ [ $sockname ] ] $addtok(%pro_ [ $+ [ $sockname ] ],$+($chr(91),Location:,$1-,] [br]),32)
    unset %pro.loc
    .timerpro $+ $sockname 1 1 /pro_msg $sockname
  }
  elseif (%pro.age) {
    unset %pro.age
    if (%k-b) && ($hget(prot,prokick_age)) {
      var %pk_n = $left($gettok($sock($sockname).mark,2-,32),-2)
      if ($1 !isnum) && ($hget(prot,prokick_age.none)) { set %p_kick NoAge | goto p_kick }
      elseif ($1 isnum) && (($1 < $hget(prot,pro_k-)) || ($1 > $hget(prot,pro_k+))) { set %p_kick You must be between $hget(prot,pro_k-) & $hget(prot,pro_k+) | goto p_kick }
      else return
    }
    if (%pro.msx.age) {
      set %pro_ [ $+ [ $sockname ] ] $addtok(%pro_ [ $+ [ $sockname ] ],$+($chr(91),Age:,$1-,] [br]),32)
      .timerpro $+ $sockname 1 1 /pro_msg $sockname
      return
    }
    :p_kick {
      var %pk_c = $gettok(%pk_n,1,32), %pk_nk = $gettok(%pk_n,2,32)
      if ($me !isop %pk_c) || (%pk_nk isop %pk_c) return
      if (%k-ban) access %pk_c add deny %pk_nk $hget(prot,prok_b) :ProfileKick Age %pk_nk
      .raw kick %pk_n [Profile Kick] %p_kick
      unset %p_kick
    }
  }
  elseif (%pro.mar) {
    set %pro_ [ $+ [ $sockname ] ] $addtok(%pro_ [ $+ [ $sockname ] ],$+($chr(91),Marital Status:,$1-,] [br]),32)
    unset %pro.mar
    .timerpro $+ $sockname 1 1 /pro_msg $sockname
  }
  elseif (%pro.url) {
    var %ux = $calc($bfind(&pro,1-,href=) + 6), %uu = $calc($bfind(&pro,$+(%ux,-),") - %ux)
    set %pro_ [ $+ [ $sockname ] ] $addtok(%pro_ [ $+ [ $sockname ] ],$+($chr(91),Website: $iif($bvar(&pro,%ux,%uu).text = $null,None,$v1) $chr(93) [br]),32)
    unset %pro.url
    .timerpro $+ $sockname 1 1 /pro_msg $sockname
  }
  elseif (%pro.email) {
    if (="left" isin $1-) return
    set %pro_ [ $+ [ $sockname ] ] $addtok(%pro_ [ $+ [ $sockname ] ],$+($chr(91),Email:,$1-,] [br]),32)
    unset %pro.email
    .timerpro $+ $sockname 1 1 /pro_msg $sockname
  }
  elseif (%pro.about) { q_ $sock($sockname).mark About Me: $hstx($1-) | unset %pro.about }
  elseif (%pro.hob) { q_ $sock($sockname).mark Hobbies: $hstx($1-) | unset %pro.hob }
  elseif (%pro.int) { q_ $sock($sockname).mark Interests: $hstx($1-) | unset %pro.int }
  elseif (%pro.fav) { q_ $sock($sockname).mark Favorite Quote: $hstx($1-) | unset %pro.fav }
  elseif ($eval($chr(40) item = 2) isin $1-) && (%pro.msx.mov) inc %pro.mov
  elseif ($eval($chr(40) item = 3) isin $1-) && (%pro.msx.aud) inc %pro.aud
  elseif ($bfind(&pro,1-,>Location<)) && (%pro.msx.loc) set %pro.loc $true
  elseif (>Name< isin $1-) && (%pro.msx.nm) set %pro.nm $true
  elseif (>Age< isin $1-) set %pro.age $true
  elseif (>marital isin $1-) && (%pro.msx.mar) set %pro.mar $true
  elseif (>My Webs isin $1-) && (%pro.msx.url) set %pro.url $true
  elseif (Email Add isin $1-) && (%pro.msx.mail) set %pro.email $true
  elseif ($1- = <div id="about">) && (%pro.msx.bout) set %pro.about $true
  elseif ($1- = <div id="hobbies">) && (%pro.msx.hob) set %pro.hob $true
  elseif ($1- = <div id="interesses">) && (%pro.msx.int) set %pro.int $true
  elseif ($1- = <div id="fav_quote">) && (%pro.msx.int) set %pro.fav $true
  :Error
  if ($error) reseterror
}
alias v_pro {
  if (!$1-3) return
  var %msgt = $iif(%pro_msg,$ifmatch,echo) $3 $+($1,'s), %psk = $+(pro.,$2)
  set -u7 $+(%,%psk) %msgt
  if ($sock(%psk)) sockclose %psk
  sockopen %psk www.buzzen.com 80
  sockmark %psk %msgt
  if (%pro.msl.album) q_ %msgt Photo Album: $+(http://www.buzzen.com/spacedom/,$2,/album.php?id=,$2)
  if (%pro.msl.blog) q_ %msgt Blog: $+(http://www.buzzen.com/spacedom/,$2,/blog.php)
  if (%pro.msl.fav) q_ %msgt Favorites: $+(http://www.buzzen.com/spacedom/,$2,/favorites.php)
  if (%pro.msl.friend) q_ %msgt Friends: $+(http://www.buzzen.com/spacedom/,$2,/friends.php)
  if (%pro.msl.link) q_ %msgt Profile: $+(http://www.buzzen.com/spacedom/,$2,/profile.php)
}
alias prof_chk {
  if (%prof_chk = 5) echo -st Profile Check Flood Detect!
  elseif (%prof_chk > 5) return
  else inc -u3 %prof_chk
  var %on = $hn($1), %ou = $gettok($ini_array(lists\users\pid,pid,$ha($1)).chk,2,32)
  if (%k-b) && $hget(prot,prokick_sex) {
    if ($mid($3,2,1) = $hget(soulfly,prokick_sex)) || (($mid($3,2,1) isin N.U) && ($hget(prot,prokick_nogender))) {
      if (%on !isop $2) sockwrite -n $+(sf.,$2) kick $2 %on ProfileKick: (Incorrect Gender) %on
      if (%k-ban) sockwrite -n $+(sf.,$2) access $2 add deny $gettok($1,2,33) $hget(prot,prok_b) :ProfileKick %on
    }
  }
  if ($3 = v-) {
    if (%ou) webpage %on $+(www.buzzen.net/profile.aspx?pid=,%ou)
    else { set -u5 %prov. [ $+ [ %on ] ] $true | sockwrite -n $+(sf.,$2) PID %on }
  }
  else {
    if (%pro.mg.sex) set -u11 %pro_a. [ $+ [ %on ] ] $pro_($mid($3,2,1))
    if (%pro.chk) {
      if (%ou) v_pro %on $ifmatch $2
      else { set %pro. [ $+ [ %on ] ] $2 | sockwrite -n $+(sf.,$2) PID %on }
    }
  }
}
alias pro_rdr dialog $iif($dialog(pro_rdr),-v,-mh) pro_rdr pro_rdr
alias pro_stat {
  if ($1) goto $1
  :3 {
    did -cr pro_rdr 3
    did -a pro_rdr 3 +c $iif(%pro.mg.sex,On,Off) $chr(9) Sex
    did -a pro_rdr 3 + $iif(%pro.msx.age,On,Off) $chr(9) Age
    did -a pro_rdr 3 + $iif(%pro.msx.nm,On,Off) $chr(9) Name
    did -a pro_rdr 3 + $iif(%pro.msx.email,On,Off) $chr(9) Email
    did -a pro_rdr 3 + $iif(%pro.msx.pic,On,Off) $chr(9) Picture
    did -a pro_rdr 3 + $iif(%pro.msx.url,On,Off) $chr(9) Website
    did -a pro_rdr 3 + $iif(%pro.msx.int,On,Off) $chr(9) Interests
    did -a pro_rdr 3 + $iif(%pro.msx.loc,On,Off) $chr(9) Location
    did -a pro_rdr 3 + $iif(%pro.msx.hob,On,Off) $chr(9) Hobbies
    did -a pro_rdr 3 + $iif(%pro.msx.fav,On,Off) $chr(9) Favorites
    if ($1 = 3) return
  }
  :80 {
    did -cr pro_rdr 80
    did -a pro_rdr 80 + $iif(%pro.msx.mar,On,Off) $chr(9) Marital Status
    did -a pro_rdr 80 + $iif(%pro.msx.about,On,Off) $chr(9) About Me
    did -a pro_rdr 80 + $iif(%pro.msx.mov,On,Off) $chr(9) Movie Clip
    did -a pro_rdr 80 + $iif(%pro.msx.aud,On,Off) $chr(9) Sound Clip
    if ($1 = 80) return
  }
  :81 {
    did -cr pro_rdr 81
    did -a pro_rdr 81 + $iif(%pro.msl.blog,On,Off) $chr(9) Blog
    did -a pro_rdr 81 + $iif(%pro.msl.link,On,Off) $chr(9) Profile
    did -a pro_rdr 81 + $iif(%pro.msl.friend,On,Off) $chr(9) Friends
    did -a pro_rdr 81 + $iif(%pro.msl.fav,On,Off) $chr(9) Favorites
    did -a pro_rdr 81 + $iif(%pro.msl.album,On,Off) $chr(9) Photo Album
  }
}
alias pro_init {
  did -r pro_rdr 11
  didtok pro_rdr 11 44 Message,Action,Echo
  if (!%pro_msg) set %pro_msg echo
  did -c pro_rdr 11 $pro_(%pro_msg)
  did -vr pro_rdr 2
  var %pchn = $numtok($hget(soulfly,profile),46)
  if (!%pchn) did -ca pro_rdr 2 No Channels
  else {
    while (%pchn) {
      did -ca pro_rdr 2 $gettok($hget(soulfly,profile),%pchn,46)
      dec %pchn
    }
  }
}