Jump to content
  • 0
PholliCruz

Instance warp and getitem after completing

Question

Good day rathena, I need help modifying this script.
the problem is after killing the last mob inside the instance the player doesn't get any rewards and the instance it self doesn't destroying.
 

it should be after killing the last mvp all players including the party leader will get a reward and after a 1 minute all players will be warped out inside the instance.

 

anyone can help me? here's the script. thank you in advance.
 

// Entrance
//============================================================
izlude,134,151,4	script	Hunting Path	1736,{

	if (BaseLevel < 150) {
		mes [email protected]$;
		mes "Why don't you come back after becoming stronger?";
		mes "Maybe, level 150.";
		close;
	}

	[email protected]$ = "[^3355FF Hunting Path ^000000]";
	[email protected]_id = getcharid(1);
	[email protected]_name$ = getpartyname([email protected]_id);
	[email protected]$ = "Hunting Path";
	set [email protected]_lim_time,upath_timer+2700; // 45 mins
	set [email protected]_timer,checkquest(80000,PLAYTIME); // 45 mins

		if (getcharid(0) == getpartyleader([email protected]_id,2)) {
		mes [email protected]$;
		mes "This is where the fun really begins, I suggest you to bring friends, Do you really think you are ready?";
			next;
			switch(select("I'm super high and i can take anything:Enter Dungeon:Cancel")) {
			case 1:
				if (Zeny < 50000) { 
				mes [email protected]$;
				mes "I will not send you for free.";
				mes "I need to make a living.";
				mes "The cost of my service is 50,000 zeny.";
				mes "Would you like to proceed?";
				//cutin "",255;
				end;
				}
				if (instance_create([email protected]$) < 0) {
					mes "Party Name: "[email protected]_name$;
					mes "Party Leader: "+strcharinfo(0);
					mes "^0000ff"[email protected]$+" ^000000- Reservation Failed!";
					close;
				}
				Zeny -= 50000;
				mes [email protected]$;
				mes "Talk to me again if you want to enter the dungeon again.";
				close;
			case 2:
				callsub L_Enter,0,1;
			case 3:
			mes [email protected]$;
			mes "Good luck!.";
				close;
			}
		}
		mes [email protected]$;
		mes "You may enter a Hunting Path if it's been reserved by your party leader.";
		next;
		switch(select("Enter the Hunting Path:Cancel")) {
		case 1:
			callsub L_Enter,1,1;
		case 2:
			mes [email protected]$;
			mes "Good luck!.";
			end;
		}
		
L_Enter:
	switch(instance_enter("Hunting Path")) {
	case 3:
		mes [email protected]$;
		mes "You are not in a party.";
		close;
	case 2:
		mes [email protected]$;
		mes "The private Hunting Path has not yet been reserved.";
		mes "The party leader did not pay the fee.";
		close;
	case 1:
		mes [email protected]$;
		mes "You can enter the room after making a party.";
		close;
	case 0:
		mapannounce "izlude", getpartyname( getcharid(1) ) +" party's party member "+ strcharinfo(0) +" has entered the Hunting Path Instance.", bc_map, "0x00ff99";
		set upath_timer,gettimetick(2);
		end;
	}
}

// Sector 1 Mobs
//============================================================
job_thief1,1,1,0	script	#unholypathmobs	HIDDEN_WARP_NPC,{
	close;

OnInstanceInit:
		[email protected]$ = instance_mapname("job_thief1");
		[email protected]$ = instance_npcname("#unholypathmobs");
		monster [email protected]$,0,0,"Apocalypse",30001,44,[email protected]$ + "::OnMobsKilled";
		monster [email protected]$,0,0,"Civil Servant",30002,47,[email protected]$ + "::OnMobsKilled";
		monster [email protected]$,0,0,"Undoer",30003,43,[email protected]$ + "::OnMobsKilled";
		monster [email protected]$,0,0,"Leaf Cat",30004,45,[email protected]$ + "::OnMobsKilled";
		monster [email protected]$,0,0,"Enchanter",30005,42,[email protected]$ + "::OnMobsKilled";
		monster [email protected]$,0,0,"Garm",30006,10,[email protected]$ + "::OnMobsKilled";
		monster [email protected]$,0,0,"Raydric DeadEye",30007,45,[email protected]$ + "::OnMobsKilled";
		monster [email protected]$,0,0,"Monkey Fist",30008,42,[email protected]$ + "::OnMobsKilled";

OnMobsKilled:
	//announce "Hey, " + strcharinfo(0) + " just killed a Poringz0rd!",bc_blue|bc_all;
	end;
}

//============================================================
// Thumb of Shax
//============================================================
job_thief1,64,330,4	script	Gatekeeper	4_F_NFDEADKAFRA,{
	mes "[Gatekeeper]";
	mes "I am the proud owner of sealed gate, Only i hold the key of entry!.";
	mes "Inside you will find one of my many beast, a challenge in which you can handle it.";
	next;
	mes "[Notice]";
	mes "Just in case you missed my announcement, please ensure all your party members are on the same map as you before continuing.";
	next;
	mes "[Gatekeeper]";
	mes "Please confirm you read my announcement.";
	next;
	switch(select("Continue:Let me grab all my party member first:Cancel")) {
	case 1:
		mes "Ok good luck i will warp you now.";
		warp instance_mapname("pvp_n_1-4", instance_id(IM_PARTY)) ,100,18;
		close;
	case 2:
		mes "Ok Lets wait them all.";
		close;
	case 3:
		mes "Ok!.";
		close;
	}
}

pvp_n_1-4,1,1,0	script	#ultimatemobs	HIDDEN_WARP_NPC,{
	//mes "Hi there";
	close;
OnInstanceInit:
		[email protected]$ = instance_mapname("pvp_n_1-4");
		[email protected]$ = instance_npcname("#ultimatemobs");
		monster [email protected]$,100,114,"Shax",30009,1,[email protected]$ + "::OnMobsKilled";

OnMobsKilled:
	mapannounce instance_mapname("pvp_n_1-4"), "Hunting Path has fallen.",bc_map,"0xffff00";
	end;

OnInstanceDestroy:
    set [email protected]$, instance_mapname("pvp_n_1-4");
    addrid(5, 0, [email protected]$);
    getitem 50037,1;

warp "izlude",128,141;
sleep2 1;
instance_destroy(instance_id(1));
deltimer strnpcinfo(0) +"::OnKick";
addtimer 60000, strnpcinfo(0) +"::OnKick"; // 60,000 seconds warp out (2 minutes)
@timeused = gettimetick(2);
end;
OnKick:
if ( strcharinfo(3) == "izlude" )
	warp "izlude",128,141;
end;


}

//============================================================
// Thumb of Raum
//============================================================
job_thief1,103,330,4	script	Gatekeeper#2	4_F_NFDEADKAFRA,{
	mes "[Gatekeeper]";
	mes "I am the proud owner of sealed gate, Only i hold the key of entry!.";
	mes "Inside you will find one of my many beast, a challenge in which you can handle it.";
	next;
	mes "[Notice]";
	mes "Just in case you missed my announcement, please ensure all your party members are on the same map as you before continuing.";
	next;
	mes "[Gatekeeper]";
	mes "Please confirm you read my announcement.";
	next;
	switch(select("Continue:Let me grab all my party member first:Cancel")) {
	case 1:
		mes "Ok good luck i will warp you now.";
		warp instance_mapname("pvp_n_2-4", instance_id(IM_PARTY)) ,100,18;
		close;
	case 2:
		mes "Ok Lets wait them all.";
		close;
	case 3:
		mes "Ok!.";
		close;
	}
}

pvp_n_2-4,1,1,0	script	#ultimatemobs2	HIDDEN_WARP_NPC,{
	//mes "Hi there";
	close;
OnInstanceInit:
		[email protected]$ = instance_mapname("pvp_n_2-4");
		[email protected]$ = instance_npcname("#ultimatemobs2");
		monster [email protected]$,100,114,"Raum",30010,1,[email protected]$ + "::OnMobsKilled";

OnMobsKilled:
	mapannounce instance_mapname("pvp_n_2-4"), "Hunting Path has fallen.",bc_map,"0xffff00";
	end;

OnInstanceDestroy:
    set [email protected]$, instance_mapname("pvp_n_2-4");
    addrid(5, 0, [email protected]$);
    getitem 50038,1;
   
warp "izlude",128,141;
sleep2 1;
instance_destroy(instance_id(1));
deltimer strnpcinfo(0) +"::OnKick";
addtimer 60000, strnpcinfo(0) +"::OnKick"; // 60,000 seconds warp out (2 minutes)
@timeused = gettimetick(2);
end;
OnKick:
if ( strcharinfo(3) == "izlude" )
	warp "izlude",128,141;
end;


}

//============================================================
// Thumb of Paimon
//============================================================
job_thief1,158,330,4	script	Gatekeeper#3	4_F_NFDEADKAFRA,{
	mes "[Gatekeeper]";
	mes "I am the proud owner of sealed gate, Only i hold the key of entry!.";
	mes "Inside you will find one of my many beast, a challenge in which you can handle it.";
	next;
	mes "[Notice]";
	mes "Just in case you missed my announcement, please ensure all your party members are on the same map as you before continuing.";
	next;
	mes "[Gatekeeper]";
	mes "Please confirm you read my announcement.";
	next;
	switch(select("Continue:Let me grab all my party member first:Cancel")) {
	case 1:
		mes "Ok good luck i will warp you now.";
		warp instance_mapname("pvp_n_3-4", instance_id(IM_PARTY)) ,100,18;
		close;
	case 2:
		mes "Ok Lets wait them all.";
		close;
	case 3:
		mes "Ok!.";
		close;
	}
}

pvp_n_3-4,1,1,0	script	#ultimatemobs3	HIDDEN_WARP_NPC,{
	//mes "Hi there";
	close;
OnInstanceInit:
		[email protected]$ = instance_mapname("pvp_n_3-4");
		[email protected]$ = instance_npcname("#ultimatemobs3");
		monster [email protected]$,100,114,"Paimon",30011,1,[email protected]$ + "::OnMobsKilled";

OnMobsKilled:
	mapannounce instance_mapname("pvp_n_3-4"), "Hunting Path has fallen.",bc_map,"0xffff00";
	end;

OnInstanceDestroy:
    set [email protected]$, instance_mapname("pvp_n_3-4");
    addrid(5, 0, [email protected]$);
    getitem 50039,1;
   
warp "izlude",128,141;
sleep2 1;
instance_destroy(instance_id(1));
deltimer strnpcinfo(0) +"::OnKick";
addtimer 60000, strnpcinfo(0) +"::OnKick"; // 60,000 seconds warp out (2 minutes)
@timeused = gettimetick(2);
end;
OnKick:
if ( strcharinfo(3) == "izlude" )
	warp "izlude",128,141;
end;


}

//============================================================
// Thumb of Apollyon
//============================================================
job_thief1,262,332,4	script	Gatekeeper#4	4_F_NFDEADKAFRA,{
	mes "[Gatekeeper]";
	mes "I am the proud owner of sealed gate, Only i hold the key of entry!.";
	mes "Inside you will find one of my many beast, a challenge in which you can handle it.";
	next;
	mes "[Notice]";
	mes "Just in case you missed my announcement, please ensure all your party members are on the same map as you before continuing.";
	next;
	mes "[Gatekeeper]";
	mes "Please confirm you read my announcement.";
	next;
	switch(select("Continue:Let me grab all my party member first:Cancel")) {
	case 1:
		mes "Ok good luck i will warp you now.";
		warp instance_mapname("pvp_n_4-4", instance_id(IM_PARTY)) ,100,18;
		close;
	case 2:
		mes "Ok Lets wait them all.";
		close;
	case 3:
		mes "Ok!.";
		close;
	}
}

pvp_n_4-4,1,1,0	script	#ultimatemobs4	HIDDEN_WARP_NPC,{
	//mes "Hi there";
	close;
OnInstanceInit:
		[email protected]$ = instance_mapname("pvp_n_4-4");
		[email protected]$ = instance_npcname("#ultimatemobs4");
		monster [email protected]$,100,114,"Apollyon",30012,1,[email protected]$ + "::OnMobsKilled";

OnMobsKilled:
	mapannounce instance_mapname("pvp_n_4-4"), "Hunting Path has fallen.",bc_map,"0xffff00";
	end;

OnInstanceDestroy:
    set [email protected]$, instance_mapname("pvp_n_4-4");
    addrid(5, 0, [email protected]$);
    getitem 50040,1;
   
warp "izlude",128,141;
sleep2 1;
instance_destroy(instance_id(1));
deltimer strnpcinfo(0) +"::OnKick";
addtimer 60000, strnpcinfo(0) +"::OnKick"; // 60,000 seconds warp out (2 minutes)
@timeused = gettimetick(2);
end;
OnKick:
if ( strcharinfo(3) == "izlude" )
	warp "izlude",128,141;
end;


}

//============================================================
// Thumb of Balam
//============================================================
job_thief1,179,287,4	script	Gatekeeper#5	4_F_NFDEADKAFRA,{
	mes "[Gatekeeper]";
	mes "I am the proud owner of sealed gate, Only i hold the key of entry!.";
	mes "Inside you will find one of my many beast, a challenge in which you can handle it.";
	next;
	mes "[Notice]";
	mes "Just in case you missed my announcement, please ensure all your party members are on the same map as you before continuing.";
	next;
	mes "[Gatekeeper]";
	mes "Please confirm you read my announcement.";
	next;
	switch(select("Continue:Let me grab all my party member first:Cancel")) {
	case 1:
		mes "Ok good luck i will warp you now.";
		warp instance_mapname("pvp_n_5-4", instance_id(IM_PARTY)) ,100,18;
		close;
	case 2:
		mes "Ok Lets wait them all.";
		close;
	case 3:
		mes "Ok!.";
		close;
	}
}

pvp_n_5-4,1,1,0	script	#ultimatemobs5	HIDDEN_WARP_NPC,{
	//mes "Hi there";
	close;
OnInstanceInit:
		[email protected]$ = instance_mapname("pvp_n_5-4");
		[email protected]$ = instance_npcname("#ultimatemobs5");
		monster [email protected]$,100,114,"Balam",30013,1,[email protected]$ + "::OnMobsKilled";

OnMobsKilled:
    mapannounce instance_mapname("pvp_n_5-4"), "Hunting Path has fallen.",bc_map,"0xffff00";
    
    //end;


OnInstanceDestroy:
    set [email protected]$, instance_mapname("pvp_n_5-4");
    addrid(5, 0, [email protected]$);
    getitem 50041,1;
   
warp "izlude",128,141;
sleep2 1;
instance_destroy(instance_id(1));
deltimer strnpcinfo(0) +"::OnKick";
addtimer 60000, strnpcinfo(0) +"::OnKick"; // 60,000 seconds warp out (2 minutes)
@timeused = gettimetick(2);
end;
OnKick:
if ( strcharinfo(3) == "izlude" )
	warp "izlude",128,141;
end;


}

//==================================================================================
//--------|Map Flags|---------------------------------------------------------------
//==================================================================================

job_thief1	mapflag	monster_noteleport
job_thief1	mapflag	nowarpto
job_thief1	mapflag	nomemo
job_thief1	mapflag	noteleport
job_thief1	mapflag	nosave	SavePoint
job_thief1	mapflag	nopenalty

pvp_n_1-4	mapflag	monster_noteleport
pvp_n_1-4	mapflag	nowarpto
pvp_n_1-4	mapflag	nomemo
pvp_n_1-4	mapflag	noteleport
pvp_n_1-4	mapflag	nosave	SavePoint
pvp_n_1-4	mapflag	nopenalty

pvp_n_2-4	mapflag	monster_noteleport
pvp_n_2-4	mapflag	nowarpto
pvp_n_2-4	mapflag	nomemo
pvp_n_2-4	mapflag	noteleport
pvp_n_2-4	mapflag	nosave	SavePoint
pvp_n_2-4	mapflag	nopenalty

pvp_n_3-4	mapflag	monster_noteleport
pvp_n_3-4	mapflag	nowarpto
pvp_n_3-4	mapflag	nomemo
pvp_n_3-4	mapflag	noteleport
pvp_n_3-4	mapflag	nosave	SavePoint
pvp_n_3-4	mapflag	nopenalty

pvp_n_4-4	mapflag	monster_noteleport
pvp_n_4-4	mapflag	nowarpto
pvp_n_4-4	mapflag	nomemo
pvp_n_4-4	mapflag	noteleport
pvp_n_4-4	mapflag	nosave	SavePoint
pvp_n_4-4	mapflag	nopenalty

pvp_n_5-4	mapflag	monster_noteleport
pvp_n_5-4	mapflag	nowarpto
pvp_n_5-4	mapflag	nomemo
pvp_n_5-4	mapflag	noteleport
pvp_n_5-4	mapflag	nosave	SavePoint
pvp_n_5-4	mapflag	nopenalty

// Shop Area
job_thief1,184,24,4	script	Forsaken Mystic#1	4_M_NFDEADMAN,{ callfunc "UnholypathShop"; }

-	script	unholypath_shop	-1,{
function Add; function Chk; function Slot;
OnInit:
	freeloop(1);

	set .Announce,1;	// Announce quest completion? (1: yes / 0: no)
	set .ShowSlot,1;	// Show item slots? (2: all equipment / 1: if slots > 0 / 0: never)
	set .ShowID,1;  	// Show item IDs? (1: yes / 0: no)
	set .ShowZeny,1;	// Show Zeny cost, if any? (1: yes / 0: no)
	set .MaxStack,5;	// Max number of quest items purchased at one time.

	setarray .Points$[0],
		"#CASHPOINTS", "Cash Points";

	setarray .Shops$[1],
		"Wings",	// Shop Named 1
		"Accesory Cards";		// Shop Named 2

// Shop 1
	Add(1,50005,1,0,0,50037,1,50038,1,50039,1,50040,1,50041,1);
	Add(1,50004,1,0,0,50037,1,50038,1,50039,1,50040,1,50041,1);
	Add(1,50006,1,0,0,50037,1,50038,1,50039,1,50040,1,50041,1);

// Shop 2
	Add(2,50053,1,0,0,50040,1,50041,1);
	Add(2,50051,1,0,0,50038,1,50040,1);
	Add(2,50054,1,0,0,50041,1,50039,1);
	Add(2,50050,1,0,0,50039,1,50036,1);
	Add(2,50052,1,0,0,50037,1,50038,1);

	freeloop(0);
	set .menu$,"";
	for(set [email protected],1; [email protected]<=getarraysize(.Shops$); set [email protected],[email protected]+1) {
		set .menu$, .menu$+.Shops$[[email protected]]+":";
		npcshopdelitem "UnholypathShop"[email protected],909;
	}
	end;

OnMenu:
	set [email protected], getarraysize(@i);
	if ([email protected]) set @shop_index, select(.menu$);
	else if ([email protected] == 1) set @shop_index, @i[0];
	else {
		for(set [email protected],0; [email protected]<[email protected]; set [email protected],[email protected]+1)
			set [email protected]$, [email protected]$+.Shops$[@i[[email protected]]]+":";
		set @shop_index, @i[select([email protected]$)-1];
	}
	deletearray @i[0],getarraysize(@i);
	if (.Shops$[@shop_index] == "") {
		message strcharinfo(0),"An error has occurred.";
		end;
	}
	dispbottom "Select one item at a time.";
	callshop "UnholypathShop"[email protected]_index,1;
	npcshopattach "UnholypathShop"[email protected]_index;
	end;

OnBuyItem:
	// [email protected][] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... }
	setarray [email protected][0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]);
	copyarray [email protected][3],getd(".q_"[email protected]_index+"_"[email protected][0]+"[0]"),getarraysize(getd(".q_"[email protected]_index+"_"[email protected][0]));
	set [email protected][2],[email protected][1]*[email protected][3];
	if ([email protected][2] || [email protected][2] > 30000) {
		message strcharinfo(0),"You can't purchase that many "+getitemname([email protected][0])+".";
		end;
	}
	mes "[Quest Shop]";
	mes "Reward: ^0055FF"+(([email protected][2] > 1)[email protected][2]+"x ":"")+Slot([email protected][0])+"^000000";
	mes "Requirements:";
	disable_items;
	if ([email protected][4]) mes " > "+Chk(Zeny,[email protected][4]*[email protected][1])+([email protected][4]*[email protected][1])+" Zeny^000000";
	if ([email protected][5]) mes " > "+Chk(getd(.Points$[0]),[email protected][5]*[email protected][1])+([email protected][5]*[email protected][1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+([email protected][5]*[email protected][1])+")^000000";
	if ([email protected][6]) for(set [email protected],6; [email protected]<getarraysize([email protected]q); set [email protected]i,[email protected]i+2)
		mes " > "+Chk(countitem([email protected][[email protected]]),[email protected][[email protected]+1]*[email protected][1])+((.ShowID)?"{"[email protected][[email protected]]+"} ":"")+Slot([email protected][[email protected]])+" ("+countitem([email protected][[email protected]])+"/"+([email protected][[email protected]+1]*[email protected][1])+")^000000";
	next;
	setarray @qe[1], getiteminfo([email protected][0],5), getiteminfo([email protected][0],11);
	if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT)))
		set [email protected],1;
	addtimer 1000, strnpcinfo(0)+"::OnEnd";
	while(1) {
		switch(select(" ~ Purchase ^0055FF"+getitemname([email protected][0])+"^000000:"+(([email protected] && [email protected][7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) {
		case 1:
			if (@qe[0]) {
				mes "[Quest Shop]";
				mes "You're missing one or more quest requirements.";
				close;
			}
			if (!checkweight([email protected][0],[email protected][2])) {
				mes "[Quest Shop]";
				mes "^FF0000You need "+((([email protected][2]*getiteminfo([email protected][0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000";
				close;
			}
			if ([email protected][4]) set Zeny, Zeny-([email protected][4]*[email protected][1]);
			if ([email protected][5]) setd .Points$[0], getd(.Points$[0])-([email protected][5]*[email protected][1]);
			if ([email protected][6]) for(set [email protected],6; [email protected]<getarraysize([email protected]q); set [email protected]i,[email protected]i+2)
				delitem [email protected]q[[email protected]i],[email protected]q[[email protected]i+1]*[email protected]q[1];
			getitem [email protected]q[0],[email protected]q[2];
			if (.Announce) announce strcharinfo(0)+" has created "+(([email protected]q[2] > 1)[email protected][2]+"x "+getitemname([email protected][0]):callfunc("F_InsertArticle",getitemname([email protected][0])))+"!",0;
			specialeffect2 EF_FLOWERLEAF;
			close;
		case 2:
			setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1;
			if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2];
			else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2];
			else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2];
			else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2];
			break;
		case 3:
			close;
		}
	}

OnEnd:
	if (@qe[7]) {
		changelook LOOK_HEAD_BOTTOM, @qe[3];
		changelook LOOK_HEAD_TOP, @qe[4];
		changelook LOOK_HEAD_MID, @qe[5];
		changelook LOOK_ROBE, @qe[6];
	}
	deletearray @qe[0],8;
	end;

function Add {
	if (getitemname(getarg(1)) == "null") {
		debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
		return;
	}
	setarray [email protected][0],getarg(2),getarg(3),getarg(4);
	for(set [email protected],5; [email protected]<getargcount(); set [email protected],[email protected]+2) {
		if (getitemname(getarg([email protected])) == "null") {
			debugmes "Quest requirement #"+getarg([email protected])+" invalid (skipped).";
			return;
		} else
			setarray [email protected][[email protected]],getarg([email protected]),getarg([email protected]+1);
	}
	copyarray getd(".q_"+getarg(0)+"_"+getarg(1)+"[0]"),[email protected][0],getarraysize([email protected]);
	npcshopadditem "UnholypathShop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0);
	return;
}

function Chk {
	if (getarg(0) < getarg(1)) {
		set @qe[0],1;
		return "^FF0000";
	} else
		return "^00FF00";
}

function Slot {
	set [email protected]$,getitemname(getarg(0));
	switch(.ShowSlot) {
		case 1: if (!getitemslots(getarg(0))) return [email protected]$;
		case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return [email protected]$+" ["+getitemslots(getarg(0))+"]";
		default: return [email protected]$;
	}
}
}

function	script	UnholypathShop	{
	deletearray @i[0],getarraysize(@i);
	for(set [email protected],0; [email protected]<getargcount(); set [email protected],[email protected]+1)
		set @i[[email protected]],getarg([email protected]);
	doevent "unholypath_shop::OnMenu";
	end;
}

-	shop	UnholypathShop1	-1,909:-1
-	shop	UnholypathShop2	-1,909:-1

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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

Important Information

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