mrlongshen 22 Posted September 28, 2015 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. Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted September 29, 2015 @@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"); 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted September 29, 2015 @@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. Quote Share this post Link to post Share on other sites
0 Emistry 145 Posted September 29, 2015 { Id: 674 AegisName: "Mithril_Coin" Name: "Mithril Coin" Type: 0 Buy: 5000 Weight: 40 Script: <" Zeny += 10000000; ">}, 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted September 29, 2015 @@Emistry hi. so no need the called function ? Quote Share this post Link to post Share on other sites
0 Emistry 145 Posted September 29, 2015 no need. 1 mrlongshen reacted to this Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted September 29, 2015 @@Emistry Thanks its working +1 Quote Share this post Link to post Share on other sites
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