reduce the MUSHclient variables

Posted by Avariel on Sat 01 Mar 2003 12:39 AM — 2 posts, 13,117 views.

Portugal #0
i read about using the less number of MUSHclient variables possible increases the speed of processing and i would like some help in doing it... i only use this variables when i dont know how to use inside language variables so im a little stucked..

ok this is what i want do do...

trigger1 set affliction0 to 1
trigger2 set affliction1 to 1

trigger3 delete affliction0
trigger4 delete affliction1

now i have the trigger5 that will check this variables and chose what do do...

to set priorities the vars are grouped in an array

var affliction = new Array()

affliction [0] = affliction0
affliction [1] = affliction1

trigger5 will run a cicle through the array and cure the first afflition with value = 1


this works with the use of MUSHclient variables but i would like to do it without the use of them if possible..


thank you
Australia Forum Administrator #1
Put your Jscript variables outside a function - they should then persist throughout the session (but they won't be saved from one session to another).

eg.


var affliction0 = 0;

function mysub (name, output, wildcards)
  {

// blah blah - some processing here 

  }  // end of function