Jump to content
  • 0

Instance Problem


Bisuke

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   10
  • Joined:  04/02/12
  • Last Seen:  

I am making an Instance Dungeon. I was able to make a working instance dungeon with instance_create and instance_destroy, however, After I moved into the instance map, I see another player. Instances are supposed to be party-exclusive map just like the Endless Tower and the Orc Memorial. What is wrong with my basic script?

 

Note: This script was based on the code of Orc Memorial. The 2 NPCs are the Quest Starter and the Quest Ender. I used it as the base of my instance.

 

<spoiler>

new_2-1,144,95,4	script	Payon Digger	78,{

	set .@party_id,getcharid(1);
	set .@p_name$,getpartyname(.@party_id);
	set .@md_name$,"Payon Cave Inferno";

	if (!instance_check_party(.@party_id,1,30,80)) {
		mes "Only users between Levels ^ff000030 ~ 80^000000 can enter this Dungeon.";
		close;
	}

	set .@paytime,checkquest(70000,PLAYTIME);
	if (.@paytime == -1) {
		if (getcharid(0) == getpartyleader(.@party_id,2)) {
			mes "Party status confirmed. Would you like to book entrance to the "+.@md_name$+"?";
			next;
			switch(select("Reserve the "+.@md_name$+":Enter the Dungeon:Cancel")) {
			case 1:
				if (instance_create(.@md_name$) < 0) {
					mes "Party Name: "+.@p_name$;
					mes "Party Leader: "+strcharinfo(0);
					mes "^0000ff"+.@md_name$+" ^000000 - Reservation Failed.";
					close;
				}
				mes "^0000ff"+.@md_name$+"^000000- Attempting to book an entrance";
				mes "After making a reservation, you have to select 'Enter the Dungeon' from the menu if you wish to enter the "+.@md_name$+".";
				close;
			case 2:
				callsub L_Enter,0;
			case 3:
				close;
			}
		}
		if(select(.@md_name$ + " Enter the Memorial Dungeon:Cancel") == 2)
			end;
		callsub L_Enter,1;
	} else if (.@paytime == 0 || .@paytime == 1) {
		mes "You can enter the Dungeon if it has been generated.";
		next;
		if(select("Enter the Dungeon "+.@md_name$+":Cancel") == 2)
			close;
		callsub L_Enter,0;
	} else if (.@paytime == 2) {
		mes "^0000ffAll records and after-effects related to the Orc's Memory Dungeon are deleted. You can now regenerate or re-enter the dungeon.^000000";
		erasequest 70000;
		close;
	}
	mes "In order to generate a dungeon you must be the Party Leader and have at least 2 members in the party.";
	close;
L_Enter:
	switch(instance_enter("Payon Cave Inferno")) {
	case 3:
		mes "An unknown error has occurred.";
		close;
	case 2:
		mes "Memorial Dungeon Payon Cave Inferno does not exist.";
		mes "Memorial Dungeon has been destroyed by the Party Leader, or because of the time limit. Please try again after 2 hours.";
		close;
	case 1:
		mes "Only a member of the party can enter the Memorial Dungeon.";
		close;
	case 0:
		mapannounce "gef_fild10",.@p_name$+" party's member "+strcharinfo(0)+" has entered the Payon Cave Inferno.",bc_map,"0x00ff99";
		if (checkquest(70000) == -1) setquest 70000;
		//warp "1@orcs",179,15;
		if (getarg(0) == 0) close;
		else end;
	}




}

paydun1,29,161,4	script	Payon Close		78,{

		.@inst = instance_id();
		instance_destroy .@inst;
mes "Congratulations";
next;
close;
end;

} 

</spoiler>

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   21
  • Joined:  01/31/12
  • Last Seen:  

Did you define your instance in instance_db.txt?

 

http://rathena.org/wiki/Instancing

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   10
  • Joined:  04/02/12
  • Last Seen:  

Yes. I defined it. 

4,Payon Cave Inferno,14400,paydun1,21,181,paydun2,paydun3,paydun4,paydun5
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   21
  • Joined:  01/31/12
  • Last Seen:  

If every player is entering via the script (using instance_enter) they should be warped to the instanced version of the map.

 

Using any other warp method can lead to undesired results. Can you explain more about how to reproduce ending up on a non-instanced, non-exclusive map with non-party members?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   10
  • Joined:  04/02/12
  • Last Seen:  

So here's what I did. I copied the Orc's Memorial Instance Warper and modified it to make my own warper. So far, I made 2 npcs, 1st to create instance and to enter the dungeon, 2nd is to destroy the instance and end the quest.  I'm also wondering, I never used any ordinary warp command on my script, It uses instance_enter. I also made another quest entry on questdb.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   10
  • Joined:  04/02/12
  • Last Seen:  

Anybody? What is wrong in my script? Am I missing some codes?

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...