Jump to content
  • 0
Sign in to follow this  
luizragna

Instance Warp

Question

Hello guys, how i can warp the instance for other map?

I whant that i kill the big foot, the instance warp to guild_vs3

 

Main Script:

prontera,156,189,5	script	Raid	1_F_MARIA,{
	mes "Conquista de três";
	next;
	if ( !getcharid(CHAR_ID_PARTY) ) {
		mes "Você deve formar um grupo para participar.";
		close;
	}
	if ( getpartyleader( getcharid(CHAR_ID_PARTY), 2 ) != getcharid(CHAR_ID_CHAR) ) {
		mes "Apenas o líder do grupo pode iniciar.";
		close;
	}
	.@origin = getcharid(CHAR_ID_ACCOUNT);
	getpartymember getcharid(CHAR_ID_PARTY), 1;
	getpartymember getcharid(CHAR_ID_PARTY), 2;
	for ( .@i = 0; .@i < $@partymembercount; ++.@i ) {
		if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
			attachrid $@partymemberaid[.@i];
			if ( strcharinfo(PC_MAP) == strnpcinfo(NPC_MAP) )
				.@online++;
		}
	}
	attachrid .@origin;
	if ( $@partymembercount != .register_min ) {
		mes "[MvP Ladder Warper]";
		mes "Você deve formar um grupo de "+ .register_min +" membror para play.";
		close;
	}
	else if ( .@online != .register_min )  {
		mes "[MvP Ladder Warper]";
		mes "Seu grupo deve possuír "+ .register_min +" membros online no mapa '"+ strnpcinfo(4) +"'.";
		close;
	}
	if ( ( .@ins = instance_create( "Raid Dungeon", getcharid(CHAR_ID_PARTY), IOT_PARTY ) ) < 0 ) {
		mes "error : "+ .@ins;
		close;
	}
	if ( instance_attachmap( "guild_vs2", .@ins, 1, .@ins +"RAID" ) == "" ) {
		mes "error : 5";
		instance_destroy .@ins;
		close;
	}
	instance_set_timeout 3600, 15, .@ins;
	instance_init .@ins;
	instance_attach .@ins;
	'hue = 1;
	warpparty has_instance("guild_vs2"), 0,0, getcharid(CHAR_ID_PARTY), strnpcinfo(4);
	end;
	
OnInit:
	.register_min = 1;
	end;
}

 

Instance Level 1:

guild_vs2,0,0,0	script	TesteDG	FAKE_NPC,{
OnInstanceInit:

	monster (("guild_vs2"), 0,0, "Bigfoot.", 1603, 1, instance_npcname( strnpcinfo(NPC_NAME) )+"::OnMobDead");
	
	end;
	
OnMobDead:
end;
	
OnInit:
	disablenpc(""+strnpcinfo(NPC_NAME)+"");
}

 

Instance Level 2: (how i can warp to here?)

guild_vs3,0,0,0	script	TesteDG#2	FAKE_NPC,{
OnInstanceInit:

  monster (("guild_vs3"), 0,0, "Lunatic", 1591, 1, instance_npcname( strnpcinfo(NPC_NAME) )+"::OnMobDead");

	end;
  
 OnMobDead:
  end;
OnInit:
	disablenpc(""+strnpcinfo(NPC_NAME)+"");
}

 

Edited by luizragna

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

This should do the trick:
 

guild_vs2,0,0,0	script	TesteDG	FAKE_NPC,{
	OnInstanceInit:
		monster (("guild_vs2"), 0,0, "Bigfoot.", 1603, 1, instance_npcname( strnpcinfo(NPC_NAME) )+"::OnMobDead");
	end;
	
	OnMobDead:
		warp(instance_mapname("guild_vs3"), 199, 255);
	end;
	
	OnInit:
		disablenpc(""+strnpcinfo(NPC_NAME)+"");
}

 

Share this post


Link to post
Share on other sites
  • 0

@Winterfox when i tryied, the console show:

Quote

[Debug]: mapindex_name2id: Map "" not found in index list!
[Debug]: Source (NPC): TesteDG  at 0RAID (0,0)
[Debug]: pc_setpos: Passed mapindex(0) is invalid!
[Error]: buildin_warp: moving player 'Sinbad' to "",199,255 failed.
[Debug]: Source (NPC): TesteDG at 0RAID (0,0)

 

Share this post


Link to post
Share on other sites
  • 0

Solved! I added this line in the main script:

	if ( instance_attachmap( "guild_vs3", .@ins, 1, .@ins +"RAID3" ) == "" ) {
		mes "error : 6";
		instance_destroy .@ins;
		close;
	}

And to warp:

warpparty has_instance("guild_vs2"), 0,0, getcharid(CHAR_ID_PARTY), strnpcinfo(4);

 

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.