Jump to content
  • 0
caspe

Npc which sell refined Equipments

Question

Hello, i want npc which sells +7 refined equipment like +7 wool scarf and tidal shoes for defined currency like Gold Coin.

 

OR

 

It is possible to add new item in item_db which is already +7?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Can't test it, but this should do the job.


prontera,155,155,4	script	Refined Shop::alresho	4_F_06,{
	set .@npcname$, "[Refined Shop]";
	mes .@npcname$;
	mes "Hello to you!";
	mes "I can sell you some allready refined stuffs.";
	mes "Interested?";
	set .@menu$, "";
	for(set .@i,0; .@i<getarraysize(.stuffIds); set .@i,.@i+1)
	{
		set .@menu$, .@menu$ + (.@i == 0 ? "" : ":") + getitemname(.stuffIds[.@i]);
	}
	set .@choice, select(.@menu$) - 1;
	next;
	mes .@npcname$;
	mes "We're going for a " + getitemname(.stuffIds[.@choice]) + ", right?";
	mes "It'll cost you " + .price[.@choice] + " " + getitemname(.currency) + ", ok?";
	if(select("Yes","No") == 1)
	{
		if(countitem(.currency) >= .price[.@choice])
		{
			delitem .currency, .price[.@choice];
			getitem2 .stuffIds[.@choice], 1, 1, 7, 0, 0, 0, 0, 0;
		}
		next;
		mes .@npcname$;
		mes "Right! See you!";
	}
	close;	
	
OnInit:
	setarray .stuffIds[0],2424,2528;
	setarray .price[0],1,2;
	set .currency, 512;
	end;
}

Tell me if there's an issue.

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

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