Zion Sphinx — File Browser
ZionSphinxv3.0 / ZionSphinxv3.0 / zion_gamelist3.mrc
zion_gamelist3.mrc — 14.19 KB — Download this file
; --------< Zion >----------------------------------------------------
; Name....: Zion Gamelist Shell
; File....: zion_gamelist3.mrc
; Ver.....: 1.0b290807
; Author..: sprion
; Email...: sprion@lyniq.com
; Date....: 29 Aug 07
; URL.....: http://zincplay.com
; Info....: Shell frontend for Gamelist
; Changes.: Modified the Help menu (Yellow ?)
;---------------------------------------------------------------------
;translatable
; script unload signal
on *:signal:zion_unload:.unload -rs $+(",$script,")
alias zion.glshell.id return ZIONGLS.1b290807
alias z.agl3 {
dialog -mdi z.agl3 z.agl_table
}
; required
alias z.agl if (!$dialog(z.agl3)) dialog -mdi z.agl3 z.agl_table
ON *:SIGNAL:zion_winmade:if ($z3.findtog(list,contained)) z.agl
ON *:SIGNAL:WFx_Size:{
if (($1 = $zion.s.chat) && ($2 = z.agl3) && ($3- != 0 0) && ((!%zion.s.cid) || ($cid = %zion.s.cid))) {
if (%zion.s.udscreen) return
else {
; if chat win coords are negative, maybe expanded..
; so update once, and ignore bad signals for 1 sec
; this fixes the window flashing bug that freezes mIRC
if (($window($1).x < 0) && ($window($1).y < 0)) set -u1 %zion.s.udscreen 1
z.agl.udscreen $4 %zion.s.udscreen.h
}
}
}
ON *:SIGNAL:zion_end:{
_cleanup
; z.gl.rline (Disconnected)
}
alias -l _cleanup {
if ($xpopup(agl.system).ismenu) xpopup -d agl.system
}
ON *:SIGNAL:zion_check:{
if ($dialog(z.agl3)) {
inc %zion.s.agl3
var %x xdid -t z.agl3 7
if (%zion.s.agl3 = 1) %x $z.lang(shell,users) $nick(%zion.s.data,0) - $z.lang(shell,games) $z.gl.getTotal
elseif (%zion.s.agl3 = 2) %x $z.lang(shell,ip) %zion.s.ip
elseif (%zion.s.agl3 = 3) %x $z.lang(shell,online) $duration($calc($ctime - $z.h.getvar(connected_ctime)))
elseif (%zion.s.agl3 = 4) { %x $z.lang(shell,totalgames) $z3.findtog(info,games) | unset %zion.s.agl3 }
}
}
alias z.agl.udscreen {
var %w z.agl3
if (($active != %w) && ($active != $zion.s.chat)) return
var %g = $window($zion.s.chat).dw + 16
dialog -s z.agl3 0 0 %g $int($calc($window($zion.s.chat).h / 100 * $_ratio))
z.agl.updatepad %w
xdialog -j %w
}
alias z.agl.updatepad dll_wfx SetPadding $zion.s.chat > $calc($dialog($1).h -1) text
;alias -l _ratio return $iif($window(@z.brs),45,40)
;alias z.brs.offset return $iif($window(@z.brs),62,0)
alias -l _ratio {
if ($md5($z.brs) != 8def39b22701f8390b6ee9f512100486) return 45
else return 40
}
alias z.brs.offset {
if ($md5($z.brs) != 8def39b22701f8390b6ee9f512100486) return 92
else return 0
}
alias z.agl.embed {
; final size
var %x $int($calc($window($zion.s.chat).h / 100 * $_ratio)),%g $calc($window($zion.s.chat).dw + 15)
set -u1 %zion.s.d.b 1
dialog -s $1 0 0 %g %x
dll_wfx SetPadding $zion.s.chat > $dialog($1).h text
dll_wfx SetChild $zion.s.chat > $1
}
; end
alias z.agl3.onclose {
if ($window($zion.s.chat)) dll_wfx SetPadding $zion.s.chat > 0 text
if ($window($z.win)) window -c $z.win
}
dialog z.agl_table {
title $z.lang(shell,listtitle)
size 0 0 535 175
}
on *:dialog:z.agl3:*:*: {
if ($devent == init) {
dcx Mark $dname z.agl_cb
xdialog -b $dname +z
;// Call initilisation alias
z.agl_init_dcx
}
}
alias -l z.agl_init_dcx {
var %d $dname
var %bg2 $rgb(0,0,80)
var %bg2_ $rgb(167,204,249)
var %bh 91,%b = $iif($md5($z.brs) != 8def39b22701f8390b6ee9f512100486,1,0)
; var %bh 61,%b $window(@z.brs)
xdialog -g %d +b %bg2
if (!%b) xdialog -c $dname 1 panel 0 0 9999 20
else xdialog -c $dname 1 panel 0 $calc(%bh -2) 9999 22
xdid -C %d 1 +kb %bg2
xdid -C %d 1 +t %bg2_
xdialog -c %d 5 text 0 0 150 20 noprefix
xdid -f %d 5 +ab ansi 10 tahoma
xdid -C %d 5 +kb %bg2
xdid -C %d 5 +t %bg2_
xdid -t %d 5 Zion $z.ver
xdialog -c %d 6 text 120 5 170 20 noprefix
xdid -f %d 6 +a ansi 8 tahoma
xdid -C %d 6 +kb %bg2
xdid -C %d 6 +t %bg2_
xdid -t %d 6 $z.tagline
xdialog -c %d 7 text 400 5 150 20 noprefix right
xdid -f %d 7 +a ansi 8 tahoma
xdid -C %d 7 +kb %bg2
xdid -C %d 7 +t %bg2_
xdid -t %d 7 -
xdialog -c %d 2 toolbar 0 19 25 150 left list wrap noauto tooltips
xdid -C %d 2 +kb 0
; setting icon size
xdid -l %d 2 16
; adding icons
xdid -w %d 2 +nh 1 $z.icl
xdid -w %d 2 +nh 2 $z.icl
xdid -w %d 2 +nh 3 $z.icl
xdid -w %d 2 +nh 10 $z.icl
xdid -w %d 2 +nh 11 $z.icl
xdid -w %d 2 +nh 12 $z.icl
xdid -w %d 2 +nh 13 $z.icl
xdid -w %d 2 +nh 14 $z.icl
xdid -w %d 2 +nh 16 $z.icl
xdid -w %d 2 +nh 17 $z.icl
xdid -w %d 2 +nh 22 $z.icl
; toolbar button size
xdid -u %d 2 24 24
xdid -a %d 2 0 +lw 24 1 0 $chr(9) $z.lang(shell,spam)
xdid -a %d 2 0 +lw 24 2 0 $chr(9) $z.lang(shell,system)
xdid -a %d 2 0 +lw 24 11 0 $chr(9) $z.lang(shell,help)
xdid -a %d 2 0 +lw 24 3 0 $chr(9) $z.lang(shell,close)
xdialog -c $dname 3 window 38 19 500 150 @z.gl
; if (%b) xdialog -c $dname 8 window 38 19 500 %bh @z.brs
if (%b) {
xdialog -c $dname 8 webctrl 38 19 500 %bh
xdid -n $dname 8 $+($z.host,/banners/zion)
}
var %cb,%cp 1
if (%b) %cb = 3
; cla
; pane root
xdialog -l $dname root $chr(9) +pv 0 0 0 0
; top h pane 1
xdialog -l $dname cell root $chr(9) +ph 0 0 0 0
; bottom h pane 2
xdialog -l $dname cell root $chr(9) +ph 0 $iif(%cb,0,1) 0 0
if (%cb = 3) {
xdialog -l $dname cell root $chr(9) +ph 0 1 0 0
xdialog -l $dname cell %cp $chr(9) +fvi 8 1 0 61
xdialog -l $dname space 1 $chr(9) + -2 -2 -2 -2
inc %cp
}
; adding into top pane 1
xdialog -l $dname cell %cp $chr(9) +fvhi 5 1 0 18
xdialog -l $dname space %cp 1 $chr(9) + 5 0 0 0
xdialog -l $dname cell %cp $chr(9) +fhi 6 1 0 0
xdialog -l $dname space %cp 2 $chr(9) + 0 2 0 0
xdialog -l $dname cell %cp $chr(9) +li 7 1 0 0
xdialog -l $dname space %cp 3 $chr(9) + 0 2 5 0
inc %cp
; adding into bottom pane 2
; now left of pane (put toolbar 2 in)
xdialog -l $dname cell %cp $chr(9) +fwi 2 1 25 0
; xdialog -l $dname space %cp 1 $chr(9) + 0 -1 0 0
if ((!%cb) || (%cb = 3)) {
xdialog -l $dname cell %cp $chr(9) +li 3 2 0
}
elseif (%cb = 2) {
xdialog -l $dname cell %cp $chr(9) +pv 0 1 0 0
xdialog -l $dname cell %cp 2 $chr(9) +fvi 8 1 0 62
xdialog -l $dname cell %cp 2 $chr(9) +li 3 2 0
}
.signal -n zion_gamelist3_made
.timer 1 0 xdialog -l $dname update
; xdid -p 4 10 10 200 120
if (!$z3.findtog(list,contained)) {
; use dcx list?
}
.timer 1 0 z.agl.embed $dname
}
;// Callback alias for z.agl
alias z.agl_cb {
if ($2 = close) return noclose
elseif ($2 = beginsize) {
var %s = $dialog($1).ch - 5, %e = $dialog($1).ch + 5, %m = $xdialog($1).mouse, %x = $gettok(%m,1,32), %y = $gettok(%m,2,32)
if ((%y < %s) || (%y > %e) || (%x < 20) || (%x > $calc($dialog($1).cw -20))) return nosize
}
elseif ($2 = endsize) z.agl.updatepad $1
;if (mouse !isin $2) echo $color(info) -s */ z.agl_cb: $1-
;/ z.agl_cb: z.agl3 activate 0
;sclick 2 1
elseif (($2 = activate) && ($active != $zion.s.chat)) window -a $zion.s.chat
elseif ( $2 = sclick ) {
window -a $zion.s.chat
; toolbar
if ( $3 = 2 ) {
.signal zion_gamelist3_hitbutton $4 $xdid($1,$3,$4).tooltip
if ($4 = 1) .signal -n zion_create
}
elseif ($3 = 1) { clipboard %zion.s.ip | z.echo $z.head(notice) $z.lang(shell,copiedip) %zion.s.ip }
}
elseif ( $2 = dclick ) {
if (($3 isnum 5-7) || ($3 = 1)) {
; var %c $iif($window(@z.brs),81,20),%d = $calc(%c +10),%y = $iif($dialog(z.agl3).ch isnum $+($calc(%c -5),-,%d),1,0)
var %c $iif($md5($z.brs) != 8def39b22701f8390b6ee9f512100486,111,20),%d = $calc(%c +10),%y = $iif($dialog(z.agl3).ch isnum $+($calc(%c -5),-,%d),1,0)
; compacts or enlarge
dialog -s z.agl3 0 0 $calc($window($zion.s.chat).dw +16) $iif(%y,$int($calc($window($zion.s.chat).h / 100 * $_ratio)),$calc(%c -20))
z.agl.updatepad z.agl3
; pause or unpause
zion.gl.pauselist $iif(!%y,-pause,-end)
}
}
}
alias z.agl.addbutton {
xdid -a z.agl3 2 $1 +l 24 $2 0 $chr(9) $3-
}
on *:signal:zion_gamelist3_hitbutton:{
; if ($2- = Options) z.options
if ($2- = $z.lang(shell,system)) z.agl.menumake $1-
elseif ($2- = $z.lang(shell,help)) z.help.menumake $1-
elseif ($2- = $z.lang(shell,close)) .signal -n zion_winclose
}
alias z.agl.menumake {
var %v agl.system
if (!$xpopup(%v).ismenu) {
xpopup -c %v office2003
.signal -n zion_gamelist3_systemmenu_init %v
xpop -a %v 100 $chr(9) + 100 0 Options..
}
.signal -n zion_gamelist3_systemmenu_open %v
xpopup -s %v +mlt $calc($dialog(z.agl3).x +28) $calc($1 *24 -24 +20 + $dialog(z.agl3).y + $z.brs.offset)
}
on *:signal:xpopup-agl.system:{
if ($1 = 100) .timer 1 0 z.options
}
alias z.help.menumake {
var %v z.help.menu
if (!$xpopup(%v).ismenu) {
xpopup -c %v office2003
xpop -a %v 1 $chr(9) + 200 0 $z.lang(shell,onlinepages)
xpop -c %v 1
xpop -a %v 1 1 $chr(9) + 106 0 $z.lang(shell,homepage)
xpop -a %v 1 2 $chr(9) + 201 0 $z.lang(shell,faq)
xpop -a %v 1 3 $chr(9) + 108 0 $z.lang(shell,rules)
xpop -a %v 1 4 $chr(9) + 105 0 $z.lang(shell,forum)
xpop -a %v 2 $chr(9) + 100 0 $z.lang(shell,viewhelp)
xpop -a %v 3 $chr(9) + 109 0 $z.lang(shell,listcmd)
xpop -a %v 4 $chr(9) + 0 0 -
xpop -a %v 5 $chr(9) + 107 0 $z.lang(shell,donate)
xpop -a %v 6 $chr(9) + 103 0 $z.lang(shell,resetyv) $zion.girlname $z.lang(shell,resetyv2)
xpop -a %v 7 $chr(9) + 0 0 -
xpop -a %v 8 $chr(9) + 102 0 $z.lang(shell,sysinfo)
xpop -a %v 9 $chr(9) + 104 0 $z.lang(shell,aboutyv) $zion.girlname $+ ..
xpop -a %v 10 $chr(9) + 101 0 $z.lang(shell,about)
}
.signal -n zion_gamelist3_systemmenu_open %v
xpopup -s %v +mlt $calc($dialog(z.agl3).x +28) $calc($1 *24 -24 +20 + $dialog(z.agl3).y + $z.brs.offset)
}
on *:signal:xpopup-z.help.menu:{
if ($1 = 100) z.help
elseif ($1 = 101) zion.install about
elseif ($1 = 102) zion.install info
elseif ($1 = 103) zion.girlreset
elseif ($1 = 104) zion.girlabout
elseif ($1 = 105) run $+(http://,$z.forumhost)
elseif ($1 = 106) run $+(http://,$z.host)
elseif ($1 = 107) z.donate
elseif ($1 = 108) z.rules
elseif ($1 = 109) z.list
elseif ($1 = 201) run http://www.zincplay.com/modules/zion/index.php/category0001.html
}
on *:signal:zion_plugin_load:if ($xpopup(agl.system).ismenu) xpopup -d agl.system
on *:signal:zion_plugin_unload:if ($xpopup(agl.system).ismenu) xpopup -d agl.system
on *:signal:zion_gamelist3_systemmenu:{
if (($1 = reset) && ($xpopup(agl.system).ismenu)) xpopup -d agl.system
}
on *:signal:zion_winclose:z.agl3.onclose | if ($dialog(z.agl3)) xdialog -x z.agl3
on *:signal:zion_chanclose:z.agl3.onclose | if ($dialog(z.agl3)) xdialog -x z.agl3
on *:signal:zion_update_complete:{
if (($dialog(z.agl3)) && ($1)) {
xdid -t z.agl3 5 Zion $z.ver
xdid -t z.agl3 6 $z.tagline
}
}
alias z.rules {
unset %zion.s.rules.*
zion_ruleswin
if ($timer(zion.s.grabrules)) .timerzion.s.grabrules off
sockclose zion.s.rules
z.sockopen zion.s.rules $z.forumhost 80
}
alias zion_rules_close unset %zion.s.rules.* | sockclose zion.s.rules | if ($window(@zion_ruleswin)) sline @zion_ruleswin 20
on *:sockopen:zion.s.rules:{
if ($sockerr > 0) { return }
var %s sockwrite -n zion.s.rules
z.sendget zion.s.rules $z.rulespath
%s Accept: */* | %s Accept-Encoding: gzip, deflate
%s User-Agent: non-mozilla Zion | %s Host: $z.forumhost | %s Connection: Keep-Alive | %s Cache-control: private, no-cache
%s
%s
}
on *:sockclose:zion.s.rules:zion_rules_close
on *:sockread:zion.s.rules:{
if ($sockerr > 0) return
:read
var %read,%v = <td colspan="2" class="postbody"><span class="postbody">,%u <span style="text-decoration: underline">,%k </span>,%b <span style="font-weight: bold">,%r <span style="color: red">,%a aline -p
sockread %read
if ($sockbr = 0) return
if (%read = $null) return
if (%read isnum) return
if (</html> isin %read) zion_rules_close
elseif (<a class="maintitle" isin %read) {
dialog -t zion_ruleswin $gettok($gettok(%read,3,62),1,60)
}
elseif (%v isin %read) {
%zion.s.rules.start = 1
xdid -h zion_ruleswin 4
xdid -s zion_ruleswin 1
%a @zion_ruleswin $remove(%read,%v)
}
elseif (%zion.s.rules.start) {
if (</table> isin %read) { zion_rules_close | return }
elseif (%read = <br />) { if (!%zion.s.rules.break) %a @zion_ruleswin $crlf | %zion.s.rules.break = 1 | goto read }
; echo -s length: $len(%read)
%zion.s.rules.break = 0
%zion.s.rules.lastmsg = $replace($left(%read,900),%u,,%k,,%b,,%r,04)
; echo @zion_ruleswin $left(%read,900)
while ($regsub(zionrule, %zion.s.rules.lastmsg, </?[^>]*>, $null, %zion.s.rules.lastmsg)) { }
if (%zion.s.rules.lastmsg != $null) {
%a @zion_ruleswin %zion.s.rules.lastmsg
}
}
goto read
}
alias zion_ruleswin dialog -ma zion_ruleswin zion_ruleswin
dialog zion_ruleswin {
title $z.lang(shell,ruleswintitle)
size -1 -1 496 398
}
on *:dialog:zion_ruleswin:*:*: {
if ($devent == init) {
dcx Mark $dname zion_ruleswin_cb
xdialog -b $dname +t
window -hn @zion_ruleswin 5 5 485 350
font @zion_ruleswin -8 Tahoma
zion_ruleswin_init_dcx
}
}
alias -l zion_ruleswin_init_dcx {
; xdialog -c $dname 1 richedit 5 5 385 250 multi vsbar tabstop left hsbar
xdialog -c $dname 1 window 5 5 385 250 @zion_ruleswin
xdid -h $dname 1
; xdid -f $dname 1 +a ansi 10 Tahoma
xdialog -c $dname 2 button 145 365 75 25 tabstop
xdid -t $dname 2 $z.lang(shell,closerules)
xdialog -c $dname 3 button 245 365 95 25 tabstop
xdid -t $dname 3 $z.lang(shell,visitrules)
xdialog -c $dname 4 text 220 180 75 25
xdid -t $dname 4 $z.lang(shell,loading)
xdid -f $dname 4 +ba ansi 10 Tahoma
}
alias zion_ruleswin_cb {
if ($2 = sclick) {
if ($3 = 2) dialog -x $1
elseif ($3 = 3) run $+(http://,$z.forumhost,$z.rulespath)
}
if ($2 = close) { window -c @zion_ruleswin | zion_rules_close }
}