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

Solved NPC don't sell

Mathb0y

New Member
Joined
Nov 5, 2009
Messages
5
Reaction score
0
So I opened my OT and a npc don't sell some items...

CXN1GIX.jpg


The thing is, i have the money i press OK and don't buy, I can't even shift click the item to see whats the name, but if i give it to myself, as GOD, it is fine, i can have and use it. One interesting part is that i can buy and shift click the Baiak Arrow. The items are cant buy is basically the baiak items.

This is the .xml of the npc:

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Updade Seller" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="335" head="0" body="0" legs="114" feet="114" addons="3"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="shop_buyable" value="fluffy santa backpack,11257,10000;expedition backpack,11234,10000;heart backpack,11115,10000;lizard backpack,11236,10000;expedition bag,11235,10000;minotaur backpack,11237,10000;nightmare doll,11138,10000;witch hat,10569,50000;dragon scale boots,11114,100000;crystal boots,11113,50000;guardian boots,11234,50000;yalahari armor,9776,500000;yalahari piece legs,9777,500000;yalahari mask,9778,500000;spellweaver's robe,11349,50000;zoan robe,11350,100000;jade hat,11362,100000;zoan shoes,11297,50000;zoan legs,11298,100000;zoan sword,11301,1000000;zoan armor,11295,200000;zoan helmet,11296,200000;
Baiak Armor,12603,1500000;Baiak Legs,12604,1500000;Baiak Shield,12605,1500000;Baiak Helemet,12606,1500000;Boots of Baiak,12607,1500000;Imperium Sword,12610,1500000;Solar axe,8925,1500000;baiak arrow,2352,1500000;staff of baiak,12609,1500000;baiak cap,12618,1500000;"/>
</parameters>
1</npc>

This is the default.lua that npc uses:

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

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

npcHandler:addModule(FocusModule:new())

And i'll put my items.xml as a attachment: View attachment items.rar


if more info are needed let me know.


help me pls!
 
Last edited:
You need to add the amount to it, even if its one.

For example 11114,100000, 1;crystal boots,

- - - Updated - - -

Let me know if it work, if not, ill make the xml script for you when I'm at home in 2 hours.
 
Try this out,

Replace your xml file with this xml file.

XML:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Updade Seller" script="data/npc/scripts/default.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="335" head="0" body="0" legs="114" feet="114" addons="3"/>
<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="shop_buyable" value="fluffy santa backpack,11257,10000,1;expedition backpack,11234,10000,1;heart backpack,11115,10000,1;lizard backpack,11236,10000,1;expedition bag,11235,10000,1;minotaur backpack,11237,10000,1;nightmare doll,11138,10000,1;witch hat,10569,50000,1;dragon scale boots,11114,100000,1;crystal boots,11113,50000,1;guardian boots,11234,50000,1;yalahari armor,9776,500000,1;yalahari piece legs,9777,500000,1;yalahari mask,9778,500000,1;spellweaver's robe,11349,50000,1;zoan robe,11350,100000,1;jade hat,11362,100000,1;zoan shoes,11297,50000,1;zoan legs,11298,100000;zoan sword,11301,1000000,1;zoan armor,11295,200000,1;zoan helmet,11296,200000,1;
Baiak Armor,12603,1500000,1;Baiak Legs,12604,1500000,1;Baiak Shield,12605,1500000,1;Baiak Helemet,12606,1500000,1;Boots of Baiak,12607,1500000,1;Imperium Sword,12610,1500000,1;Solar axe,8925,1500000,1;baiak arrow,2352,1500000,1;staff of baiak,12609,1500000,1;baiak cap,12618,1500000,1;"/>
</parameters>
1</npc>

Let me know if it worked.
post any errors here.
 
Guys, thank you all for the help, but i did a different npc to solve my problem, based on trading items, in the case 150 crystal coins.

And Mesmeroo, putting the names exactly as the items.xml didnt work, i had the some thought. thank anyway
 
This Problem Is happening to me, but in this items.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Soya" script="loot.lua" walkinterval="2000" floorchange="0">
    <health now="150" max="150"/>
    <look type="139" head="132" body="79" legs="97" feet="132" addons="1" corpse="2212"/>
    <parameters>
        <parameter key="module_shop" value="1"/>
        <parameter key="message_greet" value="Hello |PLAYERNAME|. I buy swords, clubs, axes, helmets, boots, legs, shields and armors."/>
        <parameter key="shop_sellable" value="haunted blade,7407,8000;onyx flail,7421,22000;bonebreaker,7428,10000;shadow sceptre,7451,10000;dreaded cleaver,7419,15000;swamplair armor,8880,18000;crystalline armor,8878,18000;dragon slayer,7402,15000;focus cape,8871,6000;epee,2438,8000;dragonbone staff,7430,3000;royal helmet,2498,40000;warrior helmet,2475,6000;crusader helmet,2497,9000;crown helmet,2491,5000;devil helmet,2462,4000;mystic turban,2663,500;chain helmet,2458,35;iron helmet,2459,30;steel boots,2645,40000;boots of haste,2195,40000;golden boots,2646,100000;magic plate armor,2472,100000;dragon scale mail,2492,60000;demon armor,2494,90000;golden armor,2466,30000;crown armor,2487,12000;knight armor,2476,5000;blue robe,2656,15000;lady armor,2500,2500;plate armor,2463,400;brass armor,2465,200;chain armor,2464,100;golden legs,2470,80000;crown legs,2488,15000;knight legs,2477,6000;plate legs,2647,500;brass legs,2478,100;mastermind shield,2514,80000;demon shield,2520,40000;blessed shield,2523,150000;great shield,2522,100000;vampire shield,2534,25000;medusa shield,2536,8000;amazon shield,2537,4000;crown shield,2519,5000;tower shield,2528,4000;guardian shield,2515,200;beholder shield,2518,1500;dwarven shield,2525,100;magic longsword,2390,150000;warlord sword,2408,100000;magic sword,2400,90000;giant sword,2393,10000;bright sword,2407,6000;ice rapier,2396,4000;fire sword,2392,3000;serpent sword,2409,1500;spike sword,2383,800;two handed sword,2377,400;broad sword,2413,70;short sword,2406,30;sword,2376,25;dragon lance,2414,10000;stonecutter axe,2431,90000;guardian halberd,2427,7500;fire axe,2432,10000;knight axe,2430,2000;double axe,2387,200;halberd,2381,200;battle axe,2378,100;hatchet,2388,20;war hammer,2391,6000;thunder hammer,2421,90000;skull staff,2436,6000;dragon hammer,2434,2000;clerical mace,2423,200;battle hammer,2417,60;mace,2398,30;"/>
    </parameters>
</npc>

And in loot.lua I have this

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

-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
keywordHandler:addKeyword({'helmets'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy royal (40k), warrior (6k), crusader (9k), crown (5k), devil (4k), chain (35gp) and iron helmets (30gp), also mystic turbans (500gp).'})
keywordHandler:addKeyword({'boots'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden boots (100k), steel boots (40k) and boots of haste (40k).'})
keywordHandler:addKeyword({'armors'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden (30k), crown (20k), knight (5k), lady (7,5k), plate (400gp), brass (200gp) and chain armors (100gp), also mpa (100k), dsm (60k) and blue robes (15k).'})
keywordHandler:addKeyword({'legs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy golden (80k), crown (15k), knight (6k), plate (500gp) and brass legs (100gp).'})
keywordHandler:addKeyword({'shields'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy blessed (150k), great (100k), demon (40k), vampire (25k), medusa (8k), amazon (4k), crown (5k), tower (4k), dragon (3k), guardian (2k), beholder (1k), and dwarven shields (100gp), also mms (80k).'})
keywordHandler:addKeyword({'swords'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy giant (10k), bright (6k), fire (3k) serpent (1.5k), spike (800gp) and two handed swords (400gp), also ice rapiers (4k), magic longswords (150k), magic swords (90k), warlord swords (100k) broad swords (70gp), short swords (30gp), sabres (25gp) and swords (25gp).'})
keywordHandler:addKeyword({'axes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy fire (10k), guardian halberds (7,5k) knight (2k), double (200gp) and battle axes (100gp), also dragon lances (10k), stonecutters axes (90k), halberds (200gp) and hatchets (20gp).'})
keywordHandler:addKeyword({'clubs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy thunder hammers (90k), war (6k), dragon (2k) and battle hammers (60gp), also skull staffs (10k) and clerical maces (200gp).'})

npcHandler:addModule(FocusModule:new())

Can Someone help me Out I will appreciate it. Thank You.
 
Back
Top