Amigo , voce tenq esperar por respostas ninguem e obrigado a responder , o pessoal responde quando pode ! intao vc aguarda no salmo 40 e fika de boa.
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- [Duvida] Npc
4
601
info
Grupo: Campones
Registrado: 21/08/11
Posts: 21
Reputação: +2
Char no Tibia: Meu pau de Toca

28 de setembro de 2011 às 17:36
29 de setembro de 2011 às 12:56
Amigo, não se preocupe eu "fikei de boa".
info
Grupo: Cavaleiro
Registrado: 19/11/10
Posts: 190
Reputação: +36
Char no Tibia: Frenesy

02 de outubro de 2011 às 22:22
Nossa que 'Stress'
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
if(msgcontains(msg, 'Story') or msgcontains(msg, 'story')) and getPlayerStorageValue(cid,45600) < 1 then
selfSay('Story? Since this {city} is here, a dark soul its attacking and disturbing a lot of cities', cid)
talkState[talkUser] = 1
elseif((msgcontains(msg, 'City') or msgcontains(msg, 'city')) and talkState[talkUser] == 1) then
selfSay('I can tell you one name but be careful! You can find a lot of dangerous monsters in your trip. The city name is Icya. Find a citizen named {Junaaq}, he can help you better than me.', cid)
setPlayerStorageValue(cid, 45600, 1)
setPlayerStorageValue(cid, 45601, 1)
talkState[talkUser] = 0
elseif(msgcontains(msg, 'Story') or msgcontains(msg, 'story')) and getPlayerStorageValue(cid,45601) == 1 then
selfSay('What are you waiting for? Go to the city that I informed him.', cid)
end
return TRUE
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Abraços !! :smile_positivo:
Editado Outubro 2 por Frenesy



info
Grupo: Campones
Registrado: 26/07/10
Posts: 19
Reputação: 0
Char no Tibia: >Secret<
Galera, to com um scrip de um npc. Olhando os scripts vocês já irão saber o que eu desejo fazer, que são apenas falas, sem nenhuma ação. Mais esta dando erro, alguém da uma mão?
@Edit: Ok, se é para 5 pessoas entrar e ninguém comentar então pode fechar. Não vale o esforço de checar todo dia o post sendo que ninguém responde.
Tópico Fechado