Postado Maio 16, 2015 10 anos Quero uma alavanca que se tiver 4x4 players encima dos respectivos tiles, eles são teleportados para uma AREA X. E que esse script tenha um exhausted de 5 minutos! Eu sei que é possivel, mas nao manjo tanto, não é tão dificil acredito eu, quem puder me ajudar, REP +++ OBS: SE POSSIVEL VERIFICAR SE OS 4 PLAYERS SÃO DA MESMA GUILD... E os outros 4 SÃO DA MESMA GUILD TAMBÉM, pois é GUILD X GUILD Tentei fazer algo com isso: local cfg = { positions = { {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, }, positions2 = { {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, }, not_enough_players = xxx, --Efeito que aparecerá quando não tiver jogadores o suficiente. tp_effect = xxx, --Efeito que vai aparecer nos jogadores ao serem teleportados. } function onUse(cid, item, fromPosition, item2, toPosition) for i = 1, #cfg.positions do if not isPlayer(getTopCreature(cfg.positions[i][1]).uid) then for i = 1, #cfg.positions2 do if not isPlayer(getTopCreature(cfg.positions2[i][1]).uid) then return doPlayerSendCancel(cid, "Not enough players.") and doSendMagicEffect(getThingPos(cid), cfg.not_enough_players) end end for i = 1, #cfg.positions do local creature = getTopCreature(cfg.positions[i][1]).uid doTeleportThing(creature, cfg.positions[i][2]) local creature = getTopCreature(cfg.positions2[i][1]).uid doTeleportThing(creature, cfg.positions2[i][2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), cfg.tp_effect) end return true end Editado Maio 16, 2015 10 anos por Baned (veja o histórico de edições)
Postado Maio 17, 2015 10 anos Não testei. local config = { positions = { {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, }, positions2 = { {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, }, } function onUse(cid, item, fromPosition, item2, toPosition) -- Checando posições 1 for i = 1, #config.positions do if not isPlayer(getTopCreature(config.positions[i][1]).uid) then return doPlayerSendCancel(cid, "Nao existe players em todas as posicoes.") and doSendMagicEffect(getThingPos(cid), 2) end local guild1 = getPlayerGuildId(cid) if getPlayerGuildId(getTopCreature(config.positions[i][1]).uid) ~= guild1 then return doPlayerSendCancel(cid, "Alguem player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end end -- Checando posições 2 for i = 1, #config.positions2 do if not isPlayer(getTopCreature(config.positions2[i][1]).uid) then return doPlayerSendCancel(cid, "Not enough players.") and doSendMagicEffect(getThingPos(cid), 2) end local guild2 = getPlayerGuildId(getTopCreature(config.positions2[1][1]).uid) if getPlayerGuildId(getTopCreature(config.positions2[i][1]).uid) ~= guild2 then return doPlayerSendCancel(cid, "Alguem player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end end -- Teleportando posições 1 for i = 1, #config.positions do local creature = getTopCreature(config.positions[i][1]).uid doTeleportThing(creature, config.positions[i][2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) end -- Teleportando posições 1 for i = 1, #config.positions2 do local creature = getTopCreature(config.positions2[i][1]).uid doTeleportThing(creature, config.positions2[i][2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) end return true end STYLLER OT 2022
Postado Maio 17, 2015 10 anos Autor Luan, ainda não testei, mas tem como por um storage para o time 1 e outro storage pro time 2? Pro time da posição 1 colocar storage 10045 e pro time 2 colocar storage 10046? E se possivel pegar o nome da guild dos dois e mandar um BROADCAST do tipo, Iniciou uma batalha entre GUILDX VS GUILDX? E se possivel também, remover 500k de cada player, obrigaaaaaado, só se der! Editado Maio 17, 2015 10 anos por Baned (veja o histórico de edições)
Postado Maio 17, 2015 10 anos Acho que o luan vai arrumar uma forma melhor de fazer isso (quase certeza) mais enfim, acho que ficaria assim: local config = { positions = { {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, }, positions2 = { {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, }, } function onUse(cid, item, fromPosition, item2, toPosition) -- Checando posições 1 for i = 1, #config.positions do if not isPlayer(getTopCreature(config.positions[i][1]).uid) then return doPlayerSendCancel(cid, "Nao existe players em todas as posicoes.") and doSendMagicEffect(getThingPos(cid), 2) end local guild1 = getPlayerGuildId(cid) if getPlayerGuildId(getTopCreature(config.positions[i][1]).uid) ~= guild1 then return doPlayerSendCancel(cid, "Algum player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end end -- Checando posições 2 for i = 1, #config.positions2 do if not isPlayer(getTopCreature(config.positions2[i][1]).uid) then return doPlayerSendCancel(cid, "Not enough players.") and doSendMagicEffect(getThingPos(cid), 2) end local guild2 = getPlayerGuildId(getTopCreature(config.positions2[1][1]).uid) if getPlayerGuildId(getTopCreature(config.positions2[i][1]).uid) ~= guild2 then return doPlayerSendCancel(cid, "Alguem player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end end -- Teleportando posições 1 for i = 1, #config.positions do local creature = getTopCreature(config.positions[i][1]).uid local storage1 = 10045 doTeleportThing(creature, config.positions[i][2]) setPlayerStorageValue(creature, storage1, 1) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) end -- Teleportando posições 1 for i = 1, #config.positions2 do local creature = getTopCreature(config.positions2[i][1]).uid local storage2 = 10046 local guilda1 = getPlayerGuildName(getTopCreature(config.positions[i][1]).uid) local guilda2 = getPlayerGuildName(getTopCreature(config.positions2[i][1]).uid doTeleportThing(creature, config.positions2[i][2]) setPlayerStorageValue(creature, storage2, 1) doBroadcastMessage("Começou uma batalha entre ".. guilda1 .." e ".. guilda2 ..".") doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) end return true end Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais... ________________________________________________________________________________ Minhas Sprites: Mega Metagross Mega Abomasnow Pack de Shinys [Posso atualizá-lo com novos shinys a qualquer momento] Tutoriais: [Completo] Criando e adicionando um novo Pokémon [Actions] Criando quest no RME Editores Lua/Xml/Sync Entre outros: Editores Win/Mac/Linux
Postado Maio 17, 2015 10 anos Solução Não testei .. local config = { positions = { {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, }, positions2 = { {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, {{x=535, y=1597, z=4}, {x=535, y=2000, z=4}}, }, storageTime1 = 10045, storageTime2 = 10046, money = 500,-- em k } function onUse(cid, item, fromPosition, item2, toPosition) -- Checando posições 1 for i = 1, #config.positions do local creature = getTopCreature(config.positions[i][1]).uid if not isPlayer(creature) then return doPlayerSendCancel(cid, "Nao existe players em todas as posicoes.") and doSendMagicEffect(getThingPos(cid), 2) end local guild1 = getPlayerGuildId(getTopCreature(config.positions[1][1]).uid) if getPlayerGuildId(creature) ~= guild1 then return doPlayerSendCancel(cid, "Algum player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end if getPlayerMoney(creature) < (config.money * 1000) then return doPlayerSendCancel(cid, "Algum player nao tem "..config.money.."k.") and doSendMagicEffect(getThingPos(cid), 2) end end -- Checando posições 2 for i = 1, #config.positions2 do local creature = getTopCreature(config.positions2[i][1]).uid if not isPlayer(creature) then return doPlayerSendCancel(cid, "Not enough players.") and doSendMagicEffect(getThingPos(cid), 2) end local guild2 = getPlayerGuildId(getTopCreature(config.positions2[1][1]).uid) if getPlayerGuildId(creature) ~= guild2 then return doPlayerSendCancel(cid, "Algum player nao e da guild correta.") and doSendMagicEffect(getThingPos(cid), 2) end if getPlayerMoney(creature) < (config.money * 1000) then return doPlayerSendCancel(cid, "Algum player nao tem "..config.money.."k.") and doSendMagicEffect(getThingPos(cid), 2) end end doBroadcastMessage("Começou uma batalha entre ".. getPlayerGuildName(getTopCreature(config.positions[1][1].uid) .." e ".. getPlayerGuildName(getTopCreature(config.positions2[1][1]).uid) ..".") -- Teleportando posições 1 for i = 1, #config.positions do local creature = getTopCreature(config.positions[i][1]).uid doTeleportThing(creature, config.positions[i][2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) doPlayerRemoveMoney(creature, (config.money * 1000)) setPlayerStorageValue(creature, config.storageTime1, 1) end -- Teleportando posições 2 for i = 1, #config.positions2 do local creature = getTopCreature(config.positions2[i][1]).uid doTeleportThing(creature, config.positions2[i][2]) doPlayerSendTextMessage(creature, 27, "You started the quest.") doSendMagicEffect(getThingPos(creature), 33) doPlayerRemoveMoney(creature, (config.money * 1000)) setPlayerStorageValue(creature, config.storageTime2, 1) end return true end STYLLER OT 2022
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.