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

Problem with loot.lua

Snach

Sensei
Joined
Aug 8, 2009
Messages
1,694
Reaction score
84
Location
Estonia
I can see this error when im starting the server:
bugn.png

Loot code:
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())
Loot npc:
Code:
<npc name="Loot" script="data/npc/scripts/loot.lua" walkinterval="25" floorchange="0" access="3" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="147" head="114" body="94" legs="19" feet="0" addons="3" corpse="2212"/>

<parameters>

<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Hello |PLAYERNAME|. I buy swords, axes, clubs, armors, helmets, legs, boots, shields, wands and rods" />
		<parameter key="shop_sellable" value="dragon hammer,2434,6000;mastermind shield,2514,100000;magic plate armor,2472,130000;golden legs,2470,100000;demon helmet,2493,100000;giant sword,2393,25000;knight axe,2430,5000;poison dagger,2411,50;scimitar,2419,150;serpent sword,2409,900;skull staff,2436,10000;dragon lance,2414,25000;fire axe,2432,8000;fire sword,2392,8000;war hammer,2391,1200;spike sword,2383,1000;ice rapier,2396,1000;broad sword,2413,500;obsidian lance,2425,500;dragon slayer,7402,15000;war axe,2454,9000;amber staff,7426,8000;sapphire hammer,7437,2000;lunar staff,7424,5000;diamond sceptre,7387,3000;dragonbone staff,7430,6000;beastslayer axe,3962,1500;brutetamer's staff,7379,1500;wyvern fang,7408,1500;daramanian waraxe,2440,1000;furry club,27432,1000;crystal sword,7449,600;taurus mace,7425,500;silver dagger,2402,500;mammoth whopper,7381,300;daramanian mace,2439,110;heavy machete,2442,90;crown armor,2487,20000;blue robe,2656,17000;noble armor,2486,900;dark armor,2489,400;knight armor,2476,10000;dragon scale mail,2492,70000;golden armor,2466,20000;mammoth fur cape,7463,6000;leopard armor,3968,1000;pirate shirt,605,500;royal helmet,2498,30000;crusader helmet,2497,6000;crown helmet,2491,5000;dark helmet,2490,250;mystic turban,2663,150;strange helmet,2479,500;warrior helmet,2475,5000;skull helmet,5741,40000;beholder helmet,3972,7500;devil helmet,2462,1000;pirate hat,6096,1000;ragnir helmet,7462,400;krimhorn helmet,7461,200;crown legs,2488,18008;boots of haste,2195,30000;knight legs,2477,1000;steel boots,2645,10000;pirate boots,5462,2000;fur boots,7457,2000;crocodile boots,3982,1000;pirate knee breeches,5918,200;phoenix shield,2539,16000;crown shield,2519,10000;dragon shield,2516,7000;guardian shield,2515,2000;beholder shield,2518,1200;ancient shield,2532,900;black shield,2529,800;tower shield,2528,8000;vampire shield,2534,15000;demon shield,2520,30000;medusa shield,2536,9000;castle shield,2535,5000;scarab shield,2540,2000;dark shield,2521,400;tortoise shield,6131,150;bone shield,2541,80;magic lightwand,2162,30;wand of vortex,2190,100;wand of dragonbreath,2191,200;wand of plague,2188,1000;wand of cosmic energy,2189,2000;wand of inferno,2187,3000;tempest rod,2183,3000;moonlight rod,2186,200;snakebite rod,2182,100;volcanic rod,2185,1000;quarmire rod,2181,2000;war hammer,2391,10000;spike sword,2383,8000;noble armor,2486,8000;beholder shield,2518,7000;ice rapier,2396,5000;serpent sword,2409,6000;dark armor,2489,1500;dark helmet,2490,1000;ancient shield,2532,5000;" />"
</parameters>

</npc>
I cant find what i did wrong :S
 
Code:
<npc name="Loot" script="data/npc/scripts/loot.lua" walkinterval="2000">
<look type="147" head="114" body="94" legs="19" feet="0" addons="3"/>
<parameters>
	<parameter key="module_shop" value="1" />
	<parameter key="message_greet" value="Hello |PLAYERNAME|! I buy swords, axes, clubs, armors, helmets, legs, boots, shields, wands and rods."/>
	<parameter key="shop_sellable" value="dragon hammer,2434,6000;mastermind shield,2514,100000;magic plate armor,2472,130000;golden legs,2470,100000;demon helmet,2493,100000;giant sword,2393,25000;knight axe,2430,5000;poison dagger,2411,50;scimitar,2419,150;serpent sword,2409,900;skull staff,2436,10000;dragon lance,2414,25000;fire axe,2432,8000;fire sword,2392,8000;war hammer,2391,1200;spike sword,2383,1000;ice rapier,2396,1000;broad sword,2413,500;obsidian lance,2425,500;dragon slayer,7402,15000;war axe,2454,9000;amber staff,7426,8000;sapphire hammer,7437,2000;lunar staff,7424,5000;diamond sceptre,7387,3000;dragonbone staff,7430,6000;beastslayer axe,3962,1500;brutetamer's staff,7379,1500;wyvern fang,7408,1500;daramanian waraxe,2440,1000;furry club,7432,1000;crystal sword,7449,600;taurus mace,7425,500;silver dagger,2402,500;mammoth whopper,7381,300;daramanian mace,2439,110;heavy machete,2442,90;crown armor,2487,20000;blue robe,2656,17000;noble armor,2486,900;dark armor,2489,400;knight armor,2476,10000;dragon scale mail,2492,70000;golden armor,2466,20000;mammoth fur cape,7463,6000;leopard armor,3968,1000;pirate shirt,605,500;royal helmet,2498,30000;crusader helmet,2497,6000;crown helmet,2491,5000;dark helmet,2490,250;mystic turban,2663,150;strange helmet,2479,500;warrior helmet,2475,5000;skull helmet,5741,40000;beholder helmet,3972,7500;devil helmet,2462,1000;pirate hat,6096,1000;ragnir helmet,7462,400;krimhorn helmet,7461,200;crown legs,2488,18008;boots of haste,2195,30000;knight legs,2477,1000;steel boots,2645,10000;pirate boots,5462,2000;fur boots,7457,2000;crocodile boots,3982,1000;pirate knee breeches,5918,200;phoenix shield,2539,16000;crown shield,2519,10000;dragon shield,2516,7000;guardian shield,2515,2000;beholder shield,2518,1200;ancient shield,2532,900;black shield,2529,800;tower shield,2528,8000;vampire shield,2534,15000;demon shield,2520,30000;medusa shield,2536,9000;castle shield,2535,5000;scarab shield,2540,2000;dark shield,2521,400;tortoise shield,6131,150;bone shield,2541,80;magic lightwand,2162,30;wand of vortex,2190,100;wand of dragonbreath,2191,200;wand of plague,2188,1000;wand of cosmic energy,2189,2000;wand of inferno,2187,3000;tempest rod,2183,3000;moonlight rod,2186,200;snakebite rod,2182,100;volcanic rod,2185,1000;quarmire rod,2181,2000;war hammer,2391,10000;spike sword,2383,8000;noble armor,2486,8000;beholder shield,2518,7000;ice rapier,2396,5000;serpent sword,2409,6000;dark armor,2489,1500;dark helmet,2490,1000;ancient shield,2532,5000" />
</parameters>
</npc>
You also have bug in another NPC script, try searching your .xml files for "Super Spiked Club" or "throwing knife2410" and post the scripts that contain those strings.
 
Found Super Spiked Club from my Custom seller npc script:
Code:
<npc name="Custom Seller" script="data/npc/scripts/loot.lua" walkinterval="25" floorchange="0" access="3" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="273" head="114" body="94" legs="19" feet="0" addons="3" corpse="2212"/>

<parameters>

<parameter key="module_shop" value="1" />
		<parameter key="message_greet" value="Whats up |PLAYERNAME|. I sell custom weapons and shields for high levels!" />
		<parameter key="shop_buyable" value="Orley Shield,3975,1000000;Hawky Shield,2533,3000000;Hell'Breath Shield,2535,5000000;Thick Sword,2438,1000000;Reaper's Sword,7416,3000000;Overpowered Sword,7959,5000000;Dashing Club,8928,1000000;Shaverity Club,8929,3000000;Super Spiked Club,7452;5000000;Golden Shiny Axe,8926,1000000;HeadCutter's Axe,8924,3000000;Yellow Powerfull axe,7456,5000000;Red-Happed Star,7368,1000000;Groupsen Star,7366,5000000;SD Wand,7424,1000000;Diftoriz Wand,7426,5000000;Henji Rod,2184,1000000;Happy-Clown Rod,7958,5000000;Hawk Sword,7391,20000000;Hawk Axe,7455,20000000;Hawk Club,7421,20000000;Soulmade shield,2540,30000000;HardAss XBOW,8853,20000000;DL AssPwn Wand,8921,20000000;Doono Rod,8911,20000000;" />"
</parameters>

</npc>

And the knife from Paladin seller:
Code:
<npc name="Paladin Seller" script="data/npc/scripts/distance.lua" walkinterval="25" floorchange="0" access="3" level="1" maglevel="1">
	<health now="150" max="150"/>
	<look type="137" head="114" body="0" legs="11" feet="0" addons="3" corpse="2212"/>
	<parameters>
<parameter key="module_shop" value="1"/>
<parameter key="message_greet" value="Greetings |PLAYERNAME|. I sell bows, spears, arrows, bolts and other ammunitions. I also buy crossbows(150gp) and bows(130gp)." />
<parameter key="shop_sellable" value="crossbow,2455,150;bow,2456,130" />
<parameter key="shop_buyable" value="throwing knife2410,25;royal spear,7378,15;crossbow,2455,500;bow,2456,400;spear,2389,10;piercing bolt,7363,4;power bolt,2547,6;bolt,2543,3;sniper arrow,7364,3;arrow,2544,2;" />
</parameters>
</npc>
 
Code:
<npc name="Custom Seller" script="data/npc/scripts/loot.lua" walkinterval="2000">
<look type="273" head="114" body="94" legs="19" feet="0" addons="3"/>
<parameters>
<parameter key="module_shop" value="1" />
	<parameter key="message_greet" value="What's up, |PLAYERNAME|? I sell custom weapons and shields for high level players!"/>
	<parameter key="shop_buyable" value="Orley Shield,3975,1000000;Hawky Shield,2533,3000000;Hell'Breath Shield,2535,5000000;Thick Sword,2438,1000000;Reaper's Sword,7416,3000000;Overpowered Sword,7959,5000000;Dashing Club,8928,1000000;Shaverity Club,8929,3000000;Super Spiked Club,7452,5000000;Golden Shiny Axe,8926,1000000;HeadCutter's Axe,8924,3000000;Yellow Powerfull axe,7456,5000000;Red-Happed Star,7368,1000000;Groupsen Star,7366,5000000;SD Wand,7424,1000000;Diftoriz Wand,7426,5000000;Henji Rod,2184,1000000;Happy-Clown Rod,7958,5000000;Hawk Sword,7391,20000000;Hawk Axe,7455,20000000;Hawk Club,7421,20000000;Soulmade shield,2540,30000000;HardAss XBOW,8853,20000000;DL AssPwn Wand,8921,20000000;Doono Rod,8911,20000000"/>
</parameters>
</npc>
Code:
<npc name="Paladin Seller" script="data/npc/scripts/distance.lua" walkinterval="2000">
<look type="137" head="114" body="0" legs="11" feet="0" addons="3"/>
<parameters>
	<parameter key="module_shop" value="1"/>
	<parameter key="message_greet" value="Greetings |PLAYERNAME|. I sell bows, spears, arrows, bolts and other ammunition. I also buy crossbows for 150 gold and bows for 130 gold."/>
	<parameter key="shop_sellable" value="crossbow,2455,150;bow,2456,130"/>
	<parameter key="shop_buyable" value="throwing knife,2410,25;royal spear,7378,15;crossbow,2455,500;bow,2456,400;spear,2389,10;piercing bolt,7363,4;power bolt,2547,6;bolt,2543,3;sniper arrow,7364,3;arrow,2544,2"/>
</parameters>
</npc>
 
Back
Top