-
Total de itens
2553 -
Registro em
-
Última visita
-
Dias Ganhos
72
Tudo que zipter98 postou
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Como já informado pelo Pudimdoce, área incorreta. Tópico movido, e obrigado pelo conteúdo.
- 20 respostas
-
- 8.6
- gta server 1.0 by: marcelo
- (e 3 mais)
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Funcionou direitinho? Já posso mover o tópico?
-
1º pedido: local function getRecorderPlayer(pos, cid) local ret = 0 if cid and isPosEqual(getThingPos(cid), pos) then return cid end local s = {} s.x = pos.x s.y = pos.y s.z = pos.z for a = 0, 255 do s.stackpos = a local b = getTileThingByPos(s).uid if b > 1 and isPlayer(b) and getCreatureOutfit(b).lookType ~= 814 then ret = b end end return ret end ------------[[ Configurações. ]]------------ local cfg = { {1, {x = 1056, y = 1056, z = 7}, {x = 1056, y = 1057, z = 7}}, --{valor da storage do clan, posição que o jogador deve ficar, posição para qual o mesmo será teleportado}, {2, {x = 1057, y = 1056, z = 7}, {x = 1056, y = 1058, z = 7}}, {3, {x = 1058, y = 1056, z = 7}, {x = 1056, y = 1059, z = 7}}, {4, {x = 1059, y = 1056, z = 7}, {x = 1056, y = 1060, z = 7}}, {5, {x = 1060, y = 1056, z = 7}, {x = 1056, y = 1061, z = 7}}, {6, {x = 1061, y = 1056, z = 7}, {x = 1056, y = 1062, z = 7}}, {7, {x = 1062, y = 1056, z = 7}, {x = 1056, y = 1063, z = 7}}, {8, {x = 1063, y = 1056, z = 7}, {x = 1056, y = 1064, z = 7}}, {9, {x = 1064, y = 1056, z = 7}, {x = 1056, y = 1065, z = 7}}, } local rank = { need = true, --Precisará estar em x rank? [true/sim] [false/não] what_rank = 5, --Se colocar true acima, configure aqui o rank necessário. } -----------[[ Fim das configurações. ]]--------- function onUse(cid, item, frompos, item2, topos) for a, b in pairs(cfg) do local pos = getRecorderPlayer(b[2]) if not isPlayer(pos) then return doPlayerSendCancel(cid, "One or more players aren't in the correct clan's place.") elseif rank.need == true then if getPlayerStorageValue(pos, 862281) <= (rank.what_rank - 1) then return doPlayerSendCancel(cid, "One or more players aren't at rank "..rank.what_rank..".") end end end for c, d in pairs(cfg) do local pos = getRecorderPlayer(d[2]) doTeleportThing(pos, d[3]) doPlayerSendTextMessage(pos, 27, "Good luck!") doSendMagicEffect(getThingPos(pos), 14) end return true end Tabela com valor das storages, e seus respectivos clans: [1] = Volcanic [2] = Seavell [3] = Orebound [4] = Wingeon [5] = Malefic [6] = Gardestrike [7] = Psycraft [8] = Naturia [9] = Raibolt 2º pedido: Em exp2.0.lua, abaixo de: if valor >= getCreatureHealth(cid) then if isInArray(cannotKill, combat) and isPlayer(cid) then valor = getCreatureHealth(cid) - 1 else valor = getCreatureHealth(cid) Adicione: local nome = "rattata" --Nome do pokémon (tanto faz colocar em letra minúscula ou maiúscula). if getCreatureName(cid):lower() == nome:lower() then local cfg = { id = 2708, --ID da parede. pos = {x = 1056, y = 1058, z = 7}, --Posição da parede. recreate = true, --A parede será recriada? [true/sim] [false/não] tempo = 5, --Se colocar true acima, configure aqui o tempo (em segundos). } local wall = getTileItemById(cfg.pos, cfg.id).uid if wall > 0 then doRemoveItem(wall, 1) doSendMagicEffect(cfg.pos, 15) if cfg.recreate == true then addEvent(function() doCreateItem(cfg.id, 1, cfg.pos) doSendMagicEffect(cfg.pos, 14) end, cfg.tempo * 1000) end end end
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Aqui está: 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 cfg = { [1] = 181634, [2] = 181631, [3] = 181636, [4] = 181635, [5] = 181633, [6] = 181637, [7] = 181638, [8] = 181632, [9] = 181630, } local outfit = cfg[getPlayerStorageValue(cid, 86228)] if msgcontains(msg, "outfit") or msgcontains(msg, "roupa") then if getPlayerStorageValue(cid, 86228) <= 0 then selfSay("Você não pertence à clan algum!", cid) talkState[talkUser] = 0 return true elseif getPlayerStorageValue(cid, outfit) >= 1 then selfSay("Você já pegou sua outfit!", cid) talkState[talkUser] = 0 return true end selfSay("Você gostaria de receber a outfit de rank 6 de seu respectivo clan?", cid) talkState[talkUser] = 1 return true elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, 86228) <= 0 then --melhor prevenir do quê remediar. selfSay("Você não pertence à clan algum!", cid) talkState[talkUser] = 0 return true elseif getPlayerStorageValue(cid, outfit) >= 1 then --melhor prevenir do quê remediar. selfSay("Você já pegou sua outfit!", cid) talkState[talkUser] = 0 return true end selfSay("Ok, aqui está! Faça bom proveito de sua nova outfit.", cid) doSendMagicEffect(getThingPos(cid), 14) setPlayerStorageValue(cid, outfit, 1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) talkState[talkUser] = 0 return true elseif msgcontains(msg, "no") and talkState[talkUser] == 1 then selfSay("Tudo bem, então...", cid) talkState[talkUser] = 0 return true end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Obrigado pelo elogio Sanado, movido.
-
Sabe fazer o .xml? 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 cfg = { [1] = 181634, [2] = 181631, [3] = 181636, [4] = 181635, [5] = 181633, [6] = 181637, [7] = 181638, [8] = 181632, [9] = 181630, } local outfit = cfg[getPlayerStorageValue(cid, 86228)] if msgcontains(msg, "outfit") or msgcontains(msg, "roupa") then if getPlayerStorageValue(cid, 86228) <= 0 then selfSay("Você não pertence à clan algum!", cid) talkState[talkUser] = 0 return true elseif getPlayerStorageValue(cid, outfit) >= 1 then selfSay("Você já pegou sua outfit!", cid) talkState[talkUser] = 0 return true end selfSay("Você gostaria de receber a outfit de rank 6 de seu respectivo clan?", cid) talkState[talkUser] = 1 return true elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, 86228) <= 0 then --melhor prevenir do quê remediar. selfSay("Você não pertence à clan algum!", cid) talkState[talkUser] = 0 return true elseif getPlayerStorageValue(cid, outfit) >= 1 then --melhor prevenir do quê remediar. selfSay("Você já pegou sua outfit!", cid) talkState[talkUser] = 0 return true end selfSay("Ok, aqui está! Faça bom proveito de sua nova outfit.", cid) doSendMagicEffect(getThingPos(cid), 14) setPlayerStorageValue(cid, outfit, 1) talkState[talkUser] = 0 return true elseif msgcontains(msg, "no") and talkState[talkUser] == 1 then selfSay("Tudo bem, então...", cid) talkState[talkUser] = 0 return true end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Resolvido no Skype. Código do 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) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local places = { ["saffron"] = 1, ["cerulean"] = 2, ["lavender"] = 3, ["fuchsia"] = 4, ["celadon"] = 5, ["viridian"] = 6, ["vermilion"] = 7, ["pewter"] = 8, ["cinnabar"] = 10, } if msgcontains(string.lower(msg), 'city') or msgcontains(string.lower(msg), 'citys') then if getPlayerStorageValue(cid, 9658754) == 1 then selfSay("You already choose your beginner town!", cid) return true else selfSay("You can choose your beginner town between: {Saffron, Cerulean, Lavender, Fuchsia, Celadon, Viridian, Vermilion, Pewter or Cinnabar}.", cid) return true end elseif places[string.lower(msg)] then city = string.lower(msg) selfSay("Are you sure which you want to begin in {".. doCorrectString(msg) .."}?", cid) talkState[talkUser] = 2 return true elseif msgcontains(msg, "yes") or msgcontains(msg, "Yes") and talkState[talkUser] == 2 then if getPlayerStorageValue(cid, 9658754) == 1 then selfSay("You already choose your beginner town!", cid) talkState[talkUser] = 0 return true else selfSay("OK then... Now your beginner town is ".. doCorrectString(city)..". Good luck in your jorney!", cid) doPlayerSetTown(cid, places[city]) setPlayerStorageValue(cid, 9658754, 1) talkState[talkUser] = 0 return true end elseif msgcontains(msg, "no") or msgcontains(msg, "No") and talkState[talkUser] == 2 then selfSay("Ok then... say again what city you want to begin!", cid) talkState[talkUser] = 0 return true end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
-
Tem sim uma maneira (que eu acabei de encontrar). Porém, ela é um pouco mais confusa de configurar. Vou tentar explicar: para cada posição, terá uma variável. Por exemplo, 3 posições: local pos_one = {x = 1056, y = 1056, z = 7} local pos_two = {x = 1056, y = 1057, z = 7} local pos_three = {x = 1056, y = 1058, z = 7} Terá uma variável que irá, digamos assim, "checar" a posição do jogador. Valor inicial desta é 0. local check = 0 Assim, para cada posição, você fará uma verificação de posição. E, a cada posição "errada", o valor de check será aumentado em 1. Como são 3 posições, serão 3 verificações. if getThingPos(cid).x ~= pos_one.x or getThingPos(cid).y ~= pos_one.y or getThingPos(cid).z ~= pos_one.z then --Primeira verificação, da primeira posição (pos_one). check = check + 1 --Se a posição do jogador for diferente da posição configurada em pos_one, check terá seu valor aumentado em 1 (ficando 1). end if check == 1 then --Se o valor de check for 1 (ou seja, a posição do jogador for diferente de pos_one), ocorrerá essa segunda verificação. if getThingPos(cid).x ~= pos_two.x or getThingPos(cid).y ~= pos_two.y or getThingPos(cid).z ~= pos_two.z then --Segunda verificação, da segunda posição (pos_two). check = check + 1 --Se a posição do jogador for diferente da posição configurada em pos_two, check terá seu valor aumentado em 1 (ficando 2). end end if check == 2 then --Se o valor de check for 2 (ou seja, a posição do jogador for diferente de pos_one e pos_two), ocorrerá a terceira verificação. if getThingPos(cid).x ~= pos_three.x or getThingPos(cid).y ~= pos_three.y or getThingPos(cid).z ~= pos_three.z then --Terceira verificação, da terceira posição (pos_three). return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode utilizar este comando fora do SQM correto.") --Se a posição do jogador for diferente da posição configurada em pos_three (a terceira e última), será enviada essa mensagem à ele (já que a posição do mesmo é diferente da de pos_one, pos_two e pos_three). end end Seu código poderia, então, ficar assim:
-
Sanado, movido.
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
- 4 respostas
-
- lot não funciona
- resolvido
-
(e 1 mais)
Tags:
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Tenta assim, fiz rapidinho aqui, sono = raciocínio lento. function onSay(cid, words, param) local config = { pz = true, battle = true, need_level = true, premium = true, need_Item = true, Item = 2010 } local lugar = { ["Cidade 1"] = { -- nome do lugar pos = {x=1090, y=1236, z=7},level = 8}, ["Cidade 2"] = { -- nome do lugar pos = {x=1090, y=1236, z=7},level = 8}, ["Cidade 3"] = { -- nome do lugar pos = {x=1090, y=1236, z=7},level = 8}, ["Cidade 4"] ={ -- nome do lugar pos = {x=1090, y=1236, z=7},level = 8}, } local posis = {x = xxx, y = yyy, z = zzz} --Posição que o jogador deverá ficar. if (param == "Lista") then local str = "" str = str .. "Ilhas disponíveis :\n\n" for name, pos in pairs(lugar) do str = str..name.."\n" end str = str .. "" doShowTextDialog(cid, 6579, str) return TRUE end local a = lugar[param] if not(a) then doPlayerSendTextMessage(cid, 22, "Esta ilha não existe.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif config.premium == true and isPremium(cid) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas players Premium Accounts podem teleportar. Para comprar Premium Account acesse : \n www.???.com") return TRUE elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Você só pode teleportar dentro de Protection Zones. ") return TRUE elseif config.need_Item == true and getPlayerItemCount(cid,config.Item) < 1 then doPlayerSendCancel(cid,"Você precisa da " .. getItemNameById(config.Item) .. " para teleportar para " .. param .. " Island.") return TRUE elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode teleportar durante o estado de battle.") return TRUE elseif config.need_level == true and getPlayerLevel(cid) < a.level then doPlayerSendTextMessage(cid, 22, "Você não tem level suficiente. \n Você precisa ser Lv."..a.level.."+ para poder teleportar para " .. param .. " Island.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE elseif getThingPos(cid).x ~= posis.x or getThingPos(cid).y ~= posis.y or getThingPos(cid).z ~= posis.z then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode utilizar este comando fora do SQM correto.") end doTeleportThing(cid, a.pos) doSendMagicEffect(a.pos, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, 22, " Você foi teleportado para \n " .. param .. ". Island.") end
-
No lugar de doSendPlayerExtendedOpcode(cid, 51, getCreatureHealth(getCreatureSummons(cid))) Tenta assim: if #getCreatureSummons(cid) >= 1 then doSendPlayerExtendedOpcode(cid, 51, getCreatureHealth(getCreatureSummons(cid)[1])) end
-
poketibia [Encerrado] Pedido de um poketibia server
tópico respondeu ao vegetois de zipter98 em Tópicos Sem Resposta
Tópico movido para a seção/área mais adequada. Quando seu pedido/dúvida for relacionado à servidores derivados (como pokémon, no seu caso), opte por postar aqui: Pedidos e dúvidas - Servidores derivados. Mais cuidado da próxima vez. -
[Encerrado] [Pedido] Script Quest
tópico respondeu ao FlamesAdmin de zipter98 em Tópicos Sem Resposta
Tópico movido para a seção de dúvidas e pedidos resolvidos. -
[Encerrado] [Pedido] Script Quest
tópico respondeu ao FlamesAdmin de zipter98 em Tópicos Sem Resposta
Scripts com a função main onLogin e onLogout não precisam ser registrados no login.lua. Tag: <event type="logout" name="FireQuest" event="script" value="FireQuest.lua"/> -
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
Tópico movido para a seção de dúvidas e pedidos resolvidos.
-
[Encerrado] [Pedido] Script Quest
tópico respondeu ao FlamesAdmin de zipter98 em Tópicos Sem Resposta
data/creaturescripts/scripts, function onLogout(cid) for i = 1, #getPlayersOnline() do local players = getPlayersOnline()[i] local where = {x = 1056, y = 1067, z = 7} --Para onde os jogadores serão teleportados. local sto = 2308 --Storage da quest. if getPlayerStorageValue(players, sto) >= 1 then doTeleportThing(players, where) setPlayerStorageValue(players, sto, -1) doPlayerSendTextMessage(players, 27, "O jogador "..getCreatureName(cid).." deslogou durante a quest. Você foi teleportado.") end end return true end A tag, suponho que você saiba fazer. exp2.0.lua, procure por: if valor >= getCreatureHealth(cid) then if getPlayerStorageValue(cid, 6598754) >= 1 or getPlayerStorageValue(cid, 6598755) >= 1 then setPlayerStorageValue(cid, 6598754, -1) setPlayerStorageValue(cid, 6598755, -1) doRemoveCondition(cid, CONDITION_OUTFIT) doTeleportThing(cid, posBackPVP, false) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) return false --alterado v1.8 end Coloque, abaixo: for i = 1, #getPlayersOnline() do local players = getPlayersOnline()[i] local where = {x = 1056, y = 1067, z = 7} --Para onde os jogadores serão teleportados. local sto = 2308 --Storage da quest. if getPlayerStorageValue(players, sto) >= 1 then doTeleportThing(players, where) setPlayerStorageValue(players, sto, -1) doPlayerSendTextMessage(players, 27, "O jogador "..getCreatureName(cid).." morreu durante a quest. Você foi teleportado.") end end Se fizer tudo corretamente, vai funcionar (: -
Tópico atendido e movido para a seção de pedidos entregues.
-
Ops, fail ._. function onUse(cid, item, frompos, item2, topos) local quest_status = getPlayerStorageValue(cid, 38347) if quest_status <= 0 then local life = getPlayerHealth(cid) doPlayerSendTextMessage(cid, 27, "Ativado. Heal: "..life..".") setPlayerStorageValue(cid, 38347, 1) doItemSetAttribute(item.uid, "vida", life) doItemSetAttribute(item.uid, "description", "HP: "..life..".") doSendMagicEffect(frompos, 11) else local hp = getItemAttribute(item.uid, "vida") or 0 doSendAnimatedText(getPlayerPosition(cid), "!!!", 71) doPlayerSendTextMessage(cid, 27, "Usado. Sua vida agora é "..hp..".") setPlayerStorageValue(cid, 38347, -1) doPlayerAddHealth(cid, -(getPlayerHealth(cid) - 1)) doPlayerAddHealth(cid, hp - 1) doSendMagicEffect(frompos, 11) end return true end
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.