Jump to content
  • 0

Instance dude or problem


angelwarrior

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  02/21/16
  • Last Seen:  

I have a problem. When i enter to my instance all npc are enable and there are no mobs. I have a warp portal inside that map and i dont want it is enabled because it enabled when players kill mvp from this map.

 How i can disable it?

prontera,150,150,0	script	Instanced Prontera#a	101,{

	set .@instance$, "Primer Jefe";

	if (instance_id()) {
		if (select("Enter Instance.:Cancel.") == 2) end;
		if (instance_enter(.@instance$) != 0) {
			mes "Instance entrance ^FF0000failed^000000.";
			close;
		}
	} else {
		if (select("Create Instance.:Cancel.") == 2) end;
		if (instance_create(.@instance$) < 0) {
			mes "Instance creation ^FF0000failed^000000.";
			close;
		}
		mes "Instance created.";
		close2;
		instance_enter(.@instance$);
	}
	end;

OnInstanceInit:
	disablenpc instance_npcname(strnpcinfo(0));
	end;
}


Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  02/21/16
  • Last Seen:  

Sorry for doble post but i can't disable npc with this. My script is :

prontera,150,150,0	script	Instanced Prontera#a	101,{

	set .@instance$, "Primer Jefe";

	if (instance_id()) {
		if (select("Enter Instance.:Cancel.") == 2) end;
		if (instance_enter(.@instance$) != 0) {
			mes "Instance entrance ^FF0000failed^000000.";
			close;
		}
	} else {
		if (select("Create Instance.:Cancel.") == 2) end;
		if (instance_create(.@instance$) < 0) {
			mes "Instance creation ^FF0000failed^000000.";
			close;
		}
		mes "Instance created.";
		close2;
		instance_enter(.@instance$);
		.@map$ = instance_mapname("pvp_n_1-3");
		monster .@map$,0,0,"--ja--",1296,1,0,2;
	}
	end;
OnInstanceInit:
	disablenpc instance_npcname(strnpcinfo(0));
	disablenpc instance_npcname("warpmvp1");
	end;
}


pvp_n_1-3,100,140,0	script	warpmvp1	45,2,2,{
warp "piso1",178,223;
end;
}


EDIT: I put the script inside a npc in instance map and i can solved it. But i have another problem but i go to post it

Edited by angelwarrior
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

First, You have to know which warp point you want to disable. Then use

disablenpc instance_npcname("warp name")

then add a trigger script to enable it.

 

base it here:

https://rathena.org/board/topic/92382-disable-warp-on-instance-dungeon/#entry243658

 

as an example:

prontera,150,150,0    script    Instanced Prontera#a    101,{

    set .@instance$, "Primer Jefe";

    if (instance_id()) {
        if (select("Enter Instance.:Cancel.") == 2) end;
        if (instance_enter(.@instance$) != 0) {
            mes "Instance entrance ^FF0000failed^000000.";
            close;
        }
    } else {
        if (select("Create Instance.:Cancel.") == 2) end;
        if (instance_create(.@instance$) < 0) {
            mes "Instance creation ^FF0000failed^000000.";
            close;
        }
        mes "Instance created.";
        close2;
        instance_enter(.@instance$);
        //this
        .@map$ = instance_mapname("prontera");
        .@label$ = instance_npcname(strnpcinfo(0))+"::OnMyMobDead";
        monster .@map$,0,0,"--ja--",1002,150,.@label$,2;
        //end
    }
    end;
    
//this
OnMyMobDead:
    enablenpc instance_npcname("warppoint name");
end;
//end
OnInstanceInit:
    disablenpc instance_npcname(strnpcinfo(0));
    //this
    disablenpc instance_npcname("warppoint name");
    //end
    end;
}
Edited by Ninja
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  02/21/16
  • Last Seen:  

ok, and if i want to put a boss in this map? where i should write the code line ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

after

monster .@map$,0,0,"--ja--",1002,150,.@label$,2;
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   0
  • Joined:  02/21/16
  • Last Seen:  

 

after

monster .@map$,0,0,"--ja--",1002,150,.@label$,2;

okay, inside the same script. Thanks!

Edited by angelwarrior
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...