Tsar Posted December 29, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 1 Reputation: 0 Joined: 01/27/19 Last Seen: December 10, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Winterfox Posted December 29, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 245 Reputation: 93 Joined: 06/30/18 Last Seen: November 27, 2024 Share 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 Link to comment Share on other sites More sharing options...
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.
Link to comment
Share on other sites
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.