Ir para conteúdo

Posts Recomendados

Yeahh !!

 

To de volta fazendo os pedidos ;)

 

Bom , finalmente terminei minha rookguard (olkae) , ;d

 

Bom , eu precisso de um npc the oracle.

 

1ºTipo , o oracle vai poder teleportar para 2 cidades , e escolher a vocação.

 

2º Precisso um npc de barco que teleporta assim pra 4 cidades , sendo 2 premium e 2 vip .. , o npc tenque teleportar apenas vips.

 

3º Como eu faço para colocar o "quest log" ??

 

4º Como eu faço para tirar todas as vocações do acc manager ? deixar so no vocations.

 

Olha esse script

Voakart me passo esse script , mas eu consigo fazer quantas vezes eu quiser.

Bom , parece que a storage não funfa , quando ele termina a quest eu vo abrir a porta ñ dá ..

é só colocar a storage na porta ñ é .. no id ?

 

 

 

local keywordHandler = KeywordHandler:new()

local npcHandler = NpcHandler:new(keywordHandler)

NpcSystem.parseParameters(npcHandler)

local talkState = {}

 

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

 

function creatureSayCallback(cid, type, msg)

if(not npcHandler:isFocused(cid)) then

return false

end

 

local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid

 

local exp = 2000

local t = {item1={8710,5}}

local Storage = 65500

 

--[[

XXXX = ID DO ITEM

YY = QUANTIDADE DO ITEM

]]--

 

if(msgcontains(msg, 'mission') or msgcontains(msg, 'MISSION')) then

selfSay('hello dear adventurer Olkae, you brought me the five-legged cockroach? {yes} ', cid)

talkState[talkUser] = 1

elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then

if getPlayerStorageValue(cid, Storage) <= 0 then

if(getPlayerItemCount(cid, t.item1[1]) >= t.item1[2]) then

doPlayerRemoveItem(cid, t.item1[1], t.item1[2])

doPlayerAddExp(cid, exp)

setPlayerStorageValue(cid,storage,1)

selfSay('thanks citizen,receives its recompence !', cid)

talkState[talkUser] = 0

else

selfSay('you do not have ' .. t.item1[2] .. ' ' .. getItemNameById(t.item1[1]) .. ' to surrender', cid)

talkState[talkUser] = 0

end

else

selfSay(' sorry can only do one time the mission.', cid)

talkState[talkUser] = 0

end

elseif msg == "no" and talkState[talkUser] == 1 then

selfSay("Then not", cid)

talkState[talkUser] = 0

npcHandler:releaseFocus(cid)

end

return TRUE

end

 

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

 

 

 

;D

 

TY :)

Editado por SkyDangerous
Link para o comentário
https://xtibia.com/forum/topic/139182-npchelpas-again/
Compartilhar em outros sites

tenta assim:

 

 

 

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

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 

function creatureSayCallback(cid, type, msg) 
if(not npcHandler:isFocused(cid)) then 
return false 
end 

local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid 

local exp = 2000
local t = {item1={8710,5}}
local storage = 11540 

if(msgcontains(msg, 'mission') or msgcontains(msg, 'MISSION')) then 
selfSay('hello dear adventurer Olkae, you brought me the five-legged cockroach? {yes} ', cid) 
talkState[talkUser] = 1 
elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then 
if getPlayerStorageValue(cid,storage) == -1 then
if(getPlayerItemCount(cid, t.item1[1]) >= t.item1[2]) then
setPlayerStorageValue(cid,storage,1) 
doPlayerRemoveItem(cid, t.item1[1], t.item1[2])
doPlayerAddExp(cid, exp)
selfSay('thanks citizen,receives its recompence !', cid) 
talkState[talkUser] = 0 
else 
selfSay('you do not have ' .. t.item1[2] .. ' ' .. getItemNameById(t.item1[1]) .. ' to surrender', cid) 
talkState[talkUser] = 0 
end
else
selfSay(' sorry can only do one time the mission.', cid) 
talkState[talkUser] = 0 
end
elseif msg == "no" and talkState[talkUser] == 1 then 
selfSay("Then not", cid) 
talkState[talkUser] = 0 
npcHandler:releaseFocus(cid) 
end 
return TRUE 
end 


npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) 
npcHandler:addModule(FocusModule:new())

 

 

Link para o comentário
https://xtibia.com/forum/topic/139182-npchelpas-again/#findComment-919341
Compartilhar em outros sites

http://www.xtibia.com/forum/topic/137641-adicionando-quest-log/

 

 

o 2° eu faço amanha cabei de chega

 

abraços

 

 

~~ edited ~~

 

QUAL SEU SISTEMA VIP?

Editado por Vodkart
Link para o comentário
https://xtibia.com/forum/topic/139182-npchelpas-again/#findComment-919507
Compartilhar em outros sites

Voadkart

 

Então..

 

Qual é o melhor vip para colocar no servidor sério ??

 

e se sabe como colocar vip pra mysql e aparecer no status ;)

 

---

 

Como tira as vocações no acc manager e deixa só 1 ?

Editado por SkyDangerous
Link para o comentário
https://xtibia.com/forum/topic/139182-npchelpas-again/#findComment-919693
Compartilhar em outros sites

×
×
  • Criar Novo...