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

Lua Advanced script help.

wlj

retierd
Joined
Jan 7, 2009
Messages
1,201
Reaction score
1
Need help with 2 scripts to make them to 0.3.5 from 0.2.4
And a reqest on a Promotion on 0.3.5 hi, promotion, 20k, add promotion.


Loot Normal.
XML:
Lua:
<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>

Loot.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 shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addSellableItem({'sword', 'sword'},                               2376, 25,        'sword')
shopModule:addSellableItem({'nightmare blade', 'nightmare blade'},           7418, 60000,    'nightmare blade')
shopModule:addSellableItem({'two handed sword', 'two handed sword'},         2377, 500,       'two handed sword')
shopModule:addSellableItem({'dagger', 'dagger'},                             2379, 20,        'dagger')
shopModule:addSellableItem({'spike sword', 'spike sword'},                   2383, 1000,      'spike sword')
shopModule:addSellableItem({'rapier', 'rapier'},                             2384, 30,        'rapier')
shopModule:addSellableItem({'sabre', 'sabre'},                               2385, 35,        'sabre')
shopModule:addSellableItem({'magic longsword', 'magic longsword'},           2390, 100000,    'magic longsword')
shopModule:addSellableItem({'fire sword', 'fire sword'},                     2392, 4500,      'fire sword')
shopModule:addSellableItem({'giant sword', 'giant sword'},                   2393, 17000,     'giant sword')
shopModule:addSellableItem({'carlin sword', 'carlin sword'},                 2395, 5000,      'carlin sword')
shopModule:addSellableItem({'ice rapier', 'ice rapier'},                     2396, 4000,      'ice rapier')
shopModule:addSellableItem({'longsword', 'longsword'},                       2397, 80,        'longsword')
shopModule:addSellableItem({'magic sword', 'magic sword'},                   2400, 800000,    'magic sword')
shopModule:addSellableItem({'silver dagger', 'silver dagger'},               2402, 500,       'silver dagger')
shopModule:addSellableItem({'knife', 'knife'},                               2403, 10,        'knife')
shopModule:addSellableItem({'combat knife', 'combat knife'},                 2404, 20,        'combat knife')
shopModule:addSellableItem({'sickle', 'sickle'},                             2405, 5,         'sickle')
shopModule:addSellableItem({'short sword', 'short sword'},                   2406, 150,       'short sword')
shopModule:addSellableItem({'bright sword', 'bright sword'},                 2407, 4000,      'bright sword')
shopModule:addSellableItem({'warlord sword', 'warlord sword'},               2408, 700000,    'warlord sword')
shopModule:addSellableItem({'serpent sword', 'serpent sword'},               2409, 1200,      'serpent sword')
shopModule:addSellableItem({'poison dagger', 'poison dagger'},               2411, 80,        'poison dagger')
shopModule:addSellableItem({'katana', 'katana'},                             2412, 60,        'katana')
shopModule:addSellableItem({'broad sword', 'broad sword'},                   2413, 400,       'broad sword')
shopModule:addSellableItem({'golden sickle', 'golden sickle'},               2418, 120,       'golden sickle')
shopModule:addSellableItem({'scimitar', 'scimitar'},                         2419, 150,       'scimitar')
shopModule:addSellableItem({'machete', 'machete'},                           2420, 35,        'machete')
shopModule:addSellableItem({'heavy machete', 'heavy machete'},               2442, 50,        'heavy machete')
shopModule:addSellableItem({'epee', 'epee'},                                 2438, 10000,     'epee')
shopModule:addSellableItem({'pharaoh sword', 'pharaoh sword'},               2446, 500000,    'pharaoh sword')
shopModule:addSellableItem({'bone sword', 'bone sword'},                     2450, 1000,      'bone sword')
shopModule:addSellableItem({'djinn blade', 'djinn blade'},                   2451, 90000,     'djinn blade')
shopModule:addSellableItem({'avenger', 'avenger'},                           6528, 60000,     'avenger')
shopModule:addSellableItem({'demonrage sword', 'demonrage sword'},           7382, 10000,     'demonrage sword')
shopModule:addSellableItem({'relic sword', 'relic sword'},                   7383, 30000,     'relic sword')
shopModule:addSellableItem({'mystic blade', 'mystic blade'},                 7384, 30000,     'mystic blade')
shopModule:addSellableItem({'crimson sword', 'crimson sword'},               7385, 500,       'crimson sword')
shopModule:addSellableItem({'marcenary sword', 'marcenary sword'},           7386, 35000,     'marcenary sword')
shopModule:addSellableItem({'justice seeker', 'justice seeker'},             7390, 140,       'justice seeker')
shopModule:addSellableItem({'unuseful sword', 'unuseful sword'},             7391, 4000,      'unuseful sword')
shopModule:addSellableItem({'dragon slayer', 'dragon slayer'},               7402, 15000,     'dragon slayer')
shopModule:addSellableItem({'giant unuseful sword', 'giant unuseful'},       7403, 10000,     'giant unuseful sword')
shopModule:addSellableItem({'assassin dagger', 'assassin dagger'},           7404, 40000,     'assassin dagger')
shopModule:addSellableItem({'shenlong sword', 'shenlong sword'},             7405, 10000,     'shenlong sword')
shopModule:addSellableItem({'blacksteel sword', 'blacksteel sword'},         7406, 2500,      'blacksteel sword')
shopModule:addSellableItem({'haunted blade', 'haunted blade'},               7407, 30000,     'haunted blade')
shopModule:addSellableItem({'wyvern fang', 'wyvern fang'},                   7408, 2500,      'wyvern fang')
shopModule:addSellableItem({'bloody edge', 'bloody edge'},                   7416, 100000,    'bloody edge')
shopModule:addSellableItem({'square sword', 'square sword'},                 7417, 90000,     'square sword')
shopModule:addSellableItem({'unknown sword', 'unknown sword'},               7418, 35000,     'unknown sword')
shopModule:addSellableItem({'dreaded cleaver', 'dreaded cleaver'},           7419, 40000,     'dreaded cleaver')
shopModule:addSellableItem({'mechanic sytche', 'mechanic sytche'},           7420, 30000,     'mechanic sytche')
shopModule:addSellableItem({'crystal sword', 'crystal sword'},               7449, 800,       'crystal sword')
shopModule:addSellableItem({'golden sword', 'golden sword'},                 8931, 1000000,   'golden sword')
shopModule:addSellableItem({'club', 'club'},                                 2382, 8,         'club')
shopModule:addSellableItem({'war hammer', 'war hammer'},                     2391, 1000,      'war hammer')
shopModule:addSellableItem({'morning star', 'morning star'},                 2394, 100,       'morning star')
shopModule:addSellableItem({'mace', 'mace'},                                 2398, 30,        'mace')
shopModule:addSellableItem({'staff', 'staff'},                               2401, 25,        'staff')
shopModule:addSellableItem({'crowbar', 'crowbar'},                           2416, 100,       'crowbar')
shopModule:addSellableItem({'battle hammer', 'battle hammer'},               2417, 150,       'battle hammer')
shopModule:addSellableItem({'thunder hammer', 'thunder hammer'},             2421, 90000,     'thunder hammer')
shopModule:addSellableItem({'iron hammer', 'iron hammer'},                   2422, 100,       'iron hammer')
shopModule:addSellableItem({'clerical mace', 'clerical mace'},               2423, 500,       'clerical mace')
shopModule:addSellableItem({'silver mace', 'silver mace'},                   2424, 40000,     'silver mace')
shopModule:addSellableItem({'dragon hammer', 'dragon hammer'},               2434, 2000,      'dragon hammer')
shopModule:addSellableItem({'skull staff', 'skull staff'},                   2436, 6000,      'skull staff')
shopModule:addSellableItem({'golden mace', 'golden mace'},                   2437, 3000,      'golden mace')
shopModule:addSellableItem({'daramanian mace', 'daramanian mace'},           2439, 4000,      'daramanian mace')
shopModule:addSellableItem({'hammer of wrath', 'hammer of wrath'},           2444, 100000,    'hammer of wrath')
shopModule:addSellableItem({'crystal mace', 'crystal mace'},                 2445, 300000,    'crystal mace')
shopModule:addSellableItem({'studded club', 'studded club'},                 2448, 15,        'studded club')
shopModule:addSellableItem({'bone club', 'bone club'},                       2449, 50,        'bone club')
shopModule:addSellableItem({'heavy mace', 'heavy mace'},                     2452, 50000,     'heavy mace')
shopModule:addSellableItem({'arcane staff', 'arcane staff'},                 2453, 50000,     'arcane staff')
shopModule:addSellableItem({'lich staff', 'lich staff'},                     3961, 2000,      'lich staff')
shopModule:addSellableItem({'banana staff', 'banana staff'},                 3966, 1000,      'banana staff')
shopModule:addSellableItem({'brutetamers staff', 'brutetamers staff'},       7379, 1500,      'brutetamers staff')
shopModule:addSellableItem({'mammoth whopper', 'mammoth whopper'},           7381, 500,       'mammoth whopper')
shopModule:addSellableItem({'diamond sceptre', 'diamond sceptre'},           7387, 4000,      'diamond sceptre')
shopModule:addSellableItem({'orcish maul', 'orcish maul'},                   7392, 3000,      'orcish maul')
shopModule:addSellableItem({'sapphire hammer', 'sapphire hammer'},           7437, 7000,      'sapphire hammer')
shopModule:addSellableItem({'ice hammer', 'ice hammer'},                     7450, 10000,     'ice hammer')
shopModule:addSellableItem({'shadow sceptre', 'shadow sceptre'},             7451, 100000,    'shadow sceptre')
shopModule:addSellableItem({'spiked squelcher', 'spiked squelcher'},         7452, 6000,      'spiked squelcher')
shopModule:addSellableItem({'queens sceptre', 'queens sceptre'},             7410, 50000,     'queens sceptre')
shopModule:addSellableItem({'abyss hammer', 'abyss hammer'},                 7414, 100000,    'abyss hammer')
shopModule:addSellableItem({'cranial basher', 'cranial basher'},             7415, 15000,     'cranial basher')
shopModule:addSellableItem({'cursed star', 'cursed star'},                   7421, 100000,    'cursed star')
shopModule:addSellableItem({'mace of knowledge', 'mace of knowledge'},       7422, 50000,     'mace of knowledge')
shopModule:addSellableItem({'fur square mace', 'fur square mace'},           7423, 50000,     'fur square mace')
shopModule:addSellableItem({'lunar staff', 'lunar staff'},                   7424, 9000,      'lunar staff')
shopModule:addSellableItem({'taurus mace', 'taurus mace'},                   7425, 600,       'taurus mace')
shopModule:addSellableItem({'amber staff', 'amber staff'},                   7426, 8000,      'amber staff')
shopModule:addSellableItem({'chaos mace', 'chaos mace'},                     7427, 25000,     'chaos mace')
shopModule:addSellableItem({'ice star', 'ice star'},                         7428, 50000,     'ice star')
shopModule:addSellableItem({'blessed sceptre', 'blessed sceptre'},           7429, 200000,    'blessed sceptre')
shopModule:addSellableItem({'dragonbone staff', 'dragonbone staff'},         7430, 3000,      'dragonbone staff')
shopModule:addSellableItem({'demonbone', 'demonbone'},                       7431, 20000,     'demonbone')
shopModule:addSellableItem({'furry club', 'furry club'},                     7432, 1000,      'furry club')
shopModule:addSellableItem({'battle axe', 'battle axe'},                     2378, 100,       'battle axe')
shopModule:addSellableItem({'hand axe', 'hand axe'},                         2380, 20,        'hand axe')
shopModule:addSellableItem({'halberd', 'halberd'},                           2381, 400,       'halberd')
shopModule:addSellableItem({'axe', 'axe'},                                   2386, 7,         'axe')
shopModule:addSellableItem({'double axe', 'double axe'},                     2387, 300,       'double axe')
shopModule:addSellableItem({'hatchet', 'hatchet'},                           2388, 25,        'hatchet')
shopModule:addSellableItem({'dragon lance', 'dragon lance'},                 2314, 9000,      'dragon lance')
shopModule:addSellableItem({'great axe', 'great axe'},                       2415, 20000,     'great axe')
shopModule:addSellableItem({'obsidian lance', 'obsidian lance'},             2425, 500,       'obsidian lance')
shopModule:addSellableItem({'naginata', 'naginata'},                         2426, 1000,      'naginata')
shopModule:addSellableItem({'guardian halberd', 'guardian halberd'},         2427, 5000,      'guardian halberd')
shopModule:addSellableItem({'orcish axe', 'orcish axe'},                     2428, 200,       'orcish axe')
shopModule:addSellableItem({'barbarian axe', 'barbarian axe'},               2429, 300,       'barbarian axe')
shopModule:addSellableItem({'knight axe', 'knight axe'},                     2430, 1000,      'knight axe')
shopModule:addSellableItem({'stonecutter axe', 'stonecutter axe'},           2431, 800000,    'stonecutter axe')
shopModule:addSellableItem({'fire axe', 'fire axe'},                         2432, 7000,      'fire axe')
shopModule:addSellableItem({'dwarven axe', 'dwarven axe'},                   2435, 1000,      'dwarven axe')
shopModule:addSellableItem({'daramanian waraxe', 'daramanian waraxe'},       2440, 900,       'daramanian waraxe')
shopModule:addSellableItem({'daramanian axe', 'daramanian axe'},             2441, 400,       'daramanian axe')
shopModule:addSellableItem({'ravagers axe', 'ravagers axe'},                 2443, 50000,     'ravagers axe')
shopModule:addSellableItem({'twin axe', 'twin axe'},                         2447, 60000,     'twin axe')
shopModule:addSellableItem({'war axe', 'war axe'},                           2454, 10000,     'war axe')
shopModule:addSellableItem({'beastslayer axe', 'beastslayer axe'},           3962, 2000,      'beastslayer axe')
shopModule:addSellableItem({'ruthless axe', 'ruthless axe'},                 6553, 70000,     'ruthless axe')
shopModule:addSellableItem({'headchopper', 'headchopper'},                   7380, 4000,      'headchopper')
shopModule:addSellableItem({'vile axe', 'vile axe'},                         7388, 60000,     'vile axe')
shopModule:addSellableItem({'heroic axe', 'heroic axe'},                     7389, 15000,     'heroic axe')
shopModule:addSellableItem({'relic axe', 'relic axe'},                       7411, 40000,     'relic axe')
shopModule:addSellableItem({'butchers axe', 'butchers axe'},                 7412, 70000,     'butchers axe')
shopModule:addSellableItem({'titan axe', 'titan axe'},                       7413, 40000,     'titan axe')
shopModule:addSellableItem({'bloodslayer axe', 'bloodslayer axe'},           7453, 40000,     'bloodslayer axe')
shopModule:addSellableItem({'destroyers axe', 'destroyers axe'},             7454, 60000,     'destroyers axe')
shopModule:addSellableItem({'ice double axe', 'ice double axe'},             7455, 90000,     'ice double axe')
shopModule:addSellableItem({'cursed axe', 'cursed axe'},                     7433, 30000,     'cursed axe')
shopModule:addSellableItem({'royal axe', 'royal axe'},                       7434, 150000,    'royal axe')
shopModule:addSellableItem({'black axe', 'black axe'},                       7435, 300000,    'black axe')
shopModule:addSellableItem({'angelwing axe', 'angelwing axe'},               7436, 200000,    'angelwing axe')
shopModule:addSellableItem({'demonwing axe', 'demonwing axe'},               8926, 1000000,   'demonwing axe')
shopModule:addSellableItem({'dragon scale mail', 'dsm'},                  2492, 40000,    'dragon scale mail')
shopModule:addSellableItem({'dwarven armor', 'dwarven armor'},            2503, 30000,    'dwarven armor')
shopModule:addSellableItem({'golden armor', 'golden armor'},              2466, 20000,    'golden armor')
shopModule:addSellableItem({'leopard armor', 'leopard armor'},            3968, 1000,     'leopard armor')
shopModule:addSellableItem({'mammoth fur cape', 'mfc'},                   7463, 6000,     'mammoth fur cape')
shopModule:addSellableItem({'plate armor', 'plate armor'},                2463, 400,      'plate armor')
shopModule:addSellableItem({'chain armor', 'chain armor'},                2464, 80,       'chain armor')
shopModule:addSellableItem({'brass armor', 'brass armor'},                2465, 35,       'brass armor')
shopModule:addSellableItem({'leather armor', 'leather armor'},            2467, 10,       'leather armor')
shopModule:addSellableItem({'magic plate armor', 'magic plate armor'},    2472, 80000,    'magic plate armor')
shopModule:addSellableItem({'knight armor', 'knight armor'},              2476, 5000,     'knight armor')
shopModule:addSellableItem({'scale armor', 'scale armor'},                2483, 50,       'scale armor')
shopModule:addSellableItem({'studded armor', 'studded armor'},            2484, 30,       'studded armor')
shopModule:addSellableItem({'doublet', 'doublet'},                        2485, 15,       'doublet')
shopModule:addSellableItem({'noble armor', 'noble armor'},                2486, 1000,     'noble armor')
shopModule:addSellableItem({'crown armor', 'crown armor'},                2487, 12000,    'crown armor')
shopModule:addSellableItem({'pirate shirt', 'pirate shirt'},              6095, 500,      'pirate shirt')
shopModule:addSellableItem({'dark armor', 'dark armor'},                  2489, 500,      'dark armor')
shopModule:addSellableItem({'demon armor', 'demon armor'},                2494, 120000,   'demon armor')
shopModule:addSellableItem({'amazon armor', 'amazon armor'},              2500, 150000,   'amazon armor')
shopModule:addSellableItem({'elven armor', 'elven armor'},                2505, 130000,   'elven armor')
shopModule:addSellableItem({'native armor', 'native armor'},              2508, 3000,     'native armor')
shopModule:addSellableItem({'jacket', 'jacket'},                          2650, 5,        'jacket')
shopModule:addSellableItem({'blue robe', 'blue robe'},                    2656, 11000,    'blue robe')
shopModule:addSellableItem({'hidden turbant', 'hidden turbant'},          2660, 100000,   'hidden turbant')
shopModule:addSellableItem({'cowl', 'cowl'},                              2664, 90000,    'cowl')
shopModule:addSellableItem({'terra mantle', 'terra mantle'},              7884, 10000,    'terra mantle')
shopModule:addSellableItem({'glacier rope', 'glacier rope'},              7897, 15000,    'glacier rope')
shopModule:addSellableItem({'lighting robe', 'lighting robe'},            7898, 20000,    'lighting robe')
shopModule:addSellableItem({'magma coat', 'magma coat'},                  7899, 60000,    'magma coat')
shopModule:addSellableItem({'studded legs', 'studded legs'},              2468, 10,       'studded legs')
shopModule:addSellableItem({'dragon scale legs', 'dcl'},                  2469, 100000,   'dragon scale legs')
shopModule:addSellableItem({'golden legs', 'golden legs'},                2470, 100000,   'golden legs')
shopModule:addSellableItem({'knight legs', 'knight legs'},                2477, 5000,     'knight legs')
shopModule:addSellableItem({'brass legs', 'brass legs'},                  2478, 90,       'brass legs')
shopModule:addSellableItem({'crown legs', 'crown legs'},                  2488, 12000,    'crown legs')
shopModule:addSellableItem({'demon legs', 'demon legs'},                  2495, 200000,   'demon legs')
shopModule:addSellableItem({'dwarven legs', 'dwarven legs'},              2504, 3000,     'dwarven legs')
shopModule:addSellableItem({'elven legs', 'elven legs'},                  2507, 150000,   'elven legs')
shopModule:addSellableItem({'plate legs', 'plate legs'},                  2647, 200,      'plate legs')
shopModule:addSellableItem({'chain legs', 'chain legs'},                  2648, 30,       'chain legs')
shopModule:addSellableItem({'leather legs', 'leather legs'},              2649, 5,        'leather legs')
shopModule:addSellableItem({'mammoth fur shorts', 'mfs'},                 7464, 300,      'mammoth fur shorts')
shopModule:addSellableItem({'terra legs', 'terra legs'},                  7885, 60000,    'terra legs')
shopModule:addSellableItem({'magma legs', 'magma legs'},                  7894, 70000,    'magma legs')
shopModule:addSellableItem({'lighting legs', 'lighting legs'},            7895, 50000,    'lighting legs')
shopModule:addSellableItem({'glacier kilt', 'glacier kilt'},              7896, 55000,    'glacier kilt')
shopModule:addSellableItem({'bast skirt', 'bast skirt'},                  3983, 8000,     'bast skirt')
shopModule:addSellableItem({'blue legs', 'blue legs'},                    7730, 15000,    'blue legs')
shopModule:addSellableItem({'pirate knee breeches', 'pkb'},               5918, 200,      'pirate knee breeches')
shopModule:addSellableItem({'steel shield', 'steel shield'},              2509, 80,       'steel shield')
shopModule:addSellableItem({'plate shield', 'plate shield'},              2510, 150,      'plate shield')
shopModule:addSellableItem({'brass shield', 'brass shield'},              2511, 90,       'brass shield')
shopModule:addSellableItem({'wooden shield', 'wooden shield'},            2512, 80,       'wooden shield')
shopModule:addSellableItem({'battle shield', 'battle shield'},            2513, 100,      'battle shield')
shopModule:addSellableItem({'mastermind shield', 'mastermind shield'},    2514, 90000,    'mastermind shield')
shopModule:addSellableItem({'guardian shield', 'guardian shield'},        2515, 2000,     'guardian shield')
shopModule:addSellableItem({'dragon shield', 'dragon shield'},            2516, 4000,     'dragon shield')
shopModule:addSellableItem({'shield of honour', 'shield of honour'},      2517, 100000,   'shield of honour')
shopModule:addSellableItem({'beholder shield', 'beholder shield'},        2518, 1000,     'beholder shield')
shopModule:addSellableItem({'crown shield', 'crown shield'},              2519, 8000,     'crown shield')
shopModule:addSellableItem({'demon shield', 'demon shield'},              2520, 30000,    'demon shield')
shopModule:addSellableItem({'dark shield', 'dark shield'},                2521, 500,      'dark shield')
shopModule:addSellableItem({'great shield', 'great shield'},              2522, 30000,    'great shield')
shopModule:addSellableItem({'blessed shield', 'blessed shield'},          2523, 400000,   'blessed shield')
shopModule:addSellableItem({'ornamented shield', 'ornamented shield'},    2524, 2000,     'ornamented shield')
shopModule:addSellableItem({'dwarven shield', 'dwarven shield'},          2525, 100,      'dwarven shield')
shopModule:addSellableItem({'studded shield', 'studded shield'},          2526, 50,       'studded shield')
shopModule:addSellableItem({'rose shield', 'rose shield'},                2527, 80000,    'rose shield')
shopModule:addSellableItem({'tower shield', 'tower shield'},              6128, 8000,     'tower shield')
shopModule:addSellableItem({'black shield', 'black shield'},              2529, 1000,     'black shield')
shopModule:addSellableItem({'copper shield', 'copper shield'},            2530, 30,       'copper shield')
shopModule:addSellableItem({'viking shield', 'viking shield'},            2531, 100,      'viking shield')
shopModule:addSellableItem({'ancient shield', 'ancient shield'},          2532, 1000,     'ancient shield')
shopModule:addSellableItem({'griffin shield', 'griffin shield'},          2533, 1500,     'griffin shield')
shopModule:addSellableItem({'vampire shield', 'vampire shield'},          2534, 15000,    'vampire shield')
shopModule:addSellableItem({'castle shield', 'castle shield'},            2535, 35000,    'castle shield')
shopModule:addSellableItem({'medusa shield', 'medusa shield'},            2536, 9000,     'medusa shield')
shopModule:addSellableItem({'amazon shield', 'amazon shield'},            2537, 400000,   'amazon shield')
shopModule:addSellableItem({'eagle shield', 'eagle shield'},              2538, 300000,   'eagle shield')
shopModule:addSellableItem({'phoenix shield', 'phoenix shield'},          2539, 500000,   'phoenix shield')
shopModule:addSellableItem({'scarab shield', 'scarab shield'},            2540, 2000,     'scarab shield')
shopModule:addSellableItem({'bone shield', 'bone shield'},                2541, 160,      'bone shield')
shopModule:addSellableItem({'tempest shield', 'tempest shield'},          2542, 1000000,  'tempest shield')
shopModule:addSellableItem({'tusk shield', 'tusk shield'},                3973, 1000,     'tusk shield')
shopModule:addSellableItem({'sentinel shield', 'sentinel shield'},        3974, 700,      'sentinel shield')
shopModule:addSellableItem({'salamander shield', 'salamander shield'},    3975, 600,      'salamander shield')
shopModule:addSellableItem({'tortoise shield', 'tortoise shield'},        6131, 200,      'tortoise shield')
shopModule:addSellableItem({'nightmare shield', 'nightmare shield'},      6391, 1200000,  'nightmare shield')
shopModule:addSellableItem({'necromancer shield', 'necromancer shield'},  6433, 1200000,  'necromancer shield')
shopModule:addSellableItem({'norse shield', 'norse shield'},              7460, 1500,     'norse shield')
shopModule:addSellableItem({'crown', 'crown'},                            2128, 10000,    'crown')
shopModule:addSellableItem({'steel helmet', 'steel helmet'},              2457, 300,      'steel helmet')
shopModule:addSellableItem({'chain helmet', 'chain helmet'},              2458, 35,       'chain helmet')
shopModule:addSellableItem({'iron helmet', 'iron helmet'},                2459, 150,      'iron helmet')
shopModule:addSellableItem({'brass helmet', 'brass helmet'},              2460, 30,       'brass helmet')
shopModule:addSellableItem({'leather helmet', 'leather helmet'},          2461, 8,        'leather helmet')
shopModule:addSellableItem({'devil helmet', 'devil helmet'},              2462, 1200,     'devil helmet')
shopModule:addSellableItem({'golden helmet', 'golden helmet'},            2471, 1500000,  'golden helmet')
shopModule:addSellableItem({'viking helmet', 'viking helmet'},            2473, 50,       'viking helmet')
shopModule:addSellableItem({'winged helmet', 'winged helmet'},            2474, 1300000,  'winged helmet')
shopModule:addSellableItem({'warrior helmet', 'warrior helmet'},          2475, 5000,     'warrior helmet')
shopModule:addSellableItem({'strange helmet', 'strange helmet'},          2479, 500,      'strange helmet')
shopModule:addSellableItem({'legion helmet', 'legion helmet'},            2480, 70,       'legion helmet')
shopModule:addSellableItem({'soldier helmet', 'soldier helmet'},          2481, 20,       'soldier helmet')
shopModule:addSellableItem({'studded helmet', 'studded helmet'},          2482, 3,        'studded helmet')
shopModule:addSellableItem({'dark helmet', 'dark helmet'},                2490, 250,      'dark helmet')
shopModule:addSellableItem({'crown helmet', 'crown helmet'},              2491, 2500,     'crown helmet')
shopModule:addSellableItem({'demon helmet', 'demon helmet'},              2493, 200000,   'demon helmet')
shopModule:addSellableItem({'horned helmet', 'horned helmet'},            2496, 1000000,  'horned helmet')
shopModule:addSellableItem({'crusader helmet', 'crusader helmet'},        2497, 6000,     'crusader helmet')
shopModule:addSellableItem({'royal helmet', 'royal helmet'},              2498, 30000,    'royal helmet')
shopModule:addSellableItem({'amazon helmet', 'amazon helmet'},            2499, 1400000,  'amazon helmet')
shopModule:addSellableItem({'ceremonial mask', 'ceremonial mask'},        2501, 1000,     'ceremonial mask')
shopModule:addSellableItem({'dwarven helmet', 'dwarven helmet'},          2502, 100000,   'dwarven helmet')
shopModule:addSellableItem({'dragon scale helmet', 'drascahelm'},         2506, 400000,   'dragon scale helmet')
shopModule:addSellableItem({'mystic turban', 'mystic turban'},            2663, 3000,     'mystic turban')
shopModule:addSellableItem({'post officers hat', 'post'},                 2665, 50000,    'post officers hat')
shopModule:addSellableItem({'tribal mask', 'tribal mask'},                3967, 300,      'tribal mask')
shopModule:addSellableItem({'horseman helmet', 'horseman helmet'},        3969, 1000,     'horseman helmet')
shopModule:addSellableItem({'feather headdress', 'feather head'},         3970, 1500,     'feather headdress')
shopModule:addSellableItem({'charmer tiara', 'charmer tiara'},            3971, 13000,    'charmer tiara')
shopModule:addSellableItem({'beholder helmet', 'beholder helmet'},        3972, 20000,    'beholder helmet')
shopModule:addSellableItem({'helmet of the deep', 'heotde'},              5461, 1000000,  'helmet of the deep')
shopModule:addSellableItem({'santa hat', 'santa hat'},                    6531, 2300,     'santa hat')
shopModule:addSellableItem({'skull helmet', 'skull helmet'},              5741, 50000,    'skull helmet')
shopModule:addSellableItem({'pirate hat', 'pirate hat'},                  6096, 1000,     'pirate hat')
shopModule:addSellableItem({'krimhorn helmet', 'krimhorn helmet'},        7461, 250,      'krimhorn helmet')
shopModule:addSellableItem({'ragnir helmet', 'ragnir helmet'},            7462, 400,      'ragnir helmet')
shopModule:addSellableItem({'fur cap', 'fur cap'},                        7458, 30000,    'fur cap')
shopModule:addSellableItem({'earmuffs', 'earmuffs'},                      7459, 1000,     'earmuffs')
shopModule:addSellableItem({'terra hood', 'terra hood'},                  7903, 3500,     'terra hood')
shopModule:addSellableItem({'lighting headband', 'lighba'},               7901, 8000,     'lighting headband')
shopModule:addSellableItem({'glacier mask', 'glacier mask'},              7902, 4000,     'glacier mask')
shopModule:addSellableItem({'boots of haste', 'boots of haste'},          2195, 30000,    'boots of haste')
shopModule:addSellableItem({'soft boots', 'soft boots'},                  6132, 400000,   'soft boots')
shopModule:addSellableItem({'boots of waterwalking', 'bowwalk'},          2358, 1000000,  'boots of waterwalking')
shopModule:addSellableItem({'traper boots', 'traper boots'},              2641, 3000,     'traper boots')
shopModule:addSellableItem({'sandals', 'sandals'},                        2642, 100,      'sandals')
shopModule:addSellableItem({'leather boots', 'leather boots'},            2643, 10,       'leather boots')
shopModule:addSellableItem({'bunny slippers', 'bunny slippers'},          2644, 35,       'bunny slippers')
shopModule:addSellableItem({'steel boots', 'steel boots'},                2645, 30000,    'steel boots')
shopModule:addSellableItem({'golden boots', 'golden boots'},              2646, 400000,   'golden boots')
shopModule:addSellableItem({'crocodile boots', 'crocodile boots'},        3982, 1000,     'crocodile boots')
shopModule:addSellableItem({'pirate boots', 'pirate boots'},              5462, 5000,     'pirate boots')
shopModule:addSellableItem({'fur boots', 'fur boots'},                    7457, 2000,     'fur boots')
shopModule:addSellableItem({'terra boots', 'terra boots'},                7886, 5000,     'terra boots')
shopModule:addSellableItem({'magma boots', 'magma boots'},                7891, 7000,     'magma boots')
shopModule:addSellableItem({'glacier shoes', 'glacier shoes'},            7892, 3000,     'glacier shoes')
shopModule:addSellableItem({'lighting boots', 'lighting boots'},          7893, 7000,     'lighting boots')

npcHandler:addModule(FocusModule:new())

VIP Loot.lua

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

-- OTServ event handling functions start
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
-- OTServ event handling functions end

-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
keywordHandler:addKeyword({'clubs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy dragon hammers(2k), skull staffs(6k), war hammers(1.2k), dragonbone staffs(3k) and daramanian maces(110gp). I also buy amber staffs(8k), sapphire hammers(2k), brutetamer\s staff(1.5k), furry clubs(1k), taurus maces(500gp), lunar staffs(5k), mammoth whoppers(300gp) and diamond sceptres(3k).'})
keywordHandler:addKeyword({'axes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy knight axes(2k), dragon lances(9k), fira axes (8k), obsidian lances(500gp), war axes(9k) and daramanian waraxes (1k). I also buy beastslayer axe(1.5k).'})
keywordHandler:addKeyword({'swords'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy giant swords (17k), poison daggers (50gp), scimiteras (150gp), serpent sword (900gp), fire sword (4k), spike swords(1k), ice rapiers(1k), broad swords(500gp), dragon slayers(15k), wyvern fang(1.5k), silver dagger(500gp) and heavy machetes(90gp).'})
keywordHandler:addKeyword({'wands'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy magic lightwands(30gp), wand of vortexes(100gp), wand of dragonbreaths(200gp), wand of plagues(1k), wand of cosmic energys(2k) and wand if infernoes(3k).'})
keywordHandler:addKeyword({'rods'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy snakebite rods(100gp), moonlight rods(200gp), volcanic rods(1k), quarmire rods(2k) and tempest rods(3k).'})
keywordHandler:addKeyword({'boots'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy boots of hastes(30k), steel boots(30k), pirate boots(2k) and crocodile boots(1k). I also buy fur boots(2k).'})
keywordHandler:addKeyword({'armors'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy crown armors(12k), blue robes(10k), noble armors(900gp), dark armors(400gp), knight armors(5k), dragon scale mails(40k), golden armors(20k) and pirate scirts(500gp). I also buy mammoth fur capes(6k), leopard armors(1k).'})
keywordHandler:addKeyword({'legs'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy crown legs(12k), knight legs(5k) and pirate knee breeches(200gp).'})
keywordHandler:addKeyword({'shields'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy phoenix shields(16k), crown shields(8k), dragon shields(4k), guardian shields(2k), beholder shields(1.2k), ancient shields(900gp), black shields, tower shields(8k), vampire shields(15k), demon shields(30k), medusa shields(9k), castle shields(5k), scarab shields(2k), dark shields(400gp), tortoise shields(150gp) and bone shields(80gp).'})
keywordHandler:addKeyword({'helmets'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I buy royal(30k), crusader(6k), crown(2.5k), dark(250gp), strange(500gp), warrior(5k), skull(40k), beholder(7.5k), devil(1k), ragnir(400gp) and krimhorn(200gp). I also buy mystic turbans(150gp) and pirate hats(1k).'})

-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())


VIP Loot.xml

Lua:
<npc name="VIP Loot" script="data/npc/scripts/vip 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,300000;magic plate armor,2472,500000;golden legs,2470,300000;demon helmet,2493,300000;giant sword,2393,60000;knight axe,2430,5000;poison dagger,2411,50;scimitar,2419,150;serpent sword,2409,900;skull staff,2436,10000;dragon lance,2414,85000;fire axe,2432,40000;fire sword,2392,18000;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,47000;noble armor,2486,900;dark armor,2489,400;knight armor,2476,20000;dragon scale mail,2492,230000;golden armor,2466,130000;mammoth fur cape,7463,6000;leopard armor,3968,1000;pirate shirt,605,500;royal helmet,2498,80000;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,80000;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,80000;knight legs,2477,20000;steel boots,2645,100000;pirate boots,5462,2000;fur boots,7457,2000;crocodile boots,3982,1000;pirate knee breeches,5918,200;phoenix shield,2539,16000;crown shield,2519,20000;dragon shield,2516,10000;guardian shield,2515,2000;beholder shield,2518,1200;ancient shield,2532,900;black shield,2529,800;tower shield,2528,18000;vampire shield,2534,55000;demon shield,2520,100000;medusa shield,2536,18000;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>
 
Back
Top