Ir para conteúdo

[npc] Pack Para Tfs ~ Last Update 28/12


MarcolinoGOD

Posts Recomendados

Espero que gostem deste pack que encontrem rodando pela net e que possam entender minha tradução que embora não esteja totalmente coerente ao texto original, esta bem "legivel"!

 

Créditos:

Sentielo 95% (Arquivos .lua)

Albert José 5% (Base dos npcs, tradução, looktype tibia rl, adicionar fotos e organização do tópico)

 

Agora é a hora que você escolhe se vai ter o trabalho de copiar e colar tudo isso abaixo ou simplesmente baixar o pack feito

por mim!?

 

Download (Escolha o host de sua preferencia!): Ele tambem se encontra em anexo no tópico! (tibiaa4e pronto querido)[:blush:

4Shared

Speedy Share

 

Scan: (Obrigado Phgsoares)

http://www.virustotal.com/pt/analisis/680f...2383610e1c2c014

 

Olá,

 

Hoje, eu estava trabalhando em meu OT e decidi publicar meus npcs para vcs, espero que sejam uteis para vocês tambem. Irei postar mais NPCs Assim que for concluindo os mesmos.

 

Aqui esta:

 

 

.Este npc vende bags,backpacks e alguns tools como ropes, shovels etc.

Lubo.gif

Lubo.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Lubo" script="data/npc/scripts/Tools.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="128" head="1" body="39" legs="96" feet="120" addons="3"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hello, are you looking for adventure |PLAYERNAME]! I sell things you probably need to get in deep dungeons, just ask me for a {trade}." />
	<parameter key="message_farewell" value="Goodbye, good luck on your adventure |PLAYERNAME|." />
<parameter key="message_walkaway" value="Kidd, please watch out for the deeper dungeons!" />
</parameters>
</npc>

Tools.lua

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({'brown bag'}, 1987, 20, 'brown bag')
shopModule:addBuyableItem({'brown backpack'}, 1988, 20, 'brown backpack')
shopModule:addBuyableItem({'basket'}, 1989, 6, 'basket')
shopModule:addBuyableItem({'present box'}, 1990, 20, 'present box')
shopModule:addBuyableItem({'green bag'}, 1991, 5, 'green bag')
shopModule:addBuyableItem({'yellow bag'}, 1992, 5, 'yellow bag')
shopModule:addBuyableItem({'red bag'}, 1993, 5, 'red bag')
shopModule:addBuyableItem({'purple bag'}, 1994, 5, 'purple bag')
shopModule:addBuyableItem({'blue bag'}, 1995, 5, 'blue bag')
shopModule:addBuyableItem({'grey bag'}, 1996, 5, 'grey bag')
shopModule:addBuyableItem({'golden bag'}, 1997, 5, 'golden bag')
shopModule:addBuyableItem({'green backpack'}, 1998, 20, 'green backpack')
shopModule:addBuyableItem({'yellow backpack'}, 1999, 20, 'yellow backpack')
shopModule:addBuyableItem({'red backpack'}, 2000, 20, 'red backpack')
shopModule:addBuyableItem({'purple backpack'}, 2001, 20, 'purple backpack')
shopModule:addBuyableItem({'blue backpack'}, 2002, 20, 'blue backpack')
shopModule:addBuyableItem({'grey backpack'}, 2003, 20, 'grey backpack')
shopModule:addBuyableItem({'golden backpack'}, 2004, 20, 'golden backpack')
shopModule:addBuyableItem({'beach backpack'}, 5949, 20, 'beach backpack')
shopModule:addBuyableItem({'beach bag'}, 5950, 20, 'beach bag')
shopModule:addBuyableItem({'camouflage bag'}, 3939, 20, 'camouflage bag')
shopModule:addBuyableItem({'camouflage backpack'}, 3940, 20, 'camouflage backpack')
shopModule:addBuyableItem({'pirate backpack'}, 5926, 20, 'pirate backpack')
shopModule:addBuyableItem({'pirate bag'}, 5927, 5, 'pirate bag')
shopModule:addBuyableItem({'fur backpack'}, 7342, 20, 'fur backpack')
shopModule:addBuyableItem({'fur bag'}, 7343, 20, 'fur bag')

shopModule:addBuyableItem({'rope'}, 2120, 50, 'rope')
shopModule:addBuyableItem({'scythe'}, 2550, 50, 'scythe')
shopModule:addBuyableItem({'pick'}, 2553, 50, 'pick')
shopModule:addBuyableItem({'shovel'}, 2554, 50, 'shovel')
shopModule:addBuyableItem({'fishing rod'}, 2580, 150, 'fishing rod')
shopModule:addBuyableItem({'worms'}, 3976, 1, 'worms')
shopModule:addBuyableItem({'torch'}, 2150, 2, 'torch')
shopModule:addBuyableItem({'football'}, 2190, 111, 'football')
shopModule:addBuyableItem({'watch'}, 2036, 20, 'watch')

shopModule:addSellableItem({'rope'}, 2120, 8, 'rope')
shopModule:addSellableItem({'shovel'}, 2554, 8, 'shovel')
shopModule:addSellableItem({'scythe'}, 2550, 10, 'scythe')
shopModule:addSellableItem({'pick'}, 2553, 15, 'pick')
shopModule:addSellableItem({'fishing rod'}, 2580, 40, 'fishing rod')
shopModule:addSellableItem({'watch'}, 2036, 6, 'watch')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

___________________________________________________________________________

 

.Um npc que vende todos tipos dos alimentos e um cookbook pela causa ;), porém não cosinha!

Frodo.gif

Frodo.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Frodo" script="data/npc/scripts/Food.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="128" head="58" body="68" legs="129" feet="115" addons="0"/>
<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

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, 'meat')
shopModule:addBuyableItem({'fish'}, 2667, 5, 'fish')
shopModule:addBuyableItem({'salmon'}, 2668, 5, 'salmon')
shopModule:addBuyableItem({'ham'}, 2671, 8, 'ham')
shopModule:addBuyableItem({'dragon ham'}, 2672, 25, 'dragon ham')
shopModule:addBuyableItem({'pear'}, 2673, 4, 'pear')
shopModule:addBuyableItem({'red apple'}, 2674, 3, 'red apple')
shopModule:addBuyableItem({'orange'}, 2675, 10, 'orange')
shopModule:addBuyableItem({'banana'}, 2676, 3, 'banana')
shopModule:addBuyableItem({'blueberry'}, 2677, 1, 'blueberry')
shopModule:addBuyableItem({'cherry'}, 2679, 1, 'cherry')
shopModule:addBuyableItem({'strawberry'}, 2680, 1, 'strawberry')
shopModule:addBuyableItem({'grape'}, 2680, 3, 'grape')
shopModule:addBuyableItem({'melon'}, 2682, 8, 'melon')
shopModule:addBuyableItem({'pumpkin'}, 2683, 10, 'pumpkin')
shopModule:addBuyableItem({'carrot'}, 2684, 3, 'carrot')
shopModule:addBuyableItem({'tomato'}, 2685, 5, 'tomato')
shopModule:addBuyableItem({'corncob'}, 2686, 3, 'corncob')
shopModule:addBuyableItem({'cookie'}, 2687, 2, 'cookie')
shopModule:addBuyableItem({'bread'}, 2689, 4, 'bread')
shopModule:addBuyableItem({'roll'}, 2690, 2, 'roll')
shopModule:addBuyableItem({'brown bread'}, 2691, 3, 'brown bread')
shopModule:addBuyableItem({'egg'}, 2695, 2, 'egg')
shopModule:addBuyableItem({'cheese'}, 2696, 2, 'cheese')
shopModule:addBuyableItem({'white mushroom'}, 2787, 6, 'white mushroom')
shopModule:addBuyableItem({'red mushroom'}, 2788, 12, 'red mushroom')
shopModule:addBuyableItem({'brown mushroom'}, 2789, 10, 'brown mushroom')
shopModule:addBuyableItem({'valentine cake'}, 6393, 6, 'valentine cake')
shopModule:addBuyableItem({'cookbook'}, 2347, 150, 'cookbook')

shopModule:addSellableItem({'meat'}, 2666, 2, 'meat')
shopModule:addSellableItem({'salmon'}, 2668, 2, 'salmon')
shopModule:addSellableItem({'bread'}, 2689, 2, 'bread')
shopModule:addSellableItem({'ham'}, 2671, 4, 'ham')
shopModule:addBuyableItem({'blueberry'}, 2677, 1, 5, 'blueberry')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

___________________________________________________________________________

 

.Este troca itens Ps¹:Não foi feito por mim, mas adicionei a obsidian knife

A_Sweaty_Cyclops.gif

A Sweaty Cyclops.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="A Sweaty Cyclops" script="data/npc/scripts/Exchanger.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="22" head="0" body="0" legs="0" feet="0" addons="0"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hi little one. I am an A Sweaty Cyclops. Need some {help} to know exactly what I am exchanging?" />
	<parameter key="message_farewell" value="Goodbye. Have fun on your adventure little one." />
<parameter key="message_walkaway" value="You are just so little..." />
</parameters>
</npc>

Exchanger.lua

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)

function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
	return false
end
	if msgcontains(msg, 'help') then
	selfSay('You can here change some items for "spider silk yarn", "chunk of crude iron", "draconian steel", "warrior sweat", "magic sulpher", "enchanted chicken wing", "royal steel", "hell steel", "engraved crossbow", "fighting spirit", "infernal bolt", "blue, green and red piece of clothes", "obsidian knife" and "lottery ticket".')

		elseif msgcontains(msg, 'spider silk yarn') then
		if getPlayerItemCount(cid,5879) >= 10 then
			selfSay('Did you bring me the 10 Giant Silks ?')
			talk_state = 1
		else
			selfSay('I need a 10 Giant Spider Silks, to give you the spider silk yarn. Come back when you have them.')
			talk_state = 0
		end

		elseif msgcontains(msg, 'yes') and talk_state == 1 then
		talk_state = 0
		if getPlayerItemCount(cid,5879) >= 10 then
		if doPlayerRemoveItem(cid,5879, 10) == TRUE then
		doPlayerAddItem(cid, 5886, 1)
					selfSay('Here u are.')
		end
		else
			selfSay(havent_item)
		end

elseif msgcontains(msg, 'chunk of crude iron') then
if getPlayerItemCount(cid,2393) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 then
selfSay('Did you bring me the 3 Bast Skirts and Giant Sword ?')
talk_state = 2
else
selfSay('I need a 3 Bast Skirts and Giant Sword, to give you the chunk of crude iron. Come back when you have them.')
talk_state = 0
end
elseif msgcontains(msg, 'yes') and talk_state == 2 then
talk_state = 0
if getPlayerItemCount(cid,2393) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 then
if doPlayerRemoveItem(cid,2393,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 then
selfSay(addon_give)
doPlayerAddItem(cid,5892,1)
end
else
selfSay(havent_item)
end



elseif msgcontains(msg, 'ticket') or msgcontains(msg, 'lottery') or msgcontains(msg, 'lottery ticket') or msgcontains(msg, 'lotery ticket') then
if getPlayerItemCount(cid,2006) >= 100 then
selfSay('Did you bring me 100 empty vials?')
talk_state = 9
else
selfSay('I need 100 empty vials, to give you a lottery ticket. Come back when you have them.')
talk_state = 0
end
elseif msgcontains(msg, 'yes') and talk_state == 9 then
talk_state = 0
if getPlayerItemCount(cid,2006) >= 100 then
if doPlayerRemoveItem(cid,2006,100) == 1 then
selfSay(addon_give)
if(math.random(1,10) == 1) then
doPlayerAddItem(cid,5958,1)
else
doPlayerAddItem(cid,5956,1)
end

else
selfSay(havent_item)
end



elseif msgcontains(msg, 'yes') and talk_state == 6 then
	if getPlayerItemCount(cid,2006) >= 100 then
		if doPlayerTakeItem(cid,2006,100) == 0 then
			selfSay('Here you are.')
			if(math.random(1,10) == 1) then
				doPlayerAddItem(cid,5958,1)
			else
				doPlayerAddItem(cid,5956,1)
			end
		else
			selfSay(hasNoMsg)
		end
	else
		selfSay(hasNoMsg)
	end

















elseif msgcontains(msg, 'draconian steel') then
if getPlayerItemCount(cid,2516) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 then
selfSay('Did you bring me 3 Bast Skirts and Dragon Shield ?')
talk_state = 3
else
selfSay('I need 3 Bast Skirts and Dragon Shield, to give you the draconian steel. Come back when you have them.')
talk_state = 0
end
elseif msgcontains(msg, 'yes') and talk_state == 3 then
talk_state = 0
if getPlayerItemCount(cid,2516) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 then
if doPlayerRemoveItem(cid,2516,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 then
doPlayerAddItem(cid,5889,1)
selfSay('Here u are.')
end
else
selfSay(havent_item)
end

	elseif msgcontains(msg, 'warrior sweat') then
			if getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 then
				selfSay('Did you bring me 4 warrior helmets?')
				talk_state = 4
			else
				selfSay('I need 4 warrior helmets, to give you the warrior sweat. Come back when you have them.')
				talk_state = 0
			end
	elseif msgcontains(msg, 'yes') and talk_state == 4 then
		talk_state = 0
		if getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 and getPlayerItemCount(cid,2475) >= 1 then
				if doPlayerRemoveItem(cid,2475,1) == 1 and doPlayerRemoveItem(cid,2475,1) == 1 and doPlayerRemoveItem(cid,2475,1) == 1 and doPlayerRemoveItem(cid,2475,1) == 1 then
					doPlayerAddItem(cid,5885,1)
					selfSay(addon_give)
				end
			else
			selfSay(havent_item)
			end

elseif msgcontains(msg, 'magic sulpher') then
if getPlayerItemCount(cid,2392) >= 1 and getPlayerItemCount(cid,2392) >= 1 and getPlayerItemCount(cid,2392) >= 1 then
selfSay('Did you bring me 3 fire swords?')
talk_state = 5
else
selfSay('I need 3 fire swords, to give you the magic sulpher. Come back when you have them.')
talk_state = 0
end

	elseif msgcontains(msg, 'yes') and talk_state == 5 then
		talk_state = 0
		if getPlayerItemCount(cid,2392) >= 1 and getPlayerItemCount(cid,2392) >= 1 and getPlayerItemCount(cid,2392) >= 1 then
				if doPlayerRemoveItem(cid,2392,1) == 1 and doPlayerRemoveItem(cid,2392,1) == 1 and doPlayerRemoveItem(cid,2392,1) == 1 then
					doPlayerAddItem(cid,5904,1)
					selfSay(addon_give)
			end
		else
			selfSay(havent_item)
		end

	elseif msgcontains(msg, 'enchanted chicken wing') then
		if getPlayerItemCount(cid,2195) >= 1 then
			selfSay('Did you bring me boots of haste?')
			talk_state = 6
		else
			selfSay('I need boots of haste, to give you the enchanted chicken wing. Come back when you have them.')
			talk_state = 0
		end

	elseif msgcontains(msg, 'yes') and talk_state == 6 then
		talk_state = 0
		if getPlayerItemCount(cid,2195) >= 1 then
				if doPlayerRemoveItem(cid,2195,1) == 1 then
					doPlayerAddItem(cid,5891,1)
					selfSay(addon_give)
				end
		else
			selfSay(havent_item)
		end



	elseif msgcontains(msg, 'royal steel') then
		if getPlayerItemCount(cid,2487) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 then
			selfSay('Did you bring me the 3 Bast Skirts and Crown Armor ?')
			talk_state = 7
		else
			selfSay('I need 3 Bast Skirts and Crown Armor, to give you the royal steel. Come back when you have them.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 7 then
		talk_state = 0
		if getPlayerItemCount(cid,2487) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 then
				if doPlayerRemoveItem(cid,2487,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,5887,1)
				end
		else
			selfSay(havent_item)
		end


	elseif msgcontains(msg, 'hell steel') then
		if getPlayerItemCount(cid,2462) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 then
			selfSay('Did you bring me the 3 Bast Skirts and Devil Helmet ?')
			talk_state = 8
		else
			selfSay('I need a 3 Bast Skirts and Devil Helmet, to give you the hell steel. Come back when you have them.')
			talk_state = 0
		end

	elseif msgcontains(msg, 'yes') and talk_state == 8 then
		talk_state = 0
		if getPlayerItemCount(cid,2462) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 and getPlayerItemCount(cid,3983) >= 1 then

				if doPlayerRemoveItem(cid,2462,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 and doPlayerRemoveItem(cid,3983,1) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,5888,1)
				end
		else
			selfSay(havent_item)
		end

	elseif msgcontains(msg, 'engraved crossbow') then
		if getPlayerItemCount(cid,5954) >= 15 then
			selfSay('Did you bring me the 15 demon horns?')
			talk_state = 9
		else
			selfSay('I need a 15 demon horns, to give you the engraved crossbow. Come back when you have them.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 9 then
		talk_state = 0
		if getPlayerItemCount(cid,5954) >= 15 then
				if doPlayerRemoveItem(cid,5954,15) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,5947,1)
				end

		else
			selfSay(havent_item)
		end

	elseif msgcontains(msg, 'fighting spirit') then
		if getPlayerItemCount(cid,2498) >= 1 and getPlayerItemCount(cid,2498) >= 1 then
			selfSay('Did you bring me the 2 Royal Helmets?')
			talk_state = 10
		else
			selfSay('I need a 2 Royal Helmets, to give you the Fighting Spirit. Come back when you have them.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 10 then
		talk_state = 0
		if getPlayerItemCount(cid,2498) >= 1 and getPlayerItemCount(cid,2498) >= 1 then
				if doPlayerRemoveItem(cid,2498,1) == 1 and doPlayerRemoveItem(cid,2498,1) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,5884,1)
				end

		else
			selfSay(havent_item)
		end


	elseif msgcontains(msg, 'infernal bolt') then
		if getPlayerItemCount(cid,5944) >= 1 then
			selfSay('Did you bring me the Soul Orb?')
			talk_state = 11
		else
			selfSay('I need a Soul Orb, to give you the 2 Infernal Bolts. Come back when you have them.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 11 then
		talk_state = 0
		if getPlayerItemCount(cid,5944) >= 1 then
				if doPlayerRemoveItem(cid,5944,1) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,6529,2)
				end

		else
			selfSay(havent_item)
		end

	elseif msgcontains(msg, 'blue piece of cloth') then
		if getPlayerItemCount(cid,2663) >= 1 then
			selfSay('Did you bring me the Mystic Turban ?')
			talk_state = 12
		else
			selfSay('I need a Mystic Turban, to give you the Blue Piece of Cloth. Come back when you have them.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 12 then
		talk_state = 0
		if getPlayerItemCount(cid,2663) >= 1 then
				if doPlayerRemoveItem(cid,2663,1) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,5912,1)
				end

		else
			selfSay(havent_item)
		end

	elseif msgcontains(msg, 'green piece of cloth') then
		if getPlayerItemCount(cid,2652) >= 1 then
			selfSay('Did you bring me the Green Tunic ?')
			talk_state = 13
		else
			selfSay('I need a Green Tunic, to give you the Green Piece of Cloth. Come back when you have them.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 13 then
		talk_state = 0
		if getPlayerItemCount(cid,2652) >= 1 then
				if doPlayerRemoveItem(cid,2652,1) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,5910,1)
				end

		else
			selfSay(havent_item)
		end

	elseif msgcontains(msg, 'red piece of cloth') then
		if getPlayerItemCount(cid,2655) >= 1 then
			selfSay('Did you bring me the Red Robe ?')
			talk_state = 14
		else
			selfSay('I need a Red Robe, to give you the Red Piece of Cloth. Come back when you have them.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 14 then
		talk_state = 0
		if getPlayerItemCount(cid,2655) >= 1 then
				if doPlayerRemoveItem(cid,2655,1) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,5911,1)
				end

		else
			selfSay(havent_item)
		end


	elseif msgcontains(msg, 'obsidian knife') then
		if getPlayerItemCount(cid,3983) >= 3 and getPlayerItemCount(cid,2516) >= 1 and getPlayerItemCount(cid,2425) >= 1 then
			selfSay('Did you bring me the 3 bast skirts, a dragon shield and a obsidian lance?')
			talk_state = 15
		else
			selfSay('I need 3 bast skirts, a dragon shield and a obsidian lance to give you the obsidian knife. Come back when you have them.')
			talk_state = 0
		end
	elseif msgcontains(msg, 'yes') and talk_state == 15 then
		talk_state = 0
		if getPlayerItemCount(cid,3983) >= 3 and getPlayerItemCount(cid,2516) >= 1 and getPlayerItemCount(cid,2425) >= 1  then
				if doPlayerRemoveItem(cid,3983,1) == 3 and doPlayerRemoveItem(cid,2516,1) == 1 and doPlayerRemoveItem(cid,2425,1) == 1 then
					selfSay(addon_give)
					doPlayerAddItem(cid,5908,1)
				end

		else
			selfSay(havent_item)
		end


	elseif msgcontains(msg, 'no') and (talk_state >= 1 and talk_state <= 5) then
		selfSay('Ok than.')
		talk_state = 0
	end
-- Place all your code in here. Remember that hi, bye and all that stuff is already handled by the npcsystem, so you do not have to take care of that yourself.
return true
end

end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

___________________________________________________________________________

 

.Este npc vende weapons, armors, shields, helmets e legs

Norma.gif

Norma.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Norma" script="data/npc/scripts/Equipment.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="136" head="78" body="95" legs="110" feet="96" addons="2"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Welcome |PLAYERNAME]! My name is Norma 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

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, 'steel helmet')
shopModule:addBuyableItem({'chain helmet'}, 2458, 52, 'chain helmet')
shopModule:addBuyableItem({'iron helmet'}, 2459, 390, 'iron helmet')
shopModule:addBuyableItem({'brass helmet'}, 2460, 120, 'brass helmet')
shopModule:addBuyableItem({'leather helmet'}, 2461, 12, 'leather helmet')
shopModule:addBuyableItem({'viking helmet'}, 2473, 265, 'viking helmet')
shopModule:addBuyableItem({'soldier helmet'}, 2481, 110, 'soldier helmet')
shopModule:addBuyableItem({'studded helmet'}, 2482, 63, 'studded helmet')

shopModule:addBuyableItem({'chain armor'}, 2464, 200, 'chain armor')
shopModule:addBuyableItem({'brass armor'}, 2465, 450, 'brass armor')
shopModule:addBuyableItem({'leather armor'}, 2467, 35, 'leather armor')

shopModule:addBuyableItem({'brass legs'}, 2478, 195, 'brass legs')
shopModule:addBuyableItem({'chain legs'}, 2648, 80, 'chain legs')
shopModule:addBuyableItem({'leather legs'}, 2649, 10, 'leather legs')

shopModule:addBuyableItem({'steel shield'}, 2509, 240, 'steel shield')
shopModule:addBuyableItem({'plate shield'}, 2510, 125, 'plate shield')
shopModule:addBuyableItem({'brass shield'}, 2511, 16, 'brass shield')
shopModule:addBuyableItem({'wooden shield'}, 2512, 15, 'wooden shield')
shopModule:addBuyableItem({'dwarven shield'}, 2525, 500, 'dwarven shield')

shopModule:addBuyableItem({'sword'}, 2376, 85, 'sword')
shopModule:addBuyableItem({'two handed sword'}, 2377, 950, 'two handed sword')
shopModule:addBuyableItem({'dagger'}, 2379, 5, 'dagger')
shopModule:addBuyableItem({'rapier'}, 2384, 15, 'rapier')
shopModule:addBuyableItem({'sabre'}, 2385, 35, 'sabre')
shopModule:addBuyableItem({'carlin sword'}, 2395, 473, 'carlin sword')

shopModule:addBuyableItem({'club'}, 2382, 5, 'club')
shopModule:addBuyableItem({'morning star'}, 2394, 430, 'morning star')
shopModule:addBuyableItem({'mace'}, 2398, 90, 'mace')
shopModule:addBuyableItem({'battle hammer'}, 2417, 350, 'battle hammer')
shopModule:addBuyableItem({'clerical mace'}, 2423, 540, 'clerical mace')

shopModule:addBuyableItem({'battle axe'}, 2378, 235, 'battle axe')
shopModule:addBuyableItem({'hand axe'}, 2380, 8, 'hand axe')
shopModule:addBuyableItem({'axe'}, 2386, 20, 'axe')
shopModule:addBuyableItem({'barbarian axe'}, 2429, 590, 'barbarian axe')

shopModule:addSellableItem({'battle axe'}, 2378, 80, 'battle axe')
shopModule:addSellableItem({'hand axe'}, 2380, 4, 'hand axe')
shopModule:addSellableItem({'halberd'}, 2381, 400, 'halberd')
shopModule:addSellableItem({'axe'}, 2386, 8, 'axe')
shopModule:addSellableItem({'double axe'}, 2387, 260, 'double axe')
shopModule:addSellableItem({'barbarian axe'}, 2429, 185, 'barbarian axe')

shopModule:addSellableItem({'steel helmet'}, 2457, 190, 'steel helmet')
shopModule:addSellableItem({'chain helmet'}, 2458, 17, 'chain helmet')
shopModule:addSellableItem({'iron helmet'}, 2459, 145, 'iron helmet')
shopModule:addSellableItem({'brass helmet'}, 2460, 30, 'brass helmet')
shopModule:addSellableItem({'leather helmet'}, 2461, 4, 'leather helmet')
shopModule:addSellableItem({'viking helmet'}, 2473, 66, 'viking helmet')
shopModule:addSellableItem({'legion helmet'}, 2480, 22, 'legion helmet')
shopModule:addSellableItem({'soldier helmet'}, 2481, 16, 'soldier helmet')

shopModule:addSellableItem({'plate armor'}, 2463, 400, 'plate armor')
shopModule:addSellableItem({'chain armor'}, 2464, 70, 'chain armor')
shopModule:addSellableItem({'brass armor'}, 2465, 150, 'brass armor')
shopModule:addSellableItem({'leather armor'}, 2467, 12, 'leather armor')
shopModule:addSellableItem({'scale armor'}, 2483, 75, 'scale armor')
shopModule:addSellableItem({'studded armor'}, 2484, 70, 'studded armor')

shopModule:addSellableItem({'brass legs'}, 2478, 49, 'brass legs')
shopModule:addSellableItem({'plate legs'}, 2647, 115, 'plate legs')
shopModule:addSellableItem({'chain legs'}, 2648, 25, 'chain legs')
shopModule:addSellableItem({'leather legs'}, 2649, 2, 'leather legs')

shopModule:addSellableItem({'steel shield'}, 2509, 80, 'steel shield')
shopModule:addSellableItem({'plate shield'}, 2510, 45, 'plate shield')
shopModule:addSellableItem({'brass shield'}, 2511, 16, 'brass shield')
shopModule:addSellableItem({'wooden shield'}, 2512, 5, 'wooden shield')
shopModule:addSellableItem({'battle shield'}, 2513, 95, 'battle shield')
shopModule:addSellableItem({'dwarven shield'}, 2525, 100, 'dwarven shield')
shopModule:addSellableItem({'sentinel shield'}, 3974, 120, 'sentinel shield')
shopModule:addSellableItem({'salamander shield'}, 3975, 280, 'salamander shield')
shopModule:addSellableItem({'tusk shield'}, 3973, 850, 'tusk shield')

shopModule:addSellableItem({'sword'}, 2376, 25, 'sword')
shopModule:addSellableItem({'two handed sword'}, 2377, 450, 'two handed sword')
shopModule:addSellableItem({'dagger'}, 2379, 2, 'dagger')
shopModule:addSellableItem({'rapier'}, 2384, 5, 'rapier')
shopModule:addSellableItem({'sabre'}, 2385, 12, 'sabre')
shopModule:addSellableItem({'carlin sword'}, 2395, 118, 'carlin sword')
shopModule:addSellableItem({'short sword'}, 2406, 10, 'short sword')

shopModule:addSellableItem({'club'}, 2382, 1, 'club')
shopModule:addSellableItem({'morning star'}, 2394, 90, 'morning star')
shopModule:addSellableItem({'mace'}, 2398, 30, 'mace')
shopModule:addSellableItem({'battle hammer'}, 2417, 120, 'battle hammer')
shopModule:addSellableItem({'giant smithhammer'}, 2321, 250, 'giant smithhammer')
shopModule:addSellableItem({'clerical mace'}, 2423, 170, 'clerical mace')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

___________________________________________________________________________

 

.Um npc que vende munições:

Elane.gif

Elane.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Elane" script="data/npc/scripts/Distance.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="137" head="113" body="101" legs="121" feet="120" 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>

Distance.lua

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({'bow'}, 2456, 400, 'bow')
shopModule:addBuyableItem({'crossbow'}, 2455, 500, 'crossbow')
shopModule:addBuyableItem({'royal spear'}, 7378, 15, 'royal spear')
shopModule:addBuyableItem({'spear'}, 2389, 10, 'spear')
shopModule:addBuyableItem({'arrow'}, 2544, 3, 'arrow')
shopModule:addBuyableItem({'sniper arrow'}, 7364, 5, 'sniper arrow')
shopModule:addBuyableItem({'bolt'}, 2543, 4, 'bolt')
shopModule:addBuyableItem({'earth arrow'}, 7851, 5, 'earth arrow')
shopModule:addBuyableItem({'flaming arrow'}, 7840, 5, 'flaming arrow')
shopModule:addBuyableItem({'flash arrow'}, 7838, 5, 'flash arrow')
shopModule:addBuyableItem({'onyx arrow'}, 7365, 7, 'onyx arrow')
shopModule:addBuyableItem({'power bolt'}, 2547, 7, 'power bolt')
shopModule:addBuyableItem({'throwing star'}, 2399, 42, 'throwing star')
shopModule:addBuyableItem({'shiver arrow'}, 7839, 5, 'shiver arrow')
shopModule:addBuyableItem({'piercing bolt'}, 7362, 5, 'piercing bolt')
shopModule:addBuyableItem({'assassin star'}, 7368, 100, 'assassin star')
shopModule:addBuyableItem({'throwing knife'}, 2410, 25, 'throwing knife')

shopModule:addSellableItem({'bow'}, 2456, 130, 'bow')
shopModule:addSellableItem({'crossbow'}, 2455, 160, 'crossbow')
shopModule:addSellableItem({'spear'}, 2389, 3, 'spear')
shopModule:addSellableItem({'hunting spear'}, 3965, 25, 'hunting spear')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

___________________________________________________________________________

 

.Blessing Seller; Script feito por Ninkobi, Obrigado!

Eremo.gif

Eremo.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Eremo" script="data/npc/scripts/Blessing.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="130" head="0" body="109" legs="128" feet="95" addons="0"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hello |PLAYERNAME]! My name is Eremo and I sells the 5 blessings in a row, when you just say {blessings}." />
	<parameter key="message_farewell" value="Eremo Blessings! |PLAYERNAME|." />
<parameter key="message_walkaway" value="Good bye..." />
</parameters>
</npc>

Blessing.lua

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())

___________________________________________________________________________

 

.Rune Seller; Neste é possivel comprar runas, bp runes e wands/rods.

Frans.gif

Frans.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Frans" script="data/npc/scripts/Runes.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look typeex="2229"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hiah |PLAYERNAME]! My name is Frans, 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

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({'spellbook'}, 2175, 150, 'spellbook')
shopModule:addBuyableItem({'magic lightwand'}, 2163, 400, 'magic lightwand')

shopModule:addBuyableItem({'small health'}, 8704, 20, 'small health potion')
shopModule:addBuyableItem({'health potion'}, 7618, 45, 'health potion')
shopModule:addBuyableItem({'mana potion'}, 7620, 50, 'mana potion')
shopModule:addBuyableItem({'strong health'}, 7588, 100, 'strong health potion')
shopModule:addBuyableItem({'strong mana'}, 7589, 80, 'strong mana potion')
shopModule:addBuyableItem({'great health'}, 7591, 190, 'great health potion')
shopModule:addBuyableItem({'great mana'}, 7590, 120, 'great mana potion')
shopModule:addBuyableItem({'great spirit'}, 8472, 190, 'great spirit potion')
shopModule:addBuyableItem({'ultimate health'}, 8473, 310, 'ultimate health potion')
shopModule:addBuyableItem({'antidote potion'}, 8474, 50, 'antidote potion')

shopModule:addSellableItem({'normal potion flask', 'normal flask'}, 7636, 5, 'empty small potion flask')
shopModule:addSellableItem({'strong potion flask', 'strong flask'}, 7634, 10, 'empty strong potion flask')
shopModule:addSellableItem({'great potion flask', 'great flask'}, 7635, 15, 'empty great potion flask')

shopModule:addBuyableItem({'blank rune'}, 		2260, 10, 'blank rune')
shopModule:addBuyableItem({'animate dead'}, 		2316, 375, 'animate dead rune')
shopModule:addBuyableItem({'antidote'}, 		2266, 65, 'antidote rune')
shopModule:addBuyableItem({'avalanche'}, 		2274, 180, 'avalanche rune')
shopModule:addBuyableItem({'chameleon'}, 		2291, 210, 'chameleon rune')
shopModule:addBuyableItem({'convince creature'}, 	2290, 80, 'convince creature rune')
shopModule:addBuyableItem({'desintegrate'}, 		2310, 80, 'desintegrate rune')
shopModule:addBuyableItem({'destroy field'}, 		2261, 45,  'destroy field')
shopModule:addBuyableItem({'energy bomb'}, 		2262, 325, 'energy bomb rune')
shopModule:addBuyableItem({'energy field'}, 		2277, 115, 'energy field')
shopModule:addBuyableItem({'energy wall'}, 		2279, 340, 'energy wall rune')
shopModule:addBuyableItem({'explosion'}, 		2313, 190, 'explosion rune')
shopModule:addBuyableItem({'fire bomb'}, 		2305, 235, 'fire bomb rune')
shopModule:addBuyableItem({'fire field'}, 		2301, 85,  'fire field rune')
shopModule:addBuyableItem({'fire wall'}, 		2303, 245, 'fire wall rune')
shopModule:addBuyableItem({'fireball'}, 		2302, 150,  'fire ball')
shopModule:addBuyableItem({'great fireball'}, 		2304, 180, 'great fireball rune')
shopModule:addBuyableItem({'heavy magic missile'}, 	2311, 120, 'heavy magic missile rune')
shopModule:addBuyableItem({'icicle'}, 			2271, 150, 'icicle rune')
shopModule:addBuyableItem({'intense healing'}, 		2265, 95, 'intense healing rune')
shopModule:addBuyableItem({'light magic missile'}, 	2287, 40, 'light magic missile rune')
shopModule:addBuyableItem({'magic wall'}, 		2293, 350, 'magic wall rune')
shopModule:addBuyableItem({'paralyze'}, 		2278, 700, 'paralyze rune')
shopModule:addBuyableItem({'poison bomb'}, 		2286, 170, 'poison bomb rune')
shopModule:addBuyableItem({'poison field'}, 		2285, 65,  'poison field')
shopModule:addBuyableItem({'poison wall'}, 		2289, 210, 'poison wall rune')
shopModule:addBuyableItem({'soulfire'}, 		2308, 140, 'soulfire rune')
shopModule:addBuyableItem({'stalagmite'}, 		2292, 120, 'stalagmite rune')
shopModule:addBuyableItem({'stone shower'}, 		2288, 150, 'stoneshower rune')
shopModule:addBuyableItem({'sudden death'}, 		2268, 325, 'sudden death rune')
shopModule:addBuyableItem({'thunderstorm'}, 		2268, 150, 'thunderstorm rune')
shopModule:addBuyableItem({'ultimate healing'}, 	2273, 175, 'ultimate healing rune')
shopModule:addBuyableItem({'wild growth'}, 		2269, 320, 'wild growth rune')

shopModule:addBuyableItemContainer({'bp blank rune'}, 		1988, 2260, 220, 'bp blank rune')

shopModule:addBuyableItemContainer({'bp animate dead'}, 	1998, 2316, 7520, 'bp animate dead rune')
shopModule:addBuyableItemContainer({'bp antidote'}, 		2003, 2266, 1320, 'bp antidote rune')
shopModule:addBuyableItemContainer({'bp avalanche'}, 		2002, 2274, 3620, 'bp avalanche rune')
shopModule:addBuyableItemContainer({'bp chameleon'}, 		1998, 2291, 4220, 'bp chameleon rune')
shopModule:addBuyableItemContainer({'bp convince creature'}, 	1998, 2290, 1620, 'bp convince creature rune')
shopModule:addBuyableItemContainer({'bp desintegrate'}, 	2001, 2310, 1620, 'bp desintegrate rune')
shopModule:addBuyableItemContainer({'bp destroy field'}, 	2003, 2261, 920,  'bp destroy field')
shopModule:addBuyableItemContainer({'bp energy bomb'}, 		2003, 2262, 6520, 'bp energy bomb rune')
shopModule:addBuyableItemContainer({'bp energy field'}, 	1998, 2277, 2320, 'bp energy field')
shopModule:addBuyableItemContainer({'bp energy wall'}, 		2002, 2279, 6820, 'bp energy wall rune')
shopModule:addBuyableItemContainer({'bp explosion'}, 		2001, 2313, 3820, 'bp explosion rune')
shopModule:addBuyableItemContainer({'bp fire bomb'}, 		2000, 2305, 4720, 'bp fire bomb rune')
shopModule:addBuyableItemContainer({'bp fire field'}, 		2000, 2301, 1720,  'bp fire field rune')
shopModule:addBuyableItemContainer({'bp fire wall'}, 		2000, 2303, 4920, 'bp fire wall rune')
shopModule:addBuyableItemContainer({'bp fireball'}, 		2000, 2302, 3020,  'bp fire ball')
shopModule:addBuyableItemContainer({'bp great fireball'}, 	2000, 2304, 3620, 'bp great fireball rune')
shopModule:addBuyableItemContainer({'bp heavy magic missile'}, 	2001, 2311, 2420, 'bp heavy magic missile rune')
shopModule:addBuyableItemContainer({'bp icicle'}, 		2002, 2271, 3020, 'bp icicle rune')
shopModule:addBuyableItemContainer({'bp intense healing'}, 	2003, 2265, 1920, 'bp intense healing rune')
shopModule:addBuyableItemContainer({'bp light magic missile'}, 	1998, 2287, 820, 'bp light magic missile rune')
shopModule:addBuyableItemContainer({'bp magic wall'}, 		1999, 2293, 7020, 'bp magic wall rune')
shopModule:addBuyableItemContainer({'bp paralyze'}, 		2002, 2278, 1420, 'bp paralyze rune')
shopModule:addBuyableItemContainer({'bp poison bomb'}, 		1998, 2286, 3420, 'bp poison bomb rune')
shopModule:addBuyableItemContainer({'bp poison field'}, 	1998, 2285, 1320,  'bp poison field')
shopModule:addBuyableItemContainer({'bp poison wall'}, 		1998, 2289, 4220, 'bp poison wall rune')
shopModule:addBuyableItemContainer({'bp soulfire'}, 		2000, 2308, 2820, 'bp soulfire rune')
shopModule:addBuyableItemContainer({'bp stalagmite'}, 		1998, 2292, 2400, 'bp stalagmite rune')
shopModule:addBuyableItemContainer({'bp stone shower'}, 	1999, 2288, 3020, 'bp stoneshower rune')
shopModule:addBuyableItemContainer({'bp sudden death'}, 	2003, 2268, 6520, 'bp sudden death rune')
shopModule:addBuyableItemContainer({'bp thunderstorm'}, 	1999, 2268, 3020, 'bp thunderstorm rune')
shopModule:addBuyableItemContainer({'bp ultimate healing'}, 	2002, 2273, 3520, 'bp ultimate healing rune')
shopModule:addBuyableItemContainer({'bp wild growth'}, 		2002, 2269, 6420, 'bp wild growth rune')

shopModule:addBuyableItemContainer({'bp health potion'}, 	2000, 7618, 45, 'bp health potion')
shopModule:addBuyableItemContainer({'bp mana potion'}, 		2001, 7620, 50, 'bp mana potion')
shopModule:addBuyableItemContainer({'bp strong health'}, 	2000, 7588, 100, 'bp strong health potion')
shopModule:addBuyableItemContainer({'bp strong mana'}, 		2001, 7589, 80, 'bp strong mana potion')
shopModule:addBuyableItemContainer({'bp great health'}, 	2000, 7591, 190, 'bp great health potion')
shopModule:addBuyableItemContainer({'bp great mana'}, 		2001, 7590, 120, 'bp great mana potion')
shopModule:addBuyableItemContainer({'bp great spirit'}, 	1988, 8472, 190, 'bp great spirit potion')
shopModule:addBuyableItemContainer({'bp ultimate health'}, 	2000, 8473, 310, 'bp ultimate health potion')

shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of vortex')
shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 1000, 'wand of dragonbreath')
shopModule:addBuyableItem({'wand of decay', 'decay'}, 2188, 5000, 'wand of decay')
shopModule:addBuyableItem({'wand of draconia', 'draconia'}, 8921, 7500, 'wand of draconia')
shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 10000, 'wand of cosmic energy')
shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 15000, 'wand of inferno')
shopModule:addBuyableItem({'wand of starstorm', 'starstorm'}, 8920, 18000, 'wand of starstorm')
shopModule:addBuyableItem({'wand of voodoo', 'voodoo'}, 8922, 22000, 'wand of voodoo')

shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 'snakebite rod')
shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 'moonlight rod')
shopModule:addBuyableItem({'necrotic rod', 'necrotic'}, 2185, 5000, 'necrotic rod')
shopModule:addBuyableItem({'northwind rod', 'northwind'}, 8911, 7500, 'northwind rod')
shopModule:addBuyableItem({'terra rod', 'terra'}, 2181, 10000, 'terra rod')
shopModule:addBuyableItem({'hailstorm rod', 'hailstorm'}, 2183, 15000, 'hailstorm rod')
shopModule:addBuyableItem({'springsprout rod', 'springsprout'}, 8912, 18000, 'springsprout rod')
shopModule:addBuyableItem({'underworld rod', 'underworld'}, 8910, 22000,  'underworld rod')

shopModule:addSellableItem({'wand of vortex', 'vortex'}, 2190, 250, 'wand of vortex')
shopModule:addSellableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 500, 'wand of dragonbreath')
shopModule:addSellableItem({'wand of decay', 'decay'}, 2188, 2500, 'wand of decay')
shopModule:addSellableItem({'wand of draconia', 'draconia'}, 8921, 3750, 'wand of draconia')
shopModule:addSellableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 5000, 'wand of cosmic energy')
shopModule:addSellableItem({'wand of inferno', 'inferno'},2187, 7500, 'wand of inferno')
shopModule:addSellableItem({'wand of starstorm', 'starstorm'}, 8920, 9000, 'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo', 'voodoo'}, 8922, 11000, 'wand of voodoo')

shopModule:addSellableItem({'snakebite rod', 'snakebite'}, 2182, 250,'snakebite rod')
shopModule:addSellableItem({'moonlight rod', 'moonlight'}, 2186, 500,   'moonlight rod')
shopModule:addSellableItem({'necrotic rod', 'necrotic'}, 2185, 2500, 'necrotic rod')
shopModule:addSellableItem({'northwind rod', 'northwind'}, 8911, 3750, 'northwind rod')
shopModule:addSellableItem({'terra rod', 'terra'}, 2181, 5000, 'terra rod')
shopModule:addSellableItem({'hailstorm rod', 'hailstorm'}, 2183, 7500, 'hailstorm rod')
shopModule:addSellableItem({'springsprout rod', 'springsprout'}, 8912, 9000, 'springsprout rod')
shopModule:addSellableItem({'underworld rod', 'underworld'}, 8910, 11000, '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

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

___________________________________________________________________________

 

.Este é os djinns do tibia Global reunidos em um npc só:

Nah

Nah'Bob.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Nah'Bob" script="data/npc/scripts/Djinn.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="80" head="20" body="30" legs="40" feet="50" addons="0"/>
<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

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({'beholder shield'}, 2518, 7000, 'beholder shield')
shopModule:addBuyableItem({'noble armor'}, 2486, 8000, 'noble armor')
shopModule:addBuyableItem({'spike sword'}, 2383, 8000, 'spike sword')
shopModule:addBuyableItem({'war hammer'}, 2391, 10000, 'war hammer')

shopModule:addSellableItem({'beholder shield'}, 2518, 1200, 'beholder shield')
shopModule:addSellableItem({'crown shield'}, 2519, 8000, 'crown shield')
shopModule:addSellableItem({'dragon shield'}, 2516, 4000, 'dragon shield')
shopModule:addSellableItem({'guardian shield'}, 2515, 2000, 'guardian shield')
shopModule:addSellableItem({'phoenix shield'}, 2539, 16000, 'phoenix shield')

shopModule:addSellableItem({'blue robe'}, 2656, 10000, 'blue rope')
shopModule:addSellableItem({'crown armor'}, 2487, 12000, 'crown armor')
shopModule:addSellableItem({'noble armor'}, 2486, 900, 'noble armor')

shopModule:addSellableItem({'boots of haste'}, 2195, 30000, 'boots of haste')

shopModule:addSellableItem({'broad sword'}, 2413, 500, 'broad sword')
shopModule:addSellableItem({'dragon lance'}, 2414, 9000, 'dragon lance')
shopModule:addSellableItem({'fire axe'}, 2432, 8000, 'fire axe')
shopModule:addSellableItem({'fire sword'}, 2392, 4000, 'fire sword')
shopModule:addSellableItem({'ice rapier'}, 2396, 1000, 'ice rapier')
shopModule:addSellableItem({'obsidian lance'}, 2425, 500, 'obsidian lance')
shopModule:addSellableItem({'spike sword'}, 2383, 1000, 'spike sword')
shopModule:addSellableItem({'war hammer'}, 2391200, 'war hammer')

shopModule:addSellableItem({'crown helmet'}, 2492500, 'crown helmet')
shopModule:addSellableItem({'crusader helmet'}, 2497, 6000, 'crusader helmet')
shopModule:addSellableItem({'royal helmet'}, 2498, 30000, 'royal helmet')

shopModule:addSellableItem({'crown legs'}, 2488, 12000, 'crown legs')

shopModule:addSellableItem({'earth spike sword'}, 7854, 1000, 'spike sword')
shopModule:addSellableItem({'energy spike sword'}, 7869, 1000, 'spike sword')
shopModule:addSellableItem({'fiery spike sword'}, 7744, 1000, 'spike sword')
shopModule:addSellableItem({'icy spike sword'}, 7763, 1000, 'spike sword')
shopModule:addSellableItem({'earth war hammer'}, 7868, 1200, 'war hammer')
shopModule:addSellableItem({'energy war hammer'}, 7883, 1200, 'war hammer')
shopModule:addSellableItem({'fiery war hammer'}, 7758, 1200, 'war hammer')
shopModule:addSellableItem({'icy war hammer'}, 7777, 1200, 'war hammer')

shopModule:addSellableItem({'wand of vortex'}, 2190, 100, 'wand of vortex')
shopModule:addSellableItem({'wand of dragonbreath'}, 219200, 'wand of dragonbreath')
shopModule:addSellableItem({'wand of decay'}, 2188, 1000, 'wand of decay')
shopModule:addSellableItem({'wand of draconia'}, 8921500, 'wand of draconia')
shopModule:addSellableItem({'wand of cosmic energy'}, 2189, 2000, 'wand of casmic energy')
shopModule:addSellableItem({'wand of inferno'}, 2187, 3000, 'wand of inferno')
shopModule:addSellableItem({'wand of starstorm'}, 8920, 3600, 'wand of starstorm')
shopModule:addSellableItem({'wand of voodoo'}, 8922, 4400, 'wand of voodoo')

shopModule:addSellableItem({'life crystal'}, 2177, 50, 'life crystal')
shopModule:addSellableItem({'magic light wand'}, 2162, 35, 'magic light wand')
shopModule:addSellableItem({'mind stone'}, 2178, 100, 'mind stone')
shopModule:addSellableItem({'orb'}, 2176, 750, 'orb')

shopModule:addBuyableItem({'magic light wand'}, 2162, 120, 'magic light wand')

shopModule:addSellableItem({'dragon hammer'}, 2434, 2000, 'dragon hammer')
shopModule:addSellableItem({'giant sword'}, 2393, 17000, 'giant sword')
shopModule:addSellableItem({'knight axe'}, 2430, 2000, 'knight axe')
shopModule:addSellableItem({'poison dagger'}, 2411, 50, 'poison dagger')
shopModule:addSellableItem({'scimitar'}, 2419, 150, 'scimitar')
shopModule:addSellableItem({'serpent sword'}, 2409, 900, 'serpent sword')
shopModule:addSellableItem({'skull staff'}, 2436, 6000, 'skull staff')

shopModule:addSellableItem({'dark armor'}, 2489, 400, 'dark armor')
shopModule:addSellableItem({'knight armor'}, 2476, 5000, 'knight armor')
shopModule:addSellableItem({'dark helmet'}, 2490, 250, 'dark helmet')
shopModule:addSellableItem({'mystic turban'}, 2663, 150, 'mystic turban')
shopModule:addSellableItem({'strange helmet'}, 2479, 500, 'strange helmet')
shopModule:addSellableItem({'warrior helmet'}, 2475, 5000, 'warrior helmet')

shopModule:addSellableItem({'knight legs'}, 2477, 5000, 'knight legs')

shopModule:addSellableItem({'ancient shield'}, 2532, 900, 'ancient shield')
shopModule:addSellableItem({'black shield'}, 2529, 800, 'black shield')
shopModule:addSellableItem({'tower shield'}, 2528, 8000, 'tower shield')
shopModule:addSellableItem({'vampire shield'}, 2534, 15000, 'vamire shield')

shopModule:addBuyableItem({'ice rapier'}, 2396, 5000, 'ice rapier')
shopModule:addBuyableItem({'serpent sword'}, 2409, 6000, 'serpent sword')
shopModule:addBuyableItem({'dark armor'}, 2489, 1500, 'dark armor')
shopModule:addBuyableItem({'dark helmet'}, 2490, 1000, 'dark helmet')
shopModule:addBuyableItem({'ancient shield'}, 2532, 5000, 'ancient shield')

shopModule:addSellableItem({'snakebite rod'}, 2182, 100, 'snakebite rod')
shopModule:addSellableItem({'moonlight rod'}, 2186, 200, 'moonlight rod')
shopModule:addSellableItem({'necrotic rod'}, 2185, 1000, 'necrotic rod')
shopModule:addSellableItem({'northwind rod'}, 8911, 1500, 'northwind rod')
shopModule:addSellableItem({'terra rod'}, 2181, 2000, 'terra rod')
shopModule:addSellableItem({'hailstorm rod'}, 2183, 3000, 'hailstorm rod')
shopModule:addSellableItem({'springsprout rod'}, 8912, 3600, 'springsprout rod')
shopModule:addSellableItem({'underworld rod'}, 8910, 4400, 'underworld rod')

shopModule:addSellableItem({'ankh'}, 2193, 100, 'ankh')
shopModule:addSellableItem({'mysterious fetish'}, 2194, 50, 'mysterious fetish')


npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

___________________________________________________________________________

 

.Jewelry Seller; Nesta npc é possivel vender jóias:

Chantalle.gif

Chantalle.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Chantalle" script="data/npc/scripts/Jewelry.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="140" head="79" body="34" legs="56" feet="111" addons="1"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Hi my name is Chantalle, |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

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:addSellableItem({'white pearl'}, 2143, 160, 'white pearl')
shopModule:addSellableItem({'black pearl'}, 2144, 280, 'black pearl')
shopModule:addSellableItem({'small diamond'}, 2145, 300, 'small diamond')
shopModule:addSellableItem({'small sapphire'}, 2146, 250, 'small sapphire')
shopModule:addSellableItem({'small ruby'}, 2147, 250, 'small ruby')
shopModule:addSellableItem({'small emerald'}, 2149, 250, 'small emerald')
shopModule:addSellableItem({'small amethyst'}, 2150, 200, 'small amethyst')
shopModule:addSellableItem({'talon'}, 2151, 320, 'talon')

shopModule:addBuyableItem({'white pearl'}, 2143, 320, 'white pearl')
shopModule:addBuyableItem({'black pearl'}, 2144, 560, 'black pearl')
shopModule:addBuyableItem({'small diamond'}, 2145, 600, 'small diamond')
shopModule:addBuyableItem({'small sapphire'}, 2146, 500, 'small sapphire')
shopModule:addBuyableItem({'small ruby'}, 2147, 500, 'small ruby')
shopModule:addBuyableItem({'small emerald'}, 2149, 500, 'small emerald')
shopModule:addBuyableItem({'small amethyst'}, 2150, 400, 'small amethyst')

shopModule:addBuyableItem({'bronze goblet'}, 5807, 2000, 'bronze goblet')
shopModule:addBuyableItem({'silver goblet'}, 5806, 3000, 'silver goblet')
shopModule:addBuyableItem({'golden goblet'}, 5805, 5000, 'golden goblet')

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

___________________________________________________________________________

 

.Necklaces Seller; Nesta npc é possivel comprar amulets:

Billy.gif

Billy.xml

<?xml version="1.0" encoding="UTF-8"?>
<npc name="Billy" script="data/npc/scripts/necklaces.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="153" head="97" body="121" legs="97" feet="115" addons="1"/>
<parameters>
<parameter key="module_shop" value="3" />
<parameter key="message_greet" value="Welcome |PLAYERNAME]! My name is Billy. 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

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({'amulet of loss'}, 2173, 50000, 'amulet of loss')
shopModule:addBuyableItem({'protection amulet'}, 2200, 700, 'protection amulet')
shopModule:addBuyableItem({'ruby necklace'}, 2133, 3560, 'ruby necklace')
shopModule:addBuyableItem({'dragon necklace'}, 2201, 1000, 'dragon necklace')
shopModule:addBuyableItem({'garlic necklace'}, 2199, 100, 'garlic necklace')
shopModule:addBuyableItem({'golden amulet'}, 2130, 6600, 'golden amulet')
shopModule:addBuyableItem({'scarf'}, 2661, 15, 'scarf')
shopModule:addBuyableItem({'bronze amulet'}, 2172, 100, 'bronze amulet')
shopModule:addBuyableItem({'elven amulet'}, 2198, 500, 'elven amulet')
shopModule:addBuyableItem({'protection amulet'}, 2200, 700, 'protection amulet')
shopModule:addBuyableItem({'silver amulet'}, 2198, 100, 'silver amulet')
shopModule:addBuyableItem({'strange talisman'}, 2161, 100, 'strange talisman')

shopModule:addSellableItem({'crystal necklace'}, 2123, 400, 'crystal necklace')
shopModule:addSellableItem({'ruby necklace'}, 2133, 2000, 'ruby necklace')
shopModule:addSellableItem({'dragon necklace'}, 2201, 100, 'dragon necklace')
shopModule:addSellableItem({'garlic necklace'}, 2199, 50, 'garlic necklace')
shopModule:addSellableItem({'ancient amulet'}, 2142, 200, 'ancient amulet')
shopModule:addSellableItem({'demonbone amulet'}, 2136, 32000, 'demonbone amulet')
shopModule:addSellableItem({'scarab amulet'}, 2135, 200, 'scarab amulet')
shopModule:addSellableItem({'bronze amulet'}, 2172, 50, 'bronze amulet')
shopModule:addSellableItem({'elven amulet'}, 2198, 100, 'elven amulet')
shopModule:addSellableItem({'glacier amulet'}, 7888, 1500, 'glacier amulet')
shopModule:addSellableItem({'protection amulet'}, 2200, 100, 'protection amulet')
shopModule:addSellableItem({'silver amulet'}, 2170, 50, 'silver amulet')
shopModule:addSellableItem({'strange talisman'}, 2161, 30, 'strange talisman')


npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

 

Atenção! Eu não pude testa-los ainda! Eu farei isto quando meu OT estiver rodando, mas esses Npcs são basicos e acredito que funcionarão perfeitamente. Eles poder ser muito bem copiados, os npcs podem ser colacados em seu server junto aos npcs basicos. Espero que gostem!

Eles podem ser melhorados assim que me repassarem os bugs. Em poucos dias estarei hostiando meu server, e você podera testar os npcs ;).

 

 

Eu desejo-lhes uma boa sorte com os npcs!

 

 

 

Assim que novos npcs forem adicionados no tópico original eu vou atualizando para vocês! Agradeço a atenção...

Bom Proveito!!!

npc.rar

Editado por Albert José
Link para o comentário
Compartilhar em outros sites

Galera no pack contem o Npc que faz addons através de itens é que infelizmente

ele é tão grande que o spoiler e o codebox não o suportaram!!!

@UP: Você foi rapido em aeuheua! Fico feliz em ter ajudado.

 

Reservado para futuros Npcs!

Editado por Albert José
Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

Bom Albert José

 

Seus npc's verdadeiramente são perfeitos...Mais so tem um poblema quando o player vai fazer o addon Yalaharian...O player da pra comprar os dois =/ que fica meio feio e chato.

 

use isso

 

local outfit_node = keywordHandler:addKeyword({'first yalaharian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 1, storageID = 10041})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

local outfit_node = keywordHandler:addKeyword({'second yalaharian addon'}, playerBuyAddonNPC, {premium = true, cost = 0, items = {{9955,1}}, outfit_female = 324, outfit_male = 325, addon = 2, storageID = 10041})

outfit_node:addChildKeywordNode(yesNode)

outfit_node:addChildKeywordNode(noNode)

 

Ambos StorageID iguais pois dara para fazer apenas 1 dos addon :positive:

 

 

Abraço espero que ajuda...Ah não quero criticar seu trabalho apenas quero ajudar :smile_positivo:

 

Espero que ajude.

 

Edited

________________________________________________________________________________

_________________

PS: Albelt...não sei se este é o lugar adequadro...mais, eu queria saber se você consegueria fazer um npc que em vez de fazer addon's, fazer outfit seria massa, aposto que você ajudaria não sou eu mais uma grande quantidade do pessoal...

Editado por PsyMagic
Link para o comentário
Compartilhar em outros sites

Bom Albert José

 

Seus npc's verdadeiramente são perfeitos...Mais so tem um poblema quando o player vai fazer o addon Yalaharian...O player da pra comprar os dois =/ que fica meio feio e chato.

 

use isso

 

 

 

Ambos StorageID iguais pois dara para fazer apenas 1 dos addon :positive:

 

 

Abraço espero que ajuda...Ah não quero criticar seu trabalho apenas quero ajudar :smile_positivo:

 

Espero que ajude.

 

 

PS: Arbelt...não sei se este é o lugar adequadro...mais, eu queria saber se você consegueria fazer um npc que em vez de fazer addon's, fazer outfit seria massa, aposto que você ajudaria não sou eu mais uma grande quantidade do pessoal...

/\ Meu nome ta errado auheauhea é Albert

 

Opa eu ja tinha visto esse erro e ele ja foi concertado e sera lançado junto com os novos npcs! Obrigado por reportar ;]

 

Esse lance de fazer um Npc que de outfits para os players é meio complicado porque em todos ots eles ja vem todos adicionados aos players e seria preciso fazer um recompilação no distro!

Caso você se interesse meu amigo tib4e postou como fazer isto e você pode conferir no seguinte post:

Click aqui

 

Espero ter ajudado... E obrigado por comentar!

Editado por Albert José
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...