Ir para conteúdo

[Encerrado]programador fast


paparaffiz

Posts Recomendados

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

  storage = getPlayerStorageValue(cid,91003)  
 
  if msgcontains(msg, 'FALA') and storage == 0 then
    selfSay('MSG AQUI')
    talk_state = 1
    
  elseif msgcontains(msg, 'yes') and talk_state == 1 then
   if getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 then
    doPlayerTakeItem(cid,6107,1)
    doPlayerTakeItem(cid,6107,1)
    doPlayerTakeItem(cid,6107,1)
    doPlayerTakeItem(cid,6107,1)
      doPlayerSendTextMessage(cid,19,"Quest 'SUA QUEST'.' completada.")
      doSendMagicEffect(getPlayerPosition(cid),12)
    setPlayerStorageValue(cid,91003,1)
    selfSay('MSG de qualquer se naoquizer usar isso aki basta remover a linha')
    talk_state = 0
   else
    selfSay('I knew that it was a lie! Where is it?')
   end

------------------------------------------------ confirm no ------------------------------------------------
  elseif msgcontains(msg, 'no') and (talk_state >= 1) 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())

NPC acima e Movements abaixo

 

function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) == TRUE then
		if getPlayerStorageValue(cid, 91003) == -1 then
			doTeleportThing(cid,position)
			else
			doTeleportThing(cid,fromPosition)
		end
	end
 	return TRUE
end

 

Link para o comentário
Compartilhar em outros sites

Em 30/11/2017 at 09:57, Qwizer disse:

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

  storage = getPlayerStorageValue(cid,91003)  
 
  if msgcontains(msg, 'FALA') and storage == 0 then
    selfSay('MSG AQUI')
    talk_state = 1
    
  elseif msgcontains(msg, 'yes') and talk_state == 1 then
   if getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 and getPlayerItemCount(cid,6107) >= 1 then
    doPlayerTakeItem(cid,6107,1)
    doPlayerTakeItem(cid,6107,1)
    doPlayerTakeItem(cid,6107,1)
    doPlayerTakeItem(cid,6107,1)
      doPlayerSendTextMessage(cid,19,"Quest 'SUA QUEST'.' completada.")
      doSendMagicEffect(getPlayerPosition(cid),12)
    setPlayerStorageValue(cid,91003,1)
    selfSay('MSG de qualquer se naoquizer usar isso aki basta remover a linha')
    talk_state = 0
   else
    selfSay('I knew that it was a lie! Where is it?')
   end

------------------------------------------------ confirm no ------------------------------------------------
  elseif msgcontains(msg, 'no') and (talk_state >= 1) 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())

NPC acima e Movements abaixo

 


function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) == TRUE then
		if getPlayerStorageValue(cid, 91003) == -1 then
			doTeleportThing(cid,position)
			else
			doTeleportThing(cid,fromPosition)
		end
	end
 	return TRUE
end

 

mano o piso não esta indo ;/

não faz efeito nenhum

Link para o comentário
Compartilhar em outros sites

  • 4 months later...
O recrutamento neste pedido foi encerrado por falta de movimento.
Este tópico está fechado e foi movido para Formação de Equipe - Tópicos Fechados.

+ Caso não tenha sido concluido o recrutamento você poderá criar outro tópico.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...