Jump to content

Recommended Posts

Utility: Pawn Shop
As per themon's request: http://herc.ws/board/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

Share this post


Link to post
Share on other sites

@Via - themon should be very happy with this, I liked the idea of the Pawn Shop & I am glad someone completed this request ! +1 :lol:

Share this post


Link to post
Share on other sites

@Via - themon should be very happy with this, I liked the idea of the Pawn Shop & I am glad someone completed this request ! +1 :lol:

 

I'd hope so. I found the idea intriguing and was surprised to find nothing quite like it yet. It took me a bit to debug some of the formulas (particularly the time-related ones), but I'm happy with the final result.

Share this post


Link to post
Share on other sites

I will test it soon and report anything odd about it but I am sure it works perfectly~  :)

 

Please do. I'm usually very thorough, but who knows - I may have overlooked something. d:

Share this post


Link to post
Share on other sites

Great Job!!!!! VIA :wub:

Thanks for making this script available I hope this can be enjoyed by other players too. cause I know I will.

Via deserve a +10

this is the reason why I switch from Rathena to Hercules because of people like you Via and your quick response to my request.

 

I hope you can Improve my other script cause im just a noob in script making. I just get to try the script and try to understand what it do and make my own npc. some of the script that I made is just from Euphy script. like Keno.txt and Ez2.txt idea from lottery.txt, soulbuff.txt from healer.txt, reserve.txt from resetnpc.txt,  hourlybonus.txt idea from giftnpc.txt, just added some idea on Euphy rpsroulette.txt, this two script is the only script that I think that I made since this is just my training script the chansave.txt and zenytocash.txt

keno.txt

Ez2.txt

SoulBuff.txt

reserve.txt

hourlybonus.txt

rpsroulette.txt

chansave.txt

zenytocash.txt

Edited by themon

Share this post


Link to post
Share on other sites

I Tested Via's Pawnshop NPC and it works great!

 

Loving it!

 

if I got some new idea ill try to post again.

 

again thanks for making this VIA :meow:

Share this post


Link to post
Share on other sites

@themon

I apologise for being blunt, but I'm no scripting god or machine lol. I fulfilled your request for a few reasons:

  • Nobody else did
  • The script didn't exist anywhere else (to my knowledge)
  • I found the idea intriguing

I'm glad you enjoyed my script enough to want more (it's flattering, honestly), but I'm unable to fulfill such a large quantity of requests at one time. If you would like your other scripts to be reviewed, please post individual requests in the appropriate forums with as much detail as you are able to provide.

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
Reply to this topic...

×   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...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.