mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 1
P
Mostly harmless
OP Offline
Mostly harmless
P
Joined: Dec 2002
Posts: 1
k , I'm tryin to make a skin cahnger thingy that changes the scripts color and stuff. It works by unloading and loading script files.
Heres the code for loading one of the skins

on *:LOAD:{
if (%change == yes) {
unpack
system
pack
color
set %change no
halt
else { halt }
}
}
alias unpack {
unload -rs start2.mrc
unload -rs dia.mrc
unload -rs games2.mrc
unload -rs mp2.mrc
unload -rs pop3.mrc
unload -rs protections2.mrc
unload -rs scrip7.mrc
unload -rs scrip74.mrc
unload -rs abbreviations2.mrc
unload -a alias-2.mrc
unload -a alias2.mrc
unload -a alias1.mrc
unload -a aliases.mrc
}
alias system {
load -pn system\popups.ini
load -rv mist\remote.mrc
load -a system\alias2.mrc
load -a system\alias1.mrc
load -a system\aliases.mrc


}
alias pack {
unload -rs system\dialog1.mrc
unload -rs system\dialog2.mrc
load -rs script.ini
load -rs system\dialog1.mrc
load -rs system\dialog2.mrc
load -rs mist\abbreviations.mrc
load -rs mist\games.mrc
load -rs mist\mp3.mrc
load -rs mist\protections.mrc
load -rs mist\script.mrc
load -rs mist\script4.mrc
load -rs mist\start.mrc


}
alias color {
/color -r Action Text 1
/color -r Ctcp Text 15
/color -r Info Text 15
/color -r Info2 Text 15
/color -r Invite Text 1
/color -r Join Text 1
/color -r Kick Text 1
/color -r Mode Text 1
/color -r Wallops Text 15
/color -r Whois Text 15
/color -r Notice Text 1
/color -r Notify Text 15
/color -r Other Text 1
/color -r Own Text 1
/color -r Part text 1
/color -r Quit Text 1
/color -r Topic Text 1
/color -r Background 0
/font -sb 12 Copperplate Gothic Light
}

the problem is that it keeps loading and doin the alias stuff forever and freezes mIRC =(
I know my scripting skills aint that great =/
I'll appreciate if some1 can fix dat
thnx

Joined: Dec 2002
Posts: 332
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
ok ? i get more help here than i give but i see one thing that i have come across to keep something going
on *:LOAD:{
if (%change == yes) {
unpack
system
pack
color
set %change no
halt
else { halt }
}
}
you never actually closed the first command
on *:LOAD:{
if (%change == yes) {
unpack
system
pack
color
set %change no
halt
}
else { halt }
}
as i said i get more help than i give .. good luck

Joined: Dec 2002
Posts: 7
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Dec 2002
Posts: 7
also avoid defining too many colors. It would be faster to check if the color already exists and skip the definement.


Benjamin Jensen, Sickness at Undernet.
Joined: Dec 2002
Posts: 27
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Dec 2002
Posts: 27
you have a } misplaced in the load event

on *:LOAD:{
if (%change == yes) {
unpack
system
pack
color
set %change no
halt
}
else { halt }
}

also no need of the else since you're halting the event in all cases, unless you're going to add something else to the event.

on *:LOAD:{
if (%change == yes) {
unpack
system
pack
color
set %change no
}
halt
}





Link Copied to Clipboard