Postado Outubro 26, 2017 7 anos @Joaoafp local config = { -- level needed to make the quest level = 130, -- if players should be able to do the quest unlimited amount of times (not conflicting quest rewards) redo = { status = false, -- true = unlimited, false = once storageValue = 61111 -- only if status is false this will be used }, -- vocation requirement, positions and item configuration { vocations = {1, 5}, itemId = 2190, playerPos = {x=1117, y=1150, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1117, y=1151, z=6} -- Position of Spellbook "Sorcerer". }, { vocations = {2, 6}, itemId = 2182, playerPos = {x=1123, y=1157, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1122, y=1157, z=6} -- Position of Red apple "Druid". }, { vocations = {3, 7}, itemId = 2399, playerPos = {x=1127, y=1155, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1127, y=1154, z=6} -- Position of Crossbow "Paladin". }, { vocations = {4, 8}, itemId = 8602, playerPos = {x=1123, y=1147, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, --Position of the reward room. itemPos = {x=1122, y=1147, z=6} --Position of Sword "Knight". } } function onUse(cid) local players = {} for _, v in ipairs(config) do v.playerPos.stackpos = 253 local player = getThingfromPos(v.playerPos).uid if isPlayer(player) == FALSE then return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Não há jogadores suficiente.") elseif getPlayerLevel(player) < config.level then players.level = true elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then players.vocation = true elseif config.redo.status == false and getPlayerStorageValue(cid, config.redo.storageValue) == 1 then players.done = true else v.itemPos.stackpos = 1 local item = getThingfromPos(v.itemPos) if item.itemid ~= v.itemId then players.item = true else table.insert(players, player) end end end if players.level then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os jogadores devem ser level " .. config.level .. " ou mais.") elseif players.vocation then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os jogadores devem estar em seus respectivo piso!") elseif players.done then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Um jogador em seu time ja fez a Fishing Rod and Pick Quest!") elseif players.item then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os items devem estar na posição correta!") else for k, player in ipairs(players) do doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF) doTeleportThing(player, config[k].newPos) doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT) end end return TRUE end Deixe false que é para que só possa fazer 1x vez.
Postado Outubro 27, 2017 7 anos Autor @KotZletY Deu errado, quando coloca false os jogadores podem fazer quantas vezes quiser mas obg pela ajuda ! @xWhiteWolf Wolf tenta me ajudar nessa ai? pfv? +REP
Postado Outubro 27, 2017 7 anos Em 27/10/2017 em 01:55, Joaoafp disse: quando coloca false os jogadores podem fazer quantas vezes quiser Ué ? A descrição do script diz que se tiver falso só faz uma vez(once) e se tiver true que pode fazer várias vezes(unlimited). Mostrar conteúdo oculto local config = { -- level needed to make the quest level = 130, -- if players should be able to do the quest unlimited amount of times (not conflicting quest rewards) redo = { status = false, -- true = unlimited, false = once storageValue = 61111 -- only if status is false this will be used }, -- vocation requirement, positions and item configuration { vocations = {1, 5}, itemId = 2190, playerPos = {x=1117, y=1150, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1117, y=1151, z=6} -- Position of Spellbook "Sorcerer". }, { vocations = {2, 6}, itemId = 2182, playerPos = {x=1123, y=1157, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1122, y=1157, z=6} -- Position of Red apple "Druid". }, { vocations = {3, 7}, itemId = 2399, playerPos = {x=1127, y=1155, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1127, y=1154, z=6} -- Position of Crossbow "Paladin". }, { vocations = {4, 8}, itemId = 8602, playerPos = {x=1123, y=1147, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, --Position of the reward room. itemPos = {x=1122, y=1147, z=6} --Position of Sword "Knight". } } function onUse(cid) local players = {} for _, v in ipairs(config) do v.playerPos.stackpos = 253 local player = getThingfromPos(v.playerPos).uid if isPlayer(player) == FALSE then return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Não há jogadores suficiente.") elseif getPlayerLevel(player) < config.level then players.level = true elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then players.vocation = true elseif config.redo.status == false and getPlayerStorageValue(player, config.redo.storageValue) == 1 then players.done = true else v.itemPos.stackpos = 1 local item = getThingfromPos(v.itemPos) if item.itemid ~= v.itemId then players.item = true else table.insert(players, player) end end end if players.level then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os jogadores devem ser level " .. config.level .. " ou mais.") elseif players.vocation then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os jogadores devem estar em seus respectivo piso!") elseif players.done then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Um jogador em seu time ja fez a Fishing Rod and Pick Quest!") elseif players.item then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os items devem estar na posição correta!") else for k, player in ipairs(players) do doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF) doTeleportThing(player, config[k].newPos) doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT) end end return TRUE end
Postado Outubro 27, 2017 7 anos Autor @KotZletY Eu sei manow, mas esta errada a descrição, não consigo resolver esse problema de jeito nenhum crio os 4 chares e coloco td lá, e ja fala qe eles fizeram, mesmo o time quem nunca fez.
Postado Outubro 27, 2017 7 anos @Joaoafp Mostrar conteúdo oculto local config = { -- level needed to make the quest level = 130, -- if players should be able to do the quest unlimited amount of times (not conflicting quest rewards) redo = { status = true, -- true = unlimited, false = once storageValue = 61111 -- only if status is false this will be used }, -- vocation requirement, positions and item configuration { vocations = {1, 5}, itemId = 2190, playerPos = {x=1117, y=1150, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1117, y=1151, z=6} -- Position of Spellbook "Sorcerer". }, { vocations = {2, 6}, itemId = 2182, playerPos = {x=1123, y=1157, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1122, y=1157, z=6} -- Position of Red apple "Druid". }, { vocations = {3, 7}, itemId = 2399, playerPos = {x=1127, y=1155, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, -- Position of the reward room. itemPos = {x=1127, y=1154, z=6} -- Position of Crossbow "Paladin". }, { vocations = {4, 8}, itemId = 8602, playerPos = {x=1123, y=1147, z=6}, -- Initial position in the Stone tile newPos = {x=1122, y=1153, z=6}, --Position of the reward room. itemPos = {x=1122, y=1147, z=6} --Position of Sword "Knight". } } function onUse(cid) local players = {} for _, v in ipairs(config) do v.playerPos.stackpos = 253 local player = getThingfromPos(v.playerPos).uid if isPlayer(player) == FALSE then return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Não há jogadores suficiente.") elseif getPlayerLevel(player) < config.level then players.level = true elseif isInArray(v.vocations, getPlayerVocation(player)) == FALSE then players.vocation = true elseif config.redo.status and getPlayerStorageValue(cid, config.redo.storageValue) >= 0 then players.done = true else v.itemPos.stackpos = 1 local item = getThingfromPos(v.itemPos) if item.itemid ~= v.itemId then players.item = true else table.insert(players, player) end end end if players.level then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os jogadores devem ser level " .. config.level .. " ou mais.") elseif players.vocation then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os jogadores devem estar em seus respectivo piso!") elseif players.done then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Um jogador em seu time ja fez a Fishing Rod and Pick Quest!") elseif players.item then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, "Todos os items devem estar na posição correta!") else for k, player in ipairs(players) do doSendMagicEffect(getCreaturePosition(player), CONST_ME_POFF) doTeleportThing(player, config[k].newPos) doSendMagicEffect(getCreaturePosition(player), CONST_ME_TELEPORT) end end return TRUE end
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.