The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NPC Tax
Author Message
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #1
NPC Tax
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
(This post was last modified: 02-28-2014 07:07 PM by pinku.)
02-28-2014 07:01 PM
Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #2
RE: NPC Tax
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.
02-28-2014 09:40 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)