

GustavaoTibia
Campones-
Total de itens
30 -
Registro em
-
Última visita
Tudo que GustavaoTibia postou
-
também nada, sem erro no console sem mover alavanca
-
Não da erro, mas não acontece nada, alavanca antes movia pra um lado e quando fosse da use de novo dava aquele erro com o jogador no sqm certo, se o jogador tiver no sqm fora alavanca vai e volta sem aparecer nenhum erro no console
-
Galera to com um problema no action de um boss... Alguém poderia me ajudar corrigir? ou dizer mais ou menos porque acontece? Lua Script Error: [Action Interface] data/actions/scripts/forgotten knowledge/tenebris lever.lua:onUse data/actions/scripts/forgotten knowledge/tenebris lever.lua:15: attempt to compare number with nil stack traceback: [C]: in function '__le' data/actions/scripts/forgotten knowledge/tenebris lever.lua:15: in function <data/actions/scripts/forgotten knowledge/tenebris lever.lua:7
-
Oi gente Gostaria de colocar pra funcionar esse script com apenas um item e que seja infinito. E se for possível também gostaria por "talkactions" local config = { [11260] = {blessId = 5, text = 'The Spiritual Shielding'}, [11259] = {blessId = 6, text = 'The Embrace of Tibia'}, [11261] = {blessId = 4, text = 'The Fire of the Suns'}, [11258] = {blessId = 3, text = 'The Spark of the Phoenix'}, [11262] = {blessId = 2, text = 'The Wisdom of Solitude'}, [28036] = {blessId = 7, text = 'Heart of the Mountain'}, [28037] = {blessId = 8, text = 'Blood of the Mountain'} } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local useItem = config[item.itemid] if not useItem then return true end if player:hasBlessing(useItem.blessId) then player:say('You already possess this blessing.', TALKTYPE_MONSTER_SAY) return true end player:addBlessing(useItem.blessId,1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, useItem.text .. ' protects you.') player:getPosition():sendMagicEffect(CONST_ME_LOSEENERGY) item:remove(1) return true end
-
Oi gente Gostaria de colocar pra funcionar esse script com apenas um item e que seja infinito. E se for possível também gostaria por "talkactions" local config = { [11260] = {blessId = 5, text = 'The Spiritual Shielding'}, [11259] = {blessId = 6, text = 'The Embrace of Tibia'}, [11261] = {blessId = 4, text = 'The Fire of the Suns'}, [11258] = {blessId = 3, text = 'The Spark of the Phoenix'}, [11262] = {blessId = 2, text = 'The Wisdom of Solitude'}, [28036] = {blessId = 7, text = 'Heart of the Mountain'}, [28037] = {blessId = 8, text = 'Blood of the Mountain'} } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local useItem = config[item.itemid] if not useItem then return true end if player:hasBlessing(useItem.blessId) then player:say('You already possess this blessing.', TALKTYPE_MONSTER_SAY) return true end player:addBlessing(useItem.blessId,1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, useItem.text .. ' protects you.') player:getPosition():sendMagicEffect(CONST_ME_LOSEENERGY) item:remove(1) return true end
-
suporte scripts citywar - anti-entrosa otx malucooo
pergunta respondeu ao GustavaoTibia de GustavaoTibia em Resolvidos
Erro agora está na LIB. Alguém pode ajudar? LIB: -
Lua Script Error: [CreatureScript Interface] data/creaturescripts/scripts/modalwindowhelper.lua:onModalWindowdata/creaturescripts/scripts/citywar.lua:147: attempt to call method 'getBankBalance' (a nil value)stack traceback: [C]: in function 'getBankBalance' data/creaturescripts/scripts/citywar.lua:147: in function 'callback' data/creaturescripts/scripts/modalwindowhelper.lua:26: in function <data/creaturescripts/scripts/modalwindowhelper.lua:1> Alguém pode me ajudar? tfs 1.x Script:
-
Gente eu estou procurando alguém que faça sistema anti-entrosa para war system no tfs 1.x Uma guild invita a outra para ir para um local privado onde apenas membros das duas guilds pode acessar Limitar o numero de jogadores que pode ir, ou seja, /war invite, nome da guild, 5, spell bloqueada, pote bloqueada Se for mais simples fazer deixar apenas /war invite, Nome da guild, 5 "5" = números máximo de jogadores de ambas guilds que pode entrar no local privado, 5x5 spells bloqueadas = spells bloqueadas "sem ue" "apenas sd" tanto faz pote bloqueada = pote nova bloqueada ou não. Eu tentei comprar de um cara aqui no fórum mas o animal só passou a perna. Acredito que pedindo assim vai ser mais difícil ainda. Aceito recomendações quem manjar de script pode passar o contato se quiser único jeito. (desculpe se postei no local errado)
-
otserv 10.x Global 10/11.5 + OtherWorld + Hearth of Destruction Quest+ Eventos
tópico respondeu ao Qwizer de GustavaoTibia em 11.X
@MitSuig area anti entrosa nem funciona- 632 respostas
-
- tfs 1.0/1.2
- otserv
- (e 4 mais)
-
Gente eu to com um problema em um ONKILL, na verdade acho que não seja o onkill O problema é o seguinte REWARD CHEST, quando eu mato o boss usando um jogador apenas não acontece nada o reward funciona perfeitamente, mais quando eu uso utevo res "fire elemental (qualquer monstro) e faça ele participar do boss do reward ou que ele chegue a matar o boss o server crasha Achei que o problema seria o onkill mais eu removi uma função do onkill e não caiu, por favor podem tentar me ajudar? Assim cai function onKill(cid, target)target = Monster(target) if (target ~= nil) then local mt = MonsterType(target:getName()) if mt:useRewardChest() then local loot = BossLoot:new(target) if loot then local corpse = Item(doCreateItem(MonsterType(target:getName()):getCorpseId(), 1, target:getPosition())) corpse:decay() target:setDropLoot(false) loot:updateDamage() loot:setRewards() loot:addRewards() corpse:setAttribute('aid', 21584) end end end return trueend Então eu removi o ' loot:updateDamage() ' e parou de cair mais o reward não funciona como deveria claro que é enviar os items 'x' para os jogadores que participaram... function onKill(cid, target)target = Monster(target) if (target ~= nil) then local mt = MonsterType(target:getName()) if mt:useRewardChest() then local loot = BossLoot:new(target) if loot then local corpse = Item(doCreateItem(MonsterType(target:getName()):getCorpseId(), 1, target:getPosition())) corpse:decay() target:setDropLoot(false) loot:setRewards() loot:addRewards() corpse:setAttribute('aid', 21584) end end end return trueend function BossLoot:updateDamage() if self.creature then local tmp = {} local totaldmg = 0 for killer, damage in pairs(self.creature:getDamageMap()) do totaldmg = totaldmg+damage.total tmp[killer] = damage.total end self.players = sort_descending(tmp) self.totaldmg = totaldmg else error("Creature not found.") endend
-
Estou procurando algo parecido, gostaria que os summons não ataque um certo tipo de monstro ou no caso bosses Uso tfs 1.x será que é possível isso? problema que estou tentando fazer o reward chest para de derrubar o server quando um summon participa ou mata um boss.
-
@Eskylo obrigado amigo, deu certo perfeitamente o negocio da BAG e teve o resultado que eu esperava, não esta caindo o server pelo menos do jeito de antes não. Mais agora tem o problema do summon, tipo se o jogador summonar algum monstro e ele participar ou matar o boss do reward chest o server cai... Eu coloquei aquilo que voce passou ali no onkill e parece que não deu Tem como me ajudar neste caso também? @Eskylo me desculpe pela demora para responder, é que a maquina que uso para teste teve um problema nela e pedi para formatarem.
-
@Eskylo amigo, obrigado eu ainda não testei mais creio que será de otima ajuda. Mais eu achei outro problema nele.. tipo se eu sumonar um monstro e colocar ele para atacar o monstro que tiver na lista do REWARD CHEST (boss) se ele matar o servidor cai... creio que seja porque os items do boss vai ser enviado pro monstro e como ele nao é um jogador o server cai. Será que tem um jeito de colocar no ONKILL apenas os jogadores que matar receber? se caso não for um jogador não acontece nada será possível isso?
-
@Eskylo Os items ja esta indo para o DEPOT mais o problema que ele vai em items.. não em uma BAG, eu fiz um jeito de ir 1 item por bag ou seja, se o boss me dar 100 items vai ser enviado 100 BAGS com 1 item dentro. Eu so gostaria que fosse 1 bag por cada boss, matar 1 boss e ir todos os items que sair dele pra 1 bag só... deu pra entender? ja tentei editar essa parte ai mais "bugou" o script... Poderia fazer um tipo de exemplo pra eu testar?
-
Sempre posto coisas aqui e nunca sou ajudado.. desanimador.
-
Olá gostaria de pedir uma força pra alguem ai. Eu gostaria que este script me envie uma BAG por cada boss do reward chest que o jogador matar, atualmente ele esta enviando os items normal so que se eu mato 2 bosses iguais ou diferentes os items fica um em cima do outro, gostaria de separar. Ex: matou um boss os items vai ser enviado dentro de uma bag ou backpack dependendo do id que colocar, quando eu matar o outro boss vou receber outra bag ou backpack e quando eu ir na ilha pegar os items do reward, lá vai esta 2 bag ou backpack e nao os items tudo juntos Eu tentei mais consegui apenas enviar 1 item por cada bag ou backpack, ou seja, se eu matar um boss e ganhar 10 item, vai ser enviado 10 bags :\ Por fim o scritp é este: function sort_descending(t) local tmp = {} for k, v in pairs(t) do table.insert(tmp, {k, v}) end table.sort(tmp, function(a, b) return a[2] > b[2] end) return tmpendfunction table.find(t, v) for i,x in pairs(t) do if x == v then return true end endendfunction Player:addItemRewardBag(itemid, count)local rewardbag = self:getDepotChest(99, true) return rewardbag:addItem(itemid, count)endfunction MonsterType:getBossReward(chance, unique) local ret = {} local function randomItem(lootBlock, chance) local randvalue = math.random(0, 100000) / (getConfigInfo("rateLoot") * chance) if randvalue < lootBlock.chance then if (ItemType(lootBlock.itemId):isStackable()) then return (randvalue%lootBlock.maxCount) + 0 else return 1 end end end local lootBlockList = self:getLoot() for _, loot in pairs(lootBlockList) do local rd = randomItem(loot, chance) if rd then if loot.uniquedrop then if unique then table.insert(ret, {loot, rd}) end else table.insert(ret, {loot, rd}) end end end return retendBossLoot = {}BossUids = {}function BossLoot:new(boss) if not table.find(BossUids, boss:getId()) then table.insert(BossUids, boss:getId()) return setmetatable({creature=boss}, {__index = BossLoot}) endendfunction BossLoot:updateDamage() if self.creature then local tmp = {} local totaldmg = 0 for killer, damage in pairs(self.creature:getDamageMap()) do totaldmg = totaldmg+damage.total tmp[killer] = damage.total end self.players = sort_descending(tmp) self.totaldmg = totaldmg else error("Creature not found.") endendfunction BossLoot:setRewards() if self.totaldmg and self.creature then if getConfigInfo("rateLoot") > 0 then local mt = MonsterType(self.creature:getName()) for i, playertab in ipairs(self.players) do local loot if i == 1 then loot = mt:getBossReward(playertab[2] / self.totaldmg, true) else loot = mt:getBossReward(playertab[2] / self.totaldmg, false) end table.insert(self.players[i], loot) end end else error("Error") endendfunction BossLoot:addRewards() if self.players and self.players[1] and self.players[1][3] then for i, playertab in ipairs(self.players) do local player = Player(playertab[1]) if player then local str = "The following items are available in your reward chest: " for i, lootTable in ipairs(playertab[3]) do local item = player:addItemRewardBag(lootTable[1].itemId, math.ceil(lootTable[2])) if item then str = str .. item:getNameDescription() .. ", " end end str = str:sub(1, #str-2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, str) end end else error("Error") endendfunction onKill(cid, target)target = Monster(target) if (target ~= nil) then local mt = MonsterType(target:getName()) if mt:useRewardChest() then local loot = BossLoot:new(target) if loot then local corpse = Item(doCreateItem(MonsterType(target:getName()):getCorpseId(), 1, target:getPosition())) doDecayItem() target:setDropLoot(false) loot:updateDamage() loot:setRewards() loot:addRewards() corpse:setAttribute('aid', 21584) end end end return trueend
-
como foi que você resolveu? eu também tive o mesmo problema.
-
action Reward Chest & Boss Reward
tópico respondeu ao MatheusGlad de GustavaoTibia em Linguagens de Programação
Ja tenho esse onkill. Tanto faz eu abrir o loot ou o reward chest tem vez que debuga e as vezes nem debuga já cai direto ou quando matar o boss dar um "/save" se não cair é porque da pra abrir normal o loot ou o reward chest agora se der um "/save" e cair o server é porque ta dando debug na hora de abrir o loot ou reward chest. Mesmo dando debug da pra entrar no jogo, ou seja, quando debugar o cliente eu vou la e entro de novo o char continua on só não vou poder abrir o loot ou o reward porque vai debugar de novo logico, mais dai quando o server for salvar tanto no save normal ou no "/save" vai cair :\ -
action Reward Chest & Boss Reward
tópico respondeu ao MatheusGlad de GustavaoTibia em Linguagens de Programação
Foi você que fez esse sistema ou pegou na net? Eu consegui fazer funcionar no TFS 1.0 porem as vezes quando mata o boss e vai abrir o loot "reward" da debug e o servidor cai, as vezes nem da debug já cai direto assim quando mata o boss. Estou tentando resolver mais se alguém quiser ajudar por favor ajuda ai. -
Ola, gente eu to tentando adicionar comando para invitar war, para não ficar usando site. Mais o problema que achei é que o comando não adiciona os nomes das guilds, estou tentando colocar para adicionar os nomes não estou tendo sucesso, então resolvi pedir ajuda a algum abençoado daqui, sempre tento pedir ajuda aqui mais nunca ninguem ajuda. Será que é impossível colocar os nomes das guilds? GUILD QUE INVITOU E GUILD INIMIGA, O TFS É 1.0 Comando: function onSay(cid, words, param) local player = Player(cid) local guild = player:getGuild() if(guild == nil) then player:sendCancelMessage("You need to be in a guild in order to execute this talkaction.") return false end local guild = getPlayerGuildId(cid) if not guild or (player:getGuildLevel() < GUILDLEVEL_LEADER) then player:sendCancelMessage("You cannot execute this talkaction.") return false end local t = string.split(param, ",") if(not t[2]) then player:sendChannelMessage("", "Not enough param(s).", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local enemy = getGuildId(t[2]) if(not enemy) then player:sendChannelMessage("", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end if(enemy == guild) then player:sendChannelMessage("", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local enemyName, tmp = "", db.storeQuery("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if tmp ~= false then enemyName = result.getDataString(tmp, "name") result.free(tmp) end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild1` = " .. enemy .. " AND `guild2` = " .. guild if(t[1] == "cancel") then query = "`guild1` = " .. guild .. " AND `guild2` = " .. enemy end tmp = db.storeQuery("SELECT `id`, `started`, `ended`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp == false) then player:sendChannelMessage("", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end if(t[1] == "accept") then local _tmp = db.storeQuery("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = result.getDataInt(_tmp, "balance") < result.getDataInt(tmp, "payment") result.free(_tmp) if(state) then player:sendChannelMessage("", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. result.getDataInt(tmp, "payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`ended` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`ended` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`started` = " .. os.time() .. ", `ended` = " .. (result.getDataInt(tmp, "ended") > 0 and (os.time() + ((result.getDataInt(tmp, "started") - result.getDataInt(tmp, "ended")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return false end if(t[1] == "invite") then local str = "" tmp = db.storeQuery("SELECT `guild1`, `status` FROM `guild_wars` WHERE `guild1` IN (" .. guild .. "," .. enemy .. ") AND `guild2` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp ~= false) then if(result.getDataInt(tmp, "status") == 0) then if(result.getDataInt(tmp, "guild1") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end result.free(tmp) end if(str ~= "") then player:sendChannelMessage("", str, TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.floor(payment)+1000 tmp = db.storeQuery("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = result.getDataInt(tmp, "balance") < payment result.free(tmp) if(state) then player:sendChannelMessage("", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild1`, `guild2`, `started`, `ended`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") broadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return false end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.storeQuery("SELECT `id` FROM `guild_wars` WHERE `guild1` = " .. guild .. " AND `guild2` = " .. enemy .. " AND `status` = " .. status) if(tmp ~= false) then local query = "UPDATE `guild_wars` SET `ended` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return false end if(status == 4) then player:sendChannelMessage("", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end tmp = db.storeQuery("SELECT `id`, `ended` FROM `guild_wars` WHERE `guild1` = " .. enemy .. " AND `guild2` = " .. guild .. " AND `status` = 1") if(tmp ~= false) then if(result.getDataInt(tmp, "ended") > 0) then result.free(tmp) player:sendChannelMessage("", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local query = "UPDATE `guild_wars` SET `status` = 4, `ended` = " .. os.time() .. " WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return false end player:sendChannelMessage("", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end No mysql as tabela name1 e name2 ficam vazia olha abaixo Se for impossível colocar pra adicionar os nomes das guild usando comando por favor avise se não for INCOMODAR ¬¬
-
Gente eu to procurando resolver um problema na WOTE quest. O boss é sumonado normal quando da USE no item e joga em cima do outro item no MAPA. O problema é que se o player sair ou morrer o boss continua vivo e ninguem pode entrar até que ele seja morto, só que claro que não tem como matar porque ninguem entra na sala, eu queria arrumar para depois de um tempo liberar a sala e o boss ser removido para poder o outro player que entrar sumonar novamente e tentar matar se caso ele sair ou morrer depois do tempo "x" a sala é liberada e o boss é removido. O script atual é e o que libera ou bloqueia a sala é "setGlobalStorageValue" Poderia colocar o TP normal, mais dai os players que morrer e tentar novamente vai ficar chamando muitos bosses caso ele nao seja removido. local boss = { [3193] = "fury of the emperor", [3194] = "wrath of the emperor", [3195] = "scorn of the emperor", [3196] = "spite of the emperor", } function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 12318 and boss[itemEx.uid] and itemEx.itemid == 12383) then doTransformItem(itemEx.uid, 11753) doSummonCreature(boss[itemEx.uid], {x = toPosition.x + 4, y = toPosition.y, z = toPosition.z}) setGlobalStorageValue(itemEx.uid - 4, 1) elseif(item.itemid == 12318 and itemEx.itemid == 12317) then if(toPosition.x > 33034 and toPosition.x < 33071 and toPosition.y > 31079 and toPosition.y < 31102) then if(getPlayerStorageValue(cid, 1090) == 1) then setPlayerStorageValue(cid, 1090, 2) doCreatureSay(cid, "The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_ORANGE_1) doTeleportThing(cid, {x = 33052, y = 31085, z = 14}) doSendMagicEffect({x = 33052, y = 31085, z = 14}, CONST_ME_TELEPORT) end elseif(toPosition.x > 33080 and toPosition.x < 33111 and toPosition.y > 31079 and toPosition.y < 31100) then if(getPlayerStorageValue(cid, 1090) == 2) then setPlayerStorageValue(cid, 1090, 3) doCreatureSay(cid, "The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_ORANGE_1) doTeleportThing(cid, {x = 33098, y = 31085, z = 14}) doSendMagicEffect({x = 33098, y = 31085, z = 14}, CONST_ME_TELEPORT) end elseif(toPosition.x > 33078 and toPosition.x < 33112 and toPosition.y > 31106 and toPosition.y < 31127) then if(getPlayerStorageValue(cid, 1090) == 3) then setPlayerStorageValue(cid, 1090, 4) doCreatureSay(cid, "The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_ORANGE_1) doTeleportThing(cid, {x = 33100, y = 31116, z = 14}) doSendMagicEffect({x = 33100, y = 31116, z = 14}, CONST_ME_TELEPORT) end elseif(toPosition.x > 33035 and toPosition.x < 33069 and toPosition.y > 31107 and toPosition.y < 31127) then if(getPlayerStorageValue(cid, 1090) == 4) then setPlayerStorageValue(cid, 1090, 5) doCreatureSay(cid, "The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_ORANGE_1) doTeleportThing(cid, {x = 33066, y = 31151, z = 15}) doSendMagicEffect({x = 33066, y = 31151, z = 15}, CONST_ME_TELEPORT) end end elseif(item.itemid == 12318 and itemEx.itemid == 12385) then if(getPlayerStorageValue(cid, 1090) == 5) then doCreatureSay(cid, "NOOOoooooooo...!", TALKTYPE_ORANGE_1, false, cid, toPosition) doCreatureSay(cid, "This should have dealt the deathblow to the snake things' ambitions.", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, 1090, 6) end end return true end
-
action Teletransportar para house por talk
tópico respondeu ao SkyLigh de GustavaoTibia em Actions e Talkactions
ok já fiz.. '-' -
Bem eu ando procurando como fazer uma talkactions pra convida outra guild para ir para um local X por um tempo determinado e assim que o tempo acabar eles volta pro templo ou se eles quiser cancelar antes ja usa o comando pra terminar. Como não consegui ajuda eu mesmo estou procurando fazer um modo, primeiramente eu consegui fazer com que os dois lider serem teleportado porem só consigo colocar 1 de cada vez exemplo !invite - lider que enviou o comando já foi teleportado !accept - lider que aceitou também foi teleportado Fazendo isso vai acontecer bugs... queria fazer com que os dois e seus membros serem teleportado para coordenadas x O TFS que uso é 1.0 function onSay(cid, words, param) local player = Player(cid) local guild = player:getGuild() if(guild == nil) then player:sendCancelMessage("You need to be in a guild in order to execute this talkaction.") return false end local guild = getPlayerGuildId(cid) if not guild or (player:getGuildLevel() < GUILDLEVEL_LEADER) then player:sendCancelMessage("You cannot execute this talkaction.") return false end local t = string.split(param, ",") if(not t[2]) then player:sendChannelMessage("", "Not enough param(s).", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local enemy = getGuildId(t[2]) if(not enemy) then player:sendChannelMessage("", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end if(enemy == guild) then player:sendChannelMessage("", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local enemyName, tmp = "", db.storeQuery("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if tmp ~= false then enemyName = result.getDataString(tmp, "name") result.free(tmp) end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild1` = " .. enemy .. " AND `guild2` = " .. guild if(t[1] == "cancel") then query = "`guild1` = " .. guild .. " AND `guild2` = " .. enemy end tmp = db.storeQuery("SELECT `id`, `started`, `ended`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp == false) then player:sendChannelMessage("", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end if(t[1] == "accept") then local _tmp = db.storeQuery("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = result.getDataInt(_tmp, "balance") < result.getDataInt(tmp, "payment") result.free(_tmp) if(state) then player:sendChannelMessage("", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. result.getDataInt(tmp, "payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`ended` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`ended` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`started` = " .. os.time() .. ", `ended` = " .. (result.getDataInt(tmp, "ended") > 0 and (os.time() + ((result.getDataInt(tmp, "started") - result.getDataInt(tmp, "ended")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return false end if(t[1] == "invite") then local str = "" tmp = db.storeQuery("SELECT `guild1`, `status` FROM `guild_wars` WHERE `guild1` IN (" .. guild .. "," .. enemy .. ") AND `guild2` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp ~= false) then if(result.getDataInt(tmp, "status") == 0) then if(result.getDataInt(tmp, "guild1") == guild) then str = "You have already invited " .. enemyName .. " to war." else str = enemyName .. " have already invited you to war." end else str = "You are already on a war with " .. enemyName .. "." end result.free(tmp) end if(str ~= "") then player:sendChannelMessage("", str, TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local frags = tonumber(t[3]) if(frags ~= nil) then frags = math.max(10, math.min(1000, frags)) else frags = 100 end local payment = tonumber(t[4]) if(payment ~= nil) then payment = math.floor(payment)+1000 tmp = db.storeQuery("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = result.getDataInt(tmp, "balance") < payment result.free(tmp) if(state) then player:sendChannelMessage("", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. payment .. " WHERE `id` = " .. guild) else payment = 0 end local begining, ending = os.time(), tonumber(t[5]) if(ending ~= nil and ending ~= 0) then ending = begining + (ending * 86400) else ending = 0 end db.query("INSERT INTO `guild_wars` (`guild1`, `guild2`, `started`, `ended`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") broadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return false end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.storeQuery("SELECT `id` FROM `guild_wars` WHERE `guild1` = " .. guild .. " AND `guild2` = " .. enemy .. " AND `status` = " .. status) if(tmp ~= false) then local query = "UPDATE `guild_wars` SET `ended` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return false end if(status == 4) then player:sendChannelMessage("", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end tmp = db.storeQuery("SELECT `id`, `ended` FROM `guild_wars` WHERE `guild1` = " .. enemy .. " AND `guild2` = " .. guild .. " AND `status` = 1") if(tmp ~= false) then if(result.getDataInt(tmp, "ended") > 0) then result.free(tmp) player:sendChannelMessage("", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end local query = "UPDATE `guild_wars` SET `status` = 4, `ended` = " .. os.time() .. " WHERE `id` = " .. result.getDataInt(tmp, "id") result.free(tmp) db.query(query) broadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return false end player:sendChannelMessage("", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_R1, CHANNEL_GUILD) return false end
-
action Teletransportar para house por talk
tópico respondeu ao SkyLigh de GustavaoTibia em Actions e Talkactions
Cara não poderia fazer um talkaction que convida outra guild e assim que ela aceitar todos os membros que tiver dentro do pz vai ser movido para um local X? To usando como base a talkaction de invite pra war... so que nao to conseguindo colocar pra duas guild serem movidas para o local x ao mesmo tempo -
pedido System Anti Entrosa TFS 1.0
tópico respondeu ao GustavaoTibia de GustavaoTibia em Lixeira Pública
Pois é, mais ninguem ajuda... não precisa ser ligado a war system, pra invitar war system os jogadores usa o site mais dai usa o comando pra ir pro local x.
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.