Rings

RenatoPdz
em NPCs, monsters e raids

RenatoPdz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 29/11/08Posts: 16Char no Tibia: Wizard of Sparta

Bora lá ^^.

Primeiro va á pasta (data\npc) copie um arquivo (.xml), renomei-o para "Nisse.xml", abra-a e coloque o seguinte:

<npc name="Nisse" script="data/npc/scripts/rings.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="128" head="20" body="100" legs="50" feet="99" corpse="2212"/>
<parameters>
	<parameter key="module_shop" value="1" />
	<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell all types of rings!" />
	<parameter key="shop_buyable" value="[color="#FF0000"]roh,2214,2000;might ring,2164,1000;life ring,2168,1500;stealth ring,2165,1000;power ring,2166,500;sword ring,2207,500;club ring,2209,500;axe ring,2208,500;dwarven ring,2213,100;time ring,2169,1000[/color]" />
</parameters>
</npc>

Para adicionar mais rings, e so vc acresentar o seguinte: aonde ta de vermelho sao os rings que estao a venda basta vc fazer o seguinte : n,i,p ...

n= nome do ring

i= ID do ring

p= Ao preço do ring

Se nao intendeu vou dar um exemplo: energy ring(n),2167(i), 1500(p)

Depois vá em (data\npc\scripts), copie um arquivo(.lua), renomei-a para "rings.lua", abra-o e cole o seguinte:

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)



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


-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!

keywordHandler:addKeyword({'rings'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell rohs, might rings, life rings, stealth rings, power rings, sword rings, club rings, axe rings, dwarven rings and time rings.'})

-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())

 

Esse ai fico meio esquisito mais ta funcionando:

Credito: Renato ;)

xD.

Schiavinato

Aprendendo Scripting *-*
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 12/08/07Posts: 345Char no Tibia: Lokeded

ei cara...n precisa mais usa script

 

Se liga..tecnologia,modernidade.!

 

<npc name="Nisse" script="data/npc/scripts/[b]default[/b].lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">
<health now="150" max="150"/>
<look type="128" head="20" body="100" legs="50" feet="99" corpse="2212"/>
<parameters>
	<parameter key="module_shop" value="1" />
	<parameter key="message_greet" value="Hello |PLAYERNAME|. I sell all types of rings!" />
	<parameter key="shop_buyable" value="roh,2214,2000;might ring,2164,1000;life ring,2168,1500;stealth ring,2165,1000;power ring,2166,500;sword ring,2207,500;club ring,2209,500;axe ring,2208,500;dwarven ring,2213,100;time ring,2169,1000" />
</parameters>
</npc>

 

Coloka isso ai de cima q ja ta tudo certo

:)

The Crystal Server(Sorcerer´s Stone) - Project



 

Venha participar deste projeto - Desenvolvido por Shynzo

 

Link para download do distro:

http://www.xtibia.com/forum/topic/143282-862-the-crystal-server-v018/

Link da formação do projeto:

http://www.xtibia.com/forum/topic/143247-the-crystal-server-recruta/