prontera,157,190,4[TAB]script[TAB]Garden[TAB]Entrance 793,{ if(gettime(4)==6) && (gettime(3)==12) { //enablenpc "Garden Entrance"; //this must be an issue, since if we here it's obiously enable Announce "The Mystical Gate of the Secret Garden has opened! Fifteen players may enter.",bc_all || bc_blue; mes "Rumor has it that there was once an ancient secret garden located near prontera!"; if(countitem(7559) < 1) close; next; mes "I see that you have the key... Very well, since you have the key, I can warp you to the gate."; next; mes "Do you want me to? Only [" + .playersmax - .playersin + "] can enter."; next; if(select("Yes:No") == 2) close; set .playersin,getmapusers(.garden$); //updated to auto ajust for players leaving etc if(.playersin == .playersmax) { mes "Sorry the max players has been reached."; } else { warp .garden$,.x,.y; //set .playersin,.playersin + 1; } close; } end; OnInit: //been move so we can click on NPC set .garden$,"maze" // set .x,50; // set .y,55; // set .playersmax,15; // set .playersin,0; disablenpc "Garden Entrance"; //when do you enable it ? end; OnSat1200: //enable npc on saturday at noon enablenpc "Garden Entrance"; end; OnSat1800: //disable npc after 6h disablenpc "Garden Entrance"; end; } maze,60,60,4 script Ancient Hero of the Garden 793,{ OnPCLoadMapEvent : //autoenable and spawn, comment this if you want to handle differently if((getmapusers(.garden$) == 15) && !.spawn[1]) { //when we reach 15 player on map we enable npc and spawn monster enablenpc "Ancient Hero of the Garden"; //nota : we enable npc so player can click on it but it's not really usefull, we should consider invisible automated npc instead. //nota2 we may have extra enable from player wich it's quite annoying but shouldn't be buggy anyway monster .garden$,0,0,"Treasure of the Secret Garden",.spawn,10,"Ancient Hero of the Garden::L_MDeath"; set .spawn[1],1; //mark monster are spawned } else { mes "I don't know exacly what's my purpose yet but monsters alreaby been spawn, found them !" close; } end; L_MDeath: //called at each mob dead if(getmapmobs(.spawn) == 0) { //if there no more mob on map set .spawn[1],0; //mark monster are all dead mes "I see you have found the treasure ..."; next; switch(rand(1,15)){ case 1 : goto L_First; //I dun like much goto but well case 2 : goto L_Second; case 3 : goto L_Third; default : mes "I see that you did not get the sacred mark of the treasure..."; close; } } end; L_First: mes "Wow... You got the ultimate mark of the treasure ..."; next; mes "I believe this is yours then..."; getitem 2862; set zeny, zeny + 100000; close; L_Second: mes "Wow... You got the legendary mark of the treasure ..."; next; mes "I believe this is yours then..."; getitem 5682; set zeny, zeny + 50000; close; L_Third: mes "Wow... You got the holy mark of the treasure ..."; next; mes "I believe this is yours then..."; set zeny, zeny + 20000; close; OnInit: set .spawn,1902; // set .garden$,"maze" // disablenpc "Ancient Hero of the Garden"; //when do you enable it ? end; }