Jump to content
  • 0

Item Guarantee NPC?


Selerie

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  13
  • Reputation:   0
  • Joined:  12/27/21
  • Last Seen:  

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.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

-	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

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