Jump to content
  • 0

Question

Posted

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;
}


5 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...