DomosNew
cd /home/domos/
Many people have problems with this, so I give you cash, script NPC Frodo, over which a little
tire because it had to rewrite the script seller.lua on TFS 0.3.x- latest TFS
I recall that I introduced a lot of new things,
the script will be updated from time to time.
1. Make your Frodo.xml in data /npc/, open it and paste:
If you want to use the old system [NPC's] change the line:
of
at
2.Make your seller.lua in data/npc/scripts/
open it and paste:
save everything and you put NPC Frodo on the map.
We'd asked repute!
tire because it had to rewrite the script seller.lua on TFS 0.3.x- latest TFS
I recall that I introduced a lot of new things,
the script will be updated from time to time.
1. Make your Frodo.xml in data /npc/, open it and paste:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Frodo" script="data/npc/scripts/seller.lua" walkinterval="2000" floorchange="0">
<mana now="100" max="100"/>
<health now="100" max="100"/>
<look type="134" head="114" body="113" legs="113" feet="113" corpse="2212"/>
<parameters>
<parameter key="module_shop" value="0" />
<parameter key="shop_buyable" value="pick,2553,20;shovel,2554,20;backpack,1988,10;demon backpack,10518,1000;orange backpack,10519,30;orange bag,10520,10;moon backpack,10521,5000;crown backpack,10522,800;brocade bag,9775,5;brocade backpack,9774,20;fishing rod,2580,100;torch,2050,2;rope,2120,50;aol,2173,20000;machete,2420,30;obsidian knife,5908,10000;blessed wooden stake,5942,10000;botanist container,4869,100;scythe,2550,50;time ring,2169,1000;life ring,2205,900;ring of healing,2214,1000;stealth ring,2202,2000;sword ring,2207,300;axe ring,2208,300;club ring,2209,300;dwarven ring,2213,500;energy ring,2204,500;might ring,2164,2000" />
</parameters>
</npc>
If you want to use the old system [NPC's] change the line:
of
Code:
<parameter key="module_shop" value="0" />
at
Code:
<parameter key="module_shop" value="1" />
2.Make your seller.lua in data/npc/scripts/
open it and paste:
Code:
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
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'pick', 'pick'}, 2553, 20, 11, 'pick')
shopModule:addBuyableItem({'shovel', 'shovel'}, 2554, 20, 11, 'shovel')
shopModule:addBuyableItem({'backpack', 'backpack'}, 1988, 10, 11, 'backpack')
shopModule:addBuyableItem({'demon backpack', 'demon backpack'}, 10518, 1000, 11, 'demon backpack')
shopModule:addBuyableItem({'orange backpack', 'orange backpack'}, 10519, 30, 11, 'orange backpack')
shopModule:addBuyableItem({'orange bag', 'orange bag'}, 10520, 10, 11, 'orange bag')
shopModule:addBuyableItem({'moon backpack', 'moon backpack'}, 10521, 5000, 11, 'moon backpack')
shopModule:addBuyableItem({'crown backpack', 'crown backpack'}, 10522, 800, 11, 'crown backpack')
shopModule:addBuyableItem({'brocade bag', 'brocade bag'}, 9775, 5, 11, 'brocade bag')
shopModule:addBuyableItem({'fishing rod', 'fishing rod'}, 2580, 100, 11, 'fishing rod')
shopModule:addBuyableItem({'rope', 'rope'}, 2120, 50, 11, 'rope')
shopModule:addBuyableItem({'amulet of loss', 'amulet of loss'}, 2173, 20000, 11, 'amulet of loss')
shopModule:addBuyableItem({'machete', 'machete'}, 2420, 30, 11, 'machete')
shopModule:addBuyableItem({'obsidian knife', 'obsidian knife'}, 5908, 10000, 11, 'obsidian knife')
shopModule:addBuyableItem({'scythe', 'scythe'}, 2550, 50, 11, 'scythe')
shopModule:addBuyableItem({'time ring', 'time ring'}, 2169, 1000, 11, 'time ring')
shopModule:addBuyableItem({'life ring', 'life ring'}, 2205, 900, 11, 'life ring')
shopModule:addBuyableItem({'ring of healing', 'ring of healing'}, 2214, 1000, 11, 'ring of healing')
shopModule:addBuyableItem({'stealth ring', 'stealth ring'}, 2202, 2000, 11, 'stealth ring')
shopModule:addBuyableItem({'sword ring', 'sword ring'}, 2207, 300, 11, 'sword ring')
shopModule:addBuyableItem({'axe ring', 'axe ring'}, 2208, 300, 11, 'axe ring')
shopModule:addBuyableItem({'club ring', 'club ring'}, 2209, 300, 11, 'club ring')
shopModule:addBuyableItem({'dwarven ring', 'dwarven ring'}, 2213, 500, 11, 'dwarven ring')
shopModule:addBuyableItem({'energy ring', 'energy ring'}, 2204, 500, 11, 'energy ring')
shopModule:addBuyableItem({'might ring', 'might ring'}, 2164, 2000, 11, 'might ring')
shopModule:addBuyableItem({'blessed wooden stake', 'blessed wooden stake'}, 5942, 10000, 11, 'blessed wooden stake')
npcHandler:addModule(FocusModule:new())
save everything and you put NPC Frodo on the map.
We'd asked repute!
Last edited: