Mumbles
Former Global Moderator
Utility: Pawn Shop
As per themon's request: http://herc.ws/board/topic/2373-new-shop-npc-idea-pawn-shop/https://boardtest.herc.ws/topic/2373-new-shop-npc-idea-pawn-shop/
Description:
Allows players to exchange items in their inventory for a percentage of its "fair market value (FMV)".
By default, the formula to determine the FMV is approximately one-third of the item's "buy" price (as if you were purchasing it from an NPC), multiplied by its refine rate* (if it's equipment).
Items "pawned" through this script are available to be reclaimed if the loan (plus interest) are repaid in full within seven days. If a loan expires, the item pawned will be claimed by the NPC and "sold"; the original owner will no longer be able to retrieve it.
Loan rates, interest rates, loan days, and the refine bonus trigger can be modified within the configuration settings under the 'OnInit' label. Please take care to NOT modify the leap year formula under this label.
*The refine multiplier calculates the number of UNSAFE refines, then adds it to the loan total. For example, a Sword with the refine rate of 10 (which has a safety cap of seven) has a multiplier of three; so, if the "Buy" price is 100z, the default loan would be 33z. Multiply that by three, and you get a 99z refine bonus in addition to the original 33z, for a grand total of 132z. Interest is added AFTER the final loan price is determined, so at a rate of 10 percent, it would cost approximately 145z to reclaim the Sword.
Download:
https://github.com/datmumbles/Scripts/raw/master/util/pawnshop.txt
As per themon's request: http://herc.ws/board/topic/2373-new-shop-npc-idea-pawn-shop/https://boardtest.herc.ws/topic/2373-new-shop-npc-idea-pawn-shop/
Description:
Allows players to exchange items in their inventory for a percentage of its "fair market value (FMV)".
By default, the formula to determine the FMV is approximately one-third of the item's "buy" price (as if you were purchasing it from an NPC), multiplied by its refine rate* (if it's equipment).
Items "pawned" through this script are available to be reclaimed if the loan (plus interest) are repaid in full within seven days. If a loan expires, the item pawned will be claimed by the NPC and "sold"; the original owner will no longer be able to retrieve it.
Loan rates, interest rates, loan days, and the refine bonus trigger can be modified within the configuration settings under the 'OnInit' label. Please take care to NOT modify the leap year formula under this label.
*The refine multiplier calculates the number of UNSAFE refines, then adds it to the loan total. For example, a Sword with the refine rate of 10 (which has a safety cap of seven) has a multiplier of three; so, if the "Buy" price is 100z, the default loan would be 33z. Multiply that by three, and you get a 99z refine bonus in addition to the original 33z, for a grand total of 132z. Interest is added AFTER the final loan price is determined, so at a rate of 10 percent, it would cost approximately 145z to reclaim the Sword.
Download:
https://github.com/datmumbles/Scripts/raw/master/util/pawnshop.txt
Last edited by a moderator: