• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC Jiddo System add-on | Lower/higher prices of items for pacc/voc/prom

PhoOwned

^_^
Joined
Nov 11, 2010
Messages
375
Reaction score
66
BETA VERSION
Do not re-post on other forums as a 'ready script'!

To install it on your TFS 0.3.x (or newer) you need WinMerge or other program that can check difference between files or use TFS 0.3.6pl1 :)

I tested it with few values and looks good (no bug).

Features:
* In NPC .lua file you can set:
.. function that check 'is player extra' (for X vocation/s, players with promotion, pacc... what you want)
.. change of sellable items prices (1000 = 100%, so 15% = 150), you can use values lower then 0
.. change of buyable items prices (1000 = 100%), you can use values lower then 0
Don't make items cheaper for more then 100% (I did not test, but maybe it can crash server) <_<
* Should work sell/buy with TALK and TRADE WINDOW


I don't know what values you must put where to change price + / -, you must test it. Higher value is always better for 'extra' player :thumbup:


Ideas:
-You can use 100% discount to make NPC with some free items for low levels or shop with cheaper runes for 1-40 lvl (check level)
-Shop with cheaper swords, axes, clubs for knights
-Shop with items 'for pacc only' (set NPC prices ~9999999 gp and discount 999 = 99.9%)

NPC FILE:
Under:
PHP:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
Paste:
PHP:
npcHandler:setItemsExtraSell(0)
npcHandler:setItemsExtraBuy(150)
function isPlayerExtra(cid)
	return getPlayerPremiumDays(cid) > 0
end

Report bugs in this thread.

---------------------------------
Anyone need something like that for: travel, promotion, bless, outfit (if required money) ?
 

Attachments

Pretty nice, again xD

When I have time I will test it...

For people that don't understand, you can use this lib and then make functions to check if player is premium then have discount on items, or maybe travel, etc... It is better than old system that you could talk to NPC say the place to travel and then yes, which one had lot of bugs.
 
Ok, its amazing, but how it works?

I want to dedicated some itens just to sell for premium players, what is the tag for it?
 
Back
Top