mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2012
Posts: 9
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Apr 2012
Posts: 9
Hi,

Is there a way to check if a remotescript is loaded. For example; the mirc client has multiple remote scripts (say, scriptA.mrc and scriptB.mrc). A change of a %variable makes the script to /unload and /load. To check after a disconnection of the right script is loaded i need a solution. Is this possible?

Like this (i know this doesn't exist)

on *:START: {
if (scriptA.mrc == $loaded) || (%variable == 1) {
/unload -rs scriptA.mrc
}

Last edited by geejeeNL; 07/05/15 06:48 PM.
Joined: Jul 2006
Posts: 4,156
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,156
Loop through $script(N) and check use $nopath to only check the name of the file

Code:
alias isloaded {
  var %a 1
  while ($script(%a) != $null) {
   if ($nopath($v1) == $1) return 1
   inc %a
  }
}
Use $isloaded(scriptA.mrc)


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard