Postado Maio 19, 2016 9 anos local configuration = { to_pos = {x = 477, y = 1363, z = 7}, --Para onde o teleport levará. pos = {x = 571, y = 1009, z = 7}, --Onde o teleport será criado. teleport_id = 1387, --ID do teleport. monstername = "Tower Event", -- nome do boss monsterpos = { x = 477, y = 1369, z = 7 }, -- posiçao do boss poss = {x = 578, y = 1014, z = 7}, time = 1, tempoTP = 1, teleport_id = 1387, storage = 10203, } function onSay(cid, words, param, channel, player) local item = getTileItemById(configuration.pos, configuration.teleport_id).uid if item > 0 then for _, player in ipairs(getPlayersOnline()) do setPlayerStorageValue(player, configuration.storage, 0) end db.executeQuery("DELETE FROM `player_storage` WHERE `key` = "..configuration.storage) -- aqui deleta doRemoveItem(item, 1) broadcastMessage("~> [TOWER] foi fechado.", 27) else for _, player in ipairs(getPlayersOnline()) do setPlayerStorageValue(player, configuration.storage, 1) end db.executeQuery("UPDATE `player_storage` SET `value` = 1 WHERE `key` = "..configuration.storage) -- aqui adiciona broadcastMessage( "~> [TOWER] foi aberto no Templo.", 27) doCreateTeleport(configuration.teleport_id, configuration.to_pos, configuration.pos) doCreateMonster(configuration.monstername, configuration.monsterpos) end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
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.