[npc] Rashid 1.0

skinaa
Por skinaa
em NPCs, monsters e raids

skinaa

Skinaa
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 08/10/05Posts: 56

Olá

 

tenho visto que no forum muitas pessoas fazem rashid inuteis, ou diferentes do global...pensando nisso desperdicei um pouco do meu precioso tempo para arrumalo :)

Credito exclusivamentes a mim:)

 

 

 

 

Crie um arquivo na pasta Npcs/

Chame0o de Rashid.xml e salve-o :p

 

 

<?xml version="1.0"?>
<npc name="Rashid" script="data/npc/scripts/rashid.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="146" head="116" body="120" legs="120" feet="114" addons="3"/>
</npc>

 

 

 

 

Agora na pasta Npcs/Scripts crie um arquivo chamado Rashid.lua e salve-o

 

 

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
	if getPlayerPremium(cid) then
		selfSay('Hello ' .. getCreatureName(cid) .. '! Eu compro swords, clubs, axes, helmets, boots, shields, amulets e armors.')
 		focus = cid
 		talk_start = os.clock()

	else
		selfSay('Sorry, only premium players can sell items to me.')
		focus = 0
		talk_start = 0
	end

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

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

 		if msgcontains(msg, 'skull helmet') then
 			sell(cid,5741,getCount(msg),40000)
               elseif msgcontains(msg, 'beholder helmet') then
 			sell(cid,3972,getCount(msg),7500)
               elseif msgcontains(msg, 'devil helmet') then
 			sell(cid,2462,getCount(msg),1000)
 		elseif msgcontains(msg, 'pirate hat') then
 			sell(cid,6096,getCount(msg),1000)
	elseif msgcontains(msg, 'ragnir helmet') then
 			sell(cid,7462,getCount(msg),400)
               elseif msgcontains(msg, 'krimhorn helmet') then
 			sell(cid,7461,getCount(msg),200)
 		elseif msgcontains(msg, 'helmets') then
 			selfSay('Eu compro skull helmets (40k), pirate hat (1k), devil helmet (1k), ragnir helmet(400gp),krimhorn helmet (200gp), e beholder helmet (7.5k).')

               elseif msgcontains(msg, 'fur boots') then
 			sell(cid,7457,getCount(msg),2000)  
               elseif msgcontains(msg, 'crocodile boots') then
		sell(cid,3982,getCount(msg),1000) 
 		elseif msgcontains(msg, 'steel boots') then  					sell(cid,2645,getCount(msg),30000) 
 		elseif msgcontains(msg, 'pirate boots') then
 			sell(cid,5462,getCount(msg),3000)
 		elseif msgcontains(msg, 'boots')  then
 			selfSay('Eu compro fur boots (2k),steel boots (30k),crocodile boots (1k) e pirate boots (3k).')

               elseif msgcontains(msg, 'dragon scale mail') then
 			sell(cid,2492,getCount(msg),40000)
               elseif msgcontains(msg, 'mammoth fur cape') then
 			sell(cid,7463,getCount(msg),6000)
        elseif msgcontains(msg, 'golden armor') then
 			sell(cid,2466,getCount(msg),20000)
	elseif msgcontains(msg, 'dwarven armor') then
 			sell(cid,2603,getCount(msg),30000)
	elseif msgcontains(msg, 'leopard armor') then
 			sell(cid,3968,getCount(msg),1000)
	elseif msgcontains(msg, 'pirate shirt') then
 			sell(cid,6095,getCount(msg),500)
 		elseif msgcontains(msg, 'armors')  then
 			selfSay('Eu compro dragon scale mail (40k), mammoth fur cape(6k), golden armor (20k) dwarven armor (30k), leopard armor (1k) e pirate shirt (500gp).')

	elseif msgcontains(msg, 'pirate knee breeches') then
 			sell(cid,5918,getCount(msg),200)
 		elseif msgcontains(msg, 'light shovel') then
 			sell(cid,5710,getCount(msg),300)
		elseif msgcontains(msg, 'cvbnvbnin legs') then
 			sell(cid,2478,getCount(msg),50)
 		elseif msgcontains(msg, 'legs')  then
 			selfSay('Eu pirate knee breeches (200gp), and light shovel (300gp).')

	elseif msgcontains(msg, 'demon shield') then
 			sell(cid,2520,getCount(msg),30000)
               elseif msgcontains(msg, 'medusa shield') then
 			sell(cid,2536,getCount(msg),9000)
               elseif msgcontains(msg, 'castle shield') then
 			sell(cid,2535,getCount(msg),5000)
               elseif msgcontains(msg, 'scarab shield') then
 			sell(cid,2540,getCount(msg),2000)
	elseif msgcontains(msg, 'dark shield') then
 			sell(cid,2521,getCount(msg),400)
               elseif msgcontains(msg, 'tortoise shield') then
 			sell(cid,6131,getCount(msg),150)
	elseif msgcontains(msg, 'bone shield') then
 			sell(cid,2535,getCount(msg),80)
	elseif msgcontains(msg, 'shields')  then
 			selfSay('Eu compro demon (30k), medusa (9k),castle (5k),scarab (2k),dark (400gp),tortoise (150gp) and bone shields (80gp).')

	elseif msgcontains(msg, 'crystal sword')  then
 			sell(cid,7449,getCount(msg),600)
	elseif msgcontains(msg, 'wyvern fang')  then
 			sell(cid,7408,getCount(msg),1500)
 		elseif msgcontains(msg, 'dragon slayer')  then
 			sell(cid,7402,getCount(msg),15000)
	elseif msgcontains(msg, 'swords')  then
 			selfSay('Eu compro crystal (600gp), wyvern fang (1.5k) and dragon slayer (15k).')

	elseif msgcontains(msg, 'war axe')  then
 			sell(cid,2454,getCount(msg),9000)
	elseif msgcontains(msg, 'beastslayer axe')  then
 			sell(cid,2381,getCount(msg),1500)
	elseif msgcontains(msg, 'daramanian waraxe')  then
 			sell(cid,2440,getCount(msg),1000)
 		elseif msgcontains(msg, 'axes')  then
 			selfSay('Eu compro war axe (9k), beastslayer axe (1.5k), daramanian waraxe (1k).')

	elseif msgcontains(msg, 'sapphire hammer') then
 			sell(cid,7437,getCount(msg),7000)
 		elseif msgcontains(msg, 'amber staff')  then
 			sell(cid,7426,getCount(msg),8000)
 		elseif msgcontains(msg, 'lunar staff')  then
 			sell(cid,2417,getCount(msg),5000)
 		elseif msgcontains(msg, 'brutetamers staff') then
 			sell(cid,7379,getCount(msg),1500)
               elseif msgcontains(msg, 'dragonbone staff') then
 			sell(cid,7430,getCount(msg),3000)
	elseif msgcontains(msg, 'clubs')  then
 			selfSay('Eu compro sapphire hammer (7k), amber staff (8k), dragonbone staff (3k), lunar staff (5k) e brutetamer staff(1.5k).')

	elseif msgcontains(msg, 'scarab amulet') then
 			sell(cid,2135,getCount(msg),200)
               elseif msgcontains(msg, 'ancient amulet') then
 			sell(cid,2142,getCount(msg),200)
	elseif msgcontains(msg, 'amulets')  then
 			selfSay('Eu compro scarab (200gp) e ancient amulet (200gp).')

 		elseif string.find(msg, '(%a*)bye(%a*)')  and getDistanceToCreature(cid) < 4 then
 			selfSay('Good bye, ' .. getCreatureName(cid) .. '!')
 			focus = 0
 			talk_start = 0
 		end
 	end
end


function onCreatureChangeOutfit(creature)

end

function onThink()

if (os.clock() - talk_start) > 20 then
 		if focus > 0 then
 			selfSay('...')
 		end
 			focus = 0
 	end
	if focus ~= 0 then
		if getDistanceToCreature(focus) > 5 then
			selfSay('...')
			focus = 0
		end
	end
end

 

 

 

 

 

Npc testado e funcionando, obrigado por usarem ele . :)

Lordfire

TFS Maintainer
avatar
Lenda
Lenda

INFOS

Grupo: LendaRegistrado: 04/10/06Posts: 2605Gênero: MasculinoChar no Tibia: Knight Orion

É mesmo muito bom

Vou arrumar as palavras e testá-lo aqui

Pelo que parece, está completinho.

 

 

OBS:

Põe em Quote e Spoil pra ficar mais fácil pra copiar, code usa uma linha só.

Darllan0

Darllan \___Bleach___/
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 04/11/07Posts: 192Char no Tibia: Ranzor Raven

Bom, mas para que server este npc

?

Darllan Client Maker/Npc Maker
XD

Metas:
(x) 10 Posts
(x) 30 Posts
(x) 50 Posts
(x) 80 Posts
(x) 100 posts
(x) 200 Posts
(x) 250 Posts
(x) 280 Posts
(x) 300 Posts
(x) 350 Posts
( ) 380 Posts
( ) 400 Posts
( ) 450 Posts
( ) 480 Posts
( ) 500 Posts....

Sou Fan De:
<div style="margin:0px 0px 0px 0px">
<div class="smallfont" style="margin-bottom:0px">
<input type="button" value="Mostrar Spoil" style="width:80px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';this.innerText = ''; this.value = 'Esconder'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Mostrar Spoil'; }">
</div>
<div style="margin: 0px; padding: 0px; border: 0px inset;">
<div style="display: none;">
<img src="http://img156.imageshack.us/img156/2959/tymaoes949di7.png" border="0" class="linked-sig-image" />
<img src="http://img216.imageshack.us/img216/7688/sadfcopyyp9jm4df0.png" border="0" class="linked-sig-image" />
</div>
</div>
<img src="http://i492.photobucket.com/albums/rr287/Fliper_010/darllanxtibia.png" border="0" class="linked-sig-image" />

Ajudar é Humano e Tibiano =D:
<a href="http://s8.bitefight.com.pt/c.php?uid=95671" target="_blank">http://s8.bitefight.com.pt/c.php?uid=95671</a>

Te Ajudei ?, me ama?, me odeia? ou so que enfeitar sua assinatura? entao use
<img src="http://i492.photobucket.com/albums/rr287/Fliper_010/DarlanFANxtibia.png" border="0" class="linked-sig-image" />

apaxonado

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/05/07Posts: 31Char no Tibia: Diniz'hell

Filé

vo colokar paraebns pelo NPC :thumbsupsmiley:

leonardo_loko

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/08/07Posts: 1

Parabens Npc Nota 10 :smile_positivo:

tadzio

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/09/07Posts: 85Char no Tibia: Revaux

@darllano

Rashid no Global é um npc que viaja para várias cidades e compra itens que os npcs djinn não compram como:

Dsm

Golden Armor

Demon Shield

Steel Boots

assim ajudando muito os players

 

&Tádzio&