NPC Tax - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: NPC Tax (/Thread-NPC-Tax) |
NPC Tax - pinku - 02-28-2014 07:01 PM Hey guys, I'll try to explain what I wish to do and if you guys can help me out with a starting point, I'll be really grateful! This is a King/Mayor system I'm working on, but totally stuck right now. I'm trying to add a (variable) sale tax to the default NPCs based on what a King/Mayor set. For example: 10% sale tax; If a horse is worth 100gps, it will cost 110gps instead. I know, I could probably do this with a region.tag or something similar, but this is not all; I want this tax to be sent to a certain UID. A chest, in this case. Questions I have: How can I add the variable tax to my default NPCs? How can I take the tax of what was sold and send somewhere else? Some bad ways I thought; Please, let me know if you guys have better ones... Just adding here some ideas. When the King sets a new sale tax, I will use REGION.TAG.VENDORMARKUP=KING_TAX - unsure here When a character buys something I can... ON=@ItemBuy LOCAL.TOTALCOST/KING_TAX = TAX NEWITEM i_gold NEWAMOUNT TAX NEWCONT=MY_UID Any help? Just throwing something here. xd RE: NPC Tax - amonvangrell - 02-28-2014 09:40 PM There are global variables. You should use them. And on sphere serv triggers add on server time to check your variable to add the new its to this chest. Now the chest, When u open the chest it should check the total variable and convert the amount to its contend. It just ideas to get this done. |