Tsar Posted December 29, 2023 Posted December 29, 2023 Being sincere i have no idea how to begin to design this so any clue on how to start or similar functions to modify are more than welcome. Quote
0 Winterfox Posted December 29, 2023 Posted December 29, 2023 - script SHOP_COIN_CONVERTER -1,{ OnInit: .exchange_item = 501; .conversion_rate = 1000; // 1000 to 1. initnpctimer; end; OnTimer1800000: // Reset the timer. initnpctimer; // Add all players on the server to the script. addrid(0); // Check if the player is autotrading and exit if not. if(!(checkvending(strcharinfo(0)) & 2)) end; // Convert .conversion_rate zeny into amount to exchange. .@exchange_amount = floor(Zeny / .conversion_rate, 1); // If the exchange amount is below 1 exit. if(.@exchange_amount < 1) end; // If the player can't carry all the items exit. if((getiteminfo(.exchange_item, ITEMINFO_WEIGHT) * .@exchange_amount + Weight) > MaxWeight) end; // Subtract zeny. Zeny -= .@exchange_amount * .conversion_rate; // Handout the item in .@exchange_amount. getitem(.exchange_item, .@exchange_amount); } Quote
Question
Tsar
Being sincere i have no idea how to begin to design this so any clue on how to start or similar functions to modify are more than welcome.
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.