Sentielo
Advanced OT User
- Joined
- Feb 3, 2008
- Messages
- 2,388
- Reaction score
- 226
I deleted the npcs because I have to add te xml files too and I have to fix bugs .
After I fixed that I will publish them here again.
Please be patience.
Sentielo
This is a ammunition seller/buyer.
Ammu.xml
Distans.lua
This is a druid which sells all the 5 blessings in one row.
Blessia.xml
Blessing.lua
This npc sells the djinn items, but not the rings and amulets, because I made some other npcs for that .
Djinn.xml
Djinn.lua
It sells/buys equipments, which npcs like Sam sells in reallife.
Equip.xml
Equipment.lua
Sells and buys differnt kinds of food.
Fooda.xml
Food.lua
Sells and buys jewelry
Jewel
Jewelry.lua
Rune, potions and wands/rod selling npc
Manah.xml
Runes.lua
Npc which sells necklaces
Necklace.xml
Necklaces.lua
After I fixed that I will publish them here again.
Please be patience.
Sentielo
This is a ammunition seller/buyer.
Ammu.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Ammu" script="data/npc/scripts/distans.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="137" head="96" body="121" legs="102" feet="119" addons="3"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Welcome |PLAYERNAME]! This is my ammunition shop for paladins, just ask me for a {trade}." />
<parameter key="message_farewell" value="Goodbye and I hope you love my ammunition, |PLAYERNAME|." />
<parameter key="message_walkaway" value="Don't you like my ammunition?" />
</parameters>
</npc>
Code:
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
shopModule:addBuyableItem({'bow'}, 2456, 400, 1, 'bow')
shopModule:addBuyableItem({'crossbow'}, 2455, 500, 1, 'crossbow')
shopModule:addBuyableItem({'royal spear'}, 7378, 15, 1, 'royal spear')
shopModule:addBuyableItem({'spear'}, 2389, 10, 1, 'spear')
shopModule:addBuyableItem({'arrow'}, 2544, 3, 1, 'arrow')
shopModule:addBuyableItem({'sniper arrow'}, 7364, 5, 1, 'sniper arrow')
shopModule:addBuyableItem({'bolt'}, 2543, 4, 1, 'bolt')
shopModule:addBuyableItem({'earth arrow'}, 7851, 5, 1, 'earth arrow')
shopModule:addBuyableItem({'flaming arrow'}, 7840, 5, 1, 'flaming arrow')
shopModule:addBuyableItem({'flash arrow'}, 7838, 5, 1, 'flash arrow')
shopModule:addBuyableItem({'onyx arrow'}, 7365, 7, 1, 'onyx arrow')
shopModule:addBuyableItem({'power bolt'}, 2547, 7, 1, 'power bolt')
shopModule:addBuyableItem({'throwing star'}, 2399, 42, 1, 'throwing star')
shopModule:addBuyableItem({'shiver arrow'}, 7839, 5, 1, 'shiver arrow')
shopModule:addBuyableItem({'piercing bolt'}, 7362, 5, 1, 'piercing bolt')
shopModule:addBuyableItem({'assassin star'}, 7368, 100, 1, 'assassin star')
shopModule:addBuyableItem({'throwing knife'}, 2410, 25, 1, 'throwing knife')
shopModule:addSellableItem({'bow'}, 2456, 130, 1, 'bow')
shopModule:addSellableItem({'crossbow'}, 2455, 160, 1, 'crossbow')
shopModule:addSellableItem({'spear'}, 2389, 3, 1, 'spear')
shopModule:addSellableItem({'hunting spear'}, 3965, 25, 1, 'hunting spear')
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
This is a druid which sells all the 5 blessings in one row.
Blessia.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Blessia" script="data/npc/scripts/blessing.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="150" head="95" body="9" legs="87" feet="95" addons="3"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hello |PLAYERNAME]! My name is Blessia and I sells the 5 blessings in a row, when you just say {blessings}." />
<parameter key="message_farewell" value="Blessia Blessings! |PLAYERNAME|." />
<parameter key="message_walkaway" value="Good bye..." />
</parameters>
</npc>
Blessing.lua
Code:
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
function onSay(cid, words, param)
if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
doPlayerSendCancel(cid,'You have already got one or more blessings!')
else
if doPlayerRemoveMoney(cid, 50000) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed by the gods!')
else
doPlayerSendCancel(cid, "You need five crystal coin to get blessed!")
end
end
return 1
end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
This npc sells the djinn items, but not the rings and amulets, because I made some other npcs for that .
Djinn.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Djinn" script="data/npc/scripts/Djinn.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type=80" head="20" body="30" legs="40" feet="50"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hello|PLAYERNAME]! I sell the djinn items. Just ask me for a {trade}." />
<parameter key="message_farewell" value="Goodbye. Thanks for trading with me |PLAYERNAME|." />
<parameter key="message_walkaway" value="Goodbye." />
</parameters>
</npc>
Djinn.lua
Code:
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
shopModule:addBuyableItem({'beholder shield'}, 2518, 7000, 1, 'beholder shield')
shopModule:addBuyableItem({'noble armor'}, 2486, 8000, 1, 'noble armor')
shopModule:addBuyableItem({'spike sword'}, 2383, 8000, 1, 'spike sword')
shopModule:addBuyableItem({'war hammer'}, 2391, 10000, 1, 'war hammer')
shopModule:addSellableItem({'beholder shield'}, 2518, 1200, 1, 'beholder shield')
shopModule:addSellableItem({'crown shield'}, 2519, 8000, 1, 'crown shield')
shopModule:addSellableItem({'dragon shield'}, 2516, 4000, 1, 'dragon shield')
shopModule:addSellableItem({'guardian shield'}, 2515, 2000, 1, 'guardian shield')
shopModule:addSellableItem({'phoenix shield'}, 2539, 16000, 1, 'phoenix shield')
shopModule:addSellableItem({'blue robe'}, 2656, 10000, 1, 'blue rope')
shopModule:addSellableItem({'crown armor'}, 2487, 12000, 1, 'crown armor')
shopModule:addSellableItem({'noble armor'}, 2486, 900, 1, 'noble armor')
shopModule:addSellableItem({'boots of haste'}, 2195, 30000, 1, 'boots of haste')
shopModule:addSellableItem({'broad sword'}, 2413, 500, 1, 'broad sword')
shopModule:addSellableItem({'dragon lance'}, 2414, 9000, 1, 'dragon lance')
shopModule:addSellableItem({'fire axe'}, 2432, 8000, 1, 'fire axe')
shopModule:addSellableItem({'fire sword'}, 2392, 4000, 1, 'fire sword')
shopModule:addSellableItem({'ice rapier'}, 2396, 1000, 1, 'ice rapier')
shopModule:addSellableItem({'obsidian lance'}, 2425, 500, 1, 'obsidian lance')
shopModule:addSellableItem({'spike sword'}, 2383, 1000, 1, 'spike sword')
shopModule:addSellableItem({'war hammer'}, 2391, 1200, 1, 'war hammer')
shopModule:addSellableItem({'crown helmet'}, 2491, 2500, 1, 'crown helmet')
shopModule:addSellableItem({'crusader helmet'}, 2497, 6000, 1, 'crusader helmet')
shopModule:addSellableItem({'royal helmet'}, 2498, 30000, 1, 'royal helmet')
shopModule:addSellableItem({'crown legs'}, 2488, 12000, 1, 'crown legs')
shopModule:addSellableItem({'earth spike sword'}, 7854, 1000, 1, 'spike sword')
shopModule:addSellableItem({'energy spike sword'}, 7869, 1000, 1, 'spike sword')
shopModule:addSellableItem({'fiery spike sword'}, 7744, 1000, 1, 'spike sword')
shopModule:addSellableItem({'icy spike sword'}, 7763, 1000, 1, 'spike sword')
shopModule:addSellableItem({'earth war hammer'}, 7868, 1200, 1, 'war hammer')
shopModule:addSellableItem({'energy war hammer'}, 7883, 1200, 1, 'war hammer')
shopModule:addSellableItem({'fiery war hammer'}, 7758, 1200, 1, 'war hammer')
shopModule:addSellableItem({'icy war hammer'}, 7777, 1200, 1, 'war hammer')
shopModule:addSellableItem({'wand of vortex'}, 2190, 100, 1, 'wand of vortex')
shopModule:addSellableItem({'wand of dragonbreath'}, 2191, 200, 1, 'wand of dragonbreath')
shopModule:addSellableItem({'wand of decay'}, 2188, 1000, 1, 'wand of decay')
shopModule:addSellableItem({'wand of draconia'}, 8921, 1500, 1, 'wand of draconia')
shopModule:addSellableItem({'wand of cosmic energy'}, 2189, 2000, 1, 'wand of casmic energy')
shopModule:addSellableItem({'wand of inferno'}, 2187, 3000, 1, 'wand of inferno')
shopModule:addSellableItem({'wand of starstorm'}, 8920, 3600, 1, 'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo'}, 8922, 4400, 1, 'wand of voodoo')
shopModule:addSellableItem({'life crystal'}, 2177, 50, 1, 'life crystal')
shopModule:addSellableItem({'magic light wand'}, 2162, 35, 1, 'magic light wand')
shopModule:addSellableItem({'mind stone'}, 2178, 100, 1, 'mind stone')
shopModule:addSellableItem({'orb'}, 2176, 750, 1, 'orb')
shopModule:addBuyableItem({'magic light wand'}, 2162, 120, 1, 'magic light wand')
shopModule:addSellableItem({'dragon hammer'}, 2434, 2000, 1, 'dragon hammer')
shopModule:addSellableItem({'giant sword'}, 2393, 17000, 1, 'giant sword')
shopModule:addSellableItem({'knight axe'}, 2430, 2000, 1, 'knight axe')
shopModule:addSellableItem({'poison dagger'}, 2411, 50, 1, 'poison dagger')
shopModule:addSellableItem({'scimitar'}, 2419, 150, 1, 'scimitar')
shopModule:addSellableItem({'serpent sword'}, 2409, 900, 1, 'serpent sword')
shopModule:addSellableItem({'skull staff'}, 2436, 6000, 1, 'skull staff')
shopModule:addSellableItem({'dark armor'}, 2489, 400, 1, 'dark armor')
shopModule:addSellableItem({'knight armor'}, 2476, 5000, 1, 'knight armor')
shopModule:addSellableItem({'dark helmet'}, 2490, 250, 1, 'dark helmet')
shopModule:addSellableItem({'mystic turban'}, 2663, 150, 1, 'mystic turban')
shopModule:addSellableItem({'strange helmet'}, 2479, 500, 1, 'strange helmet')
shopModule:addSellableItem({'warrior helmet'}, 2475, 5000, 1, 'warrior helmet')
shopModule:addSellableItem({'knight legs'}, 2477, 5000, 1, 'knight legs')
shopModule:addSellableItem({'ancient shield'}, 2532, 900, 1, 'ancient shield')
shopModule:addSellableItem({'black shield'}, 2529, 800, 1, 'black shield')
shopModule:addSellableItem({'tower shield'}, 2528, 8000, 1, 'tower shield')
shopModule:addSellableItem({'vampire shield'}, 2534, 15000, 1, 'vamire shield')
shopModule:addBuyableItem({'ice rapier'}, 2396, 5000, 1, 'ice rapier')
shopModule:addBuyableItem({'serpent sword'}, 2409, 6000, 1, 'serpent sword')
shopModule:addBuyableItem({'dark armor'}, 2489, 1500, 1, 'dark armor')
shopModule:addBuyableItem({'dark helmet'}, 2490, 1000, 1, 'dark helmet')
shopModule:addBuyableItem({'ancient shield'}, 2532, 5000, 1, 'ancient shield')
shopModule:addSellableItem({'snakebite rod'}, 2182, 100, 1, 'snakebite rod')
shopModule:addSellableItem({'moonlight rod'}, 2186, 200, 1, 'moonlight rod')
shopModule:addSellableItem({'necrotic rod'}, 2185, 1000, 1, 'necrotic rod')
shopModule:addSellableItem({'northwind rod'}, 8911, 1500, 1, 'northwind rod')
shopModule:addSellableItem({'terra rod'}, 2181, 2000, 1, 'terra rod')
shopModule:addSellableItem({'hailstorm rod'}, 2183, 3000, 1, 'hailstorm rod')
shopModule:addSellableItem({'springsprout rod'}, 8912, 3600, 1, 'springsprout rod')
shopModule:addSellableItem({'underworld rod'}, 8910, 4400, 1, 'underworld rod')
shopModule:addSellableItem({'ankh'}, 2193, 100, 1, 'ankh')
shopModule:addSellableItem({'mysterious fetish'}, 2194, 50, 1, 'mysterious fetish')
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
It sells/buys equipments, which npcs like Sam sells in reallife.
Equip.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Equip" script="data/npc/scripts/equipment.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="131" head="57" body="113" legs="86" feet="95" addons="0"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Welcome |PLAYERNAME]! My name is Equip and I sell and buy equipments, just ask me for a {trade} if your are interested." />
<parameter key="message_farewell" value="Goodbye, I will see you around sometimes |PLAYERNAME|." />
<parameter key="message_walkaway" value="Aren't we saying goodbye anymore?" />
</parameters>
</npc>
Equipment.lua
Code:
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({'steel helmet'}, 2457, 580, 1, 'steel helmet')
shopModule:addBuyableItem({'chain helmet'}, 2458, 52, 1, 'chain helmet')
shopModule:addBuyableItem({'iron helmet'}, 2459, 390, 1, 'iron helmet')
shopModule:addBuyableItem({'brass helmet'}, 2460, 120, 1, 'brass helmet')
shopModule:addBuyableItem({'leather helmet'}, 2461, 12, 1, 'leather helmet')
shopModule:addBuyableItem({'viking helmet'}, 2473, 265, 1, 'viking helmet')
shopModule:addBuyableItem({'soldier helmet'}, 2481, 110, 1, 'soldier helmet')
shopModule:addBuyableItem({'studded helmet'}, 2482, 63, 1, 'studded helmet')
shopModule:addBuyableItem({'chain armor'}, 2464, 200, 1, 'chain armor')
shopModule:addBuyableItem({'brass armor'}, 2465, 450, 1, 'brass armor')
shopModule:addBuyableItem({'leather armor'}, 2467, 35, 1, 'leather armor')
shopModule:addBuyableItem({'brass legs'}, 2478, 195, 1, 'brass legs')
shopModule:addBuyableItem({'chain legs'}, 2648, 80, 1, 'chain legs')
shopModule:addBuyableItem({'leather legs'}, 2649, 10, 1, 'leather legs')
shopModule:addBuyableItem({'steel shield'}, 2509, 240, 1, 'steel shield')
shopModule:addBuyableItem({'plate shield'}, 2510, 125, 1, 'plate shield')
shopModule:addBuyableItem({'brass shield'}, 2511, 16, 1, 'brass shield')
shopModule:addBuyableItem({'wooden shield'}, 2512, 15, 1, 'wooden shield')
shopModule:addBuyableItem({'dwarven shield'}, 2525, 500, 1, 'dwarven shield')
shopModule:addBuyableItem({'sword'}, 2376, 85, 1, 'sword')
shopModule:addBuyableItem({'two handed sword'}, 2377, 950, 1, 'two handed sword')
shopModule:addBuyableItem({'dagger'}, 2379, 5, 1, 'dagger')
shopModule:addBuyableItem({'rapier'}, 2384, 15, 1, 'rapier')
shopModule:addBuyableItem({'sabre'}, 2385, 35, 1, 'sabre')
shopModule:addBuyableItem({'carlin sword'}, 2395, 473, 1, 'carlin sword')
shopModule:addBuyableItem({'club'}, 2382, 5, 1, 'club')
shopModule:addBuyableItem({'morning star'}, 2394, 430, 1, 'morning star')
shopModule:addBuyableItem({'mace'}, 2398, 90, 1, 'mace')
shopModule:addBuyableItem({'battle hammer'}, 2417, 350, 1, 'battle hammer')
shopModule:addBuyableItem({'clerical mace'}, 2423, 540, 1, 'clerical mace')
shopModule:addBuyableItem({'battle axe'}, 2378, 235, 1, 'battle axe')
shopModule:addBuyableItem({'hand axe'}, 2380, 8, 1, 'hand axe')
shopModule:addBuyableItem({'axe'}, 2386, 20, 1, 'axe')
shopModule:addBuyableItem({'barbarian axe'}, 2429, 590, 1, 'barbarian axe')
shopModule:addSellableItem({'battle axe'}, 2378, 80, 1, 'battle axe')
shopModule:addSellableItem({'hand axe'}, 2380, 4, 1, 'hand axe')
shopModule:addSellableItem({'halberd'}, 2381, 400, 1, 'halberd')
shopModule:addSellableItem({'axe'}, 2386, 8, 1, 'axe')
shopModule:addSellableItem({'double axe'}, 2387, 260, 1, 'double axe')
shopModule:addSellableItem({'barbarian axe'}, 2429, 185, 1, 'barbarian axe')
shopModule:addSellableItem({'steel helmet'}, 2457, 190, 1, 'steel helmet')
shopModule:addSellableItem({'chain helmet'}, 2458, 17, 1, 'chain helmet')
shopModule:addSellableItem({'iron helmet'}, 2459, 145, 1, 'iron helmet')
shopModule:addSellableItem({'brass helmet'}, 2460, 30, 1, 'brass helmet')
shopModule:addSellableItem({'leather helmet'}, 2461, 4, 1, 'leather helmet')
shopModule:addSellableItem({'viking helmet'}, 2473, 66, 1, 'viking helmet')
shopModule:addSellableItem({'legion helmet'}, 2480, 22, 1, 'legion helmet')
shopModule:addSellableItem({'soldier helmet'}, 2481, 16, 1, 'soldier helmet')
shopModule:addSellableItem({'plate armor'}, 2463, 400, 1, 'plate armor')
shopModule:addSellableItem({'chain armor'}, 2464, 70, 1, 'chain armor')
shopModule:addSellableItem({'brass armor'}, 2465, 150, 1, 'brass armor')
shopModule:addSellableItem({'leather armor'}, 2467, 12, 1, 'leather armor')
shopModule:addSellableItem({'scale armor'}, 2483, 75, 1, 'scale armor')
shopModule:addSellableItem({'studded armor'}, 2484, 70, 1, 'studded armor')
shopModule:addSellableItem({'brass legs'}, 2478, 49, 1, 'brass legs')
shopModule:addSellableItem({'plate legs'}, 2647 115, 1, 'plate legs')
shopModule:addSellableItem({'chain legs'}, 2648, 25, 1, 'chain legs')
shopModule:addSellableItem({'leather legs'}, 2649, 2, 1, 'leather legs')
shopModule:addSellableItem({'steel shield'}, 2509, 80, 1, 'steel shield')
shopModule:addSellableItem({'plate shield'}, 2510, 45, 1, 'plate shield')
shopModule:addSellableItem({'brass shield'}, 2511, 16, 1, 'brass shield')
shopModule:addSellableItem({'wooden shield'}, 2512, 5, 1, 'wooden shield')
shopModule:addSellableItem({'battle shield'}, 2513, 95, 1, 'battle shield')
shopModule:addSellableItem({'dwarven shield'}, 2525, 100, 1, 'dwarven shield')
shopModule:addSellableItem({'sentinel shield'}, 3974, 120, 1, 'sentinel shield')
shopModule:addSellableItem({'salamander shield'}, 3975, 280, 1, 'salamander shield')
shopModule:addSellableItem({'tusk shield'}, 3973, 850, 1, 'tusk shield')
shopModule:addSellableItem({'sword'}, 2376, 25, 1, 'sword')
shopModule:addSellableItem({'two handed sword'}, 2377, 450, 1, 'two handed sword')
shopModule:addSellableItem({'dagger'}, 2379, 2, 1, 'dagger')
shopModule:addSellableItem({'rapier'}, 2384, 5, 1, 'rapier')
shopModule:addSellableItem({'sabre'}, 2385, 12, 1, 'sabre')
shopModule:addSellableItem({'carlin sword'}, 2395, 118, 1, 'carlin sword')
shopModule:addSellableItem({'short sword'}, 2406, 10, 1, 'short sword')
shopModule:addSellableItem({'club'}, 2382, 1, 1, 'club')
shopModule:addSellableItem({'morning star'}, 2394, 90, 1, 'morning star')
shopModule:addSellableItem({'mace'}, 2398, 30, 1, 'mace')
shopModule:addSellableItem({'battle hammer'}, 2417, 120, 1, 'battle hammer')
shopModule:addSellableItem({'giant smithhammer'}, 2321, 250, 1, 'giant smithhammer')
shopModule:addSellableItem({'clerical mace'}, 2423, 170, 1, 'clerical mace')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Sells and buys differnt kinds of food.
Fooda.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Fooda" script="data/npc/scripts/food.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="251" head="78" body="79" legs="82" feet="101" addons="3"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hi |PLAYERNAME]. Ask me for a {trade} if you want to buy some food." />
<parameter key="message_farewell" value="Goodbye and bon a petit! |PLAYERNAME|." />
<parameter key="message_walkaway" value="Bye... Don't you like my food?" />
</parameters>
</npc>
Food.lua
Code:
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({'meat'}, 2666, 5, 1, 'meat')
shopModule:addBuyableItem({'fish'}, 2667, 5, 1, 'fish')
shopModule:addBuyableItem({'salmon'}, 2668, 5, 1, 'salmon')
shopModule:addBuyableItem({'ham'}, 2671, 8, 1, 'ham')
shopModule:addBuyableItem({'dragon ham'}, 2672, 25, 1, 'dragon ham')
shopModule:addBuyableItem({'pear'}, 2673, 4, 1, 'pear')
shopModule:addBuyableItem({'red apple'}, 2674, 3, 1, 'red apple')
shopModule:addBuyableItem({'orange'}, 2675, 10, 1, 'orange')
shopModule:addBuyableItem({'banana'}, 2676, 3, 1, 'banana')
shopModule:addBuyableItem({'blueberry'}, 2677, 1, 1, 'blueberry')
shopModule:addBuyableItem({'cherry'}, 2679, 1, 1, 'cherry')
shopModule:addBuyableItem({'strawberry'}, 2680, 1, 1, 'strawberry')
shopModule:addBuyableItem({'grape'}, 2680, 3, 1, 'grape')
shopModule:addBuyableItem({'melon'}, 2682, 8, 1, 'melon')
shopModule:addBuyableItem({'pumpkin'}, 2683, 10, 1, 'pumpkin')
shopModule:addBuyableItem({'carrot'}, 2684, 3, 1, 'carrot')
shopModule:addBuyableItem({'tomato'}, 2685, 5, 1, 'tomato')
shopModule:addBuyableItem({'corncob'}, 2686, 3, 1, 'corncob')
shopModule:addBuyableItem({'cookie'}, 2687, 2, 1, 'cookie')
shopModule:addBuyableItem({'bread'}, 2689, 4, 1, 'bread')
shopModule:addBuyableItem({'roll'}, 2690, 2, 1, 'roll')
shopModule:addBuyableItem({'brown bread'}, 2691, 3, 1, 'brown bread')
shopModule:addBuyableItem({'egg'}, 2695, 2, 1, 'egg)
shopModule:addBuyableItem({'cheese'}, 2696, 2, 1, 'cheese')
shopModule:addBuyableItem({'white mushroom'}, 2787, 6, 1, 'white mushroom')
shopModule:addBuyableItem({'red mushroom'}, 2788, 12, 1, 'red mushroom')
shopModule:addBuyableItem({'brown mushroom'}, 2789, 10, 1, 'brown mushroom')
shopModule:addBuyableItem({'valentine cake'}, 6393, 6, 1, 'valentine cake')
shopModule:addBuyableItem({'cookbook'}, 2347, 150, 1, 'cookbook')
shopModule:addSellableItem({'meat'}, 2666, 2, 1, 'meat')
shopModule:addSellableItem({'salmon'}, 2668, 2, 1, 'salmon')
shopModule:addSellableItem({'bread'}, 2689, 2, 1, 'bread')
shopModule:addSellableItem({'ham'}, 2671, 4, 1, 'ham')
shopModule:addBuyableItem({'blueberry'}, 2677, 1, 5, 'blueberry')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Sells and buys jewelry
Jewel
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Jewel" script="data/npc/scripts/jewelry.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="140" head="79" body="15" legs="55" feet="110" addons="3"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hi my name is Jewel, |PLAYERNAME]! I could offer you jewelry, just ask me to {trade}." />
<parameter key="message_farewell" value="Goodbye, do you also love jewelry? |PLAYERNAME|." />
<parameter key="message_walkaway" value="See you around with my jewelry I hope." />
</parameters>
</npc>
Jewelry.lua
Code:
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
shopModule:addSellableItem({'white pearl'}, 2143, 160, 1, 'white pearl')
shopModule:addSellableItem({'black pearl'}, 2144, 280, 1, 'black pearl')
shopModule:addSellableItem({'small diamond'}, 2145, 300, 1, 'small diamond')
shopModule:addSellableItem({'small sapphire'}, 2146, 250, 1, 'small sapphire')
shopModule:addSellableItem({'small ruby'}, 2147, 250, 1, 'small ruby')
shopModule:addSellableItem({'small emerald'}, 2149, 250, 1, 'small emerald')
shopModule:addSellableItem({'small amethyst'}, 2150, 200, 1, 'small amethyst')
shopModule:addSellableItem({'talon'}, 2151, 320, 1, 'talon')
shopModule:addBuyableItem({'white pearl'}, 2143, 320, 1, 'white pearl')
shopModule:addBuyableItem({'black pearl'}, 2144, 560, 1, 'black pearl')
shopModule:addBuyableItem({'small diamond'}, 2145, 600, 1, 'small diamond')
shopModule:addBuyableItem({'small sapphire'}, 2146, 500, 1, 'small sapphire')
shopModule:addBuyableItem({'small ruby'}, 2147, 500, 1, 'small ruby')
shopModule:addBuyableItem({'small emerald'}, 2149, 500, 1, 'small emerald')
shopModule:addBuyableItem({'small amethyst'}, 2150, 400, 1, 'small amethyst')
shopModule:addBuyableItem({'bronze goblet'}, 5807, 2000, 1, 'bronze goblet')
shopModule:addBuyableItem({'silver goblet'}, 5806, 3000, 1, 'silver goblet')
shopModule:addBuyableItem({'golden goblet'}, 5805, 5000, 1, 'golden goblet')
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Rune, potions and wands/rod selling npc
Manah.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Mana" script="data/npc/scripts/runes.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="130" head="95" body="94" legs="95" feet="76" addons="0"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hiah |PLAYERNAME]! My name is Manah, Ask me for a {trade} if you want to buy some runes, wands or fluids." />
<parameter key="message_farewell" value="Thanks for doing business |PLAYERNAME|." />
<parameter key="message_walkaway" value="Biah!" />
</parameters>
</npc>
Runes.lua
Code:
---------holy missile------------
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
shopModule:addBuyableItem({'spellbook'}, 2175, 150, 1, 'spellbook')
shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 1, 'magic lightwand')
shopModule:addBuyableItem({'health potion'}, 7618, 45, 1, 'health potion')
shopModule:addBuyableItem({'mana potion'}, 7620, 50, 1, 'mana potion')
shopModule:addBuyableItem({'strong health'}, 7588, 100, 1, 'strong health potion')
shopModule:addBuyableItem({'strong mana'}, 7589, 80, 1, 'strong mana potion')
shopModule:addBuyableItem({'great health'}, 7591, 190, 1, 'great health potion')
shopModule:addBuyableItem({'great mana'}, 7590, 120, 1, 'great mana potion')
shopModule:addBuyableItem({'great spirit'}, 8472, 190, 1, 'great spirit potion')
shopModule:addBuyableItem({'ultimate health'}, 8473, 310, 1, 'ultimate health potion')
shopModule:addSellableItem({'normal flask'}, 7636, 5, 'empty small potion flask')
shopModule:addSellableItem({'strong flask'}, 7634, 10, 'empty strong potion flask')
shopModule:addSellableItem({'great flask'}, 7635, 15, 'empty great potion flask')
shopModule:addBuyableItem({'blank rune'}, 2260, 10, 1 'blank rune')
shopModule:addBuyableItem({'animate dead'}, 2316, 375, 1, 'animate dead rune')
shopModule:addBuyableItem({'antidote'}, 2266, 65, 1, 'antidote rune')
shopModule:addBuyableItem({'avalanche'}, 2274, 180, 4, 'avalanche rune')
shopModule:addBuyableItem({'chameleon'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'desintegrate'}, 2310, 80, 3, 'desintegrate rune')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field')
shopModule:addBuyableItem({'energy bomb'}, 2262, 325, 2, 'energy bomb rune')
shopModule:addBuyableItem({'energy field'}, 2277, 115, 3, 'energy field')
shopModule:addBuyableItem({'energy wall'}, 2279, 340, 4, 'energy wall rune')
shopModule:addBuyableItem({'explosion'}, 2313, 190, 6, 'explosion rune')
shopModule:addBuyableItem({'fire bomb'}, 2305, 235, 2, 'fire bomb rune')
shopModule:addBuyableItem({'fire field'}, 2301, 85, 3, 'fire field rune')
shopModule:addBuyableItem({'fire wall'}, 2303, 245, 4, 'fire wall rune')
shopModule:addBuyableItem({'fireball'}, 2302, 150, 5, 'fire ball')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 120, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'icicle'}, 2271, 150, 5, 'icicle rune')
shopModule:addBuyableItem({'intense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
shopModule:addBuyableItem({'poison bomb'}, 2286, 170, 2, 'poison bomb rune')
shopModule:addBuyableItem({'poison field'}, 2285, 65, 3, 'poison field')
shopModule:addBuyableItem({'poison wall'}, 2289, 210, 4, 'poison wall rune')
shopModule:addBuyableItem({'soulfire'}, 2308, 140, 3, 'soulfire rune')
shopModule:addBuyableItem({'stalagmite'}, 2292, 120, 10, 'stalagmite rune')
shopModule:addBuyableItem({'stone shower'}, 2288, 150, 4, 'stoneshower rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 325, 3, 'sudden death rune')
shopModule:addBuyableItem({'thunderstorm'}, 2268, 150, 4, 'thunderstorm rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'wild growth'}, 2269, 320, 2, 'wild growth rune')
shopModule:addBuyableItemContainer({'bp blank rune'}, 1988, 2260, 220, 1 'bp blank rune')
shopModule:addBuyableItemContainer({'bp animate dead'}, 1998, 2316, 7520, 1, 'bp animate dead rune')
shopModule:addBuyableItemContainer({'bp antidote'}, 2003, 2266, 1320, 1, 'bp antidote rune')
shopModule:addBuyableItemContainer({'bp avalanche'}, 2002, 2274, 3620, 4, 'bp avalanche rune')
shopModule:addBuyableItemContainer({'bp chameleon'}, 1998, 2291, 4220, 1, 'bp chameleon rune')
shopModule:addBuyableItemContainer({'bp convince creature'}, 1998, 2290, 1620, 1, 'bp convince creature rune')
shopModule:addBuyableItemContainer({'bp desintegrate'}, 2001, 2310, 1620, 3, 'bp desintegrate rune')
shopModule:addBuyableItemContainer({'bp destroy field'}, 2003, 2261, 920, 3, 'bp destroy field')
shopModule:addBuyableItemContainer({'bp energy bomb'}, 2003, 2262, 6520, 2, 'bp energy bomb rune')
shopModule:addBuyableItemContainer({'bp energy field'}, 1998, 2277, 2320, 3, 'bp energy field')
shopModule:addBuyableItemContainer({'bp energy wall'}, 2002, 2279, 6820, 4, 'bp energy wall rune')
shopModule:addBuyableItemContainer({'bp explosion'}, 2001, 2313, 3820, 6, 'bp explosion rune')
shopModule:addBuyableItemContainer({'bp fire bomb'}, 2000, 2305, 4720, 2, 'bp fire bomb rune')
shopModule:addBuyableItemContainer({'bp fire field'}, 2000, 2301, 1720, 3, 'bp fire field rune')
shopModule:addBuyableItemContainer({'bp fire wall'}, 2000, 2303, 4920, 4, 'bp fire wall rune')
shopModule:addBuyableItemContainer({'bp fireball'}, 2000, 2302, 3020, 5, 'bp fire ball')
shopModule:addBuyableItemContainer({'bp great fireball'}, 2000, 2304, 3620, 4, 'bp great fireball rune')
shopModule:addBuyableItemContainer({'bp heavy magic missile'}, 2001, 2311, 2420, 10, 'bp heavy magic missile rune')
shopModule:addBuyableItemContainer({'bp icicle'}, 2002, 2271, 3020, 5, 'bp icicle rune')
shopModule:addBuyableItemContainer({'bp intense healing'}, 2003, 2265, 1920, 1, 'bp intense healing rune')
shopModule:addBuyableItemContainer({'bp light magic missile'}, 1998, 2287, 820, 10, 'bp light magic missile rune')
shopModule:addBuyableItemContainer({'bp magic wall'}, 1999, 2293, 7020, 3, 'bp magic wall rune')
shopModule:addBuyableItemContainer({'bp paralyze'}, 2002, 2278, 1420, 1, 'bp paralyze rune')
shopModule:addBuyableItemContainer({'bp poison bomb'}, 1998, 2286, 3420, 2, 'bp poison bomb rune')
shopModule:addBuyableItemContainer({'bp poison field'}, 1998, 2285, 1320, 3, 'bp poison field')
shopModule:addBuyableItemContainer({'bp poison wall'}, 1998, 2289, 4220, 4, 'bp poison wall rune')
shopModule:addBuyableItemContainer({'bp soulfire'}, 2000, 2308, 2820, 3, 'bp soulfire rune')
shopModule:addBuyableItemContainer({'bp stalagmite'}, 1998, 2292, 2400, 10, 'bp stalagmite rune')
shopModule:addBuyableItemContainer({'bp stone shower'}, 1999, 2288, 3020, 4, 'bp stoneshower rune')
shopModule:addBuyableItemContainer({'bp sudden death'}, 2003, 2268, 6520, 3, 'bp sudden death rune')
shopModule:addBuyableItemContainer({'bp thunderstorm'}, 1999, 2268, 3020, 4, 'bp thunderstorm rune')
shopModule:addBuyableItemContainer({'bp ultimate healing'}, 2002, 2273, 3520, 1, 'bp ultimate healing rune')
shopModule:addBuyableItemContainer({'bp wild growth'}, 2002, 2269, 6420, 2, 'bp wild growth rune')
shopModule:addBuyableItemContainer({'bp health potion'}, 2000, 7618, 45, 1, 'bp health potion')
shopModule:addBuyableItemContainer({'bp mana potion'}, 2001, 7620, 50, 1, 'bp mana potion')
shopModule:addBuyableItemContainer({'bp strong health'}, 2000, 7588, 100, 1, 'bp strong health potion')
shopModule:addBuyableItemContainer({'bp strong mana'}, 2001, 7589, 80, 1, 'bp strong mana potion')
shopModule:addBuyableItemContainer({'bp great health'}, 2000, 7591, 190, 1, 'bp great health potion')
shopModule:addBuyableItemContainer({'bp great mana'}, 2001, 7590, 120, 1, 'bp great mana potion')
shopModule:addBuyableItemContainer({'bp great spirit'}, 1988, 8472, 190, 1, 'bp great spirit potion')
shopModule:addBuyableItemContainer({'bp ultimate health'}, 2000, 8473, 310, 1, 'bp ultimate health potion')
shopModule:addBuyableItem({'wand of vortex'}, 2190, 500, 1, 'wand of vortex')
shopModule:addBuyableItem({'wand of dragonbreath'}, 2191, 1000, 1, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of decay'}, 2188, 5000, 1, 'wand of decay')
shopModule:addBuyableItem({'wand of draconia'}, 8921, 7500, 1, 'wand of draconia')
shopModule:addBuyableItem({'wand of cosmic energy'}, 2189, 10000, 1, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of inferno'}, 2187, 15000, 1, 'wand of inferno')
shopModule:addBuyableItem({'wand of starstorm'}, 8920, 18000, 1, 'wand of starstorm')
shopModule:addBuyableItem({'wand of voodoo'}, 8922, 22000, 1, 'wand of voodoo')
shopModule:addBuyableItem({'snakebite rod'}, 2182, 500, 1, 'snakebite rod')
shopModule:addBuyableItem({'moonlight rod'}, 2186, 1000, 1, 'moonlight rod')
shopModule:addBuyableItem({'necrotic rod'}, 2185, 5000, 1, 'necrotic rod')
shopModule:addBuyableItem({'northwind rod'}, 8911, 7500, 1, 'northwind rod')
shopModule:addBuyableItem({'terra rod'}, 2181, 10000, 1, 'terra rod')
shopModule:addBuyableItem({'hailstorm rod'}, 2183, 15000, 1, 'hailstorm rod')
shopModule:addBuyableItem({'springsprout rod'}, 8912, 18000, 1, 'springsprout rod')
shopModule:addBuyableItem({'underworld rod'}, 8910, 22000, 1, 'underworld rod')
shopModule:addSellableItem({'wand of vortex'}, 2190, 500, 1, 'wand of vortex')
shopModule:addSellableItem({'wand of dragonbreath'}, 2191, 1000, 1, 'wand of dragonbreath')
shopModule:addSellableItem({'wand of decay'}, 2188, 5000, 1, 'wand of decay')
shopModule:addSellableItem({'wand of draconia'}, 8921, 7500, 1, 'wand of draconia')
shopModule:addSellableItem({'wand of cosmic energy'}, 2189, 10000, 1, 'wand of cosmic energy')
shopModule:addSellableItem({'wand of inferno'},2187, 15000, 1, 'wand of inferno')
shopModule:addSellableItem({'wand of starstorm'}, 8920, 18000, 1, 'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo'}, 8922, 22000, 1, 'wand of voodoo')
shopModule:addSellableItem({'snakebite rod'}, 2182, 500, 1, 'snakebite rod')
shopModule:addSellableItem({'moonlight rod'}, 2186, 1000, 1, 'moonlight rod')
shopModule:addSellableItem({'necrotic rod'}, 2185, 5000, 1, 'necrotic rod')
shopModule:addSellableItem({'northwind rod'}, 8911, 7500, 1, 'northwind rod')
shopModule:addSellableItem({'terra rod'}, 2181, 10000, 1, 'terra rod')
shopModule:addSellableItem({'hailstorm rod'}, 2183, 15000, 1, 'hailstorm rod')
shopModule:addSellableItem({'springsprout rod'}, 8912, 18000, 1, 'springsprout rod')
shopModule:addSellableItem({'underworld rod'}, 8910, 22000, 1, 'underworld rod')
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
local items = {[1] = 2190, [2] = 2182, [5] = 2190, [6] = 2182}
if(msgcontains(msg, 'first rod') or msgcontains(msg, 'first wand')) then
if(isSorcerer(cid) or isDruid(cid)) then
if(getPlayerStorageValue(cid, 30002) == -1) then
selfSay('So you ask me for a {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '} to begin your advanture?', cid)
talkState[talkUser] = 1
else
selfSay('What? I have already gave you one {' .. getItemNameById(items[getPlayerVocation(cid)]) .. '}!', cid)
end
else
selfSay('Sorry, you aren\'t a druid either a sorcerer.', cid)
end
elseif(msgcontains(msg, 'yes')) then
if(talkState[talkUser] == 1) then
doPlayerAddItem(cid, items[getPlayerVocation(cid)], 1)
selfSay('Here you are young adept, take care yourself.', cid)
setPlayerStorageValue(cid, 30002, 1)
end
talkState[talkUser] = 0
elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then
selfSay('Ok then.', cid)
talkState[talkUser] = 0
end
return true
end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Npc which sells necklaces
Necklace.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Necklace" script="data/npc/scripts/necklaces.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="138" head="115" body="0" legs="19" feet="94" addons="3"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Welcome |PLAYERNAME]! My name is Necklace. May I help you with a {trade}?" />
<parameter key="message_farewell" value="Goodbye and good luck with your necklaces, |PLAYERNAME|." />
<parameter key="message_walkaway" value="Goodbye and good luck with your necklaces." />
</parameters>
</npc>
Necklaces.lua
Code:
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
shopModule:addBuyableItem({'amulet of loss'}, 2173, 50000, 1, 'amulet of loss')
shopModule:addBuyableItem({'protection amulet'}, 2200, 700, 1, 'protection amulet')
shopModule:addBuyableItem({'ruby necklace'}, 2133, 3560, 1, 'ruby necklace')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 1000, 1, 'dragon necklace')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 100, 1, 'garlic necklace')
shopModule:addBuyableItem({'golden amulet'}, 2130, 6600, 1, 'golden amulet')
shopModule:addBuyableItem({'scarf'}, 2661, 15, 1, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 100, 1, 'bronze amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 500, 1, 'elven amulet')
shopModule:addBuyableItem({'protection amulet'}, 2200, 700, 1, 'protection amulet')
shopModule:addBuyableItem({'silver amulet'}, 2198, 100, 1, 'silver amulet')
shopModule:addBuyableItem({'strange talisman'}, 2161, 100, 1, 'strange talisman')
shopModule:addSellableItem({'crystal necklace'}, 2123, 400, 1, 'crystal necklace')
shopModule:addSellableItem({'ruby necklace'}, 2133, 2000, 1, 'ruby necklace')
shopModule:addSellableItem({'dragon necklace'}, 2201, 100, 1, 'dragon necklace')
shopModule:addSellableItem({'garlic necklace'}, 2199, 50, 1, 'garlic necklace')
shopModule:addSellableItem({'ancient amulet'}, 2142, 200, 1, 'ancient amulet')
shopModule:addSellableItem({'demonbone amulet'}, 2136, 32000, 1, 'demonbone amulet')
shopModule:addSellableItem({'scarab amulet'}, 2135, 200, 1, 'scarab amulet')
shopModule:addSellableItem({'bronze amulet'}, 2172, 50, 1, 'bronze amulet')
shopModule:addSellableItem({'elven amulet'}, 2198, 100, 1, 'elven amulet')
shopModule:addSellableItem({'glacier amulet'}, 7888, 1500, 1, 'glacier amulet')
shopModule:addSellableItem({'protection amulet'}, 2200, 100, 1, 'protection amulet')
shopModule:addSellableItem({'silver amulet'}, 2170, 50, 1, 'silver amulet')
shopModule:addSellableItem({'strange talisman'}, 2161, 30, 1, 'strange talisman')
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Last edited: