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

NPC buys loot - xml or lua?

Fiodor

Lua & Maps
Joined
Mar 14, 2009
Messages
400
Reaction score
10
Location
Poland
Hello

Which loot NPC is better, in xml or in lua? I mean:
this[in LUA]:

Code:
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 demon (100k),golden (80k), crown (15k), knight (6k), plate (500gp) and brass legs (100gp).'})
keywordHandler

or this [in xml]:
Code:
<parameter key="shop_sellable" value="serpent coat,8866,15000;skullcracker armor,8889,20000;magma legs,7894,5000;magma coat,7899,10000;terra 2470,60000;crown legs,2488,15000;knight legs,2477,6000;plate legs,2647,500;brass legs,2487,100;mastermind shield,2514,80000;demon shield,2520,40000;blessed sire axe,2432,10000;knight axe,2430,2000;double axe,2387,200;halberd,2381,200;battle axe,2378,100;hatchet,2388,20;dragonbone staff,7430,4000;wand of inferno,2187,3000;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;paladin armor,8891,30000;"/>;Justice Seeker,7390,50000;Royal Axe,7434,50000;Blessed Sceptre,7429,50000;DSM,2492,40000;Dwarven Armor,2503,30000;Glacier Robe,7897,11000;Golden Armor,2466,20000;Golden Legs,2470,40000;Hibiscus Dress,8873,3000;Leopard Amor,3968,1000;Lightning Robe,7898,11000;MMS,2514,40000;MPA,2472,150000;Magma Coat,7899,11000;Mammoth Fur Cape,7463,6000;Paladin Armor,8891,15000;Pirate Shirt,6095,500;Skullcracker Armor,8889,18000;Terra Mantle,7889,11000;Glacier Kilt,7896,11000;Lightning Legs,7895,11000;Magma Legs,7894,11000;Mammoth Fur Shorts,7464,500;Pirate Knee Breeches,5918,rn Helmet,7461,200;Lightning Headband,7901,2500;Magma Monocle,7900,2500;Pirate Hat,6096,1000;Ragnir Guardian Halberd,2427,11000;Heavy Machete,2442,90;Heroic Axe Royal Axe,7434,50000;Blessed Sceptre,7429
??

I hope you know what I mean :thumbup:
 
lua makes it simpler to read if u ask me, especially when u have 100items in the shop. also it gives u the option to add some text later if u want that's more advanced then just key word handling. ex getting 1 free wand.
 
Back
Top