Jump to content
  • 0
Sign in to follow this  
spectator

R>NPC scripts

Question

Hi to all can i request some of scripts?

 

here:

 

1. Mithril Coin Trader

 

2. Reward Giver  (input player name then the itemid and the amount of items)

 

 

 

 

 

thanks in advance

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Mithril Coin Trader

prontera,150,150,0	script	Sample	100,{	mes .NPC$;	mes "Hello " +strcharinfo(0)+ " what can i do for you?";	next;	if (select("Trade my " +getitemname(.coin)+ " to zeny:Nothing" ) - 1) close;	if (!countitem(.coin)) close;	    mes .NPC$;	mes "How many " +getitemname(.coin)+ " would you like to exchange?";	next;	input @amount;			if (@amount == 0 || countitem(.coin) < @amount) {		mes .NPC$;		mes "Invalid amount";		close;	}	mes .NPC$;	mes "So you want to exchange " +@amount+ " " +getitemname(.coin)+ "?";	next;	if (select("Yes:No") - 1) close;		mes .NPC$;	mes "Here you go!";	delitem .coin, @amount;	Zeny = Zeny + ( .rate * @amount );	close;	OnInit:		.NPC$ = strnpcinfo(1);		.coin = 674; // 674 = Mithril Coin		.rate = 5000; // 1 (.coin) = 5000 zeny		end;}
Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

its not mine but i will share to you!

 

[cbox]// Made by MoonlightRO
// Source: http://www.eathena.ws/board/index.php?showtopic=251759
// Don't take my creation as your own >.>

prontera,164,173,3 script Coin Exchanger 878,{

cutin "kafra_08",2;
mes "[ ^336699Bank Master^000000 ]";
mes "What do you want to do today?";
menu "Coins -> Zeny",L_Coins,"Zeny -> Coins",L_Zeny,"Nevermind",L_No;

L_Coins:
next;
mes "[ ^336699Bank Master^000000 ]";
mes "Very well. Here is the list on how much a coin is worth:";
mes "^666666Silver Coins^000000: 1,000,000m Zeny";
mes "^FFFF66Gold Coins^000000: 5,000,000m Zeny";
mes "^99CCCCMithril Coins^000000: 10,000,000m Zeny";
mes "Tell me, what coin would you like to exchange?";
next;
menu "^666666Silver Coins^000000",M_Silver,"^FFFF66Gold Coins^000000",M_Gold,"^99CCCCMithril Coins^000000",M_Mithril;





M_Silver:
next;
mes "[ ^336699Bank Master^000000 ]";
mes "How many coins would you like to give up?";
set @mamount,0;
input @mamount;
if (@mamount < 0) goto L_No;
if (countitem(675) < @mamount) goto L_No;
set Zeny,(zeny + (1000000* @mamount));
delitem 675,@mamount;
goto L_Thanks;

M_Gold:
next;
mes "[ ^336699Bank Master^000000 ]";
mes "How many coins would you like to give up?";
set @mamount,0;
input @mamount;
if (@mamount < 0) goto L_No;
if (countitem(671) < @mamount) goto L_No;
set Zeny,(zeny + (5000000* @mamount));
delitem 671,@mamount;
goto L_Thanks;

M_Mithril:
next;
mes "[ ^336699Bank Master^000000 ]";
mes "How many coins would you like to give up?";
set @mamount,0;
input @mamount;
if (@mamount < 0) goto L_No;
if (countitem(674) < @mamount) goto L_No;
set Zeny,(zeny + (10000000* @mamount));
delitem 674,@mamount;
goto L_Thanks;

L_Zeny:
next;
mes "[ ^336699Bank Master^000000 ]";
mes "Very well. Here is the list on how much each coin is worth:";
mes "^666666Silver Coins^000000: 1,000,000m Zeny";
mes "^FFFF66Gold Coins^000000: 5,000,000m Zeny";
mes "^99CCCCMithril Coins^000000: 10,000,000m Zeny";
mes "Tell me, what check would you like to get?";
next;
menu "^666666Silver Coin^000000",M_Silver1,"^FFFF66Gold Coin^000000",M_Gold1,"^99CCCCMithril Coin^000000",M_Mithril1;

M_Silver1:
next;
mes "[ ^336699Bank Master^000000 ]";
mes "How many coins would you like?";
set @mamount,0;
input @mamount;
if (zeny < 0) goto L_No;
if (zeny < (1000000* @mamount)) goto L_No;
set Zeny,(zeny - (1000000* @mamount));
getitem 675,@mamount;
goto L_Thanks;

M_Gold1:
next;
mes "[ ^336699Bank Master^000000 ]";
mes "How many coins would you like?";
set @mamount,0;
input @mamount;
if (zeny < 0) goto L_No;
if (zeny < (5000000* @mamount)) goto L_No;
set Zeny,(zeny - (5000000* @mamount));
getitem 671,@mamount;
goto L_Thanks;

M_Mithril1:
next;
mes "[ ^336699Bank Master^000000 ]";
mes "How many coins would you like?";
set @mamount,0;
input @mamount;
if (zeny < 0) goto L_No;
if (zeny < (10000000* @mamount)) goto L_No;
set Zeny,(zeny - (10000000* @mamount));
getitem 674,@mamount;
goto L_Thanks;

L_Thanks:
mes "[ ^336699Bank Master^000000 ]";
mes "Pleasure doing business with you.";
close2;
cutin "", 255;
close;

L_No:
mes "[ ^336699Bank Master^000000 ]";
mes "Okay~ Bye!";
close2;
cutin "", 255;
close;
}[/cbox]

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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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