Jump to content
  • 0

Instance NPC with time and duration


Questune

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  38
  • Reputation:   0
  • Joined:  08/19/23
  • Last Seen:  

Requesting for an instance NPC where is available only everyday for 1 hour and 30 minutes.

Details:

  • An instance NPC where you can enter with or without a party.
  • Once you enter the dungeon you are only allowed to explore the map within 1 hour and 30 minutes and after times is up you will be warp outside and you are not allowed to enter again.
  • If you didn't consume the 1 hour and 30 minutes duration you can enter the dungeon anytime you want (but once the time goes to 12:00 AM) the dungeon will be reset.
  • Dungeon reset every 11:59 PM (those who already enter the dungeon can enter it again after reset time).
  • PVP is allowed inside the map, exp penalty.
  • If kill/killed by a player you or they will be resurrected on the starting area prt_maze01 180 97.
  • Only flywing is allowed to use inside the map, other teleport skills, items, save point or anything that can abuse the map are not allowed

Wishing that this can be possible 🤗 thank you!

Edited by Questune
Other details
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  38
  • Reputation:   0
  • Joined:  08/19/23
  • Last Seen:  

Just to add for the details.

  • Ideal map is prt_maze01 (or do you have a better map 🙂 )
  • Starting map is prt_maze01 180 97 (where i can setup the NPC for potions, other items that can be buy and other things maybe around 5 npc).
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  38
  • Reputation:   0
  • Joined:  08/19/23
  • Last Seen:  

I was trying to make this request but i got an error, hopefully someone can help me out.

image.png.be721732f9bc92560d59b60a021c9f39.png

Here's the script

//===== rAthena Script =======================================
//= Dead Branch Room Script
//============================================================

prontera,146,171,6	script	Portal Square	89,{
	.@n$ = "[^3355FF Portal Square ^000000]";
	.@party_id = getcharid(1);
	.@p_name$ = getpartyname(.@party_id);
	.@instance$ = "Portal Square";

		if (getcharid(0) == getpartyleader(.@party_id,2)) {
		mes .@n$;
		mes "Portal Square is available everyday for 1 hour and 30 minutes.";
		mes "Remember, the room and everything inside including boss chamber and other resources, watch out for enemies as well since the room are pk free.";
			next;
			switch(select("Enter the Room:Cancel")) {
			case 1:
				callsub L_Enter,0,1;
			case 2:
			mes .@n$;
			mes "Have a nice day then, see you later!.";
				close;
			}
		}
		mes .@n$;
		mes "In able to enter the Portal Square, you must have a party.";
		next;
			end;
		}
		switch(select("Enter the Portal Square:Cancel")) {
		case 1:
			callsub L_Enter,1,1;
		case 2:
			mes .@n$;
			mes "Have a nice day then, see you later!.";
			end;
		}
		
L_Enter:
	switch(instance_enter("Portal Square")) {
	case 3:
			mes .@n$;
		mes "You doesn't have a party.";
		close;
	case 2:
			mes .@n$;
		mes "You can enter the room after making a party.";
		end;
	}
}

//==================================================================================
//--------|Map Flags|---------------------------------------------------------------
//==================================================================================

prt_maze01	mapflag	monster_noteleport
prt_maze01	mapflag	nowarpto
prt_maze01	mapflag	nomemo
prt_maze01	mapflag	noteleport
prt_maze01	mapflag	nosave SavePoint
prt_maze01	mapflag	nopenalty
prt_maze01	mapflag	pvp

 

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

prontera,146,171,6	script	Portal Square	89,{
	.@n$ = "[^3355FF Portal Square ^000000]";
	.@party_id = getcharid(1);
	.@p_name$ = getpartyname(.@party_id);
	.@instance$ = "Portal Square";

	if (getcharid(0) != getpartyleader(.@party_id,2)) {
		mes .@n$;
		mes "In able to enter the Portal Square, you must have a party.";
		close
	}
	mes .@n$;
	mes "Portal Square is available everyday for 1 hour and 30 minutes.";
	mes "Remember, the room and everything inside including boss chamber and other resources, watch out for enemies as well since the room are pk free.";
	next;
	switch(select("Enter the Room:Cancel")) {
		case 1:
			switch(instance_enter("Portal Square")) {
				case 3:
					mes .@n$;
					mes "You doesn't have a party.";
					close;
				case 2:
					mes .@n$;
					mes "You can enter the room after making a party.";
					end;
			}
			break;
		case 2:
			mes .@n$;
			mes "Have a nice day then, see you later!.";
			break;
	}
	close;
}

//==================================================================================
//--------|Map Flags|---------------------------------------------------------------
//==================================================================================

prt_maze01	mapflag	monster_noteleport
prt_maze01	mapflag	nowarpto
prt_maze01	mapflag	nomemo
prt_maze01	mapflag	noteleport
prt_maze01	mapflag	nosave SavePoint
prt_maze01	mapflag	nopenalty
prt_maze01	mapflag	pvp

remove unnecessary brackets

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  38
  • Reputation:   0
  • Joined:  08/19/23
  • Last Seen:  

11 hours ago, Emistry said:
prontera,146,171,6	script	Portal Square	89,{
	.@n$ = "[^3355FF Portal Square ^000000]";
	.@party_id = getcharid(1);
	.@p_name$ = getpartyname(.@party_id);
	.@instance$ = "Portal Square";

	if (getcharid(0) != getpartyleader(.@party_id,2)) {
		mes .@n$;
		mes "In able to enter the Portal Square, you must have a party.";
		close
	}
	mes .@n$;
	mes "Portal Square is available everyday for 1 hour and 30 minutes.";
	mes "Remember, the room and everything inside including boss chamber and other resources, watch out for enemies as well since the room are pk free.";
	next;
	switch(select("Enter the Room:Cancel")) {
		case 1:
			switch(instance_enter("Portal Square")) {
				case 3:
					mes .@n$;
					mes "You doesn't have a party.";
					close;
				case 2:
					mes .@n$;
					mes "You can enter the room after making a party.";
					end;
			}
			break;
		case 2:
			mes .@n$;
			mes "Have a nice day then, see you later!.";
			break;
	}
	close;
}

//==================================================================================
//--------|Map Flags|---------------------------------------------------------------
//==================================================================================

prt_maze01	mapflag	monster_noteleport
prt_maze01	mapflag	nowarpto
prt_maze01	mapflag	nomemo
prt_maze01	mapflag	noteleport
prt_maze01	mapflag	nosave SavePoint
prt_maze01	mapflag	nopenalty
prt_maze01	mapflag	pvp

remove unnecessary brackets

Thank you, I try this and upon checking it doesn't allowing me to enter the dungeon even I created a party, no error on the console as well.

 

I try to add this line but still no luck

 

L_Enter:
	switch(instance_enter("Portal Square")) {
	case 3:
			mes .@n$;
		mes "You doesn't have a party.";
		close;
	case 2:
			mes .@n$;
		mes "You can enter the room after making a party.";
		end;
	}
}

image.png.df4336f3e065e7797d28e4d4ff0e25f3.png

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

you aren't using the script which I have updated for you in the earlier post.

prontera,146,171,6	script	Portal Square	89,{
	.@n$ = "[^3355FF Portal Square ^000000]";
	.@party_id = getcharid(1);
	.@p_name$ = getpartyname(.@party_id);
	.@instance$ = "Portal Square";

	if (!.@party_id || getcharid(0) != getpartyleader(.@party_id, 2)) {
		mes .@n$;
		mes "In able to enter the Portal Square, you must have a party.";
		close;
	}
	mes .@n$;
	mes "Portal Square is available everyday for 1 hour and 30 minutes.";
	mes "Remember, the room and everything inside including boss chamber and other resources, watch out for enemies as well since the room are pk free.";
	next;
	switch(select("Enter the Room:Cancel")) {
		case 1:
			switch(instance_enter("Portal Square")) {
				case 3:
					mes .@n$;
					mes "You doesn't have a party.";
					close;
				case 2:
					mes .@n$;
					mes "You can enter the room after making a party.";
					end;
			}
			break;
		case 2:
			mes .@n$;
			mes "Have a nice day then, see you later!.";
			break;
	}
	close;
}

//==================================================================================
//--------|Map Flags|---------------------------------------------------------------
//==================================================================================

prt_maze01	mapflag	monster_noteleport
prt_maze01	mapflag	nowarpto
prt_maze01	mapflag	nomemo
prt_maze01	mapflag	noteleport
prt_maze01	mapflag	nosave SavePoint
prt_maze01	mapflag	nopenalty
prt_maze01	mapflag	pvp

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.03
  • Content Count:  38
  • Reputation:   0
  • Joined:  08/19/23
  • Last Seen:  

On 2/4/2024 at 4:30 PM, Emistry said:

you aren't using the script which I have updated for you in the earlier post.

prontera,146,171,6	script	Portal Square	89,{
	.@n$ = "[^3355FF Portal Square ^000000]";
	.@party_id = getcharid(1);
	.@p_name$ = getpartyname(.@party_id);
	.@instance$ = "Portal Square";

	if (!.@party_id || getcharid(0) != getpartyleader(.@party_id, 2)) {
		mes .@n$;
		mes "In able to enter the Portal Square, you must have a party.";
		close;
	}
	mes .@n$;
	mes "Portal Square is available everyday for 1 hour and 30 minutes.";
	mes "Remember, the room and everything inside including boss chamber and other resources, watch out for enemies as well since the room are pk free.";
	next;
	switch(select("Enter the Room:Cancel")) {
		case 1:
			switch(instance_enter("Portal Square")) {
				case 3:
					mes .@n$;
					mes "You doesn't have a party.";
					close;
				case 2:
					mes .@n$;
					mes "You can enter the room after making a party.";
					end;
			}
			break;
		case 2:
			mes .@n$;
			mes "Have a nice day then, see you later!.";
			break;
	}
	close;
}

//==================================================================================
//--------|Map Flags|---------------------------------------------------------------
//==================================================================================

prt_maze01	mapflag	monster_noteleport
prt_maze01	mapflag	nowarpto
prt_maze01	mapflag	nomemo
prt_maze01	mapflag	noteleport
prt_maze01	mapflag	nosave SavePoint
prt_maze01	mapflag	nopenalty
prt_maze01	mapflag	pvp

 

My bad, thank you so much

 

@Emistry After making a party it doesn't allowing me to enter the instance. It said that you can enter the room after making a party

 

What am I missing?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...