Npc Soft Boots!

vuadorananuka

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 17/12/06Posts: 17

eu queria dar os creditos para o florestan que postou isto em outro forum e eu postei aki para ver se eu ajudo

 

 

primeiro crie um arquivo em data/npc/scripts chamado soft boots e cole isso

 

 

 

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



function creatureSayCallback(cid, type, msg)

  -- 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.

  if(npcHandler.focus ~= cid) then

   return false

  end



   if msgcontains(msg, 'specialised') or msgcontains(msg, 'boot') then

	   selfSay('Yes, my fathers was a great one blacksmith, it was a wise person , but when he decided to teach me he dies and i just learn about the lovely boots. So, did you bring me some boots? which one?')

   elseif msgcontains(msg, 'soft boots') or msgcontains(msg, 'worn soft boots') or msgcontains(msg, 'soft boot') or msgcontains(msg, 'worn soft boot') then

	   selfSay('Did u like that i fix ur worn soft boots? it will cost 100 platinum coins')

	   talk_state = 1





   elseif msgcontains(msg, 'yes') and talk_state == 1 then

	   if getPlayerItemCount(cid,6530) >= 1 and getPlayerItemCount(cid,2152) >= 1 then

		   if doPlayerTakeItem(cid,6530,1) and doPlayerTakeItem(cid,2152,100) == 0 then

		   selfSay('Here you are.')

			   doPlayerAddItem(cid,2640,1)

		   end

	   else

		   selfSay('Sorry, you don\'t have the 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



npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

e depois vai em data/npc crie um arquivo com o nome Roy e coloque

 

<npc name="Roy" script="data/npc/scripts/soft boots.lua" autowalk="25" floorchange="0" access="5" level="1" maglevel="1">

<health now="150" max="150"/>

   <look type="151" head="114" body="1" legs="1" feet="76" addons="1" corpse="2212"/>

<parameters>

<parameter key="message_greet" value="Hello |PLAYERNAME|. i am specialised in boots" />



</parameters>

</npc>

 

 

pronto ai esta seu npc

 

FUNCIONA PERFEITO EM EVOLUTIONS 0.7.7


Atenciosamente.
Vuadorananuka



~Metas~
[X] 1 Poste
[X] 10 Postes
[X] 25 Postes
[X] 30 Postes
[ ] 50 Postes
[ ] 70 Postes
[ ] 100 Postes


Comedia Team


[snapback]
100
[/snapback]

vuadorananuka

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 17/12/06Posts: 17

ninguem posta -.-


Atenciosamente.
Vuadorananuka



~Metas~
[X] 1 Poste
[X] 10 Postes
[X] 25 Postes
[X] 30 Postes
[ ] 50 Postes
[ ] 70 Postes
[ ] 100 Postes


Comedia Team


[snapback]
100
[/snapback]

Archblade

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 18/07/07Posts: 33

muito bom, eu precisava de um desses xD

obrigado

Bispo

Pênis de Penguin Acrobata
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/01/06Posts: 42

Amigo, explique oque o NPC faz e tudo mais.

se possivel mostre fotos...

Isto ajuda na organização do topico ;D

 

//Bispo

14996_4.png

dark rogue

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 22/01/06Posts: 56

Tah ai 1 NPC util...vlw vo por no meu server =D

ramonpacheco

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/09/06Posts: 37Gênero: Masculino

bem bom esse npc ,eu ja tinha pego em otro forum xD...

 

e funfa no forgoten ^^

 

//paxeco


Fan


Ragnarok


//Paxeco

Ricard

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 17/08/06Posts: 45

parabens manu...

npc bem util...

vlw

~*Sign*~

Sou Scripting 100%
~*Gostou de mim, achou legal oq eu postei use minha Fan Bar*~

...Quem ri por ultimo...É Retardado!!!!
GM Ghost*~


~*Metas*~
[x] 1 Post*~
[x] 50 Post's*~
[x] 100 Post's*~
[ ] 150 Post's*~
[ ] 200 Post's*~
[ ] 250+ Post's*~

...

(x) Caçador*~
(x) Cavaleiro*~
(x) Baronete*~

...

capeta7

avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 22/04/06Posts: 238

legal mas

funciona em ot 8.0 ?

aff pq ninguem posta a versao -.-

moh sako isso ¬¬

QUOTE
21:51 Gabriel Stoll [12]: aki é thais?
21:51 Gabriel Stoll [12]: ?
21:51 Gabriel Stoll [12]: ?
21:52 Djinn Middow [20]: n.. eh northport ^.-

-----------------
mithi_9@hotmail.com
-----------------
----> Bars <----

jmazzacaro

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/11/07Posts: 29Char no Tibia: PsyKina

aleluia achei um npc q finalmente va servir no meu server brigado

Zorrado

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/12/07Posts: 38Char no Tibia: Silan da favela

funciona pra 8.0 ??? aki o npc nao funciono nao, eu to a worn soft boots ele n da a nova soft boots ;/

explica ae plxxxx

Carlic

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 08/12/07Posts: 64

Dahora esse script, vai ajudar muitas pessoas...

Em muitos OT's agora estão tendo soft boots...

Nota 9.5 (Mais um pouquinho de organização fica perfeito).

 

See ya! :smile_positivo:

Atenciosamente,
//Carli


Fast Furious~

paladinzinhoo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 20/09/08Posts: 16Char no Tibia: Blable Bucks

mt bom!