• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC Runemaker

Status
Not open for further replies.
Above this post the script what u posted are relly working?

Workign with tfs 0.2.13 rev 866 or 906?


Above this poste the script only repalce with my runes.lua and its working relly 0o?
 
It doesnt hurt to try I guess...
 
I see now that u are a grat scripter :thumbup: When i use it, i repalce it with my runes.lua. Need i something to do that the script work like advanced buycontainer or i need to edit the script? I hope i have onyl to copy your work.

1.) i only must replace it with my runes.lua?

2.) What is the best tfs atm? 0.2.13 rev. 866 or 906?


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:
1) Yea, just replace it.
2) The best TFS now is the newest revision of Tags I guess, since it contains already fixed files.

If you want to add more possible backpacks to buy just edit those lines:
Code:
		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
 
i see bp sd , bp uh , bp hmm. The other thinks(look at code: ) are not possible to buy atm?

Code:
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.)

Code:
2) The best TFS now is the newest revision of Tags I guess, since it contains already fixed files.

You mean the 0.2.12 rev. 906 right?
-> hier

3.)

Already possible at the script to buy runes with a bp? i not want a rune with x25 charges(only answer: yeah/no)
 
Last edited:
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.
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)

Code:
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)

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?
 
Last edited:
2) So just wait for new release :p
3) runes.lua:
Code:
		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?


--->Please answer 1 too<----

@Emty: For Empty i hope u look now this script are okay? i hope i not need to edit Advanced BuyCOntainer or so at my tfs 0.2.13 rev. 866. i hope its a finished working script.

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:
Its already possible to buy them, you dont have to edit anything, just copy/paste this script in your runes.lua, but first make a backup of those runes.lua in case my script is buggy, since I didnt test it - you should do it, few hours ago.
 
Empty said that i only need to change scripts when i udpate to 0.3 tfs but i have 0.2.12 rev. 904. What was the reason what u said? i only need a rune npc who sell runes and potions and wands with bps(runes and potions into bps)
 
Last edited:
1.) EMpty said that the npc's only must updated when i using 0.3 tfs

2.) i'm using tfs 0.2.13 rev 866 or. rev 904.

3.) We talk now a long long time Men's I NEED ONLY A RUNEMAKER.lua


What i need:

Runes.lua = potions , runes , wands , rots + Runes and Potions sells into a bp. Not want one rune with 25 charges want a whole bp with runes. Potions too but without charges ofc.


Now gimme one, every real ot have it so now arr i need one
 
Last edited:
Just fucking use the npc i gave you omfg!
 
Okay thank your for your help i have only 2 more questions:

1.) What must i do that he sell it with bp's?

2.) What must i do that i can say bp sds...
 
You can already buy the backpacks if you will use my script omg..
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
	
[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())
 
Okay, sry;)


this are working to buy more bp's?

Code:
		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
 
Code:
		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

Yes, you can add as many as you want there...
 
What u mena with as many as u want?

i tought its one sentence for the thignt hat players cna buy unlimit bps of XXXX

Sorry for doppelposting now answer please.

want a script that:

-work's

-sell runes,potions,wands,rods

-runes and potion are sell into bps's
----------

i think you Marcinek Paladinek already give me the script for it. The things on the top of this posting all at your script right?



2.) i need to add advanced BuyCOntainer for it or?
 
Last edited by a moderator:
1. I think you should quit your ot and start playing ot.
2. If you don't agree with 1 then read tutorials first.
 
Nah, haha because this little thing?

i need only a runes.lua for my tfs 0.2.13 rev. 866. So give me one and write what i must edit to make it work like: add BuyContainer or so.


e.g why this will not work? i think its work perfectly:

Code:
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())
 
Last edited:
Status
Not open for further replies.
Back
Top