Jump to content
  • 0
Sign in to follow this  
mrlongshen

A clickable item to zeny and some command

Question

Hi all.
A simple request from me.


Player A have 100m. Then player A type commands for example @convert then the 100m turn into 10 pieces of mithril coin (674)

and when player A click the mithril coin (674), he will get 10m per pieces.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

@@mrlongshen

 

Add this NPC:

-	script	ZENY_TO_MITHRIL_COIN	-1,{	OnInit:		bindatcmd("convert", "ZENY_TO_MITHRIL_COIN::OnConvert");	end;	OnConvert:		if( Zeny < 10000000 ) {			dispbottom "You need atleast 10.000.000z to get Mithril Coins.";			end;		}		.@coinCount = Zeny / 10000000;				Zeny -= .@coinCount * 10000000;		getitem Mithril_Coin, .@coinCount;}function    script    convert    {    .@coinCount = countitem(Mithril_Coin);    if( !.@coinCount ) {        dispbottom "You need atleast 1 Mithril Coin to get 10.000.000z.";        end;    }            delitem Mithril_Coin, .@coinCount;    Zeny += .@coinCount * 10000000;}

afterwards make Mithril Coin usable and use this as item script:

callfunc("convert");

Share this post


Link to post
Share on other sites
  • 0

@@Winterfox

 

Hi miss. I have test this script..

I think the script problem..

 

Read the condition

1. I have 1b and and I convert, then I get 100 mithril coin

2. When I click the 100 mithril coin, its convert my coin to zeny back, however I should get the 1b back, but I get 990m.

 

  • Can you make clickable one by one the mithril coins, so I will get 10m each, instead convert all in directly.. 

Thanks you.

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.