
Tudo que MaXwEllDeN postou
-
Duvida & Pedido
Global storage não fica ligada a um player, mas sim ao servidor. E não, não tem como mudar o nome do personagem sem o player deslogar.
-
(Resolvido)Dúvida parameters de Movement
AH, então o que acontece é um callback overflow, algo assim. Por exemplo. Se você coloca um movement pra quando pisar em um tile, teletransportar pro mesmo tile. O onStepIn vai ser executado várias vezes até dar debug no client e_e. Já passei por uma situação parecida, quando eu precisava mudar a outfit de um player, dentro do método onOutfit. Pra solucionar foi só colocar uma storage no player, aí quando essa storage tem um valor positivo, o bloco principal não é executado. Exemplo: function onOutfit(cid) if getPlayerStorageValue(cid, 60000) > 0 then return true end setPlayerStorageValue(cid, 60000, 1) doCreatureChangeOutfit(cid, newOutfit) setPlayerStorageValue(cid, 60000, -1) return false end Algo tipo isso ahuahua
-
(Resolvido)Dúvida parameters de Movement
Nunca gostei muito dessa Rev. Crying Damson sempre deu problemas sem lógica com movements. Tenta com outra versão, se não der certo posta o feedback aqui que tento ajudar!
-
[Pedido] Mudar barra de Hp e Mana do OTClient
O que você quer dizer com "moderna"? Isso pra mim já é bastante moderno, XD. Quem sabe algum exemplo poderia nos ajudar a entender melhor como você quer deixá-la O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Suporte OTServ → Suporte de Scripts" Para: "OTServ → Suporte OTServ → Suporte de Clients"
-
Tibia não conecta
O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "Tibia King → Atendimento Geral" Para: "OTServ → Suporte OTServ"
-
hi, my name is Nildson
Bem vindo Nil. Curti seu avatar :V
-
HOST HOST HOST
Por que prefere um Windows?
-
(Resolvido)Alguns Players Vindo Pelado
Recomendo a você, deletar todos os ítens dos samples e utilizar um script de firstitems.
-
[TFS 1.0] GuildPoints System - TALKACTIONS
GuildPointsConfigs = { ExecuteIntervalHours = 24, NeedPlayersOnline = 10, NeedDiferentIps = 6, MinLevel = 80, AddPointsForAcc = 9 } function getGuildPlayersValidAccIDS(GuildID, MinLevel) local RanksIDS, AccsID, ValidAccsID = {}, {}, {} local q = db.storeQuery("SELECT `id` FROM `guild_ranks` WHERE guild_id = '".. GuildID .."';") if q then return ValidAccsID end while true do table.insert(RanksIDS, result.getDataInt(q, "id")) if not result.next(q) then break end end local q = db.storeQuery("SELECT `account_id` FROM `players` WHERE `rank_id` IN (".. table.concat(RanksIDS, ', ') ..") AND `level` >= ".. MinLevel ..";") if q then return ValidAccsID end while true do local AccID = result.getDataInt(q, "account_id") if #AccsID > 0 then for k = 1, #AccsID do if AccID == AccsID[k] then AddAccList = false break end AddAccList = true end if AddAccList then table.insert(AccsID, AccID) end else table.insert(AccsID, AccID) end if not result.next(q) then break end end local q = db.storeQuery("SELECT `id` FROM `accounts` WHERE `guild_points_stats` = 0 AND `id` IN (".. table.concat(AccsID, ', ') ..");") if q then return ValidAccsID end while true do local AccID = result.getDataInt(q, "id") if #ValidAccsID > 0 then for k = 1, #ValidAccsID do if AccID == ValidAccsID[k] then AddAccList = false break end AddAccList = true end if AddAccList then table.insert(ValidAccsID, AccID) end else table.insert(ValidAccsID, AccID) end if not result.next(q) then break end end return ValidAccsID end function onSay(cid, words, param, channel) if(getPlayerGuildLevel(cid) == 3) then local GuildID = getPlayerGuildId(cid) local q = db.storeQuery("SELECT `last_execute_points` FROM `guilds` WHERE id = '".. GuildID .."';") if not q then return true end if result.getDataInt(q, "last_execute_points") < os.time() then local GuildMembers = {} local GuildMembersOnline = {} local PlayersOnline = getPlayersOnline() for i, pid in ipairs(PlayersOnline) do if getPlayerGuildId(pid) == GuildID then if getPlayerLevel(pid) >= GuildPointsConfigs.MinLevel then table.insert(GuildMembersOnline, pid) end end end if #GuildMembersOnline >= GuildPointsConfigs.NeedPlayersOnline then local IPS = {} for i, pid in ipairs(GuildMembersOnline) do local PlayerIP = getPlayerIp(pid) if #IPS > 0 then for k = 1, #IPS do if PlayerIP == IPS[k] then AddIPList = false break end AddIPList = true end if AddIPList then table.insert(IPS, PlayerIP) end else table.insert(IPS, PlayerIP) end end if #IPS >= GuildPointsConfigs.NeedDiferentIps then local ValidAccounts = getGuildPlayersValidAccIDS(GuildID, GuildPointsConfigs.MinLevel) db.query("UPDATE `guilds` SET `last_execute_points` = ".. os.time() +(GuildPointsConfigs.ExecuteIntervalHours * 3600) .." WHERE `guilds`.`id` = ".. GuildID ..";") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "".. #ValidAccounts .." Players received points") if #ValidAccounts > 0 then db.query("UPDATE `accounts` SET `guild_points` = `guild_points` + " ..GuildPointsConfigs.AddPointsForAcc .. ", `guild_points_stats` = ".. os.time() .." WHERE `id` IN (" .. table.concat(ValidAccounts, ',') ..");") for i, pid in ipairs(GuildMembersOnline) do local PlayerMSGAccID = getPlayerAccountId(pid) for k = 1, #ValidAccounts do if PlayerMSGAccID == ValidAccounts[k] then doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, "You received "..GuildPointsConfigs.AddPointsForAcc .." guild points.") break end end end end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Only ".. #IPS .." players are valid, you need ".. GuildPointsConfigs.NeedDiferentIps .." players with different ips.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Has only ".. #GuildMembersOnline .." players online you need ".. GuildPointsConfigs.NeedPlayersOnline .." players online at least from level ".. GuildPointsConfigs.MinLevel ..".") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The command can only be run once every "..GuildPointsConfigs.ExecuteIntervalHours .." hours.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Only guild leader can request points.") end return true end
-
LUA Functions
Sim. Alguns métodos são bem eficientes e dá pra fazer coisas legais, estou estudando eles pra ver se tenho alguma ideia pra vocês :V
- [TFS 1.0] House market (buy/sell)
-
Hiho Guys!
Bem vindo xD. Espero que curta o fórum
-
[C++] Color Name [DigiWo]
Se tiver um player com o mesmo nome do monstro, o que acontece? Vou baixar o compilador e depois faço aqui :_)
-
[PEDIDO] Separar Players
local config_teams = { [1] = { -- Team 1 pos = {x = 160, y = 54, z = 7}, outfit = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, storages = {123321, 123325}, }, [2] = { -- Team 2 pos = {x = 160, y = 54, z = 7}, outfit = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, storages = {123322, 123326}, }, } function onStepIn(cid, item, position, fromPosition) local team = getItemAttribute(item.uid, "team") or 1 local config = config_teams[team] for _, storage in pairs(config.storages) do setPlayerStorageValue(storage, 1) end doTeleportThing(cid, config.pos, true) doSetCreatureOutfit(cid, config.outfit, -1) doItemSetAttribute(item.uid, "team", team == 1 and 2 or 1) return true end
-
Dodge System
Estou desenvolvendo ele. Mas aos poucos, assim que terminar eu posto aqui no fórum, ok?
-
[PEDIDO] Lendários não tomam status
O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Scripting → CreatureScripts, GlobalEvents e MoveMents" Para: "OTServ → Suporte OTServ"
-
Alavanca Desert Quest não está funcionando!
Qual o problema? Dá algum erro?
-
prazer, Haxz
Seja bem vindo ao fórum. Espero que curta a estadia Na minha assinatura tem o link para um tópico com um índice de alguns tutoriais sobre Scripting para OT Servers. Já que você já tem boa noção de programação, sugiro que comece olhando o Tutorial Como Funcionam os Scripts? A lógica é bem simples, quase tudo é executado por meio de métodos callback, que têm retorno da Distro. Onde esses callbacks foram predefinidos na source do servidor.
-
[PEDIDO] Separar Players
local config_teams = { [1] = { -- Team 1 pos = {x = 160, y = 54, z = 7}, outfit = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, storages = {123321, 123325}, }, [2] = { -- Team 2 pos = {x = 160, y = 54, z = 7}, outfit = {lookType = 152, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, storages = {123322, 123326}, }, } function onStepIn(cid, item, position, fromPosition) local team = getItemAttribute(item.uid, "team") or 1 local config = config_teams[team] for _, storage in pairs(team.storages) do setPlayerStorageValue(storage, 1) end doTeleportThing(cid, config.pos, true) doSetCreatureOutfit(cid, config.outfit, -1) doItemSetAttribute(item.uid, "team", team == 1 and 2 or 1) return true end
- Sistema de Pontos
-
(Resolvido)Display numérico de pots e magias
Haha, por nada Marca alí como Melhor Resposta, para que o tópico seja identificado como resolvido!
-
(Resolvido)Display numérico de pots e magias
- (Resolvido)Display numérico de pots e magias
Poderia mostrar o seu config.lua? Caso seu OT utilize Banco de Dados MYSQL. Lembre de mudar as informações do banco de dados, para que não sejam expostas aqui no fórum.- [Pedido] Inserir função!
Se um player matar, e logo depois uma guild matar. O player que matou sozinho perderá a storage também?- Glacier Set dando conditions em área
Ótima ideia, xD Só uma otimização no código xD - (Resolvido)Display numérico de pots e magias
Informação Importante
Confirmação de Termo