Diarreamental
Banned User
- Joined
- Jul 6, 2015
- Messages
- 463
- Solutions
- 1
- Reaction score
- 85
Well the problem it's that i've added an item, in this case, it's a royal spear i added it in my sprites with object builder and to my items otb and items.xml
the item is working if i do it via the the id example /i 5281
i dont have error in console the npcs just keep trying to sell me a normal spear
but the npcs don't sell it i've tried with two npcs differents , in this case the new item it's a royal spear
i dont have error in console the npcs just keep trying to sell me a normal spear
galuna.xml
willard.lua
the item is working if i do it via the the id example /i 5281
i dont have error in console the npcs just keep trying to sell me a normal spear
but the npcs don't sell it i've tried with two npcs differents , in this case the new item it's a royal spear
i dont have error in console the npcs just keep trying to sell me a normal spear
galuna.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Galuna" script="data/npc/scripts/default.lua" walkinterval="2000" access="3" floorchange="0">
<health now="100" max="100"/>
<look type="137" head="40" body="96" legs="95" feet="96" addons="0"/>
<parameters>
<parameter key="message_greet" value="Oh, please come in, |PLAYERNAME|. What do you need? Distance weapons? I sell lots of them."/>
<parameter key="message_farewell" value="Good bye."/>
<parameter key="message_sendtrade" value="Of course, just browse through my wares."/>
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="name;job;offer;" />
<parameter key="keyword_reply1" value="I am Galuna, paladin and fletcher." />
<parameter key="keyword_reply2" value="I am the local fletcher. I am selling bows, crossbows, and ammunition. Do you need anything?" />
<parameter key="keyword_reply3" value="My offers are bows, crossbows and ammunition." />
<parameter key="module_shop" value="1"/>
<parameter key="shop_buyable" value="crossbow,2455,500;bow,2456,400;bolt,2543,4;arrow,2544,3;spear,2389,10;royal spear,5281,25;" />
<parameter key="shop_sellable" value="spear,2389,3;" />
</parameters>
</npc>
willard.lua
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)
-- Items Rookgaard by Rodrigo (Nottinghster)
-- Itens para vender
shopModule:addSellableItem({'steel helmet'},2457,190,'steel helmet')
shopModule:addSellableItem({'double axe'},2387,260,'double axe')
shopModule:addSellableItem({'chain helmet'},2458,17,'chain helmet')
shopModule:addSellableItem({'iron helmet'},2459,150,'iron helmet')
shopModule:addSellableItem({'leather helmet'},2461,4,'leather helmet')
shopModule:addSellableItem({'chain legs'},2648,25,'chain legs')
shopModule:addSellableItem({'plate armor'},2463,400,'plate armor')
shopModule:addSellableItem({'chain armor'},2464,70,'chain armor')
shopModule:addSellableItem({'brass armor'},2465,150,'brass armor')
shopModule:addSellableItem({'leather armor'},2467,12,'leather armor')
shopModule:addSellableItem({'steel shield'},2509,80,'steel shield')
shopModule:addSellableItem({'wooden shield'},2512,5,'wooden shield')
shopModule:addSellableItem({'battle shield'},2513,95,'battle shield')
shopModule:addSellableItem({'viking shield'},2531,85,'viking shield')
shopModule:addSellableItem({'two handed sword'},2377,450,'two handed sword')
shopModule:addSellableItem({'spike sword'},2383,240,'spike sword')
shopModule:addSellableItem({'short sword'},2406,10,'short sword')
shopModule:addSellableItem({'morning star'},2394,90,'morning star')
shopModule:addSellableItem({'battle hammer'},2417,120,'battle hammer')
shopModule:addSellableItem({'clerical mace'},2423,170,'clerical mace')
shopModule:addSellableItem({'battle axe'},2378,80,'battle axe')
shopModule:addSellableItem({'barbarian axe'},2429,185,'barbarian axe')
shopModule:addSellableItem({'hand axe'},2380,4,'hand axe')
shopModule:addSellableItem({'dagger'},2379,2,'dagger')
shopModule:addSellableItem({'rapier'},2384,5,'rapier')
shopModule:addSellableItem({'sabre'},2385,12,'sabre')
shopModule:addSellableItem({'mace'},2398,30,'mace')
shopModule:addSellableItem({'halberd'},2381,400,'halberd')
shopModule:addSellableItem({'crossbow'},2455,120,'crossbow')
shopModule:addSellableItem({'bow'},2456,100,'bow')
shopModule:addSellableItem({'spear'},2389,3,'spear')
shopModule:addSellableItem({'royal spear'},5281,15,'royal spear')
-- Itens para comprar
shopModule:addBuyableItem({'chain helmet'},2458,52,'chain helmet')
shopModule:addBuyableItem({'leather helmet'},2461,12,'leather helmet')
shopModule:addBuyableItem({'chain legs'},2648,80,'chain legs')
shopModule:addBuyableItem({'chain armor'},2464,200,'chain armor')
shopModule:addBuyableItem({'brass armor'},2465,450,'brass armor')
shopModule:addBuyableItem({'leather armor'},2467,35,'leather armor')
shopModule:addBuyableItem({'steel shield'},2509,240,'steel shield')
shopModule:addBuyableItem({'wooden shield'},2512,15,'wooden shield')
shopModule:addBuyableItem({'viking shield'},2531,260,'viking shield')
shopModule:addBuyableItem({'battle hammer'},2417,350,'battle hammer')
shopModule:addBuyableItem({'clerical mace'},2423,540,'clerical mace')
shopModule:addBuyableItem({'barbarian axe'},2429,590,'barbarian axe')
shopModule:addBuyableItem({'throwing star'},2399,42,'throwing star')
shopModule:addBuyableItem({'dagger'},2379,5,'dagger')
shopModule:addBuyableItem({'rapier'},2384,15,'rapier')
shopModule:addBuyableItem({'sabre'},2385,35,'sabre')
shopModule:addBuyableItem({'mace'},2398,90,'mace')
shopModule:addBuyableItem({'crossbow'},2455,500,'crossbow')
shopModule:addBuyableItem({'bow'},2456,400,'bow')
shopModule:addBuyableItem({'spear'},2389,10,'spear')
shopModule:addBuyableItem({'arrow'},2544,3,'arrow')
shopModule:addBuyableItem({'bolt'},2543,4,'bolt')
npcHandler:addModule(FocusModule:new())