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
function creatureSayCallback(cid, type, msg)
if(npcHandler.focus ~= cid) then
return false
end
function buyContainer(cid, containerid, itemid, itemcount, price)
if doPlayerRemoveMoney(cid, price) == TRUE then
local container = doPlayerAddItem(cid, containerid, 1)
for i = 1, 20 do
doAddContainerItem(container, itemid, itemcount)
end
selfSay("Here you are.")
else
selfSay("Not enough money.")
end
end
function buy(cid, itemid, charges, price)
if doPlayerRemoveMoney(cid, price) == TRUE then
doPlayerAddItem(cid, itemid, charges)
selfSay("Here you are.")
else
selfSay("Not enough money.")
end
end
if msgcontains(msg, 'bp sd') then
buyContainer(cid, 2003, 2268, 3, 6500)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid, 2003, 2273, 1, 3500)
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
keywordHandler:addKeyword({'spell runes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell convince creature(80gp) and chameleon(210gp), desintegrate(80gp), soulfire(210gp), paralyze(700gp), light magic missile(40gp), heavy magic missile(125gp), icicle(130gp), sudden death(325gp), fireball(95gp), great fireball(180gp), explosion(250gp), fire field(85gp), energy field(115gp), poison field(65gp), destroy field(45gp), fire wall(245gp), energy wall(340gp) and poison wall(210gp), magic wall runes(350gp), fire bomb(210gp), poison bomb(170gp), energy bomb(325gp), intense healing(95gp) and ultimate healing(175gp) runes.'})
keywordHandler:addKeyword({'fluids'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell normal mana potions, normal health potions, strong health potions, strong mana potions, great mana potions, great health potions, ultimate health potions, ultimate mana potions.(example: 4 normal mana potions) Also i selling backpacks with potions.(example: backpack normal mana potion)'})
keywordHandler:addKeyword({'wands'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell wand of vortex(50 gp), dragonbreath(500gp), plague(2.5k), cosmic energy(5k) and inferno(7.5k).'})
keywordHandler:addKeyword({'rods'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell snakebite(50 gp), moonlight(500gp), volcanic(2.5k), quarmire(5k) and hailstorm rod(7.5k).'})
shopModule:addBuyableItem({'normal health potions'}, 7618, 50, 'health potions')
shopModule:addBuyableItem({'strong health potions'}, 7588, 100, 'strong health potions')
shopModule:addBuyableItem({'great health potions'}, 7591, 190, 'great health potions')
shopModule:addBuyableItem({'ultimate health potions'}, 8377, 310, 'ultimate health potions')
shopModule:addBuyableItem({'normal mana potions'}, 7620, 50, 'mana potions')
shopModule:addBuyableItem({'strong mana potions'}, 7589, 80, 'strong mana potions')
shopModule:addBuyableItem({'great mana potions'}, 7590, 120, 'great mana potions')
shopModule:addBuyableItem({'ultimate mana potions'}, 8376, 160, 'ultimate mana potions')
shopModule:addBuyableItem({'blank rune'}, 2260, 10, 'blank rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 125, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 325, 3, 'sudden death rune')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'fireball'}, 2302, 95, 5, 'fire ball')
shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune')
shopModule:addBuyableItem({'fire field'}, 2301, 85, 3, 'fire field rune')
shopModule:addBuyableItem({'energy field'}, 2277, 115, 3, 'energy field')
shopModule:addBuyableItem({'poison field'}, 2285, 65, 3, 'poison field')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field')
shopModule:addBuyableItem({'fire wall'}, 2303, 245, 4, 'fire wall rune')
shopModule:addBuyableItem({'energy wall'}, 2279, 340, 4, 'energy wall rune')
shopModule:addBuyableItem({'poison wall'}, 2289, 210, 4, 'poison wall rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'fire bomb'}, 2305, 235, 2, 'fire bomb rune')
shopModule:addBuyableItem({'poison bomb'}, 2286, 170, 2, 'poison bomb rune')
shopModule:addBuyableItem({'energy bomb'}, 2262, 325, 2, 'energy bomb rune')
shopModule:addBuyableItem({'antidote'}, 2266, 65, 1, 'antidote rune')
shopModule:addBuyableItem({'intense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'chameleon rune'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'soulfire'}, 2308, 210, 3, 'soulfire rune')
shopModule:addBuyableItem({'Icicle'}, 2271, 130, 5, 'icicle runes')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
shopModule:addBuyableItem({'spell book'}, 2217, 150, 'spell book')
shopModule:addBuyableItem({'wand of inferno'}, 2187, 7500, 'wand of inferno')
shopModule:addBuyableItem({'wand of cosmic energy'}, 2189, 5000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of plague'}, 2188, 2500, 'wand of plague')
shopModule:addBuyableItem({'wand of dragonbreath'}, 2191, 500, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of vortex'}, 2190, 50, 'wand of vortex')
shopModule:addBuyableItem({'tempest rod'}, 2183, 7500, 'hailstorm rod')
shopModule:addBuyableItem({'quagmire rod'}, 2181, 5000, 'quagmire rod')
shopModule:addBuyableItem({'volcanic rod'}, 2185, 2500, 'volcanic rod')
shopModule:addBuyableItem({'moonlight rod'}, 2186, 500, 'moonlight rod')
shopModule:addBuyableItem({'snakebite rod'},
npcHandler:addModule(FocusModule:new())
if msgcontains(msg, 'bp sd') then
buyContainer(cid, 2003, 2268, 3, 6500)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid, 2003, 2273, 1, 3500)
elseif msgcontains(msg, 'bp hmm') then
buyContainer(cid, 2001, HMMID, 5, 2500)
end
shopModule:addBuyableItem({'normal health potions'}, 7618, 50, 'health potions')
shopModule:addBuyableItem({'strong health potions'}, 7588, 100, 'strong health potions')
shopModule:addBuyableItem({'great health potions'}, 7591, 190, 'great health potions')
shopModule:addBuyableItem({'ultimate health potions'}, 8377, 310, 'ultimate health potions')
shopModule:addBuyableItem({'normal mana potions'}, 7620, 50, 'mana potions')
shopModule:addBuyableItem({'strong mana potions'}, 7589, 80, 'strong mana potions')
shopModule:addBuyableItem({'great mana potions'}, 7590, 120, 'great mana potions')
shopModule:addBuyableItem({'ultimate mana potions'}, 8376, 160, 'ultimate mana potions')
shopModule:addBuyableItem({'blank rune'}, 2260, 10, 'blank rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 125, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 325, 3, 'sudden death rune')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'fireball'}, 2302, 95, 5, 'fire ball')
shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune')
shopModule:addBuyableItem({'fire field'}, 2301, 85, 3, 'fire field rune')
shopModule:addBuyableItem({'energy field'}, 2277, 115, 3, 'energy field')
shopModule:addBuyableItem({'poison field'}, 2285, 65, 3, 'poison field')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field')
shopModule:addBuyableItem({'fire wall'}, 2303, 245, 4, 'fire wall rune')
shopModule:addBuyableItem({'energy wall'}, 2279, 340, 4, 'energy wall rune')
shopModule:addBuyableItem({'poison wall'}, 2289, 210, 4, 'poison wall rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'fire bomb'}, 2305, 235, 2, 'fire bomb rune')
shopModule:addBuyableItem({'poison bomb'}, 2286, 170, 2, 'poison bomb rune')
shopModule:addBuyableItem({'energy bomb'}, 2262, 325, 2, 'energy bomb rune')
shopModule:addBuyableItem({'antidote'}, 2266, 65, 1, 'antidote rune')
shopModule:addBuyableItem({'intense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'chameleon rune'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'soulfire'}, 2308, 210, 3, 'soulfire rune')
shopModule:addBuyableItem({'Icicle'}, 2271, 130, 5, 'icicle runes')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
2) The best TFS now is the newest revision of Tags I guess, since it contains already fixed files.
Movement said:Already possible at the script to buy runes with a bp? i not want a rune with x25 charges(only answer: yeah/no)
buyContainer(cid, BackpackID, ItemID, ItemCOUNT, Price)
1) It is possible to buy them too.
2) No, the newest revision is 971 but you have to download and compile it by yourself.
3) Yeah.
Code:buyContainer(cid, BackpackID, ItemID, ItemCOUNT, Price)
buyContainer(cid, BackpackID, ItemID, ItemCOUNT, Price)
if msgcontains(msg, 'bp sd') then
buyContainer(cid, 2003, 2268, 3, 6500)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid, 2003, 2273, 1, 3500)
elseif msgcontains(msg, 'MESSAGE') then
buyContainer(cid, CONTAINERID, ITEMID, ITEMCOUNT, PRICE)
end
1.)You say too. must i add it or its already possible to buy all?
2.) i can't compile i'm ideot say how or a link to tut and i will learn it. Idk what is compile but when i do it by myself then its stable or its a beta where i found many many many bugs?
3.)Code:buyContainer(cid, BackpackID, ItemID, ItemCOUNT, Price)
Where i must add it? where at runes.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
function creatureSayCallback(cid, type, msg)
if(npcHandler.focus ~= cid) then
return false
end
function buyContainer(cid, containerid, itemid, itemcount, price)
if doPlayerRemoveMoney(cid, price) == TRUE then
local container = doPlayerAddItem(cid, containerid, 1)
for i = 1, 20 do
doAddContainerItem(container, itemid, itemcount)
end
selfSay("Here you are.")
else
selfSay("Not enough money.")
end
end
function buy(cid, itemid, charges, price)
if doPlayerRemoveMoney(cid, price) == TRUE then
doPlayerAddItem(cid, itemid, charges)
selfSay("Here you are.")
else
selfSay("Not enough money.")
end
end
if msgcontains(msg, 'bp sd') then
buyContainer(cid, 2003, 2268, 3, 6500)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid, 2003, 2273, 1, 3500)
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
keywordHandler:addKeyword({'spell runes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell convince creature(80gp) and chameleon(210gp), desintegrate(80gp), soulfire(210gp), paralyze(700gp), light magic missile(40gp), heavy magic missile(125gp), icicle(130gp), sudden death(325gp), fireball(95gp), great fireball(180gp), explosion(250gp), fire field(85gp), energy field(115gp), poison field(65gp), destroy field(45gp), fire wall(245gp), energy wall(340gp) and poison wall(210gp), magic wall runes(350gp), fire bomb(210gp), poison bomb(170gp), energy bomb(325gp), intense healing(95gp) and ultimate healing(175gp) runes.'})
keywordHandler:addKeyword({'fluids'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell normal mana potions, normal health potions, strong health potions, strong mana potions, great mana potions, great health potions, ultimate health potions, ultimate mana potions.(example: 4 normal mana potions) Also i selling backpacks with potions.(example: backpack normal mana potion)'})
keywordHandler:addKeyword({'wands'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell wand of vortex(50 gp), dragonbreath(500gp), plague(2.5k), cosmic energy(5k) and inferno(7.5k).'})
keywordHandler:addKeyword({'rods'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell snakebite(50 gp), moonlight(500gp), volcanic(2.5k), quarmire(5k) and hailstorm rod(7.5k).'})
shopModule:addBuyableItem({'normal health potions'}, 7618, 50, 'health potions')
shopModule:addBuyableItem({'strong health potions'}, 7588, 100, 'strong health potions')
shopModule:addBuyableItem({'great health potions'}, 7591, 190, 'great health potions')
shopModule:addBuyableItem({'ultimate health potions'}, 8377, 310, 'ultimate health potions')
shopModule:addBuyableItem({'normal mana potions'}, 7620, 50, 'mana potions')
shopModule:addBuyableItem({'strong mana potions'}, 7589, 80, 'strong mana potions')
shopModule:addBuyableItem({'great mana potions'}, 7590, 120, 'great mana potions')
shopModule:addBuyableItem({'ultimate mana potions'}, 8376, 160, 'ultimate mana potions')
shopModule:addBuyableItem({'blank rune'}, 2260, 10, 'blank rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 125, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 325, 3, 'sudden death rune')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'fireball'}, 2302, 95, 5, 'fire ball')
shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune')
shopModule:addBuyableItem({'fire field'}, 2301, 85, 3, 'fire field rune')
shopModule:addBuyableItem({'energy field'}, 2277, 115, 3, 'energy field')
shopModule:addBuyableItem({'poison field'}, 2285, 65, 3, 'poison field')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field')
shopModule:addBuyableItem({'fire wall'}, 2303, 245, 4, 'fire wall rune')
shopModule:addBuyableItem({'energy wall'}, 2279, 340, 4, 'energy wall rune')
shopModule:addBuyableItem({'poison wall'}, 2289, 210, 4, 'poison wall rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'fire bomb'}, 2305, 235, 2, 'fire bomb rune')
shopModule:addBuyableItem({'poison bomb'}, 2286, 170, 2, 'poison bomb rune')
shopModule:addBuyableItem({'energy bomb'}, 2262, 325, 2, 'energy bomb rune')
shopModule:addBuyableItem({'antidote'}, 2266, 65, 1, 'antidote rune')
shopModule:addBuyableItem({'intense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'chameleon rune'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'soulfire'}, 2308, 210, 3, 'soulfire rune')
shopModule:addBuyableItem({'Icicle'}, 2271, 130, 5, 'icicle runes')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
shopModule:addBuyableItem({'spell book'}, 2217, 150, 'spell book')
shopModule:addBuyableItem({'wand of inferno'}, 2187, 7500, 'wand of inferno')
shopModule:addBuyableItem({'wand of cosmic energy'}, 2189, 5000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of plague'}, 2188, 2500, 'wand of plague')
shopModule:addBuyableItem({'wand of dragonbreath'}, 2191, 500, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of vortex'}, 2190, 50, 'wand of vortex')
shopModule:addBuyableItem({'tempest rod'}, 2183, 7500, 'hailstorm rod')
shopModule:addBuyableItem({'quagmire rod'}, 2181, 5000, 'quagmire rod')
shopModule:addBuyableItem({'volcanic rod'}, 2185, 2500, 'volcanic rod')
shopModule:addBuyableItem({'moonlight rod'}, 2186, 500, 'moonlight rod')
shopModule:addBuyableItem({'snakebite rod'},
npcHandler:addModule(FocusModule:new())
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
function creatureSayCallback(cid, type, msg)
if(npcHandler.focus ~= cid) then
return false
end
[b]function buyContainer(cid, containerid, itemid, itemcount, price)
if doPlayerRemoveMoney(cid, price) == TRUE then
local container = doPlayerAddItem(cid, containerid, 1)
for i = 1, 20 do
doAddContainerItem(container, itemid, itemcount)
end
selfSay("Here you are.")
else
selfSay("Not enough money.")
end
end
function buy(cid, itemid, charges, price)
if doPlayerRemoveMoney(cid, price) == TRUE then
doPlayerAddItem(cid, itemid, charges)
selfSay("Here you are.")
else
selfSay("Not enough money.")
end
end
if msgcontains(msg, 'bp sd') then
buyContainer(cid, 2003, 2268, 3, 6500)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid, 2003, 2273, 1, 3500)
end
return TRUE
end[/b]
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
keywordHandler:addKeyword({'spell runes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell convince creature(80gp) and chameleon(210gp), desintegrate(80gp), soulfire(210gp), paralyze(700gp), light magic missile(40gp), heavy magic missile(125gp), icicle(130gp), sudden death(325gp), fireball(95gp), great fireball(180gp), explosion(250gp), fire field(85gp), energy field(115gp), poison field(65gp), destroy field(45gp), fire wall(245gp), energy wall(340gp) and poison wall(210gp), magic wall runes(350gp), fire bomb(210gp), poison bomb(170gp), energy bomb(325gp), intense healing(95gp) and ultimate healing(175gp) runes.'})
keywordHandler:addKeyword({'fluids'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell normal mana potions, normal health potions, strong health potions, strong mana potions, great mana potions, great health potions, ultimate health potions, ultimate mana potions.(example: 4 normal mana potions) Also i selling backpacks with potions.(example: backpack normal mana potion)'})
keywordHandler:addKeyword({'wands'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell wand of vortex(50 gp), dragonbreath(500gp), plague(2.5k), cosmic energy(5k) and inferno(7.5k).'})
keywordHandler:addKeyword({'rods'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell snakebite(50 gp), moonlight(500gp), volcanic(2.5k), quarmire(5k) and hailstorm rod(7.5k).'})
shopModule:addBuyableItem({'normal health potions'}, 7618, 50, 'health potions')
shopModule:addBuyableItem({'strong health potions'}, 7588, 100, 'strong health potions')
shopModule:addBuyableItem({'great health potions'}, 7591, 190, 'great health potions')
shopModule:addBuyableItem({'ultimate health potions'}, 8377, 310, 'ultimate health potions')
shopModule:addBuyableItem({'normal mana potions'}, 7620, 50, 'mana potions')
shopModule:addBuyableItem({'strong mana potions'}, 7589, 80, 'strong mana potions')
shopModule:addBuyableItem({'great mana potions'}, 7590, 120, 'great mana potions')
shopModule:addBuyableItem({'ultimate mana potions'}, 8376, 160, 'ultimate mana potions')
shopModule:addBuyableItem({'blank rune'}, 2260, 10, 'blank rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 125, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 325, 3, 'sudden death rune')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'fireball'}, 2302, 95, 5, 'fire ball')
shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune')
shopModule:addBuyableItem({'fire field'}, 2301, 85, 3, 'fire field rune')
shopModule:addBuyableItem({'energy field'}, 2277, 115, 3, 'energy field')
shopModule:addBuyableItem({'poison field'}, 2285, 65, 3, 'poison field')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field')
shopModule:addBuyableItem({'fire wall'}, 2303, 245, 4, 'fire wall rune')
shopModule:addBuyableItem({'energy wall'}, 2279, 340, 4, 'energy wall rune')
shopModule:addBuyableItem({'poison wall'}, 2289, 210, 4, 'poison wall rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'fire bomb'}, 2305, 235, 2, 'fire bomb rune')
shopModule:addBuyableItem({'poison bomb'}, 2286, 170, 2, 'poison bomb rune')
shopModule:addBuyableItem({'energy bomb'}, 2262, 325, 2, 'energy bomb rune')
shopModule:addBuyableItem({'antidote'}, 2266, 65, 1, 'antidote rune')
shopModule:addBuyableItem({'intense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'chameleon rune'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'soulfire'}, 2308, 210, 3, 'soulfire rune')
shopModule:addBuyableItem({'Icicle'}, 2271, 130, 5, 'icicle runes')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
shopModule:addBuyableItem({'spell book'}, 2217, 150, 'spell book')
shopModule:addBuyableItem({'wand of inferno'}, 2187, 7500, 'wand of inferno')
shopModule:addBuyableItem({'wand of cosmic energy'}, 2189, 5000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of plague'}, 2188, 2500, 'wand of plague')
shopModule:addBuyableItem({'wand of dragonbreath'}, 2191, 500, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of vortex'}, 2190, 50, 'wand of vortex')
shopModule:addBuyableItem({'tempest rod'}, 2183, 7500, 'hailstorm rod')
shopModule:addBuyableItem({'quagmire rod'}, 2181, 5000, 'quagmire rod')
shopModule:addBuyableItem({'volcanic rod'}, 2185, 2500, 'volcanic rod')
shopModule:addBuyableItem({'moonlight rod'}, 2186, 500, 'moonlight rod')
shopModule:addBuyableItem({'snakebite rod'},
npcHandler:addModule(FocusModule:new())
if msgcontains(msg, 'bp sd') then
buyContainer(cid, 2003, 2268, 3, 6500)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid, 2003, 2273, 1, 3500)
elseif msgcontains(msg, 'MESSAGE') then
buyContainer(cid, CONTAINERID, ITEMID, ITEMCOUNT, PRICE)
end
return TRUE
end
if msgcontains(msg, 'bp sd') then
buyContainer(cid, 2003, 2268, 3, 6500)
elseif msgcontains(msg, 'bp uh') then
buyContainer(cid, 2003, 2273, 1, 3500)
elseif msgcontains(msg, 'MESSAGE') then
buyContainer(cid, CONTAINERID, ITEMID, ITEMCOUNT, PRICE)
elseif msgcontains(msg, 'MESSAGE2') then
buyContainer(cid, CONTAINERID2, ITEMID2, ITEMCOUNT2, PRICE2)
end
return TRUE
end
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)
keywordHandler:addKeyword({'spell runes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell convince creature(80gp) and chameleon(210gp), desintegrate(80gp), soulfire(210gp), paralyze(700gp), light magic missile(40gp), heavy magic missile(125gp), icicle(130gp), sudden death(325gp), fireball(95gp), great fireball(180gp), explosion(250gp), fire field(85gp), energy field(115gp), poison field(65gp), destroy field(45gp), fire wall(245gp), energy wall(340gp) and poison wall(210gp), magic wall runes(350gp), fire bomb(210gp), poison bomb(170gp), energy bomb(325gp), intense healing(95gp) and ultimate healing(175gp) runes.'})
keywordHandler:addKeyword({'fluids'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell normal mana potions, normal health potions, strong health potions, strong mana potions, great mana potions, great health potions, ultimate health potions, ultimate mana potions.(example: 4 normal mana potions) Also i selling backpacks with potions.(example: backpack normal mana potion)'})
keywordHandler:addKeyword({'wands'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell wand of vortex(50 gp), dragonbreath(500gp), plague(2.5k), cosmic energy(5k) and inferno(7.5k).'})
keywordHandler:addKeyword({'rods'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell snakebite(50 gp), moonlight(500gp), volcanic(2.5k), quarmire(5k) and hailstorm rod(7.5k).'})
shopModule:addBuyableItem({'normal health potions'}, 7618, 50, 'health potions')
shopModule:addBuyableItem({'strong health potions'}, 7588, 100, 'strong health potions')
shopModule:addBuyableItem({'great health potions'}, 7591, 190, 'great health potions')
shopModule:addBuyableItem({'ultimate health potions'}, 8377, 310, 'ultimate health potions')
shopModule:addBuyableItem({'normal mana potions'}, 7620, 50, 'mana potions')
shopModule:addBuyableItem({'strong mana potions'}, 7589, 80, 'strong mana potions')
shopModule:addBuyableItem({'great mana potions'}, 7590, 120, 'great mana potions')
shopModule:addBuyableItem({'ultimate mana potions'}, 8376, 160, 'ultimate mana potions')
shopModule:addBuyableItem({'blank rune'}, 2260, 10, 'blank rune')
shopModule:addBuyableItem({'light magic missile'}, 2287, 40, 10, 'light magic missile rune')
shopModule:addBuyableItem({'heavy magic missile'}, 2311, 125, 10, 'heavy magic missile rune')
shopModule:addBuyableItem({'sudden death'}, 2268, 325, 3, 'sudden death rune')
shopModule:addBuyableItem({'great fireball'}, 2304, 180, 4, 'great fireball rune')
shopModule:addBuyableItem({'fireball'}, 2302, 95, 5, 'fire ball')
shopModule:addBuyableItem({'explosion'}, 2313, 250, 6, 'explosion rune')
shopModule:addBuyableItem({'fire field'}, 2301, 85, 3, 'fire field rune')
shopModule:addBuyableItem({'energy field'}, 2277, 115, 3, 'energy field')
shopModule:addBuyableItem({'poison field'}, 2285, 65, 3, 'poison field')
shopModule:addBuyableItem({'destroy field'}, 2261, 45, 3, 'destroy field')
shopModule:addBuyableItem({'fire wall'}, 2303, 245, 4, 'fire wall rune')
shopModule:addBuyableItem({'energy wall'}, 2279, 340, 4, 'energy wall rune')
shopModule:addBuyableItem({'poison wall'}, 2289, 210, 4, 'poison wall rune')
shopModule:addBuyableItem({'magic wall'}, 2293, 350, 3, 'magic wall rune')
shopModule:addBuyableItem({'fire bomb'}, 2305, 235, 2, 'fire bomb rune')
shopModule:addBuyableItem({'poison bomb'}, 2286, 170, 2, 'poison bomb rune')
shopModule:addBuyableItem({'energy bomb'}, 2262, 325, 2, 'energy bomb rune')
shopModule:addBuyableItem({'antidote'}, 2266, 65, 1, 'antidote rune')
shopModule:addBuyableItem({'intense healing'}, 2265, 95, 1, 'intense healing rune')
shopModule:addBuyableItem({'ultimate healing'}, 2273, 175, 1, 'ultimate healing rune')
shopModule:addBuyableItem({'convince creature'}, 2290, 80, 1, 'convince creature rune')
shopModule:addBuyableItem({'chameleon rune'}, 2291, 210, 1, 'chameleon rune')
shopModule:addBuyableItem({'soulfire'}, 2308, 210, 3, 'soulfire rune')
shopModule:addBuyableItem({'Icicle'}, 2271, 130, 5, 'icicle runes')
shopModule:addBuyableItem({'paralyze'}, 2278, 700, 1, 'paralyze rune')
shopModule:addBuyableItem({'spell book'}, 2217, 150, 'spell book')
shopModule:addBuyableItem({'wand of inferno'}, 2187, 7500, 'wand of inferno')
shopModule:addBuyableItem({'wand of cosmic energy'}, 2189, 5000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of plague'}, 2188, 2500, 'wand of plague')
shopModule:addBuyableItem({'wand of dragonbreath'}, 2191, 500, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of vortex'}, 2190, 50, 'wand of vortex')
shopModule:addBuyableItem({'tempest rod'}, 2183, 7500, 'hailstorm rod')
shopModule:addBuyableItem({'quagmire rod'}, 2181, 5000, 'quagmire rod')
shopModule:addBuyableItem({'volcanic rod'}, 2185, 2500, 'volcanic rod')
shopModule:addBuyableItem({'moonlight rod'}, 2186, 500, 'moonlight rod')
shopModule:addBuyableItem({'snakebite rod'}, 2182, 50, 'snakebite rod')
npcHandler:addModule(FocusModule:new())