Ir para conteúdo

Npc Encantando Armas


Posts Recomendados

[NPC] Isto encanta todos os 8,1 armas para você, 1 npc cada elemento

 

Esta thread conteúdos 4 npc's [4 lua arquivos, 4 xml]

Estes npc's encanta armas para você, cada npc para cada elemento [fogo, gelo, natureza, a energia]

 

encantararmarszd2.jpg

 

Lembre-se que isto só "encanta as armas" Isto significa que encantou dosn't armas irá subitamente trabalho para adicionar esses npc's você tem que ler outros manuais para saber como corrigir encantou armas, este é apenas um npc que encanta-lo para você.

Primeiros passos:

Adicionar esta a data / npc

enchantfire.xml

 

<?xml version="1.0"?>

<npc name="Ruth Exuro" script="data/npc/scripts/firee.lua" access="5" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="143" head="94" body="114" legs="79" feet="79" addons="3" />
</npc>

 

 

--------------------------

 

Acrescentar também esta a data / npc

enchantice.xml

 

<?xml version="1.0"?>

<npc name="Glacies Tempestas" script="data/npc/scripts/icee.lua" access="5" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="251" head="0" body="85" legs="105" feet="85" addons="3" />
</npc>

 

-------------------

Acrescentar também esta a data / npc

enchantnature.xml

 

<?xml version="1.0"?>

<npc name="Torva Gero" script="data/npc/scripts/naturee.lua" access="5" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="144" head="0" body="78" legs="75" feet="97" addons="3" />
</npc>

 

---------------------

 

Acrescentar também esta a data / npc

enchantenergy.xml

 

<?xml version="1.0"?>

<npc name="Desumo Navitas" script="data/npc/scripts/energye.lua" access="5" lookdir="2" autowalk="25">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="133" head="57" body="79" legs="110" feet="91" addons="1" />
</npc>

----------------------------

 

Agora entra dados / npc / scripts e adicionar

 

firee.lua

Código:

 

--- ------------------------------------------------------ ---
--- Inspired by stix360's npc trade item for item example. ---
--- ------------------------------------------------------ ---
--- -------------- Bugfixed by ----> Nahruto <---- ------- ---
--- ------------------------------------------------------ ---
--- -- The shit job was done by me, Luxitur, Znote[NOR] -- ---
--- ----------- The hoster of Znote & WooTserv  ---------- ---
--- ------------------------------------------------------ ---
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
  if focus == cid then
	  selfSay('Good bye then.')
	  focus = 0
	  talk_start = 0
  end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
  return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
  msg = string.lower(msg)

  if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
	  selfSay('Hello, I can enchant some weapons with my fire enchant technique, just say enchant if youre intrested.')
	  focus = cid
	  talk_start = os.clock()

  elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
	  selfSay('Sorry, ill talk you in a minute.')

elseif focus == cid then
	talk_start = os.clock()

	if msgcontains(msg, 'enchant') then
		selfSay('What weapon do you want to enchant to the fire version?')
		talk_state = 1


	elseif talk_state == 1 then
	if msgcontains(msg, 'spike sword') then
	plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
	ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
	weap = getPlayerItemCount(cid,2383) --- spike sword
		if plats >= 60 and ing >= 5 and weap >= 1 then
			doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
			doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
			doPlayerRemoveItem(cid,2383,1) --- spike sword
			selfSay('Enchantmenth completed, here is your weapon.')
			doPlayerAddItem(cid,7744) --- Spike sword with fire enchant
		else
			selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the spike sword, or else i cant enchant the weapon for you.')
		end
		elseif talk_state == 1 then
		if msgcontains(msg, 'barbarian axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,2429) --- barbarian axe
			if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,2429,1) --- barbarian axe
				selfSay('Enchantmenth completed, here is your weapon.')
				doPlayerAddItem(cid,7749) --- barbarian axe with fire enchant
			else
				selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the barbarian axe, or else i cant enchant the weapon for you.')
			end
		elseif talk_state == 1 then
 if msgcontains(msg, 'relic sword') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,7383) --- weapon
									if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,7383,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7745) --- fire enchanted weapon
					 else
					 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the relic sword, or else i cant enchant the weapon for you.')
					 end
		elseif talk_state == 1 then
 if msgcontains(msg, 'blacksteel sword') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,7406) --- weapon
					  if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,7406,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7747) --- fire enchanted weapon
						 else
					 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the blacksteel sword, or else i cant enchant the weapon for you.')
						  end
									  elseif talk_state == 1 then
 if msgcontains(msg, 'dragon slayer') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,7402) --- weapon
					   if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,7402,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7748) --- fire enchanted weapon
						 else
					 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the dragon slayer, or else i cant enchant the weapon for you.')
						 end
						 			elseif talk_state == 1 then
 if msgcontains(msg, 'mystic blade') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,7384) --- weapon
							 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,7384,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7746) --- fire enchanted weapon
					 else
					 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the mystic blade, or else i cant enchant the weapon for you.')
					 end
					 			elseif talk_state == 1 then
 if msgcontains(msg, 'knight axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,2430) --- weapon
								   if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,2430,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7750) --- fire enchanted weapon
		   					   else
					 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the knight axe, or else i cant enchant the weapon for you.')
							end
										elseif talk_state == 1 then
 if msgcontains(msg, 'heroic axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,7389) --- weapon
						 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,7389,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7751) --- fire enchanted weapon
						   else
					 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the heroic axe, or else i cant enchant the weapon for you.')
						   end
						   			elseif talk_state == 1 then
 if msgcontains(msg, 'headchopper') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,7380) --- weapon
							   if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,7380,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7752) --- fire enchanted weapon
							else
	 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the headchopper, or else i cant enchant the weapon for you.')
							end
										elseif talk_state == 1 then
 if msgcontains(msg, 'war axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,2454) --- weapon
									 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,2454,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7753) --- fire enchanted weapon
						 	else
	 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the war axe, or else i cant enchant the weapon for you.')
						  end
									  elseif talk_state == 1 then
 if msgcontains(msg, 'clerical mace') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,2423) --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,2423,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7754) --- fire enchanted weapon
			   else
	 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the clerical mace, or else i cant enchant the weapon for you.')
				end
							elseif talk_state == 1 then
 if msgcontains(msg, 'crystal mace') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,2445)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,2445,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7755) --- fire enchanted weapon
				 else
	 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the crystal mace, or else i cant enchant the weapon for you.')
				end
							elseif talk_state == 1 then
 if msgcontains(msg, 'cranial basher') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,7415)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,7415,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7756) --- fire enchanted weapon
			 	else
	 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the cranial basher, or else i cant enchant the weapon for you.')
				end
							elseif talk_state == 1 then
 if msgcontains(msg, 'orcish maul') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,7392)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,7392,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7757) --- fire enchanted weapon
			   else
	 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the orcish maul, or else i cant enchant the weapon for you.')
				end
							elseif talk_state == 1 then
 if msgcontains(msg, 'war hammer') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,2391)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,2391,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7758) --- fire enchanted weapon
				else
	 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the war hammer, or else i cant enchant the weapon for you.')
				end
							elseif talk_state == 1 then
 if msgcontains(msg, 'arrow') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2795) --- 5 fire mushrooms
		  weap = getPlayerItemCount(cid,2544)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 100 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2795,5) --- 5 fire mushrooms
				doPlayerRemoveItem(cid,2544,100) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7840,100) --- fire enchanted weapon
			  else
	 selfSay('I need 60 platinum coins, 5 fire mushrooms and borrow the arrow, or else i cant enchant the weapon for you.')
				end
				end

	elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
		selfSay('Goodbye!')
		focus = 0
		talk_start = 0
	end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end

function onCreatureChangeOutfit(creature)
end

function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
	  if focus > 0 then
		  selfSay('Next Please...')
	  end
		  focus = 0
  end
	if focus ~= 0 then
		if getDistanceToCreature(focus) > 5 then
			selfSay('Good bye then.')
			focus = 0
		end
	end
end

---------------------------

 

 

Agora entra dados / npc / scripts e adicionar

icee.lua

 

--- ------------------------------------------------------ ---
--- Inspired by stix360's npc trade item for item example. ---
--- ------------------------------------------------------ ---
--- -------------- Bugfixed by ----> Nahruto <---- ------- ---
--- ------------------------------------------------------ ---
--- -- The shit job was done by me, Luxitur, Znote[NOR] -- ---
--- ----------- The hoster of Znote & WooTserv  ---------- ---
--- ------------------------------------------------------ ---
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
  if focus == cid then
	  selfSay('Good bye then.')
	  focus = 0
	  talk_start = 0
  end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
  return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
  msg = string.lower(msg)

  if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
	  selfSay('Hello, I can enchant some weapons with my ice enchant technique, just say enchant if youre intrested.')
	  focus = cid
	  talk_start = os.clock()

  elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
	  selfSay('Sorry, ill talk you in a minute.')

elseif focus == cid then
	talk_start = os.clock()

	if msgcontains(msg, 'enchant') then
		selfSay('What weapon do you want to enchant to the ice version?')
		talk_state = 1


	elseif talk_state == 1 then
	if msgcontains(msg, 'spike sword') then
	plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
	ing = getPlayerItemCount(cid,7290) --- 5 ice shards
	weap = getPlayerItemCount(cid,2383) --- spike sword
		if plats >= 60 and ing >= 5 and weap >= 1 then
			doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
			doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
			doPlayerRemoveItem(cid,2383,1) --- spike sword
			selfSay('Enchantmenth completed, here is your weapon.')
			doPlayerAddItem(cid,7763) --- Spike sword with ice enchant
		else
			selfSay('I need 60 platinum coins, 5 ice shards and borrow the spike sword, or else i cant enchant the weapon for you.')
		end
		elseif talk_state == 1 then
		if msgcontains(msg, 'barbarian axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,2429) --- barbarian axe
			if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,2429,1) --- barbarian axe
				selfSay('Enchantmenth completed, here is your weapon.')
				doPlayerAddItem(cid,7768) --- barbarian axe with ice enchant
			else
				selfSay('I need 60 platinum coins, 5 ice shards and borrow the barbarian axe, or else i cant enchant the weapon for you.')
			end
			elseif talk_state == 1 then
 if msgcontains(msg, 'relic sword') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,7383) --- weapon
									if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,7383,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7764) --- ice enchanted weapon
					 else
					 selfSay('I need 60 platinum coins, 5 ice shards and borrow the relic sword, or else i cant enchant the weapon for you.')
					 end
					 elseif talk_state == 1 then
 if msgcontains(msg, 'blacksteel sword') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,7406) --- weapon
					  if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,7406,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7766) --- ice enchanted weapon
						 else
					 selfSay('I need 60 platinum coins, 5 ice shards and borrow the blacksteel sword, or else i cant enchant the weapon for you.')
						  end
						  elseif talk_state == 1 then
 if msgcontains(msg, 'dragon slayer') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,7402) --- weapon
					   if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,7402,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7767) --- ice enchanted weapon
						 else
					 selfSay('I need 60 platinum coins, 5 ice shards and borrow the dragon slayer, or else i cant enchant the weapon for you.')
						 end
						 elseif talk_state == 1 then
 if msgcontains(msg, 'mystic blade') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,7384) --- weapon
							 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,7384,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7765) --- ice enchanted weapon
					 else
					 selfSay('I need 60 platinum coins, 5 ice shards and borrow the mystic blade, or else i cant enchant the weapon for you.')
					 end
					 elseif talk_state == 1 then
 if msgcontains(msg, 'knight axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,2430) --- weapon
								   if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,2430,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7769) --- ice enchanted weapon
		   					   else
					 selfSay('I need 60 platinum coins, 5 ice shards and borrow the knight axe, or else i cant enchant the weapon for you.')
							end
							elseif talk_state == 1 then
 if msgcontains(msg, 'heroic axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,7389) --- weapon
						 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,7389,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7770) --- ice enchanted weapon
						   else
					 selfSay('I need 60 platinum coins, 5 ice shards and borrow the heroic axe, or else i cant enchant the weapon for you.')
						   end
						   elseif talk_state == 1 then
 if msgcontains(msg, 'headchopper') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,7380) --- weapon
							   if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,7380,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7771) --- ice enchanted weapon
							else
	 selfSay('I need 60 platinum coins, 5 ice shards and borrow the headchopper, or else i cant enchant the weapon for you.')
							end
							elseif talk_state == 1 then
 if msgcontains(msg, 'war axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,2454) --- weapon
									 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,2454,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7772) --- ice enchanted weapon
						 	else
	 selfSay('I need 60 platinum coins, 5 ice shards and borrow the war axe, or else i cant enchant the weapon for you.')
						  end
						  elseif talk_state == 1 then
 if msgcontains(msg, 'clerical mace') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,2423) --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,2423,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7773) --- ice enchanted weapon
			   else
	 selfSay('I need 60 platinum coins, 5 ice shards and borrow the clerical mace, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'crystal mace') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,2445)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,2445,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7774) --- ice enchanted weapon
				 else
	 selfSay('I need 60 platinum coins, 5 ice shards and borrow the crystal mace, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'cranial basher') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,7415)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,7415,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7775) --- ice enchanted weapon
			 	else
	 selfSay('I need 60 platinum coins, 5 ice shards and borrow the cranial basher, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'orcish maul') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,7392)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,7392,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7776) --- ice enchanted weapon
			   else
	 selfSay('I need 60 platinum coins, 5 ice shards and borrow the orcish maul, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'war hammer') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,2391)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,2391,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7777) --- ice enchanted weapon
				else
	 selfSay('I need 60 platinum coins, 5 ice shards and borrow the war hammer, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'arrow') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,7290) --- 5 ice shards
		  weap = getPlayerItemCount(cid,2544)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 100 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,7290,5) --- 5 ice shards
				doPlayerRemoveItem(cid,2544,100) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7839,100) --- ice enchanted weapon
			  else
	 selfSay('I need 60 platinum coins, 5 ice shards and borrow the arrow, or else i cant enchant the weapon for you.')
				end
				end

	elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
		selfSay('Goodbye!')
		focus = 0
		talk_start = 0
	end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end

function onCreatureChangeOutfit(creature)
end

function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
	  if focus > 0 then
		  selfSay('Next Please...')
	  end
		  focus = 0
  end
	if focus ~= 0 then
		if getDistanceToCreature(focus) > 5 then
			selfSay('Good bye then.')
			focus = 0
		end
	end
end

 

 

---------------------------------------------------------

 

Acrescentar também esta a data / npc / scripts

naturee.lua

 

--- ------------------------------------------------------ ---
--- Inspired by stix360's npc trade item for item example. ---
--- ------------------------------------------------------ ---
--- -------------- Bugfixed by ----> Nahruto <---- ------- ---
--- ------------------------------------------------------ ---
--- -- The shit job was done by me, Luxitur, Znote[NOR] -- ---
--- ----------- The hoster of Znote & WooTserv  ---------- ---
--- ------------------------------------------------------ ---
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
  if focus == cid then
	  selfSay('Good bye then.')
	  focus = 0
	  talk_start = 0
  end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
  return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
  msg = string.lower(msg)

  if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
	  selfSay('Hello, I can enchant some weapons with my nature enchant technique, just say enchant if youre intrested.')
	  focus = cid
	  talk_start = os.clock()

  elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
	  selfSay('Sorry, ill talk you in a minute.')

elseif focus == cid then
	talk_start = os.clock()

	if msgcontains(msg, 'enchant') then
		selfSay('What weapon do you want to enchant to the nature version?')
		talk_state = 1


	elseif talk_state == 1 then
	if msgcontains(msg, 'spike sword') then
	plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
	ing = getPlayerItemCount(cid,4850) ---  1 hydra egg
	weap = getPlayerItemCount(cid,2383) --- spike sword
		if plats >= 60 and ing >= 1 and weap >= 1 then
			doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
			doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
			doPlayerRemoveItem(cid,2383,1) --- spike sword
			selfSay('Enchantmenth completed, here is your weapon.')
			doPlayerAddItem(cid,7854) --- Spike sword with nature enchant
		else
			selfSay('I need 60 platinum coins, a hydra egg and borrow the spike sword, or else i cant enchant the weapon for you.')
		end
		elseif talk_state == 1 then
		if msgcontains(msg, 'barbarian axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,2429) --- barbarian axe
			if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,2429,1) --- barbarian axe
				selfSay('Enchantmenth completed, here is your weapon.')
				doPlayerAddItem(cid,7859) --- barbarian axe with nature enchant
			else
				selfSay('I need 60 platinum coins, a hydra egg and borrow the barbarian axe, or else i cant enchant the weapon for you.')
			end
			elseif talk_state == 1 then
 if msgcontains(msg, 'relic sword') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,7383) --- weapon
									if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,7383,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7855) --- nature enchanted weapon
					 else
					 selfSay('I need 60 platinum coins, a hydra egg and borrow the relic sword, or else i cant enchant the weapon for you.')
					 end
					 elseif talk_state == 1 then
 if msgcontains(msg, 'blacksteel sword') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,7406) --- weapon
					  if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,7406,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7857) --- nature enchanted weapon
						 else
					 selfSay('I need 60 platinum coins, a hydra egg and borrow the blacksteel sword, or else i cant enchant the weapon for you.')
						  end
						  elseif talk_state == 1 then
 if msgcontains(msg, 'dragon slayer') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,7402) --- weapon
					   if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,7402,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7858) --- nature enchanted weapon
						 else
					 selfSay('I need 60 platinum coins, a hydra egg and borrow the dragon slayer, or else i cant enchant the weapon for you.')
						 end
						 elseif talk_state == 1 then
 if msgcontains(msg, 'mystic blade') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,7384) --- weapon
							 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,7384,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7856) --- nature enchanted weapon
					 else
					 selfSay('I need 60 platinum coins, a hydra egg and borrow the mystic blade, or else i cant enchant the weapon for you.')
					 end
					 elseif talk_state == 1 then
 if msgcontains(msg, 'knight axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,2430) --- weapon
								   if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,2430,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7860) --- nature enchanted weapon
		   					   else
					 selfSay('I need 60 platinum coins, a hydra egg and borrow the knight axe, or else i cant enchant the weapon for you.')
							end
							elseif talk_state == 1 then
 if msgcontains(msg, 'heroic axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,7389) --- weapon
						 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,7389,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7861) --- nature enchanted weapon
						   else
					 selfSay('I need 60 platinum coins, a hydra egg and borrow the heroic axe, or else i cant enchant the weapon for you.')
						   end
						   elseif talk_state == 1 then
 if msgcontains(msg, 'headchopper') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,7380) --- weapon
							   if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,7380,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7862) --- nature enchanted weapon
							else
	 selfSay('I need 60 platinum coins, a hydra egg and borrow the headchopper, or else i cant enchant the weapon for you.')
							end
							elseif talk_state == 1 then
 if msgcontains(msg, 'war axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,2454) --- weapon
									 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,2454,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7863) --- nature enchanted weapon
						 	else
	 selfSay('I need 60 platinum coins, a hydra egg and borrow the war axe, or else i cant enchant the weapon for you.')
						  end
						  elseif talk_state == 1 then
 if msgcontains(msg, 'clerical mace') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,2423) --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,2423,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7864) --- nature enchanted weapon
			   else
	 selfSay('I need 60 platinum coins, a hydra egg and borrow the clerical mace, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'crystal mace') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,2445)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,2445,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7865) --- nature enchanted weapon
				 else
	 selfSay('I need 60 platinum coins, a hydra egg and borrow the crystal mace, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'cranial basher') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,7415)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,7415,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7866) --- nature enchanted weapon
			 	else
	 selfSay('I need 60 platinum coins, a hydra egg and borrow the cranial basher, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'orcish maul') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,7392)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,7392,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7867) --- nature enchanted weapon
			   else
	 selfSay('I need 60 platinum coins, a hydra egg and borrow the orcish maul, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'war hammer') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,2391)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,2391,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7868) --- nature enchanted weapon
				else
	 selfSay('I need 60 platinum coins, a hydra egg and borrow the war hammer, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'arrow') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,4850) --- 1 hydra egg
		  weap = getPlayerItemCount(cid,2544)  --- weapon
					 if plats >= 60 and ing >= 5 and weap >= 100 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,4850,1) --- 1 hydra egg
				doPlayerRemoveItem(cid,2544,100) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7850,100) --- nature enchanted weapon
			  else
	 selfSay('I need 60 platinum coins, a hydra egg and borrow the arrow, or else i cant enchant the weapon for you.')
				end

	elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
		selfSay('Goodbye!')
		focus = 0
		talk_start = 0
	end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end

function onCreatureChangeOutfit(creature)
end

function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
	  if focus > 0 then
		  selfSay('Next Please...')
	  end
		  focus = 0
  end
	if focus ~= 0 then
		if getDistanceToCreature(focus) > 5 then
			selfSay('Good bye then.')
			focus = 0
		end
	end
end

-----------------------------

 

Acrescentar também esta a data / npc / scripts

energye.lua

 

--- ------------------------------------------------------ ---
--- Inspired by stix360's npc trade item for item example. ---
--- ------------------------------------------------------ ---
--- -------------- Bugfixed by ----> Nahruto <---- ------- ---
--- ------------------------------------------------------ ---
--- -- The shit job was done by me, Luxitur, Znote[NOR] -- ---
--- ----------- The hoster of Znote & WooTserv  ---------- ---
--- ------------------------------------------------------ ---
local focus = 0
local talk_start = 0
local target = 0
local following = false
local attacking = false

function onThingMove(creature, thing, oldpos, oldstackpos)
end
function onCreatureAppear(creature)
end
function onCreatureDisappear(cid, pos)
  if focus == cid then
	  selfSay('Good bye then.')
	  focus = 0
	  talk_start = 0
  end
end
function onCreatureTurn(creature)
end
function msgcontains(txt, str)
  return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))
end

function onCreatureSay(cid, type, msg)
  msg = string.lower(msg)

  if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
	  selfSay('Hello, I can enchant some weapons with my energy enchant technique, just say enchant if youre intrested.')
	  focus = cid
	  talk_start = os.clock()

  elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
	  selfSay('Sorry, ill talk you in a minute.')

elseif focus == cid then
	talk_start = os.clock()

	if msgcontains(msg, 'enchant') then
		selfSay('What weapon do you want to enchant to the energy version?')
		talk_state = 1


	elseif talk_state == 1 then
	if msgcontains(msg, 'spike sword') then
	plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
	ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
	weap = getPlayerItemCount(cid,2383) --- spike sword
		if plats >= 60 and ing >= 1 and weap >= 1 then
			doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
			doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
			doPlayerRemoveItem(cid,2383,1) --- spike sword
			selfSay('Enchantmenth completed, here is your weapon.')
			doPlayerAddItem(cid,7869) --- Spike sword with energy enchant
		else
			selfSay('I need 60 platinum coins, a crystal ring and borrow the spike sword, or else i cant enchant the weapon for you.')
		end
		elseif talk_state == 1 then
		if msgcontains(msg, 'barbarian axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,2429) --- barbarian axe
			if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,2429,1) --- barbarian axe
				selfSay('Enchantmenth completed, here is your weapon.')
				doPlayerAddItem(cid,7874) --- barbarian axe with energy enchant
			else
				selfSay('I need 60 platinum coins, a crystal ring and borrow the barbarian axe, or else i cant enchant the weapon for you.')
			end
			elseif talk_state == 1 then
 if msgcontains(msg, 'relic sword') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,7383) --- weapon
									if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,7383,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7870) --- energy enchanted weapon
					 else
					 selfSay('I need 60 platinum coins, a crystal ring and borrow the relic sword, or else i cant enchant the weapon for you.')
					 end
					 elseif talk_state == 1 then
 if msgcontains(msg, 'blacksteel sword') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,7406) --- weapon
					  if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,7406,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7872) --- energy enchanted weapon
						 else
					 selfSay('I need 60 platinum coins, a crystal ring and borrow the blacksteel sword, or else i cant enchant the weapon for you.')
						  end
						  elseif talk_state == 1 then
 if msgcontains(msg, 'dragon slayer') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,7402) --- weapon
					   if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,7402,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7873) --- energy enchanted weapon
						 else
					 selfSay('I need 60 platinum coins, a crystal ring and borrow the dragon slayer, or else i cant enchant the weapon for you.')
						 end
						 elseif talk_state == 1 then
 if msgcontains(msg, 'mystic blade') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,7384) --- weapon
							 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,7384,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7871) --- energy enchanted weapon
					 else
					 selfSay('I need 60 platinum coins, a crystal ring and borrow the mystic blade, or else i cant enchant the weapon for you.')
					 end
					 elseif talk_state == 1 then
 if msgcontains(msg, 'knight axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,2430) --- weapon
								   if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,2430,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7875) --- energy enchanted weapon
		   					   else
					 selfSay('I need 60 platinum coins, a crystal ring and borrow the knight axe, or else i cant enchant the weapon for you.')
							end
							elseif talk_state == 1 then
 if msgcontains(msg, 'heroic axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,7389) --- weapon
						 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,7389,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7876) --- energy enchanted weapon
						   else
					 selfSay('I need 60 platinum coins, a crystal ring and borrow the heroic axe, or else i cant enchant the weapon for you.')
						   end
						   elseif talk_state == 1 then
 if msgcontains(msg, 'headchopper') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,7380) --- weapon
							   if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,7380,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7877) --- energy enchanted weapon
							else
	 selfSay('I need 60 platinum coins, a crystal ring and borrow the headchopper, or else i cant enchant the weapon for you.')
							end
							elseif talk_state == 1 then
 if msgcontains(msg, 'war axe') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,2454) --- weapon
									 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,2454,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7878) --- energy enchanted weapon
						 	else
	 selfSay('I need 60 platinum coins, a crystal ring and borrow the war axe, or else i cant enchant the weapon for you.')
						  end
						  elseif talk_state == 1 then
 if msgcontains(msg, 'clerical mace') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,2423) --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,2423,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7879) --- energy enchanted weapon
			   else
	 selfSay('I need 60 platinum coins, a crystal ring and borrow the clerical mace, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'crystal mace') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,2445)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,2445,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7880) --- energy enchanted weapon
				 else
	 selfSay('I need 60 platinum coins, a crystal ring and borrow the crystal mace, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'cranial basher') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,7415)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,7415,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7881) --- energy enchanted weapon
			 	else
	 selfSay('I need 60 platinum coins, a crystal ring and borrow the cranial basher, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'orcish maul') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,7392)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,7392,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7882) --- energy enchanted weapon
			   else
	 selfSay('I need 60 platinum coins, a crystal ring and borrow the orcish maul, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'war hammer') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,2391)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 1 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,2391,1) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7883) --- energy enchanted weapon
				else
	 selfSay('I need 60 platinum coins, a crystal ring and borrow the war hammer, or else i cant enchant the weapon for you.')
				end
				elseif talk_state == 1 then
 if msgcontains(msg, 'arrow') then
		  plats = getPlayerItemCount(cid,2152) --- 60 platinum coins
		  ing = getPlayerItemCount(cid,2124) --- 1 crystal ring
		  weap = getPlayerItemCount(cid,2544)  --- weapon
					 if plats >= 60 and ing >= 1 and weap >= 100 then
				doPlayerRemoveItem(cid,2152,60) --- 60 platinum coins
				doPlayerRemoveItem(cid,2124,1) --- 1 crystal ring
				doPlayerRemoveItem(cid,2544,100) --- weapon
						  selfSay('Enchantmenth completed, here is your weapon.')
						  doPlayerAddItem(cid,7838,100) --- energy enchanted weapon
			  else
	 selfSay('I need 60 platinum coins, a crystal ring and borrow the arrow, or else i cant enchant the weapon for you.')
				end
				end

	elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
		selfSay('Goodbye!')
		focus = 0
		talk_start = 0
	end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end
end

function onCreatureChangeOutfit(creature)
end

function onThink()
doNpcSetCreatureFocus(focus)
if (os.clock() - talk_start) > 30 then
	  if focus > 0 then
		  selfSay('Next Please...')
	  end
		  focus = 0
  end
	if focus ~= 0 then
		if getDistanceToCreature(focus) > 5 then
			selfSay('Good bye then.')
			focus = 0
		end
	end
end

 

 

AGORA COMENTEM =D

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

N sei se aconteceu só comigo mas o NPC n me devolve a arma eu entrego o dinheiro os itens mas ele n me devolve a arma.

 

Mas a ideia é optma :smile_positivo:

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...

Cara aqui não deu....

Tpw ele faz tudo certinho, mas quando vai dar o item ele não dá.

Ele só remove meus itens, eu acho por causa do meu yurots 1.2 que não tem ainda um items.obtm bom...

Se você conseguir me avisa numa pm se você acha um items.otbm pra yurots bom...

 

Obrigado!

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...