Postado Janeiro 20, 2015 10 anos gente estou mudando minha wrath of emperor e queria um slimpes script mais que nao consigo fazer a pessoa mata 4 boses e ganha x storage(isso ja fiz) e agora preciso de um script de npc que o player fala com o npc e se ela tiver 4 tipos diferentes de storage(exemplo: 2050,2051,2052,2053) ele teleporta para um local alguem me ajuda ? rep++ Editado Janeiro 20, 2015 10 anos por matheusbrito180 (veja o histórico de edições)
Postado Janeiro 20, 2015 10 anos 1º Isso é um pedido e não uma dúvida... 2º Qual a versão do seu servidor ?? Aguardo. xBlackWolf THX @Storm Night Best Avatar Ever
Postado Janeiro 20, 2015 10 anos Meio que improvisei aqui. Estou no serviço, não tem como testar. 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 msg = string.lower(msg) if (msgcontains(msg, 'quest) or msgcontains(msg, 'mission)) then selfSay("Voce tem as storages da mission?.", cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, 2050) == 1 and getPlayerStorageValue(cid, 2051) == 1 and getPlayerStorageValue(cid, 2052) == 1 and getPlayerStorageValue(cid, 2053) == 1 then selfSay("Legal, vc pode fazer a Quest.", cid) setPlayerStorageValue(cid, 2050, -1) setPlayerStorageValue(cid, 2051, -1) setPlayerStorageValue(cid, 2052, -1) setPlayerStorageValue(cid, 2053, -1) talkState[talkUser] = 0 else selfSay("Voce nao tem todas as storages", cid) talkState[talkUser] = 0 return true end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Editado Janeiro 20, 2015 10 anos por Frenesy (veja o histórico de edições)
Postado Janeiro 20, 2015 10 anos Autor muito bom ! mais nao vi no script que ele teleporta para um local ao dizer "yes" me ajuda ? Editado Janeiro 20, 2015 10 anos por matheusbrito180 (veja o histórico de edições)
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.