• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved Pirate Addons NPC Bulma bugged. Reason?

bury

Active Member
Joined
Jul 27, 2008
Messages
421
Solutions
7
Reaction score
25
I use tfs 0.4

Bulma NPC:
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bulma" script="data/npc/scripts/defaulti.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <voices>
<voice text="Do you need help with any addon items? Come here!" interval2="100" margin="1" yell="no"/>
</voices>
    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
        <parameter key="shop_buyable" value="banana staff,3966,10000;tribal mask,3967,15000;simon the beggar's favorite staff,6107,100000;brutus bloodbeard's hat,6099,100000;lethal lissy's shirt,6100,100000;deadeye devious' eye patch,6102,100000;ron the ripper's sabre,6101,100000;eye patch,6098,3000;peg legs,6126,3000;hook,6097,3000;ceiron's wolf tooth chain,5940,10000;waterhose,5939,10000;spools of yarn,5886,50000;warrior's sweat,5885,40000;fighting spirit,5884,80000;sniper gloves,5875,50000;white piece of cloth,5909,15000;elane's crossbow,5947,5000;green piece of cloth,5910,5000;red piece of cloth,5911,10000;blue piece of cloth,5912,5000;brown piece of cloth,5913,5000;yellow piece of cloth,5914,10000;lizard leather,5876,1000;green dragon leather,5877,1000;minotaur leather,5878,2000;giant spider silk,5879,8000;iron ore,5880,1000;lizard scale,5881,1000;red dragon scale,5882,5000;ape fur,5883,2000;chicken feather,5890,3000;perfect behemoth fang,5893,5000;bat wing,5894,1000;fish fin,5895,15000;bear paw,5896,5000;wolf paw,5897,3000;beholder eye,5898,5000;turtle shell,5899,2000;dwarven beard,5900,1000;honeycomb,5902,2000;vampire dust,5905,15000;demon dust,5906,20000;heaven blosson,5921,2000;holy orchid,5922,15000;behemoth claw,5930,35000;demonic essence,6500,1500;
        dworc voodoo doll,5810,5000;vampiric crest,9955,100000;shard,7290,1000;hardened bone,5925,1000;blessed wooden stake,5942,10000;enchanted chicken wing,5891,50000;piece of royal stell,5887,50000;piece of draconian stell,5889,50000;piece of hell stell,5888,50000;ankh,2193,5000;huge chunk of crude iron,5892,150000;soul stone,5809,150000;nose ring,5804,150000;obsidian knife,5908,20000;red dragon leather,5948,3000;legion helmet,2480,500"/>
    </parameters>
</npc>

Items bugged: Brutus Bloodbeard's Hat, Lethal Lissy's Shirt and Ron the Ripper's Sabre.

I though it was the " 's " but for example elane's crossbow works properly.

Also ids are correct and if I try to get the items ingame with /i they are correct too.

Thanks.
 
Last edited:
Solution
Did you edit your items.xml or items.otb before this issue happened or is it original from the distro?

You can try something like this too, let me know.

bulma.xml
XML:
<?xml version="1.0"?>
<npc name="Bulma" script="data/npc/scripts/bulma.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <parameters>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
    </parameters>
</npc>

bulma.lua
LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}...
Bulma NPC:
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bulma" script="data/npc/scripts/defaulti.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <voices>
<voice text="Do you need help with any addon items? Come here!" interval2="100" margin="1" yell="no"/>
</voices>
    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
        <parameter key="shop_buyable" value="banana staff,3966,10000;tribal mask,3967,15000;simon the beggar's favorite staff,6107,100000;brutus bloodbeard's hat,6099,100000;lethal lissy's shirt,6100,100000;deadeye devious' eye patch,6102,100000;ron the ripper's sabre,6101,100000;eye patch,6098,3000;peg legs,6126,3000;hook,6097,3000;ceiron's wolf tooth chain,5940,10000;waterhose,5939,10000;spools of yarn,5886,50000;warrior's sweat,5885,40000;fighting spirit,5884,80000;sniper gloves,5875,50000;white piece of cloth,5909,15000;elane's crossbow,5947,5000;green piece of cloth,5910,5000;red piece of cloth,5911,10000;blue piece of cloth,5912,5000;brown piece of cloth,5913,5000;yellow piece of cloth,5914,10000;lizard leather,5876,1000;green dragon leather,5877,1000;minotaur leather,5878,2000;giant spider silk,5879,8000;iron ore,5880,1000;lizard scale,5881,1000;red dragon scale,5882,5000;ape fur,5883,2000;chicken feather,5890,3000;perfect behemoth fang,5893,5000;bat wing,5894,1000;fish fin,5895,15000;bear paw,5896,5000;wolf paw,5897,3000;beholder eye,5898,5000;turtle shell,5899,2000;dwarven beard,5900,1000;honeycomb,5902,2000;vampire dust,5905,15000;demon dust,5906,20000;heaven blosson,5921,2000;holy orchid,5922,15000;behemoth claw,5930,35000;demonic essence,6500,1500;
        dworc voodoo doll,5810,5000;vampiric crest,9955,100000;shard,7290,1000;hardened bone,5925,1000;blessed wooden stake,5942,10000;enchanted chicken wing,5891,50000;piece of royal stell,5887,50000;piece of draconian stell,5889,50000;piece of hell stell,5888,50000;ankh,2193,5000;huge chunk of crude iron,5892,150000;soul stone,5809,150000;nose ring,5804,150000;obsidian knife,5908,20000;red dragon leather,5948,3000;legion helmet,2480,500"/>
    </parameters>
</npc>

Items bugged: Brutus Bloodbeard's Hat, Lethal Lissy's Shirt and Ron the Ripper's Sabre.

I though it was the " 's " but for example elane's crossbow works properly.

Also ids are correct and if I try to get the items ingame with /i they are correct too.

Thanks.


Everything looks fine with the parameters, I'm not sure what going on with this though just seeing if 'defaulti.lua' was intentional instead of default.lua?
Code:
script="data/npc/scripts/defaulti.lua"
 
yea, defaulti.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

npcHandler:addModule(FocusModule:new())

It's weird man!

In items.xml they are named:

LUA:
<item id="6099" name="brutus bloodbeard's hat">
        <attribute key="weight" value="1250" />
    </item>

<item id="6100" name="lethal lissy's shirt">
        <attribute key="weight" value="2000" />
    </item>

    <item id="6101" name="ron the ripper's sabre">
        <attribute key="weight" value="2500" />
        <attribute key="defense" value="10" />
        <attribute key="attack" value="12" />
        <attribute key="weaponType" value="sword" />
    </item>

Maybe one thing, when you say trade to the npc and see the small image, it says:

11:43 You see a pirate shirt (Arm:3).

11:44 You see a pirate hat (Arm:3).

11:44 You see a sabre (Atk:12, Def:10 +1).

LOL
 
Have you tried to escape the names?
Try this;
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bulma" script="data/npc/scripts/defaulti.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <voices>
        <voice text="Do you need help with any addon items? Come here!" interval2="100" margin="1" yell="no"/>
    </voices>

    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
        <parameter key="shop_buyable" value="banana staff,3966,10000;tribal mask,3967,15000;simon the beggar\'s favorite staff,6107,100000;brutus bloodbeard\'s hat,6099,100000;lethal lissy\'s shirt,6100,100000;deadeye devious\' eye patch,6102,100000;ron the ripper\'s sabre,6101,100000;eye patch,6098,3000;peg legs,6126,3000;hook,6097,3000;ceiron\'s wolf tooth chain,5940,10000;waterhose,5939,10000;spools of yarn,5886,50000;warrior\'s sweat,5885,40000;fighting spirit,5884,80000;sniper gloves,5875,50000;white piece of cloth,5909,15000;elane\'s crossbow,5947,5000;green piece of cloth,5910,5000;red piece of cloth,5911,10000;blue piece of cloth,5912,5000;brown piece of cloth,5913,5000;yellow piece of cloth,5914,10000;lizard leather,5876,1000;green dragon leather,5877,1000;minotaur leather,5878,2000;giant spider silk,5879,8000;iron ore,5880,1000;lizard scale,5881,1000;red dragon scale,5882,5000;ape fur,5883,2000;chicken feather,5890,3000;perfect behemoth fang,5893,5000;bat wing,5894,1000;fish fin,5895,15000;bear paw,5896,5000;wolf paw,5897,3000;beholder eye,5898,5000;turtle shell,5899,2000;dwarven beard,5900,1000;honeycomb,5902,2000;vampire dust,5905,15000;demon dust,5906,20000;heaven blosson,5921,2000;holy orchid,5922,15000;behemoth claw,5930,35000;demonic essence,6500,1500;
        dworc voodoo doll,5810,5000;vampiric crest,9955,100000;shard,7290,1000;hardened bone,5925,1000;blessed wooden stake,5942,10000;enchanted chicken wing,5891,50000;piece of royal stell,5887,50000;piece of draconian stell,5889,50000;piece of hell stell,5888,50000;ankh,2193,5000;huge chunk of crude iron,5892,150000;soul stone,5809,150000;nose ring,5804,150000;obsidian knife,5908,20000;red dragon leather,5948,3000;legion helmet,2480,500"/>
    </parameters>
</npc>
 
Have you tried to escape the names?
Try this;
XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bulma" script="data/npc/scripts/defaulti.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <voices>
        <voice text="Do you need help with any addon items? Come here!" interval2="100" margin="1" yell="no"/>
    </voices>

    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
        <parameter key="shop_buyable" value="banana staff,3966,10000;tribal mask,3967,15000;simon the beggar\'s favorite staff,6107,100000;brutus bloodbeard\'s hat,6099,100000;lethal lissy\'s shirt,6100,100000;deadeye devious\' eye patch,6102,100000;ron the ripper\'s sabre,6101,100000;eye patch,6098,3000;peg legs,6126,3000;hook,6097,3000;ceiron\'s wolf tooth chain,5940,10000;waterhose,5939,10000;spools of yarn,5886,50000;warrior\'s sweat,5885,40000;fighting spirit,5884,80000;sniper gloves,5875,50000;white piece of cloth,5909,15000;elane\'s crossbow,5947,5000;green piece of cloth,5910,5000;red piece of cloth,5911,10000;blue piece of cloth,5912,5000;brown piece of cloth,5913,5000;yellow piece of cloth,5914,10000;lizard leather,5876,1000;green dragon leather,5877,1000;minotaur leather,5878,2000;giant spider silk,5879,8000;iron ore,5880,1000;lizard scale,5881,1000;red dragon scale,5882,5000;ape fur,5883,2000;chicken feather,5890,3000;perfect behemoth fang,5893,5000;bat wing,5894,1000;fish fin,5895,15000;bear paw,5896,5000;wolf paw,5897,3000;beholder eye,5898,5000;turtle shell,5899,2000;dwarven beard,5900,1000;honeycomb,5902,2000;vampire dust,5905,15000;demon dust,5906,20000;heaven blosson,5921,2000;holy orchid,5922,15000;behemoth claw,5930,35000;demonic essence,6500,1500;
        dworc voodoo doll,5810,5000;vampiric crest,9955,100000;shard,7290,1000;hardened bone,5925,1000;blessed wooden stake,5942,10000;enchanted chicken wing,5891,50000;piece of royal stell,5887,50000;piece of draconian stell,5889,50000;piece of hell stell,5888,50000;ankh,2193,5000;huge chunk of crude iron,5892,150000;soul stone,5809,150000;nose ring,5804,150000;obsidian knife,5908,20000;red dragon leather,5948,3000;legion helmet,2480,500"/>
    </parameters>
</npc>

Thought about this but some other items with " 's " worked like Elane's crossbow... Right, used it with escape, well, used your fix script and didn't work. It keeps being wierd. It doenst say ron sabre etc in the small picture, it says "you see a sabre" I think thats the problem.

For example Ceiron's wolf tooth chain is working and if you click on the small picture once you say trade to the npc: You see ceiron's wolf tooth chain.
Same with Elane's Crossbow: 03:09 You see elane's crossbow.
 
Try it:

LUA:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bulma" script="data/npc/scripts/defaulti.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <voices>
        <voice text="Do you need help with any addon items? Come here!" interval2="100" margin="1" yell="no"/>
    </voices>
    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
        <parameter key="shop_buyable" value="
        banana staff,3966,10000;
        tribalmask,3967,15000;
        simon,6107,100000;
        brutus,6099,100000;
        lethal,6100,100000;
        deadeye,6102,100000;
        ron,6101,100000;
        eye patch,6098,3000;       
        pegegs,6126,3000;
        hook,6097,3000;
        ceiron,5940,10000;
        waterhose,5939,10000;
        yarn,5886,50000;
        sweat,5885,40000;
        fighting spirit,5884,80000;
        sniper gloves,5875,50000;
        cloth,5909,15000;
        elane,5947,5000;
        cloth,5910,5000;
        cloth,5911,10000;
        cloth,5912,5000;
        cloth,5913,5000;
        cloth,5914,10000;
        lizard leather,5876,1000;
        greenleather,5877,1000;
        minotaur leather,5878,2000;
        giant spider silk,5879,8000;
        iron ore,5880,1000;
        lizard scale,5881,1000;
        red dragon scale,5882,5000;
        ape fur,5883,2000;
        chicken feather,5890,3000;
        perfect behemoth fang,5893,5000;
        bat wing,5894,1000;
        fish fin,5895,15000;
        bear paw,5896,5000;
        wolf paw,5897,3000;
        beholder eye,5898,5000;
        turtle shell,5899,2000;
        dwarven beard,5900,1000;
        honeycomb,5902,2000;
        vampire dust,5905,15000;
        demon dust,5906,20000;
        heaven blosson,5921,2000;
        holy orchid,5922,15000;
        behemoth claw,5930,35000;
        demonic essence,6500,1500;
       dworc voodoo doll,5810,5000;
       vampiric crest,9955,100000;
       shard,7290,1000;
       hardened bone,5925,1000;
       blessedake,5942,10000;
       enwing,5891,50000;
       piecestell,5887,50000;
       pieceraconian stell,5889,50000;
       piece of hell stell,5888,50000;
       ankh,2193,5000;
       hugeiron,5892,150000;
       soul stone,5809,150000;
       nose ring,5804,150000;
       obsidian knife,5908,20000;
       redleather,5948,3000;
       legion helmet,2480,500"/>
    </parameters>
</npc>
 
Try it:

LUA:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Bulma" script="data/npc/scripts/defaulti.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <voices>
        <voice text="Do you need help with any addon items? Come here!" interval2="100" margin="1" yell="no"/>
    </voices>
    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
        <parameter key="shop_buyable" value="
        banana staff,3966,10000;
        tribalmask,3967,15000;
        simon,6107,100000;
        brutus,6099,100000;
        lethal,6100,100000;
        deadeye,6102,100000;
        ron,6101,100000;
        eye patch,6098,3000;      
        pegegs,6126,3000;
        hook,6097,3000;
        ceiron,5940,10000;
        waterhose,5939,10000;
        yarn,5886,50000;
        sweat,5885,40000;
        fighting spirit,5884,80000;
        sniper gloves,5875,50000;
        cloth,5909,15000;
        elane,5947,5000;
        cloth,5910,5000;
        cloth,5911,10000;
        cloth,5912,5000;
        cloth,5913,5000;
        cloth,5914,10000;
        lizard leather,5876,1000;
        greenleather,5877,1000;
        minotaur leather,5878,2000;
        giant spider silk,5879,8000;
        iron ore,5880,1000;
        lizard scale,5881,1000;
        red dragon scale,5882,5000;
        ape fur,5883,2000;
        chicken feather,5890,3000;
        perfect behemoth fang,5893,5000;
        bat wing,5894,1000;
        fish fin,5895,15000;
        bear paw,5896,5000;
        wolf paw,5897,3000;
        beholder eye,5898,5000;
        turtle shell,5899,2000;
        dwarven beard,5900,1000;
        honeycomb,5902,2000;
        vampire dust,5905,15000;
        demon dust,5906,20000;
        heaven blosson,5921,2000;
        holy orchid,5922,15000;
        behemoth claw,5930,35000;
        demonic essence,6500,1500;
       dworc voodoo doll,5810,5000;
       vampiric crest,9955,100000;
       shard,7290,1000;
       hardened bone,5925,1000;
       blessedake,5942,10000;
       enwing,5891,50000;
       piecestell,5887,50000;
       pieceraconian stell,5889,50000;
       piece of hell stell,5888,50000;
       ankh,2193,5000;
       hugeiron,5892,150000;
       soul stone,5809,150000;
       nose ring,5804,150000;
       obsidian knife,5908,20000;
       redleather,5948,3000;
       legion helmet,2480,500"/>
    </parameters>
</npc>

Still doesn't work. You click "ok" in the trade menu to buy and it makes nothing. The only bug items are the one I say on the op and if I create them, they work 100%

bump

Any idea of how to fix it? where could it be the fail? I can't find it out!

Just 3 items bugged :/

bumpp
 
Last edited by a moderator:
Did you edit your items.xml or items.otb before this issue happened or is it original from the distro?

You can try something like this too, let me know.

bulma.xml
XML:
<?xml version="1.0"?>
<npc name="Bulma" script="data/npc/scripts/bulma.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <parameters>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
    </parameters>
</npc>

bulma.lua
LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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({'ape fur'}, 5883, 120, 'ape fur')
shopModule:addBuyableItem({'bat wing'}, 5894, 100, 'bat wing')
shopModule:addBuyableItem({'bear paw'}, 5896, 100, 'bear paw')
shopModule:addBuyableItem({'behemoth claw'}, 5930, 2000, 'behemoth claw')
shopModule:addBuyableItem({'beholder eye'}, 5898, 150, 'beholder eye')
shopModule:addBuyableItem({'chicen feather'}, 5890, 100, 'chicen feather')
shopModule:addBuyableItem({'cockroach leg'}, 8710, 500, 'cockroach leg')
shopModule:addBuyableItem({'demon dust'}, 5906, 400, 'demon dust')
shopModule:addBuyableItem({'demon horn'}, 5954, 2500, 'demon horn')
shopModule:addBuyableItem({'dracola\'s eye'}, 6546, 80000, 'dracola\'s eye')
shopModule:addBuyableItem({'dragon claw'}, 5919, 50000, 'dragon claw')
shopModule:addBuyableItem({'dwarven beard'}, 5900, 25000, 'dwarven beard')
shopModule:addBuyableItem({'fish fin'}, 5895, 3500, 'fish fin')
shopModule:addBuyableItem({'gland'}, 8971, 2000, 'gland')
shopModule:addBuyableItem({'glob of acid slime'}, 9967, 200, 'glob of acid slime')
shopModule:addBuyableItem({'glob of mercury'}, 9966, 200, 'glob of mercury')
shopModule:addBuyableItem({'glob of tar'}, 9968, 200, 'glob of tar')
shopModule:addBuyableItem({'green dragon leather'}, 5877, 200, 'green dragon leather')
shopModule:addBuyableItem({'green dragon scale'}, 5920, 500, 'green dragon scale')
shopModule:addBuyableItem({'hardened bone'}, 5925, 300, 'hardened bone')
shopModule:addBuyableItem({'honeycomb'}, 5902, 40, 'honeycomb')
shopModule:addBuyableItem({'hydra egg'}, 4850, 200, 'hydra egg')
shopModule:addBuyableItem({'lizard leather'}, 5876, 200, 'lizard leather')
shopModule:addBuyableItem({'lizard scale'}, 5881, 500, 'lizard scale')
shopModule:addBuyableItem({'minotaur leather'}, 5878, 150, 'minotaur leather')
shopModule:addBuyableItem({'morgaroth\'s heart'}, 5943, 700000, 'morgaroth\'s heart')
shopModule:addBuyableItem({'orshabaal\'s brain'}, 5808, 500000, 'orshabaal\'s brain')
shopModule:addBuyableItem({'perfect behemoth fang'}, 5893, 5000, 'perfect behemoth fang')
shopModule:addBuyableItem({'red dragon leather'}, 5948, 500, 'red dragon leather')
shopModule:addBuyableItem({'red dragon scale'}, 5882, 1000, 'red dragon scale')
shopModule:addBuyableItem({'shard'}, 7290, 300, 'shard')
shopModule:addBuyableItem({'giant spider silk'}, 5879, 7000, 'giant spider silk')
shopModule:addBuyableItem({'plasmother remains'}, 6535, 30000, 'plasmother remains')
shopModule:addBuyableItem({'turtle shell'}, 5899, 200, 'turtle shell')
shopModule:addBuyableItem({'tusk'}, 8614, 150, 'tusk')
shopModule:addBuyableItem({'vampire dust'}, 5905, 2000, 'vampire dust')
shopModule:addBuyableItem({'wolf paw'}, 5897, 100, 'wolf paw')
shopModule:addBuyableItem({'blue piece of cloth'}, 5912, 300, 'blue piece of cloth')
shopModule:addBuyableItem({'red piece of cloth'}, 5911, 300, 'red piece of cloth')
shopModule:addBuyableItem({'yellow piece of cloth'}, 5914, 300, 'yellow piece of cloth')
shopModule:addBuyableItem({'green piece of cloth'}, 5910, 300, 'green piece of cloth')
shopModule:addBuyableItem({'brown piece of cloth'}, 5913, 150, 'brown piece of cloth')
shopModule:addBuyableItem({'white piece of cloth'}, 5909, 300, 'white piece of cloth')
shopModule:addBuyableItem({'huge chunk of crude iron'}, 5892, 3000, 'huge chunk of crude iron')
shopModule:addBuyableItem({'iron ore'}, 5880, 500, 'iron ore')
shopModule:addBuyableItem({'heaven blossom'}, 5921, 100, 'heaven blossom')
shopModule:addBuyableItem({'holy orchid'}, 5922, 2000, 'holy orchid')
shopModule:addBuyableItem({'mandrake'}, 5015, 800000, 'mandrake')
shopModule:addBuyableItem({'nose ring'}, 5804, 500000, 'nose ring')
shopModule:addBuyableItem({'peg leg'}, 6126, 300, 'peg leg')
shopModule:addBuyableItem({'spool of yarn'}, 5886, 20000, 'spool of yarn')
shopModule:addBuyableItem({'brutus bloodbeard\'s hat'}, 6099, 50000, 'brutus bloodbeard\'s hat')
shopModule:addBuyableItem({'deadeye devious\' eye patch'}, 6102, 50000, 'deadeye devious\' eye patch')
shopModule:addBuyableItem({'enchanted chicken wing'}, 5891, 2000, 'enchanted chicken wing')
shopModule:addBuyableItem({'eye patch'}, 6098, 300, 'eye patch')
shopModule:addBuyableItem({'ferumbras\' hat'}, 5903, 1500000, 'ferumbras\' hat')
shopModule:addBuyableItem({'hook'}, 6097, 300, 'hook')
shopModule:addBuyableItem({'fighting spirit'}, 5884, 40000, 'fighting spirit')
shopModule:addBuyableItem({'lethal lissy\'s shirt'}, 6100, 50000, 'lethal lissy\'s shirt')
shopModule:addBuyableItem({'magic sulphur'}, 5904, 8000, 'magic sulphur')
shopModule:addBuyableItem({'piece of draconian steel'}, 5889, 5000, 'piece of draconian steel')
shopModule:addBuyableItem({'piece of hell steel'}, 5888, 5000, 'piece of hell steel')
shopModule:addBuyableItem({'piece of royal steel'}, 5887, 5000, 'piece of royal steel')
shopModule:addBuyableItem({'ron the ripper\'s sabre'}, 6101, 50000, 'ron the ripper\'s sabre')
shopModule:addBuyableItem({'sniper gloves'}, 5875, 10000, 'sniper gloves')
shopModule:addBuyableItem({'soul stone'}, 5809, 80000, 'soul stone')
shopModule:addBuyableItem({'warrior\' sweat'}, 5885, 20000, 'warrior\' sweat')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
 
Last edited:
Did you edit your items.xml or items.otb before this issue happened or is it original from the distro?

You can try something like this too, let me know.

bulma.xml
XML:
<?xml version="1.0"?>
<npc name="Bulma" script="data/npc/scripts/bulma.lua" walkinterval="2000" floorchange="0">
    <health now="100" max="100"/>
    <look type="139" head="113" body="57" legs="95" feet="113" addons="3"/>
    <parameters>
        <parameter key="message_greet" value="Hello |PLAYERNAME|, I have some items for your addons. Say {trade} to see my offers."/>
    </parameters>
</npc>

bulma.lua
LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

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({'ape fur'}, 5883, 120, 'ape fur')
shopModule:addBuyableItem({'bat wing'}, 5894, 100, 'bat wing')
shopModule:addBuyableItem({'bear paw'}, 5896, 100, 'bear paw')
shopModule:addBuyableItem({'behemoth claw'}, 5930, 2000, 'behemoth claw')
shopModule:addBuyableItem({'beholder eye'}, 5898, 150, 'beholder eye')
shopModule:addBuyableItem({'chicen feather'}, 5890, 100, 'chicen feather')
shopModule:addBuyableItem({'cockroach leg'}, 8710, 500, 'cockroach leg')
shopModule:addBuyableItem({'demon dust'}, 5906, 400, 'demon dust')
shopModule:addBuyableItem({'demon horn'}, 5954, 2500, 'demon horn')
shopModule:addBuyableItem({'dracola\'s eye'}, 6546, 80000, 'dracola\'s eye')
shopModule:addBuyableItem({'dragon claw'}, 5919, 50000, 'dragon claw')
shopModule:addBuyableItem({'dwarven beard'}, 5900, 25000, 'dwarven beard')
shopModule:addBuyableItem({'fish fin'}, 5895, 3500, 'fish fin')
shopModule:addBuyableItem({'gland'}, 8971, 2000, 'gland')
shopModule:addBuyableItem({'glob of acid slime'}, 9967, 200, 'glob of acid slime')
shopModule:addBuyableItem({'glob of mercury'}, 9966, 200, 'glob of mercury')
shopModule:addBuyableItem({'glob of tar'}, 9968, 200, 'glob of tar')
shopModule:addBuyableItem({'green dragon leather'}, 5877, 200, 'green dragon leather')
shopModule:addBuyableItem({'green dragon scale'}, 5920, 500, 'green dragon scale')
shopModule:addBuyableItem({'hardened bone'}, 5925, 300, 'hardened bone')
shopModule:addBuyableItem({'honeycomb'}, 5902, 40, 'honeycomb')
shopModule:addBuyableItem({'hydra egg'}, 4850, 200, 'hydra egg')
shopModule:addBuyableItem({'lizard leather'}, 5876, 200, 'lizard leather')
shopModule:addBuyableItem({'lizard scale'}, 5881, 500, 'lizard scale')
shopModule:addBuyableItem({'minotaur leather'}, 5878, 150, 'minotaur leather')
shopModule:addBuyableItem({'morgaroth\'s heart'}, 5943, 700000, 'morgaroth\'s heart')
shopModule:addBuyableItem({'orshabaal\'s brain'}, 5808, 500000, 'orshabaal\'s brain')
shopModule:addBuyableItem({'perfect behemoth fang'}, 5893, 5000, 'perfect behemoth fang')
shopModule:addBuyableItem({'red dragon leather'}, 5948, 500, 'red dragon leather')
shopModule:addBuyableItem({'red dragon scale'}, 5882, 1000, 'red dragon scale')
shopModule:addBuyableItem({'shard'}, 7290, 300, 'shard')
shopModule:addBuyableItem({'giant spider silk'}, 5879, 7000, 'giant spider silk')
shopModule:addBuyableItem({'plasmother remains'}, 6535, 30000, 'plasmother remains')
shopModule:addBuyableItem({'turtle shell'}, 5899, 200, 'turtle shell')
shopModule:addBuyableItem({'tusk'}, 8614, 150, 'tusk')
shopModule:addBuyableItem({'vampire dust'}, 5905, 2000, 'vampire dust')
shopModule:addBuyableItem({'wolf paw'}, 5897, 100, 'wolf paw')
shopModule:addBuyableItem({'blue piece of cloth'}, 5912, 300, 'blue piece of cloth')
shopModule:addBuyableItem({'red piece of cloth'}, 5911, 300, 'red piece of cloth')
shopModule:addBuyableItem({'yellow piece of cloth'}, 5914, 300, 'yellow piece of cloth')
shopModule:addBuyableItem({'green piece of cloth'}, 5910, 300, 'green piece of cloth')
shopModule:addBuyableItem({'brown piece of cloth'}, 5913, 150, 'brown piece of cloth')
shopModule:addBuyableItem({'white piece of cloth'}, 5909, 300, 'white piece of cloth')
shopModule:addBuyableItem({'huge chunk of crude iron'}, 5892, 3000, 'huge chunk of crude iron')
shopModule:addBuyableItem({'iron ore'}, 5880, 500, 'iron ore')
shopModule:addBuyableItem({'heaven blossom'}, 5921, 100, 'heaven blossom')
shopModule:addBuyableItem({'holy orchid'}, 5922, 2000, 'holy orchid')
shopModule:addBuyableItem({'mandrake'}, 5015, 800000, 'mandrake')
shopModule:addBuyableItem({'nose ring'}, 5804, 500000, 'nose ring')
shopModule:addBuyableItem({'peg leg'}, 6126, 300, 'peg leg')
shopModule:addBuyableItem({'spool of yarn'}, 5886, 20000, 'spool of yarn')
shopModule:addBuyableItem({'brutus bloodbeard\'s hat'}, 6099, 50000, 'brutus bloodbeard\'s hat')
shopModule:addBuyableItem({'deadeye devious\' eye patch'}, 6102, 50000, 'deadeye devious\' eye patch')
shopModule:addBuyableItem({'enchanted chicken wing'}, 5891, 2000, 'enchanted chicken wing')
shopModule:addBuyableItem({'eye patch'}, 6098, 300, 'eye patch')
shopModule:addBuyableItem({'ferumbras\' hat'}, 5903, 1500000, 'ferumbras\' hat')
shopModule:addBuyableItem({'hook'}, 6097, 300, 'hook')
shopModule:addBuyableItem({'fighting spirit'}, 5884, 40000, 'fighting spirit')
shopModule:addBuyableItem({'lethal lissy\'s shirt'}, 6100, 50000, 'lethal lissy\'s shirt')
shopModule:addBuyableItem({'magic sulphur'}, 5904, 8000, 'magic sulphur')
shopModule:addBuyableItem({'piece of draconian steel'}, 5889, 5000, 'piece of draconian steel')
shopModule:addBuyableItem({'piece of hell steel'}, 5888, 5000, 'piece of hell steel')
shopModule:addBuyableItem({'piece of royal steel'}, 5887, 5000, 'piece of royal steel')
shopModule:addBuyableItem({'ron the ripper\'s sabre'}, 6101, 50000, 'ron the ripper\'s sabre')
shopModule:addBuyableItem({'sniper gloves'}, 5875, 10000, 'sniper gloves')
shopModule:addBuyableItem({'soul stone'}, 5809, 80000, 'soul stone')
shopModule:addBuyableItem({'warrior\' sweat'}, 5885, 20000, 'warrior\' sweat')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Hello. Thanks for your help.

Still doesnt work. As I see it's a strange error since other " 's " items are working, I included the items on a exchanger npc I have:

Create the npc and link it with the script addonexchanger.lua. There are the 3 last talkstate on the script. If you dont want the other items, just edit it and change the talkstate for a better order (1,2,3).

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

local item = 'You do not have the required items.'
local done = 'Here you are.'

function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
        return false
    end
  
        if msgcontains(msg, 'offer') then
        selfSay('You can here change some items for {spider silk yarn}, {chunk of crude iron}, {draconian steel}, {warrior sweat}, {magic sulphur}, {enchanted chicken wing}, {royal steel}, {hell steel}, {fighting spirit}, {infernal bolt}.', cid)

            elseif msgcontains(msg, 'silk') or msgcontains(msg, 'yarn') or msgcontains(msg, 'spool') then
                if getPlayerItemCount(cid,5879) >= 10 then
                    selfSay('Did you bring me the 10 Giant Silks ?', cid)
                    talk_state = 1
                else
                    selfSay('I need a {10 Giant Spider Silks}, to give you the spider silk yarn. Come back when you have them.', cid)
                    talk_state = 0
                end

            elseif msgcontains(msg, 'yes') and talk_state == 1 then
            talk_state = 0
            if getPlayerItemCount(cid,5879) >= 10 then
            if doPlayerRemoveItem(cid,5879, 10) == TRUE then
                            selfSay(done, cid)
            doPlayerAddItem(cid, 5886, 1)
            end
            else
                selfSay(item, cid)
            end

elseif msgcontains(msg, 'chunk of crude iron') then
if getPlayerItemCount(cid,2393) >= 1 then
selfSay('Did you bring me the Giant Sword ?', cid)
talk_state = 2
else
selfSay('I need a {Giant Sword}, to give you the chunk of crude iron. Come back when you have it.', cid)
talk_state = 0

end
elseif msgcontains(msg, 'yes') and talk_state == 2 then
talk_state = 0
if getPlayerItemCount(cid,2393) >= 1 then
if doPlayerRemoveItem(cid,2393,1) == TRUE then
                selfSay(done, cid)
doPlayerAddItem(cid,5892,1)
end
else
selfSay(item, cid)
end
elseif msgcontains(msg, 'draconian steel') then
if getPlayerItemCount(cid,2516) >= 1 then
selfSay('Did you bring me Dragon Shield ?', cid)
talk_state = 3
else
selfSay('I need {Dragon Shield}, to give you the draconian steel. Come back when you have it.', cid)
talk_state = 0
end
elseif msgcontains(msg, 'yes') and talk_state == 3 then
talk_state = 0
if getPlayerItemCount(cid,2516) >= 1 then
if doPlayerRemoveItem(cid,2516,1) == TRUE then
doPlayerAddItem(cid,5889,1)
                selfSay(done, cid)
end
else
selfSay(item, cid)
end

        elseif msgcontains(msg, 'warrior\'s sweat') then
                if getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 then
                    selfSay('Did you bring me 4 warrior helmets?', cid)
                    talk_state = 4
                else
                    selfSay('I need {4 warrior helmet\'s}, to give you the warrior\'s sweat. Come back when you have them.', cid)
                    talk_state = 0
                end
        elseif msgcontains(msg, 'yes') and talk_state == 4 then
            talk_state = 0
            if getPlayerItemCount(cid,2475) >= 4 then
                    if doPlayerRemoveItem(cid,2475,1) == TRUE and doPlayerRemoveItem(cid,2475,1) == TRUE and doPlayerRemoveItem(cid,2475,1) == TRUE and doPlayerRemoveItem(cid,2475,1) == TRUE then
                        doPlayerAddItem(cid,5885,1)
                        selfSay(done, cid)
                    end
                else
                selfSay(item, cid)
                end

elseif msgcontains(msg, 'magic sulphur') then
if getPlayerItemCount(cid,2392) >= 1 and getPlayerItemCount(cid,2392) >= 1 and getPlayerItemCount(cid,2392) >= 1 then
selfSay('Did you bring me 3 fire swords?', cid)
talk_state = 5
else
selfSay('I need {3 fire sword\'s}, to give you the magic sulpher. Come back when you have them.', cid)
talk_state = 0
end

        elseif msgcontains(msg, 'yes') and talk_state == 5 then
            talk_state = 0
            if getPlayerItemCount(cid,2392) >= 3 then
                    if doPlayerRemoveItem(cid,2392,1) == TRUE and doPlayerRemoveItem(cid,2392,1) == TRUE and doPlayerRemoveItem(cid,2392,1) == TRUE then
                        doPlayerAddItem(cid,5904,1)
                                        selfSay(done, cid)
                end
            else
                selfSay(item, cid)
            end

        elseif msgcontains(msg, 'enchanted chicken wing') then
            if getPlayerItemCount(cid,2195) >= 1 then
                selfSay('Did you bring me boots of haste?', cid)
                talk_state = 6
            else
                selfSay('I need {boots of haste}, to give you the enchanted chicken wing. Come back when you have them.', cid)
                talk_state = 0
            end

        elseif msgcontains(msg, 'yes') and talk_state == 6 then
            talk_state = 0
            if getPlayerItemCount(cid,2195) >= 1 then
                    if doPlayerRemoveItem(cid,2195,1) == TRUE then
                        doPlayerAddItem(cid,5891,1)
                                        selfSay(done, cid)
                    end
            else
                selfSay(item, cid)
            end



        elseif msgcontains(msg, 'royal steel') then
            if getPlayerItemCount(cid,2487) >= 1 then
                selfSay('Did you bring me the Crown Armor ?', cid)
                talk_state = 7
            else
                selfSay('I need a {Crown Armor}, to give you the royal steel. Come back when you have it.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'yes') and talk_state == 7 then
            talk_state = 0
            if getPlayerItemCount(cid,2487) >= 1 then
                    if doPlayerRemoveItem(cid,2487,1) == TRUE then
                        doPlayerAddItem(cid,5887,1)
                                        selfSay(done, cid)
                    end
            else
                selfSay(item, cid)
            end


        elseif msgcontains(msg, 'hell steel') then
            if getPlayerItemCount(cid,2462) >= 1 then
                selfSay('Did you bring me the Devil Helmet ?', cid)
                talk_state = 8
            else
                selfSay('I need a {Devil Helmet}, to give you the hell steel. Come back when you have it.', cid)
                talk_state = 0
            end

        elseif msgcontains(msg, 'yes') and talk_state == 8 then
            talk_state = 0
            if getPlayerItemCount(cid,2462) >= 1 then
                    if doPlayerRemoveItem(cid,2462,1) == TRUE then
                        doPlayerAddItem(cid,5888,1)
                                        selfSay(done, cid)
                    end
            else
                selfSay(item, cid)
            end

        elseif msgcontains(msg, 'fighting spirit') then
            if getPlayerItemCount(cid,2498) >= 1 and getPlayerItemCount(cid,2498) >= 1 then
                selfSay('Did you bring me the 2 Royal Helmets?', cid)
                talk_state = 10
            else
                selfSay('I need a {2 Royal Helmet\'s}, to give you the Fighting Spirit. Come back when you have them.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'yes') and talk_state == 10 then
            talk_state = 0
            if getPlayerItemCount(cid,2498) >= 2 then
                    if doPlayerRemoveItem(cid,2498,1) == TRUE and doPlayerRemoveItem(cid,2498,1) == TRUE then
                        doPlayerAddItem(cid,5884,1)
                                        selfSay(done, cid)
                    end

            else
                selfSay(item, cid)
            end


        elseif msgcontains(msg, 'infernal bolt') then
            if getPlayerItemCount(cid,5944) >= 1 then
                selfSay('Did you bring me a Soul Orb?', cid)
                talk_state = 11
            else
                selfSay('I need a {Soul Orb}, to give you 10 Infernal Bolts. Come back when you have it.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'yes') and talk_state == 11 then
            talk_state = 0
            if getPlayerItemCount(cid,5944) >= 1 then
                    if doPlayerRemoveItem(cid,5944,1) == TRUE then
                        doPlayerAddItem(cid,6529,10)
                                        selfSay(done, cid)
                    end

            else
                selfSay(item, cid)
            end
          
          
            elseif msgcontains(msg, 'Lethal') then
            if getPlayerItemCount(cid,2160) >= 5 then
                selfSay('Did you bring me 5 crystal coins?', cid)
                talk_state = 12
            else
                selfSay('I need a {5 crystal coins}, to give you the lethal Lissy\'s shirt. Come back when you have the money.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'yes') and talk_state == 12 then
            talk_state = 0
            if getPlayerItemCount(cid,2160) >= 5 then
                    if doPlayerRemoveItem(cid,2160,5) == TRUE then
                        doPlayerAddItem(cid,6100,1)
                                        selfSay(done, cid)
                    end

            else
                selfSay(item, cid)
            end
          
            elseif msgcontains(msg, 'brutus') then
            if getPlayerItemCount(cid,2160) >= 5 then
                selfSay('Did you bring me 5 crystal coins?', cid)
                talk_state = 13
            else
                selfSay('I need a {5 crystal coins}, to give you the Brutus bloodbeard\'s hat. Come back when you have the money.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'yes') and talk_state == 13 then
            talk_state = 0
            if getPlayerItemCount(cid,2160) >= 5 then
                    if doPlayerRemoveItem(cid,2160,5) == TRUE then
                        doPlayerAddItem(cid,6099,1)
                                        selfSay(done, cid)
                    end

            else
                selfSay(item, cid)
            end
          
            elseif msgcontains(msg, 'ron') then
            if getPlayerItemCount(cid,2160) >= 5 then
                selfSay('Did you bring me 5 crystal coins?', cid)
                talk_state = 14
            else
                selfSay('I need a {5 crystal coins}, to give you the Ron the ripper\'s sabre. Come back when you have the money.', cid)
                talk_state = 0
            end
        elseif msgcontains(msg, 'yes') and talk_state == 14 then
            talk_state = 0
            if getPlayerItemCount(cid,2160) >= 5 then
                    if doPlayerRemoveItem(cid,2160,5) == TRUE then
                        doPlayerAddItem(cid,6101,1)
                                        selfSay(done, cid)
                    end

            else
                selfSay(item, cid)
            end
          
          
          
          
          
        elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
            selfSay('So Leave, LEAVE ME NOW!')
            talk_state = 0
        end
    -- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
    return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

It works 100%, is not a solution but a patch.

Thanks all :)
 
Solution
Back
Top