I talk now about 2hours to a scripter of otland and i talk to empty.
All have a other opinion to the topic so i want know it now. i not want talk again 2 hours for nothing.
Version: TfS 0.2.13 rev. 866 or 904.
-------Questions-------
i search a working Rune Npc who sell's Rune,Potions,Wands,Rods and i want to sell runes and potions with bp's, not want one rune with x 25 charges simply or?
i get now 2-3 scripts and i dont know if its compatible with my version of TfS because 50% say "Yes" 50% "No".
The scripts will following so i hope u can post a working script or say wich are working of the following scripts. i know its not hard to add that he sells runes and potions with bp's so i only want know wich script are working with my version.
Number 1:
Number 2:
All have a other opinion to the topic so i want know it now. i not want talk again 2 hours for nothing.
Version: TfS 0.2.13 rev. 866 or 904.
-------Questions-------
i search a working Rune Npc who sell's Rune,Potions,Wands,Rods and i want to sell runes and potions with bp's, not want one rune with x 25 charges simply or?
i get now 2-3 scripts and i dont know if its compatible with my version of TfS because 50% say "Yes" 50% "No".
The scripts will following so i hope u can post a working script or say wich are working of the following scripts. i know its not hard to add that he sells runes and potions with bp's so i only want know wich script are working with my version.
Number 1:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
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())
Number 2:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
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())
Last edited: