Postado Julho 21, 2016 8 anos Olá colegas, Estou fazendo o possível pra tirar apenas as dúvidas que eu não encontro forma de resolver e surgiu mais uma. Na Pits of Inferno tem uma parte que você precisa ter o The Holy Tible para passar pelo SQM X e ser transportado para SQM Y, caso não tenha o livro nada acontece. É esse script que desejo. 1. Citar SQM Teletransporte {x = 1069, y = 1122, z = 7} Blue Tome ID - 1984 Destino - {x = 1060, y = 1073, z = 12} O player vai passar no SQM Teletransporte e será movido para o destino, mas apenas se tiver na backpack o blue tome. Para evitar spam, vou deixar outra dúvida aqui também. 2. Criei com ajuda do pessoal aqui do fórum um monstro que quando morre abre o portal para X local. Até ai tudo bem, mas o portal abre sempre onde o monstro morre, queria que ele abrisse em uma coordenada XYZ. local config = { message = "Take the Blue Tome, you have 60 seconds to leave! The room will collapse!", timeToRemove = 60, -- seconds teleportId = 1387, bosses = { ["Raging Halcrof"] = {teleportPos = {x = 1071, y = 1124, z = 10, stackpos = 1}, toPos = {x = 1066, y = 1125, z = 6}} } } local function removal(position) doRemoveThing(getTileItemById(position, config.teleportId).uid, 1) return TRUE end function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "halcrofteleport") local position = getCreaturePosition(cid) for name, pos in pairs(config.bosses) do if name == getCreatureName(cid) then teleport = doCreateTeleport(config.teleportId, pos, position) doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1) addEvent(removal, config.timeToRemove * 1000, position) doSendMagicEffect(position,10) end end return TRUE end Esse é o script que estou usando mas não está funcionando. Ele abre o portal no corpo do monstro e não está enviando o player para posição desejada. 3. Esse é um NPC que o jogador vai desafiar se tiver lvl 100+ pode aceitar, então é movido para sala. Onde luta com o boss e se o player morrer pode tentar novamente, mas se conseguir eu queria criar um storageid onde o npc checasse se o player já derrotou o boss e se sim, não pode fazer de novo. local tab = { level = 100, pos = {x = 1071, y = 1135, z = 10} } 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, 'challenge')) then talkState[talkUser] = 1 selfSay('You are sure you want to go? You can not return.', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if (getPlayerLevel(cid) <= tab.level) then talkState[talkUser] = 0 doTeleportThing(cid, tab.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) else talkState[talkUser] = 0 selfSay('I can only challenge players with level '..tab.level..' or less.', cid) end elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 selfSay('Come back when you are ready learner.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Agradeço desde já galera. Atenciosamente, Felipe Lotz.
Postado Julho 21, 2016 8 anos @Felipe Lotz NPC Spoiler local tab = { level = 100, pos = {x = 1071, y = 1135, z = 10} } local storage = 123456 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, 'challenge')) then talkState[talkUser] = 1 selfSay('You are sure you want to go? You can not return.', cid) elseif (msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if (getPlayerLevel(cid) <= tab.level) then if getPlayerStorageValue(cid, storage) <= 1 then talkState[talkUser] = 0 doTeleportThing(cid, tab.pos) doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) setPlayerStorageValue(cid, storage) else talkState[talkUser] = 0 selfSay('You already kill the boss.', cid) end else talkState[talkUser] = 0 selfSay('I can only challenge players with level '..tab.level..' or less.', cid) end elseif (msgcontains(msg, 'no') and talkState[talkUser] == 1) then talkState[talkUser] = 0 selfSay('Come back when you are ready learner.', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Tile da POI Spoiler local bluetome = 1984 local position = {x = 1060, y = 1073, z = 12} function onStepIn(cid, item, position, fromPosition) if getPlayerItemCount(cid, bluetome) == 1 then doTeleportThing(cid, position) end Editado Julho 22, 2016 8 anos por VictorTasquin (veja o histórico de edições) Atenciosamente, Meu servidor: pbOT
Postado Julho 22, 2016 8 anos Autor @VictorTasquin Muito obrigado irmão! Ajudou muito! O server tá quase 100% graças a galera ajudando! Atenciosamente, Felipe Lotz.
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.