Emistry icon

[RO] NPC Portal - Specific Hours

Emistry | PRO | 05/01/17 11:51:22 AM UTC | 0 ⭐ | 790 👁️ | Never ⏰ | []
text |

960 B

|

None

|

0 👍

/

0 👎

// https://rathena.org/board/topic/110756-npc-that-opens-at-certain-times/
 prontera,155,181,5	script	Sample	4_F_KAFRA1,{
	.@aid = getcharid(3);
 	for ( .@i = 0; .@i < .aid_size; .@i++ )
		if ( .aid[.@i] == .@aid ) {
			mes "You can only enter once per session.";
			close;
		}
 	.aid[.aid_size] = .@aid;
	.aid_size++;
 	addtimer ( .duration * 60000 ), .npc_name$ + "::OnKick";
	warp .map$,0,0;
	end;
 	OnInit:
		// map name
		.map$ = "guild_vs5";
		// duration stay in map
		.duration = 10;
		// duration the npc available
		.minute = 60;
 		.npc_name$ = strnpcinfo(3);
		donpcevent .npc_name$+"::OnHide";
		end;
 	OnClock1500:
	OnClock1900:
		deletearray .aid;
		.aid_size = 0;
		hideoffnpc .npc_name$;
		sleep ( .minute * 60000 ); // available for 1 hour
 	OnHide:
		mapwarp .map$, "prontera",155,181;
		hideonnpc .npc_name$;
		end;
 	OnKick:
		if ( strcharinfo(3) == .map$ ) {
			warp "prontera",155,181;
		}
		end;
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎