Jump to content
  • 0

Item Guarantee NPC?


Question

Posted

May i request a script for this NPC?

1.) An NPC that lets you input a mob ID

2.) Shows a menu of that mob's drop item IDs

3.) After you pick the desired drop item ID.

4.) NPC will guarantee you that item after killing 100 said mob.

1 answer to this question

Recommended Posts

  • 0
Posted
-	script	Sample	-1,{
	OnTalk:
		mes "Enter Mob ID";
		input .@mob_id;
		getmobdrops(.@mob_id);
		.@count = $@MobDrop_count;
		copyarray .@mob_drop_item, $@MobDrop_item, .@count;
		for (.@i = 0; .@i < .@count; .@i++) {
			mes getitemname(.@mob_drop_item[.@i]);
			.@menu$ = .@menu$ + getitemname(.@mob_drop_item[.@i]) + ":";
		}
		.@i = select(.@menu$) - 1;
		MOB_DROP_MOB_ID = .@mob_id;
		MOB_DROP_ITEMID = .@mob_drop_item[.@i];
		MOB_DROP_KILL = 0;
		close;
		
	OnNPCKillEvent:
		if (killedrid == MOB_DROP_MOB_ID) {
			MOB_DROP_KILL++;
			if (MOB_DROP_KILL && MOB_DROP_KILL % 100 == 0)
				getitem MOB_DROP_ITEMID, 1;
		}
		end;
}

prontera,155,181,5	script	NPC	757,{
	doevent "Sample::OnTalk";
}

try this

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