ziggy46802
Active Member
- Joined
- Aug 19, 2012
- Messages
- 418
- Reaction score
- 27
Here is the ultimate shields 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 shields 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 45 shields and 10 spellbooks for a total of 55 "shields" so to say, which are all of them except for the first few that just don't make sense really and the nightmare and brotherhood shields, since some servers use those for quests, I decided to leave them out. I did include the rainbow shield though, at a ridiculous 4mil price but hey, just do the quest is what I say. Tested and does fully work on the latest TFS distro, although you are still welcome to use the XML based script by televeolt below this one, although the only thing I'll say is that it is not updated for the full 9.6 items, like ornate shield and such, but it does indeed work on 9.6 TFS servers and televolt did a good job on it.
shields.lua
Here is the alternative npc, in the xml style, by televolt, so give him rep if you used his script and it worked since I did not make it, all credits go to him for this one (which I tested and does work)
I plan on making an npc for clubs, axes, helmets, armors, legs, and boots as well so just keep watching this forum and I will post them in time, but it takes awhile to make these npcs. Also, please notify me if you find any errors. I quickly went over the whole trade window and it seemed fine but I didn't look at it super closely.
I hope some of you get a use out of this, it took a lot of work and helps new servers establish shields.
And if this helped you at all, rep++ would be nice.
He sells 45 shields and 10 spellbooks for a total of 55 "shields" so to say, which are all of them except for the first few that just don't make sense really and the nightmare and brotherhood shields, since some servers use those for quests, I decided to leave them out. I did include the rainbow shield though, at a ridiculous 4mil price but hey, just do the quest is what I say. Tested and does fully work on the latest TFS distro, although you are still welcome to use the XML based script by televeolt below this one, although the only thing I'll say is that it is not updated for the full 9.6 items, like ornate shield and such, but it does indeed work on 9.6 TFS servers and televolt did a good job on it.
shields.lua
LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function onPlayerEndTrade(cid) npcHandler:onPlayerEndTrade(cid) end
function onPlayerCloseChannel(cid) npcHandler:onPlayerCloseChannel(cid) end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
--------------sells-----------------
--spellbooks
shopModule:addBuyableItem({'spellbook'}, 2175, 150, 'spellbook')
shopModule:addBuyableItem({'spellbook of enlightenment'}, 8900, 16000, 'spellbook of enlightenment')
shopModule:addBuyableItem({'spellbook of warding'}, 8901, 32000, 'spellbook of warding')
shopModule:addBuyableItem({'spellbook of mind control'}, 8902, 52000, 'spellbook of mind control')
shopModule:addBuyableItem({'spellbook of lost souls'}, 8903, 76000,'spellbook of lost souls')
shopModule:addBuyableItem({'spellscroll of prophecies'}, 8904, 500000,'spellscroll of prophecies')
shopModule:addBuyableItem({'spellbook of dark mysteries'}, 8918, 1000000,'spellbook of dark mysteries')
shopModule:addBuyableItem({'snake god\'s wristguard'}, 12647, 2000000,'snake god\'s wristguard')
shopModule:addBuyableItem({'spellbook of vigilance'}, 18401, 4000000,'spellbook of vigilance')
shopModule:addBuyableItem({'spellbook of ancient arcana'}, 16112, 5000000,'spellbook of ancient arcana')
--def 14-19
shopModule:addBuyableItem({'wooden shield'}, 2512, 13,'wooden shield')
shopModule:addBuyableItem({'studded shield'}, 2526, 50, 'studded shield')
shopModule:addBuyableItem({'brass shield'}, 2511, 65,'brass shield')
shopModule:addBuyableItem({'plate shield'}, 2510, 125,'plate shield')
shopModule:addBuyableItem({'black shield'}, 2529, 3200,'black shield')
shopModule:addBuyableItem({'copper shield'}, 2530, 200,'copper shield')
--def 20-24
shopModule:addBuyableItem({'bone shield'}, 2541, 320,'bone shield')
shopModule:addBuyableItem({'steel shield'}, 2509, 200,'steel shield')
shopModule:addBuyableItem({'ornamented shield'}, 2524, 6000,'ornamented shield')
shopModule:addBuyableItem({'sentinel shield'}, 3974, 480,'sentinel shield')
shopModule:addBuyableItem({'viking shield'}, 2531, 260,'viking shield')
shopModule:addBuyableItem({'battle shield'}, 2513, 380,'battle shield')
--def 25-29
shopModule:addBuyableItem({'dark shield'}, 2521, 1600,'dark shield')
shopModule:addBuyableItem({'scarab shield'}, 2540, 8000,'scarab shield')
shopModule:addBuyableItem({'dwarven shield'}, 2525, 500,'dwarven shield')
shopModule:addBuyableItem({'salamander shield'}, 3975, 1120,'salamander shield')
shopModule:addBuyableItem({'tortoise shield'}, 6131, 600,'tortoise shield')
shopModule:addBuyableItem({'ancient shield'}, 2532, 5000,'ancient shield')
shopModule:addBuyableItem({'tusk shield'}, 3973, 3400,'tusk shield')
shopModule:addBuyableItem({'bonelord shield'}, 2518, 7000,'bonelord shield')
shopModule:addBuyableItem({'castle shield'}, 2535, 20000,'castle shield')
shopModule:addBuyableItem({'norse shield'}, 7460, 6000,'norse shield')
shopModule:addBuyableItem({'depth scutum'}, 15411, 128000,'depth scutum')
--def 30-34
shopModule:addBuyableItem({'rainbow shield'}, 8905, 4000000,'rainbow shield')
shopModule:addBuyableItem({'guardian shield'}, 2515, 8000,'guardian shield')
shopModule:addBuyableItem({'dragon shield'}, 2516, 16000,'dragon shield')
shopModule:addBuyableItem({'amazon shield'}, 2537, 1000000,'amazon shield')
shopModule:addBuyableItem({'crown shield'}, 2519, 32000,'crown shield')
shopModule:addBuyableItem({'tower shield'}, 2528, 32000,'tower shield')
shopModule:addBuyableItem({'medusa shield'}, 2536, 36000,'medua shield')
shopModule:addBuyableItem({'phoenix shield'}, 2539, 64000,'phoenix shield')
shopModule:addBuyableItem({'vampire shield'}, 2534, 60000,'vampire shield')
shopModule:addBuyableItem({'warrior\'s shield'}, 15453, 36000,'warrior\'s shield')
--def 35-40
shopModule:addBuyableItem({'demon shield'}, 2520, 120000,'demon shield')
shopModule:addBuyableItem({'mastermind shield'}, 2514, 200000,'mastermind shield')
shopModule:addBuyableItem({'tempest shield'}, 2542, 175000,'tempest shield')
shopModule:addBuyableItem({'great shield'}, 2522, 500000,'great shield')
shopModule:addBuyableItem({'blessed shield'}, 2523, 2000000,'blessed shield')
shopModule:addBuyableItem({'carapace shield'}, 15491, 256000,'carapace shield')
shopModule:addBuyableItem({'shield of corruption'}, 12644, 2000000,'shield of corruption')
shopModule:addBuyableItem({'ornate shield'}, 15413, 2000000,'ornate shield')
shopModule:addBuyableItem({'prismatic shield'}, 18410, 1000000,'prismatic shield')
shopModule:addBuyableItem({'fiery rainbow shield'}, 8906, 5000000, 'fiery rainbow shield')
shopModule:addBuyableItem({'sparking rainbow shield'}, 8908, 5000000,'sparking rainbow shield')
shopModule:addBuyableItem({'terran rainbow shield'}, 8909, 5000000,'terran rainbow shield')
shopModule:addBuyableItem({'icy rainbow shield'}, 8907, 5000000,'icy rainbow shield')
-----------------buys----------------
--spellbooks
shopModule:addSellableItem({'spellbook'}, 2175, 50,'spellbook')
shopModule:addSellableItem({'spellbook of enlightenment'}, 8900, 4000,'spellbook of enlightenment')
shopModule:addSellableItem({'spellbook of warding'}, 8901, 8000,'spellbook of warding')
shopModule:addSellableItem({'spellbook of mind control'}, 8902, 13000,'spellbook of mind control')
shopModule:addSellableItem({'spellbook of lost souls'}, 8903, 19000,'spellbook of lost souls')
shopModule:addSellableItem({'spellscroll of prophecies'}, 8904, 125000,'spellscroll of prophecies')
shopModule:addSellableItem({'spellbook of dark mysteries'}, 8918, 250000,'spellbook of dark mysteries')
shopModule:addSellableItem({'snake god\'s wristguard'}, 12647, 500000, 'snake god\'s wristguard')
shopModule:addSellableItem({'spellbook of vigilance'}, 18401, 1000000,'spellbook of vigilance')
shopModule:addSellableItem({'spellbook of ancient arcana'}, 16112, 1250000,'spellbook of ancient arcana')
--def 15-19
shopModule:addSellableItem({'wooden shield'}, 2512, 5,'wooden shield')
shopModule:addSellableItem({'studded shield'}, 2526, 16, 'studded shield')
shopModule:addSellableItem({'brass shield'}, 2511, 25,'brass shield')
shopModule:addSellableItem({'plate shield'}, 2510, 45,'plate shield')
shopModule:addSellableItem({'black shield'}, 2529, 800,'black shield')
shopModule:addSellableItem({'copper shield'}, 2530, 50,'copper shield')
--def 20-24
shopModule:addSellableItem({'bone shield'}, 2541, 80,'bone shield')
shopModule:addSellableItem({'steel shield'}, 2509, 80,'steel shield')
shopModule:addSellableItem({'ornamented shield'}, 2524, 1500,'ornamented shield')
shopModule:addSellableItem({'sentinel shield'}, 3974, 120,'sentinel shield')
shopModule:addSellableItem({'viking shield'}, 2531, 85,'viking shield')
shopModule:addSellableItem({'battle shield'}, 2513, 95,'battle shield')
--def 25-29
shopModule:addSellableItem({'dark shield'}, 2521, 400,'dark shield')
shopModule:addSellableItem({'scarab shield'}, 2540, 2000,'scarab shield')
shopModule:addSellableItem({'dwarven shield'}, 2525, 100,'dwarven shield')
shopModule:addSellableItem({'salamander shield'}, 3975, 280,'salamander shield')
shopModule:addSellableItem({'tortoise shield'}, 6131, 150,'tortoise shield')
shopModule:addSellableItem({'ancient shield'}, 2532, 900,'ancient shield')
shopModule:addSellableItem({'tusk shield'}, 3973, 850,'tusk shield')
shopModule:addSellableItem({'beholder shield'}, 2518, 1200,'beholder shield')
shopModule:addSellableItem({'castle shield'}, 2535, 5000,'castle shield')
shopModule:addSellableItem({'norse shield'}, 7460, 1500,'norse shield')
shopModule:addSellableItem({'depth scutum'}, 15411, 32000,'depth scutum')
--def 30-34
shopModule:addSellableItem({'guardian shield'}, 2515, 2000,'guardian shield')
shopModule:addSellableItem({'dragon shield'}, 2516, 4000,'dragon shield')
shopModule:addSellableItem({'amazon shield'}, 2537, 250000,'amazon shield')
shopModule:addSellableItem({'crown shield'}, 2519, 8000,'crown shield')
shopModule:addSellableItem({'tower shield'}, 2528, 8000,'tower shield')
shopModule:addSellableItem({'medusa shield'}, 2536, 9000,'medua shield')
shopModule:addSellableItem({'phoenix shield'}, 2539, 16000,'phoenix shield')
shopModule:addSellableItem({'vampire shield'}, 2534, 15000,'vampire shield')
shopModule:addSellableItem({'warrior\'s shield'}, 15453, 9000,'warrior\'s shield')
--def 35-40
shopModule:addSellableItem({'demon shield'}, 2520, 30000,'demon shield')
shopModule:addSellableItem({'mastermind shield'}, 2514, 50000,'mastermind shield')
shopModule:addSellableItem({'tempest shield'}, 2542, 35000,'tempest shield')
shopModule:addSellableItem({'great shield'}, 2522, 125000,'great shield')
shopModule:addSellableItem({'blessed shield'}, 2523, 500000,'blessed shield')
shopModule:addSellableItem({'carapace shield'}, 15491, 64000,'carapace shield')
shopModule:addSellableItem({'shield of corruption'}, 12644, 500000,'shield of corruption')
shopModule:addSellableItem({'ornate shield'}, 15413, 500000,'ornate shield')
shopModule:addSellableItem({'prismatic shield'}, 18410, 250000,'prismatic shield')
shopModule:addSellableItem({'fiery rainbow shield'}, 8906, 1250000, 'fiery rainbow shield')
shopModule:addSellableItem({'sparking rainbow shield'}, 8908, 1250000,'sparking rainbow shield')
shopModule:addSellableItem({'terran rainbow shield'}, 8909, 1250000,'terran rainbow shield')
shopModule:addSellableItem({'icy rainbow shield'}, 8907, 1250000,'icy rainbow shield')
npcHandler:addModule(FocusModule:new())
Here is the alternative npc, in the xml style, by televolt, so give him rep if you used his script and it worked since I did not make it, all credits go to him for this one (which I tested and does work)
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Tugar" script="data/npc/scripts/tugar.lua" walkinterval="2000" floorchange="0">
<health now="185" max="185"/>
<look type="128" addons="0" head="2" body="97" legs="27" feet="94" corpse="2317"/>
<voices>
<voice text="lala lalala" interval2="100" margin="1" yell="no"/>
</voices>
<parameters>
<parameter key="module_shop" value="1" />
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="shield;" />
<parameter key="keyword_reply1" value="If you'd like to check the quality of my shields, ask me for a {trade}." />
--------------sells-----------------
<parameter key="shop_buyable" value="
--def 15-19
wooden shield, 2512, 13;
studded shield, 2526, 50;
brass shield, 2511, 65;
plate shield, 2510, 125;
black shield, 2529, 3200;
copper shield, 2530, 200;
--def 20-24
bone shield, 2541, 320;
steel shield, 2509, 200;
ornamented shield, 2524, 6000;
sentinel shield, 3974, 480;
viking shield, 2531, 260;
battle shield, 2513, 380;
--def 25-29
dark shield, 2521, 1600;
scarab shield, 2540, 8000;
dwarven shield, 2525, 500;
salamander shield, 3975, 1120;
tortoise shield, 6131, 600;
ancient shield, 2532, 5000;
tusk shield, 3973, 3400;
beholder shield, 2518, 7000;
castle shield, 2535, 20000;
norse shield, 7460, 6000;
--def 30-34
guardian shield, 2515, 8000;
dragon shield, 2516, 16000;
amazon shield, 2537, 1000000;
crown shield, 2519, 32000;
tower shield, 2528, 32000;
medusa shield, 2536, 36000;
phoenix shield, 2539, 64000;
vampire shield, 2534, 60000;
--def 35-40
demon shield, 2520, 120000;
mastermind shield, 2514, 200000;
tempest shield, 2542, 175000;
great shield, 2522, 500000;
blessed shield, 2523, 2000000" />
-----------------buys----------------
<parameter key="shop_sellable" value="
--def 15-19
wooden shield, 2512, 5;
studded shield, 2526, 16;
brass shield, 2511, 25;
plate shield, 2510, 45;
black shield, 2529, 800;
copper shield, 2530, 50;
--def 20-24
bone shield, 2541, 80;
steel shield, 2509, 80;
ornamented shield, 2524, 1500;
sentinel shield, 3974, 120;
viking shield, 2531, 85;
battle shield, 2513, 95;
--def 25-29
dark shield, 2521, 400;
scarab shield, 2540, 2000;
dwarven shield, 2525, 100;
salamander shield, 3975, 280;
tortoise shield, 6131, 150;
ancient shield, 2532, 900;
tusk shield, 3973, 850;
beholder shield, 2518, 1200;
castle shield, 2535, 5000;
norse shield, 7460, 1500;
--def 30-34
guardian shield, 2515, 2000;
dragon shield, 2516, 4000;
amazon shield, 2537, 250000;
crown shield, 2519, 8000;
tower shield, 2528, 8000;
medusa shield, 2536, 9000;
phoenix shield, 2539, 16000;
vampire shield, 2534, 15000;
--def 35-40
demon shield, 2520, 30000;
mastermind shield, 2514, 50000;
tempest shield, 2542, 35000;
great shield, 2522, 125000;
blessed shield, 2523, 500000" />
<parameter key="message_greet" value="Welcome to my humble {shield} shop, |PLAYERNAME|."/>
<parameter key="message_farewell" value="Please come and buy again, |PLAYERNAME|."/>
<parameter key="message_walkaway" value="Please come and buy again, |PLAYERNAME|." />
<parameter key="message_sendtrade" value="Of course, take a good look at my shields." />
</parameters>
</npc>
I plan on making an npc for clubs, axes, helmets, armors, legs, and boots as well so just keep watching this forum and I will post them in time, but it takes awhile to make these npcs. Also, please notify me if you find any errors. I quickly went over the whole trade window and it seemed fine but I didn't look at it super closely.
I hope some of you get a use out of this, it took a lot of work and helps new servers establish shields.
And if this helped you at all, rep++ would be nice.
Last edited: