rendered paste bodyon *:load:{
var %chan = $?="What channel would you like to join each time MRC starts?"
writeini mrc.ini preferences chan $iif($left(%chan,1) == $chr(35),%chan,$chr(35) $+ %chan)
}
dialog mrc {
title "Mirc Runescape Client | MRC | Version 0.1 BETA | Created by [-Kyle-]"
size -1 -1 1002 697
option pixels
menu "File" 100
item "Close" 101
}
on *:dialog:mrc:*:*: {
if ($devent == init) {
set %chan $readini(mrc.ini,preferences,chan)
if ($me !ison %chan) { join %chan }
dcx Mark $dname mrc_cb
window -hel12 @irc Tahoma 11
xdialog -b $dname +tnymz
xdialog -T $dname +p
$iif($readini(mrc.ini,preferences,bkrnd),xdialog -g $dname +b $readini(mrc.ini,preferences,bkrnd))
xdialog -c $dname 1 edit 548 545 460 110 multi return hsbar vsbar
xdid -f $dname 1 + ansi 8 Courier New
xdialog -c $dname 2 comboex 550 667 100 100 dropdown transparent
xdialog -c $dname 3 button 655 669 80 20 transparent
xdid -t $dname 3 Save
xdialog -c $dname 4 button 740 669 80 20 transparent
xdid -t $dname 4 Delete File
xdialog -c $dname 5 button 825 669 80 20 transparent
xdid -t $dname 5 Unload
xdialog -c $dname 6 button 910 669 80 20 transparent
xdid -t $dname 6 Load
%noscripts = $script(0)
%while = 1
while (%noscripts >= %while) {
xdid -a $dname 2 0 0 0 0 0 $nopath($script(%while))
inc %while
}
xdialog -c $dname 8 button 805 464 80 30 transparent
xdid -t $dname 8 Bkgrnd
;xdialog -c $dname 10 tab 7 540 527 153 flat buttons disabled transparent
;xdid -a $dname 10 0 0 Status $chr(9)
xdialog -c $dname 20 window 9 539 525 150 @irc disabled transparent
if ($chan($readini(mrc.ini,preferences,chan))) {
updatelist $v1
aline @irc 3< $+ $time $+ > Now talking in %chan
}
;xdialog -c $dname 11 button 509 540 25 25 notheme disabled
;xdid -t $dname 11 X
xdialog -c $dname 12 webctrl 0 0 798 535 transparent
xdid -n $dname 12 www.runescape.com
xdialog -c $dname 13 button 810 17 200 30 transparent
xdid -t $dname 13 RS Homepage
xdid -f $dname 13 +u asci 10 Tahoma
xdialog -c $dname 14 edit 819 84 100 21 transparent autohs
xdialog -c $dname 15 button 929 84 70 21 transparent
xdid -t $dname 15 Search
xdialog -c $dname 16 edit 811 111 197 262 readonly transparent multi vsbar hsbar
xdialog -c $dname 17 button 891 464 80 30 transparent
xdid -t $dname 17 Channel
xdialog -c $dname 18 text 878 64 100 21 transparent
xdid -t $dname 18 Price Lookup
}
}
alias mrc_cb {
if ($2 == sclick) && ($3 == 2) { xdid -r $1 1 | xdid -t $1 1 $script($4) }
if ($2 == sclick) && ($3 == 3) {
if ($dcx(MsgBox, yesno owner $1 $chr(9) Are you sure $chr(9) Are you sure you wish to save? (You will not be able to get the old file back)) == yes) {
%file = $script($xdid($1, 2).sel)
if ($nopath($script) == $nopath($script($xdid($1, 2).sel))) { xdid -u $1 1 %file | xdid -d $1 2 $xdid($1, 2).sel | xdid -a $1 2 $calc($xdid($1, 2).num + 1) 0 0 0 0 $nopath(%file) | .timer 1 0.1 .load -rs %file | .unload -rs %file }
else { xdid -u $1 1 %file | .unload -rs %file | .load -rs %file | xdid -d $1 2 $xdid($1, 2).sel | xdid -a $1 2 $calc($xdid($1, 2).num + 1) 0 0 0 0 $nopath(%file) }
}
}
if ($2 == sclick) && ($3 == 4) {
if ($dcx(MsgBox, yesno owner $1 $chr(9) Are you sure $chr(9) Are you sure you wish to delete this file? (File can be retrieved from the recycle bin)) == yes) {
.remove -b $script($xdid($1, 2).sel) | .unload -rs $script($xdid($1, 2).sel) | xdid -d $1 2 $xdid($1, 2).sel | did -r $1 1
}
}
if ($2 == sclick) && ($3 == 5) {
if ($nopath($script) == $nopath($script($xdid($1, 2).sel))) { noop $dcx(MsgBox, stop owner $1 $chr(9) Cannot Unload $chr(9) Cannot unload this file) | halt }
.unload -rs $script($xdid($1, 2).sel) | xdid -d $1 2 $xdid($1, 2).sel | xdid -r $1 1
}
if ($2 == sclick) && ($3 == 6) { var %script = $sfile($mircdir)
if (%script != $null) { .load -rs %script | xdid -a $1 2 0 0 0 0 0 $nopath(%script) }
}
if ($2 == sizing) { echo -s $3 $4 $5 }
if ($2 == close) { window -c @irc | unset %chan }
if ($2 == sclick) {
if ($3 == 13) { xdid -n $1 12 www.runescape.com }
if ($3 == 17) {
var %chan1 = $?="What channel would you like to join each time MRC starts?"
writeini mrc.ini preferences chan $iif($left(%chan1,1) == $chr(35),%chan1,$chr(35) $+ %chan1)
set %chan %chan1
dline @irc 1-
aline @irc 3< $+ $time $+ > Now talking in %chan
if ($me !ison %chan) { join %chan }
updatelist %chan
}
if ($3 == 15) {
if ($xdid(mrc, 14).text) {
xdid -r mrc 16
sockopen mrcprice zybez.net 80
sockmark mrcprice $replace($xdid(mrc, 14).text,$chr(32),+)
}
}
if ($3 == 8) { writeini mrc.ini preferences bkrnd $iif($dcx(ColorDialog, $readini(mrc.ini,preferences,bkrnd) fullopen owner $1 anycolor) == -1,$readini(mrc.ini,preferences,bkrnd),$v1) | xdialog -g $1 +b $readini(mrc.ini,preferences,bkrnd) }
}
if ($2 == dclick) { echo -s $xdialog($1).mouse }
}
alias mrc { dialog -md mrc mrc }
alias updatelist {
dline -l @irc 1-
var %no = 1
var %nicks = $nick($1,0)
while ($nick($1,%no)) {
var %nick = $nick($1,%no)
aline -l @irc $iif(%nick isop $1,4@,$iif(%nick ishop $1,12 $+ $chr(37),$iif(%nick isvoice $1,3+))) $+ $nick($1,%no))
inc %no
}
}
on *:op:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick sets mode +o $opnick | updatelist $chan } }
on *:deop:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick sets mode -o $opnick | updatelist $chan } }
on *:help:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick sets mode +h $hnick | updatelist $chan } }
on *:dehelp:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick sets mode -h $hnick | updatelist $chan } }
on *:voice:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick sets mode +v $vnick | updatelist $chan } }
on *:devoice:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick sets mode -v $vnick | updatelist $chan } }
on *:mode:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick sets mode $1- $chan | updatelist $chan } }
on *:servermode:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick sets mode $1- $chan | updatelist $chan } }
on *:nick: { if ($dialog(mrc)) { aline @irc 3< $+ $time $+ > $nick has changed their nick to $newnick | updatelist %chan } }
on *:notice:*:*: { if ($dialog(mrc)) { aline @irc 4< $+ $time $+ > <Notice> < $+ $nick $+ > $1- } }
on *:text:*:#: {
if ($dialog(mrc)) && ($chan == %chan) {
if ($len($1-) > 35) {
%x = 41
aline @irc < $+ $time $+ > < $+ $iif($nick isop $chan,4@,$iif($nick ishop $chan,12 $+ $chr(37),$iif($nick isvoice $chan,10+,1))) $+ $nick $+ > $mid($1-,1,40)
while ($mid($1-,%x,55)) {
aline @irc $mid($1-,%x,55)
inc %x 55
}
}
else { aline @irc < $+ $time $+ > < $+ $iif($nick isop $chan,4@,$iif($nick ishop $chan,12 $+ $chr(37),$iif($nick isvoice $chan,10+,1))) $+ $nick $+ > $1- }
}
}
on *:input:@irc: {
msg %chan $1-
if ($len($1-) > 35) {
%x = 41
aline @irc < $+ $time $+ > < $+ $iif($me isop %chan,4@,$iif($me ishop %chan,12 $+ $chr(37),$iif($me isvoice %chan,10+,1))) $+ $me $+ > $mid($1-,1,40)
while ($mid($1-,%x,55)) {
aline @irc $mid($1-,%x,55)
inc %x 55
}
}
else { aline @irc < $+ $time $+ > < $+ $iif($me isop %chan,4@,$iif($me ishop %chan,12 $+ $chr(37),$iif($me isvoice %chan,10+,1))) $+ $me $+ > $1- }
}
on *:join:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick has joined the channel ( $+ $chan $+ ) | updatelist $chan } }
on *:quit: { if ($dialog(mrc)) { aline @irc 3< $+ $time $+ > $nick has quit IRC ( $+ $1- $+ ) | updatelist %chan } }
on *:part:#: { if ($dialog(mrc)) && ($chan == %chan) { aline @irc 3< $+ $time $+ > $nick has parted $chan ( $+ $1- $+ ) | updatelist $chan } }
on *:sockopen:mrcprice: {
sockwrite -nt $sockname GET /priceguide.php?search_terms= $+ $sock($sockname).mark $+ &search_area=1&price_low=&price_high=&member=1&w13=rules HTTP/1.1
sockwrite -nt $sockname Host: www.zybez.net
sockwrite -nt $sockname $crlf
}
on *:sockread:mrcprice: {
if ($sockerr) { sockclose $sockname | halt }
else {
var %s
sockread %s
if (*Your search did not return any results.* iswm %s) { xdid -a mrc 16 No results found | sockclose $sockname }
if (*<!--name-->* iswm %s) { set %mrc.name $remove($nohtml(%s),<!--name-->) }
if (*<!--price-->* iswm %s) { xdid -a mrc 16 %mrc.name --- $nohtml(%s) $+ $crlf }
if (*<!-- Search Results: End -->* iswm %s) { sockclose $sockname }
}
}