Carregador De Soft Boots

RenatoPdz
em NPCs, monsters e raids

RenatoPdz

avatar
Campones
Campones

INFOS

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

Hehe ai fiz um npc que recarrega a soft boots quando acaba.

Intao Vamos lá!

Primeiro vá em (data\npc). Copie uma pasta. Abra-a. e cole isto.

<?xml version="1.0"?>

<npc name="Tomboy" script="data/npc/scripts/soft.lua" access="3" lookdir="1" autowalk="100" speed="200">
   <health now="100" max="100"/>
   <look type="151" head="78" body="95" legs="113" feet="114" addons="1" corpse="2212"/>
   <parameters/>
</npc>

Mude o nome se quiser.

Agora vá em (data\npc\scripts). Copie uma pasta. Renomeia para "soft.lua".

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



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, '[color="#FF0000"]soft boots'[/color]) or msgcontains(msg, '[color="#FF0000"]worn soft boots[/color]') 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())

 

Explicando:

O que esta de vermelho e o que vc deve falar pra trocar a soft veia peloa soft nova :p.

OBS: custa 10k.

 

Creditos: Renato

Qualquer coisa poste ai que eu corrijo.

Desculpe aew. Esqueci de avisar. Esse aki deu certo mais o meu é Ares 8.1. :/

satan666

Antichrist Superstar
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 07/05/08Posts: 612Char no Tibia: leviana luciferiana

nao ta funcionando pra tfs 8.31 =/

creationb.jpg

"Um Deus que usasse seu poder para criar seres humanos que de antemão sabia que seriam atormentados eternamente, e que os predestinasse a isso,



não poderia ser sábio, nem justo e tampouco amoroso.

Além de nos submeter a isso vim a nos julgar e condenar por nossos atos aos tormentos do inferno.

pra minha pessoa isso não é um Deus Pai amoroso e bondoso como o chaman, seu padrão seria muito mais inferior do que o de muitos homens."

Movack

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/11/08Posts: 25Char no Tibia: Druid Loose

Não funciona.

Ele cata a Worn Soft Boots e não cata os 10k e não da a soft boots nova ¬¬.

Tenta arruma ae

ZerOOo~

Sou fan de:




~ xP/


Outifit:

noobinhu

Ex Administrador
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 01/03/06Posts: 1022Gênero: Masculino

Dei uma arrumada, testem:

 

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) >= 100 then

 

if doPlayerTakeItem(cid,6530,1) and doPlayerTakeItem(cid,2152,100) 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())

RenatoPdz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 29/11/08Posts: 16Char no Tibia: Wizard of Sparta
Dei uma arrumada, testem:

 

vlw aew por corrigir ^^, e que esqueci de falar q o meu é Ares 8.10 :( ai pensei q dava certo em todos... sry awe.

satan666

Antichrist Superstar
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 07/05/08Posts: 612Char no Tibia: leviana luciferiana

noobinhu ainda n ta funfando no tfs o npc nao respond nada que eu digo...

 

na realidade eu digo hi e ele responde depois que eu falo pra concerta a bota ele pega os itens e n me da a bota nova e os resto dos comandos ele n diz nada ate quando eu dgo bye ele num responde....

se vc podesse arrumar isso ae eu agradeceria.... vlw

creationb.jpg

"Um Deus que usasse seu poder para criar seres humanos que de antemão sabia que seriam atormentados eternamente, e que os predestinasse a isso,



não poderia ser sábio, nem justo e tampouco amoroso.

Além de nos submeter a isso vim a nos julgar e condenar por nossos atos aos tormentos do inferno.

pra minha pessoa isso não é um Deus Pai amoroso e bondoso como o chaman, seu padrão seria muito mais inferior do que o de muitos homens."

RenatoPdz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 29/11/08Posts: 16Char no Tibia: Wizard of Sparta
noobinhu ainda n ta funfando no tfs o npc nao respond nada que eu digo...

 

na realidade eu digo hi e ele responde depois que eu falo pra concerta a bota ele pega os itens e n me da a bota nova e os resto dos comandos ele n diz nada ate quando eu dgo bye ele num responde....

se vc podesse arrumar isso ae eu agradeceria.... vlw

 

Vou tentar arrumar aki .. vlws awe hehe, depois eu edito

IcarooxDloll

GOD King
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 04/01/09Posts: 133Char no Tibia: GOD King

hum .. axo que nen preciza disso, sei la !

GOD King





kingtower.no-ip.biz