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

Ultimate Legs Dealer

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
Here is the ultimate legs dealer. All of the prices for selling to him are from tibia.wikia.com so they should be correct, but the buy prices I usually just took the sell price and multiplied it by four to make it buyable, but at a semi-ridiculous price. The idea of this npc is to make it so certain rare legs can exist on a new server before they are looted from extremely hard monsters. It also sets a "ceiling" (like if the buy price is 4000, then you cant sell it to players for more than 4000) and a "floor" (the sell price to the npc would be 1000 in this instance so that, if sold to another player, it would be above 1000 but below the ridiculousness of 4000).

He sells 29 legs and was made for 9.60, tested in the latest TFS 9.6 and works in full.

legs.lua
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

-- OTServ event handling functions start
function onCreatureAppear(cid)              npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid)           npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg)      npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink()                          npcHandler:eek:nThink() end
function onPlayerEndTrade(cid) npcHandler:eek:nPlayerEndTrade(cid) end
function onPlayerCloseChannel(cid) npcHandler:eek:nPlayerCloseChannel(cid) end
-- OTServ event handling functions end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)


-------------------------------he sells--------------------------------------


--no req
shopModule:addBuyableItem({'zaoan legs'}, 11304, 56000,'zaoan legs')
shopModule:addBuyableItem({'studded legs'}, 2468, 60,'studded legs')
shopModule:addBuyableItem({'plate legs'}, 2647, 460,'plate legs')
shopModule:addBuyableItem({'pirate knee breeches'}, 5918, 800,'pirate knee breeches')
shopModule:addBuyableItem({'mammoth fur shorts'}, 7464, 3400,'mammoth fur shorts')
shopModule:addBuyableItem({'leather legs'}, 2649, 10,'leather legs')
shopModule:addBuyableItem({'leaf legs'}, 9928, 2000,'leaf legs')
shopModule:addBuyableItem({'dwarven legs'}, 2504, 160000,'dwarven legs')
shopModule:addBuyableItem({'dragon scale legs'}, 2469, 4000000,'dragon scale legs')
shopModule:addBuyableItem({'demon legs'}, 2495, 3000000,'demon legs')
shopModule:addBuyableItem({'chain legs'}, 2648, 80,'chain legs')
shopModule:addBuyableItem({'brass legs'}, 2478, 195,'brass legs')
shopModule:addBuyableItem({'blue legs'}, 7730, 60000,'blue legs')
shopModule:addBuyableItem({'bast skirt'}, 3983, 3000,'bast skirt')
shopModule:addBuyableItem({'ranger legs'}, 8923, 110,'ranger legs')

--lvl 75
shopModule:addBuyableItem({'grasshopper legs'}, 15490, 60000,'grasshopper legs')

--lvl 130
shopModule:addBuyableItem({'depth ocrea'}, 15409, 4000000,'depth ocrea')

--lvl 150
shopModule:addBuyableItem({'gill legs'}, 18400, 6000000,'gill legs')
shopModule:addBuyableItem({'prismatic legs'}, 18405, 6000000,'prismatic legs')

--lvl 185
shopModule:addBuyableItem({'ornate legs'}, 15412, 10000000,'ornate legs')

--kinas and pallies
shopModule:addBuyableItem({'crown legs'}, 2488, 48000,'crown legs')
shopModule:addBuyableItem({'golden legs'}, 2470, 120000,'golden legs')
shopModule:addBuyableItem({'knight legs'}, 2477, 20000,'knight legs')

--pallies
shopModule:addBuyableItem({'ranger legs'}, 2507, 400,'ranger legs')

--lvl 40 druids and sorcs
shopModule:addBuyableItem({'glacier kilt'}, 7896, 44000,'glacier kilt')
shopModule:addBuyableItem({'magma legs'}, 7894, 44000,'magma legs')
shopModule:addBuyableItem({'terra legs'}, 7885, 44000,'terra legs')
shopModule:addBuyableItem({'lightning legs'}, 7895, 44000,'lightning legs')

--lvl 80 pally
shopModule:addBuyableItem({'yalahari leg piece'}, 9777, 200000,'yalahari leg piece')


--------------------------------he buys--------------------------------------

--no req
shopModule:addSellableItem({'zaoan legs'}, 11304, 14000,'zaoan legs')
shopModule:addSellableItem({'studded legs'}, 2468, 15,'studded legs')
shopModule:addSellableItem({'plate legs'}, 2647, 115,'plate legs')
shopModule:addSellableItem({'pirate knee breeches'}, 5918, 200,'pirate knee breeches')
shopModule:addSellableItem({'mammoth fur shorts'}, 7464, 850,'mammoth fur shorts')
shopModule:addSellableItem({'leather legs'}, 2649, 9,'leather legs')
shopModule:addSellableItem({'leaf legs'}, 9928, 500,'leaf legs')
shopModule:addSellableItem({'dwarven legs'}, 2504, 40000,'dwarven legs')
shopModule:addSellableItem({'dragon scale legs'}, 2469, 1000000,'dragon scale legs')
shopModule:addSellableItem({'demon legs'}, 2495, 750000,'demon legs')
shopModule:addSellableItem({'chain legs'}, 2648, 25,'chain legs')
shopModule:addSellableItem({'brass legs'}, 2478, 49,'brass legs')
shopModule:addSellableItem({'blue legs'}, 7730, 15000,'blue legs')
shopModule:addSellableItem({'bast skirt'}, 3983, 750,'bast skirt')
shopModule:addSellableItem({'ranger legs'}, 8923, 50,'ranger legs')

--lvl 75
shopModule:addSellableItem({'grasshopper legs'}, 15490, 15000,'grasshopper legs')

--lvl 130
shopModule:addSellableItem({'depth ocrea'}, 15409, 1000000,'depth ocrea')

--lvl 150
shopModule:addSellableItem({'gill legs'}, 18400, 1500000,'gill legs')
shopModule:addSellableItem({'prismatic legs'}, 18405, 1500000,'prismatic legs')


--lvl 185
shopModule:addSellableItem({'ornate legs'}, 15412, 2500000,'ornate legs')

--kinas and pallies
shopModule:addSellableItem({'crown legs'}, 2488, 12000,'crown legs')
shopModule:addSellableItem({'golden legs'}, 2470, 30000,'golden legs')
shopModule:addSellableItem({'knight legs'}, 2477, 5000,'knight legs')

--pallies
shopModule:addSellableItem({'ranger legs'}, 2507, 100,'ranger legs')

--lvl 40 druids and sorcs
shopModule:addSellableItem({'glacier kilt'}, 7896, 11000,'glacier kilt')
shopModule:addSellableItem({'magma legs'}, 7894, 11000,'magma legs')
shopModule:addSellableItem({'terra legs'}, 7885, 11000,'terra legs')
shopModule:addSellableItem({'lightning legs'}, 7895, 11000,'lightning legs')

--lvl 80 pally
shopModule:addSellableItem({'yalahari leg piece'}, 9777, 50000,'yalahari leg piece')

npcHandler:addModule(FocusModule:new())


I hope some of you get a use out of this, it took a lot of work and helps new servers establish armor.

And if this helped you at all, rep++ would be nice.
 
Last edited:
Added in 9.6 items, made compatible with 9.6 servers using TFS.

Also added LUA tags so it is easier to see.
 
Last edited:
Back
Top