about the castle treasure box

konichiwa08

New member
Messages
8
Points
0
i would like to make the respawn of the treasure box to be every week rather than every 12:00am.. is it possible?

 
Yep it is, just make some kind of counter that adds one by one (I guess, on a permanent server var) and make the spawn once it reaches 7 and don't forget to reset it.

 
Even better than a counter, you can spawn them just on Sundays or other days:

*gettime(<type>)       This function returns specified information about the current system time.       1 - Seconds (of a minute)   2 - Minutes (of an hour)   3 - Hour (of a day)   4 - Week day (0 for Sunday, 6 is Saturday)   5 - Day of the month.   6 - Number of the month.   7 - Year.   8 - Day of the year.       It will only return numbers.       if (gettime(4)==6) mes "It's a Saturday. I don't work on Saturdays.";
For example:

Code:
OnClock0001: // this is the routine for treasure chests spawning  if (gettime(4) != 0) { // just spawn on Sundays   end;   }    // [rest of script comes here]
 
I guess yes, but not sure if it'll produce any unwanted behaviour.

 
Back
Top