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

NPC That sell runes - need he to sell 100 charges instead of 1

Luciano

Member
Joined
Feb 18, 2010
Messages
998
Reaction score
24
Hello.
I have this script:
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)



-- OTServ event handling functions start
function onCreatureAppear(cid)				npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) 			npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) 	npcHandler:onCreatureSay(cid, type, msg) end
function onThink() 						npcHandler:onThink() end
-- OTServ event handling functions end

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)

shopModule:addBuyableItem({'light wand', 'lightwand'}, 					2163, 250, 		'magic light wand')




shopModule:addBuyableItem({'great fireball', 'gfb'}, 						2304, 750, 100, 	'great fireball rune')
shopModule:addBuyableItem({'lmanarune', 'lmanarune'}, 							2294, 2500, 100,		'large manarune')
shopModule:addBuyableItem({'smanarune', 'smanarune'}, 							2281, 1000, 100,		'small manarune')
shopModule:addBuyableItem({'mmanarune', 'mmanarune'}, 							2298, 10000, 100,		'medium manarune')
shopModule:addBuyableItem({'xmanarune', 'xmanarune'}, 							2306, 150000, 100,		'X-Large manarune')



shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 				2187, 15000, 	'wand of inferno')
shopModule:addBuyableItem({'wand of decay', 'decay'}, 				2188, 5000, 	'wand of decay')
shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic energy'}, 	2189, 10000, 	'wand of cosmic energy')
shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 				2190, 500, 	 	'wand of vortex')
shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'}, 	2191, 1000, 	'wand of dragonbreath')


shopModule:addBuyableItem({'terra rod', 'terra'}, 				2181, 10000, 	'terra rod')
shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 				2182, 500, 	 	'snakebite rod')
shopModule:addBuyableItem({'hailstorm', 'hailstorm'}, 				2183, 15000, 	'hailstorm rod')
shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 				2186, 500,   	'moonlight rod')


npcHandler:addModule(FocusModule:new())
i need the items small manarune, large manarune, medium manarune and X-Large manarune to be sold with 100 charges, as other runes. the thing is the npc only sell 1 charge... some way to fix? or it is in items.xml ?
Help ~
 
spells.xml
WRONG

this works for me
Code:
shopModule:addBuyableItem({'100x hmm'}, 2311, 1200, 100)--
shopModule:addBuyableItem({'100x gfb'}, 2304, 4500, 100)--
shopModule:addBuyableItem({'100x expl'}, 2313, 3040, 100)--
shopModule:addBuyableItem({'100x uh'}, 2273, 47500, 100)--
shopModule:addBuyableItem({'100x sd'}, 2268, 35000, 100)--
they will say sudden death rune in the trade window. "100x uh" is if you say "buy 100x uh" like the old system
 
Back
Top