Jump to content
  • 0

Instance Problem


Reborn

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

I am having a problem with the instance especially for maps.

I tried to use the instancing.txt inside the Doc folder and its working fine, but when I changed the instance map  "abyss_03" to a different map like "pay_fild04" I am getting a client error.
PS: When I change the mapname inside the script into "pay_fild04" I also changed the mapname in instance_db.yml

Script:

prontera,151,190,6	script	Sample Instance	101,{
	.@instance$ = "Abyss Lake Instance";

	if (instance_live_info(ILI_NAME, instance_id(IM_PARTY)) == .@instance$) {
		mes "[Sample Instance]";
		mes "You are already part of an instance.";
		next;
		switch(select("Enter Instance.:Cancel.")) {
		case 1:
			break;
		case 2:
			mes "[Sample Instance]";
			mes "You don't want to try again?";
			emotion ET_CRY;
			close;
		}
	}
	else if (instance_id(IM_PARTY)) {
		mes "[Sample Instance]";
		mes "You are part of the instance " + instance_live_info(ILI_NAME, instance_id(IM_PARTY)) + ".";
		close;
	}
	else {
		mes "[Sample Instance]";
		mes "Would you like to try the sample instance in Abyss Lake 3?";
		next;
		switch(select("Create Instance.:Cancel.")) {
		case 1:
			.@create = instance_create(.@instance$);
			if (.@create < 0) {
				mes "[Sample Instance]";
				switch (.@create) {
					case -1: mes "ERROR: Invalid type."; break;
					case -2: mes "ERROR: Party not found."; break;
					case -3: mes "ERROR: Instance already exists."; break;
					case -4: mes "ERROR: No free instances."; break;
				}
				mes " ";
				mes "Instance creation ^FF0000failed^000000.";
				emotion ET_HUK;
				close;
			}
			mes "[Sample Instance]";
			mes "Instance created.";
			mes " ";
			mes "Now entering the instance...";
			next;
			break;
		case 2:
			mes "[Sample Instance]";
			mes "Okay. Maybe next time!";
			close;
		}
	}
	.@enter = instance_enter(.@instance$);
	if (.@enter != 0) {
		mes "[Sample Instance]";
		switch (.@enter) {
			case 1: mes "ERROR: Party not found."; break;
			case 2: mes "ERROR: Party does not have an instance."; break;
			case 3: mes "ERROR: Unknown error."; break;
		}
		mes " ";
		mes "Instance entry ^FF0000failed^000000.";
		emotion ET_HUK;
		close;
	}
	close;
}

// Instance Scripts
//============================================================
pay_fild04,131,207,3	script	Instance NPC#start	101,{
	mes "[Instance NPC]";
	mes "Are you ready to begin?";
	next;
	switch(select("Yes.:No.")) {
	case 1:
		mes "[Instance NPC]";
		mes "Good luck.";
		close2;
		donpcevent instance_npcname("#ins_abyss03_mobs")+"::OnEnable";
		delwaitingroom;
		disablenpc instance_npcname(strnpcinfo(0));
		end;
	case 2:
		mes "[Instance NPC]";
		mes "Take your time.";
		close;
	}
	end;

	OnInit:
		disablenpc strnpcinfo(0);
	end;
	OnInstanceInit:
		waitingroom "Click here to start!",0;
	end;
}

pay_fild04,0,0,0	script	#ins_abyss03_mobs	-1,{
	end;
	OnEnable:
		initnpctimer;
	end;
	OnTimer1000:
		mapannounce strnpcinfo(4),"Instance NPC: The Abyss Lake instance has begun.",bc_all;
	end;
	OnTimer4000:
		mapannounce strnpcinfo(4),"Instance NPC: Smash the Treasure Chest in the center of the map for a prize.",bc_all;
	end;
	OnTimer5000:
		stopnpctimer;
		.@map$        = instance_mapname("pay_fild04");
		.@label$      = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
		.@label_boss$ = instance_npcname(strnpcinfo(0))+"::OnMyBossDead";
		monster .@map$,0,0,"Huge Poring",1002,20,.@label$,2;
		monster .@map$,0,0,"Huge Drops",1113,15,.@label$,2;
		monster .@map$,0,0,"Huge Poporing",1031,10,.@label$,2;
		monster .@map$,0,0,"Huge Marin",1242,10,.@label$,2;
		monster .@map$,0,0,"Tiny Zombie",1015,30,.@label$,1;
		monster .@map$,0,0,"Huge Mime Monkey",1585,2,.@label$,2;
		monster .@map$,97,102,"Treasure Chest",1732,1,.@label_boss$,2;
	end;
	OnMyMobDead:
		dispbottom "What am I doing? I should be attacking the Treasure Chest!";
		viewpoint 0,97,102,0,0xFF0000;
		switch (rand(6)) {
			case 0: sc_start SC_STONE,5000,0; break;
			case 1: sc_start SC_FREEZE,5000,0; break;
			case 2: sc_start SC_STUN,5000,0; break;
			case 3: sc_start SC_SLEEP,5000,0; break;
			case 4: sc_start SC_CONFUSION,5000,0; break;
			case 5: sc_start SC_BLIND,5000,0; break;
		}
	end;
	OnMyBossDead:
		specialeffect2 EF_MVP;
		getitem 512,1;
		.@map$   = instance_mapname("pay_fild04");
		.@label$ = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
		killmonster .@map$,.@label$;
		mapannounce .@map$,"Instance NPC: Good work! Please speak to me as soon as possible.",bc_all;
		donpcevent instance_npcname("Instance NPC#finish")+"::OnEnable";
	end;
}

pay_fild04,246,197,4	script	Instance NPC#finish	101,{
	mes "[Instance NPC]";
	mes "Congratulations! You've finished the instance.";
	mes "I'll send you back to town now.";
	emotion ET_BEST;
	close2;
	warp "prontera",156,191;
	instance_destroy();
	end;

	OnInit:
		disablenpc strnpcinfo(0);
	end;
	OnInstanceInit:
		disablenpc instance_npcname(strnpcinfo(0));
	end;
	OnEnable:
		enablenpc instance_npcname(strnpcinfo(0));
		specialeffect EF_HIDING;
	end;
}

instance_db.yml

Header:
  Type: INSTANCE_DB
  Version: 1

Body:
  - Id: 100
    Name: Abyss Lake Instance
    TimeLimit: 3600
    IdleTimeOut: 0
    Enter:
      Map: pay_fild04
      X: 130
      Y: 200

After the NPC warped me to the map I am getting this client error message

 Untitled1.thumb.png.fed4368140d4366fc445b1e243e12f95.png

Untitled2.thumb.png.8a8f59ce6fb17ddbf29fdedb72761f0f.png

And then the client will close.

Am I missing something here? What I am thinking is there might something that I need to compile within yml? Im not sure. Please help me out.

Edited by neXus
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

Is there anyone knows hows to fix this?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Check your client files. Seems there are incorrect filenames? per error it says "ay_fild04.rsw" . It should be "pay_fild04.rsw"

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

@Patskie I dont have a map named ay_fild04.rsw because I am using an existing map pay_fild04.rsw. its an instance so basically it should create a copy map from an existing map right

[UPDATE]

This is not just happening to some existing map but this also happens to all new maps that I have.

When I tried a repository prior on changing the instance_db.txt to instance_db.yml everything works fine.

Now that its in yml file, am I missing some steps that's why its not working on my end?

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

A pull request is currently ongoing to fix the issue https://github.com/rathena/rathena/pull/4945

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