Postado Novembro 6, 2012 12 anos Tem o script (poderia postar) de quando o player recebe o storage? Bruno Carvalho / Ex-Administrador TibiaKing [email protected] Em 26/12/2016 em 03:47, Spraypaint disse: A força da alienação vem dessa fragilidade dos indivíduos, quando apenas conseguem identificar o que os separa e não o que os une. -miltinho
Postado Novembro 6, 2012 12 anos Autor Ele recebe de um npc 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --[[ REMEMBER TO SET YOUR STORAGE AS YOURSTORAGE! ]]-- local boromir = 4001 local boromir2 = 4002 local boromir3 = 4003 if (getPlayerStorageValue(cid, 96745) == 1) and msgcontains(msg, 'portao') then npcHandler:say("Você terá que matar um guarda e abrir o portão, acha que consegue?", cid) talkState[talkUser] = 0 elseif (getPlayerStorageValue(cid, 96745) == 1) and msgcontains(msg, 'yes') then setPlayerStorageValue(cid, boromir, 1) setPlayerStorageValue(cid, boromir2, 1) setPlayerStorageValue(cid, boromir3, 1) npcHandler:say("Quando abrir o portão, desça as escadas e vá procurar por Heller, ele lhe dará as próximas instruções.", cid) talkState[talkUser] = 0 else npcHandler:say("Estou muito ferido e não posso mais lutar, você terá que ir sozinho.", cid) talkState[talkUser] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Postado Novembro 6, 2012 12 anos tenta usa 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) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid --[[ REMEMBER TO SET YOUR STORAGE AS YOURSTORAGE! ]]-- local boromir = 4001 local boromir2 = 4002 local boromir3 = 4003 if (getPlayerStorageValue(cid, 96745) == 1) and msgcontains(msg, 'portao') then npcHandler:say("Você terá que matar um guarda e abrir o portão, acha que consegue?", cid) talkState[talkUser] = 0 elseif (getPlayerStorageValue(cid, 96745) == 1) and msgcontains(msg, 'yes') then setPlayerStorageValue(cid, boromir, 1) setPlayerStorageValue(cid, boromir2, 1) setPlayerStorageValue(cid, boromir3, 1) doSendMagicEffect(cid, 55) npcHandler:say("Quando abrir o portão, desça as escadas e vá procurar por Heller, ele lhe dará as próximas instruções.", cid) talkState[talkUser] = 0 else npcHandler:say("Estou muito ferido e não posso mais lutar, você terá que ir sozinho.", cid) talkState[talkUser] = 0 end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) [/code] Ou se quiser que fique constante [code] function SendEffect(cid) doSendMagicEffect(cid, 55) addEvent(function() SendEffect(cid) end,2*1000) return TRUE end function onThink(cid) if getPlayerStorageValue(cid, 4001) == 1 then SendEffect(cid) end return true end Editado Novembro 6, 2012 12 anos por comedinhasss (veja o histórico de edições) Bruno Carvalho / Ex-Administrador TibiaKing [email protected] Em 26/12/2016 em 03:47, Spraypaint disse: A força da alienação vem dessa fragilidade dos indivíduos, quando apenas conseguem identificar o que os separa e não o que os une. -miltinho
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.