Ir para conteúdo

Leolinduxo

Membro
  • Registro em

  • Última visita

Tudo que Leolinduxo postou

  1. Não tem! só tem dois tipos que são esses: fragsSecondLimit = 1 * 24 * 60 * 60 fragsThirdLimit = 1 * 24 * 60 * 60
  2. Onde posso alterar o tempo para sair o frag do jogador, no caso diminuir, lembrando: é o frag não o Skull!!
  3. Gente, estou com um problema, eu queria bloquear os jogadores de criar personagens com o nome de bixos, estão fazendo isso e fazendo os caras pegarem red... tem um sistema que não deixa criar, alguém sabe como posso fazer? pensei em criar um char de cada bixo, mas é muito char para criar, já vi um mais simples.... porém não encontrei, alguém pode me ajudar?
  4. @Maste deve ser, vou dar uma conferida
  5. Leolinduxo postou uma resposta no tópico em Suporte Tibia OTServer
    É só você usar o mesmo código, criando outro arquivo piso.lua e atribuir o action ID.
  6. Gente eu gostaria de saber como faço ou onde encontro aquele piso preto (transparente) que é possível ver o andar de baixo no RME! Alguém pode me ajudar?
  7. Já resolvi! obrigado.
  8. Gente meu shop lua não para de entregar itens, alguém pode me ajudar como solucionar esse problema? é um servidor de dragonball. -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then full_weight = getItemWeightById(itemtogive_id, 1) end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'Voce acaba de receber o item >> '.. add_item_name ..' << de nosso shopping, obrigado por ser um ilustrissimo donate!') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") doPlayerSave(cid) else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'Seu item >> '.. add_item_name ..' << esta esperando por voce. Por favor faça o local para este item em sua mochila e aguarde cerca de 30 segundos para obte-lo.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'Seu item >> '.. add_item_name ..' << esta esperando por voce. O peso do item e '.. full_weight ..' oz., Vc tem no momento '.. free_cap ..' oz. de capacidade livre. Coloque alguns itens no deposito e espere cerca de 30 segundos para obte-lo.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end
  9. Gente, é o seguinte.... troquei de vps, copiei tudo pra outra, inclusive o site, porém me deparei com dois problemas! 1° não está entregando os itens do shop para o jogo. 2° quando eu clico em qualquer personagem seja no rank ou quem está online aparece a seguinte mensagem: Could not load items! meu config.lua está certinho, se alguém pode me ajudar corrigir esses erros agradeço.
  10. Cara, eu resolvi.... a vps ainda estava sem as libs, depois de muito trabalho consegui resolver tudo ! valeu.
  11. Gente, comprei uma vps hoje, abri ela usando o winscp e o putty, porém quando vou executar os arquivos no meu server linux, dá -bash: ./ot: Permission denied Alguém pode me ajudar a configurar certinho? por favor quem puder entra em contato comigo whats ou aqui mesmo 87 99112-9992
  12. Leolinduxo postou uma resposta no tópico em Suporte Tibia OTServer
    Pode ser mais explicativo? isso no mysql? [RESOLVIDO]
  13. Leolinduxo postou uma resposta no tópico em Suporte Tibia OTServer
    Gente, fiz algumas alterções no itens.xml no meu server, quando fui abrir o site para ver né, apareceu isso! Could not load items! oque pode ter ocorrido? por acaso quando é alterado algo no items.xml tem que alterar algo na pasta do server?
  14. Gente, estou com dois problemas; 1° Estou querendo ativar o loot booster no meu servidor pois o item é vendido no site e ele não está funcionando, se alguém poder me ajudar agradeço, minha lib de autoloot é a da Killua, pois bem.... Eu queria adicionar um autoloot boster, com esse id: 12289 se alguém poder me ajudar agradeço muito. 2° o segundo problema é usar o meu site para vender pacc 30 dias vip lá, já está o item no shop, porém não ativa automaticamente direto no jogo, já tem o vip_time. E no caso seria acesso a uma area donate que está com os pisos com action 12500, oque vocês me recomendam fazer para corrigir esses erros? posso até recompensar quem me ajudar a arrumar tudo isso com R$.
  15. Gente, estou com um problema no meu sistema autoloot, a primeira vez funcionou normal, depois fui reiniciar o servidor novamente agora tá dando esse erro: Error - CreatureScript Interface] In a timer event called from: data/creaturescripts/scripts/Auto_Loot.lua:onKill Description: (luaDoRemoveItem) Item not found Esse é meu Auto_Loott.lua:onKill --[[ Auto Loot System by Danyel Varejão Created in 02/07/2017 ]] function onLogin(cid) registerCreatureEvent(cid, "Auto_Loot_Login") registerCreatureEvent(cid, "Auto_Loot_Kill") return true end function onKill(cid, target, lastHit) if isPlayer(cid) and isMonster(target) then if getPlayerStorageValue(cid, AutoLoot.Storage_On_Items) == 1 and #AutoLoot.getPlayerList(cid) > 0 then addEvent(AutoLoot.Items, 500, cid, getCreaturePosition(target)) end if getPlayerStorageValue(cid, AutoLoot.Storage_On_Gold) == 1 then addEvent(AutoLoot.Gold, 500, cid, getCreaturePosition(target)) end if getPlayerStorageValue(cid, AutoLoot.Storage_On_Items) == 1 or getPlayerStorageValue(cid, AutoLoot.Storage_On_Gold) == 1 then addEvent(AutoLoot.Message, 500, cid) end end return true end Fiz igual esse tutorial: a primeira vez funcionou , botei ontem... ai reiniciei server hoje deu isso.
  16. Leolinduxo postou uma resposta no tópico em Suporte Tibia OTServer
    Gente, eu gostaria de apagar minhas duas postagens no site que foram e erradas, porém não sei como apago isso, alguém pode me ajudar? Quando clico lá em comentários da erro. Em adm painel não dá também.
  17. Leolinduxo postou uma resposta no tópico em Formação de Equipe
    Procuro alguém para me ajudar a criar um servidor de tibia 8.6 baiak, com acc site e corrigir os bugs e deixar tudo arrumadinho no site, será recompensado. whats: 87 99112-9992
  18. Leolinduxo postou uma resposta no tópico em Suporte Tibia OTServer
    Nada resolvido, não está logando obs: estou usando mysql, caso queiram me ajudar entrem em contato por whatsapp para detalhar mais para vocês: 87 991129992 @GiovaneCampos @MaTTch Gente, eu troquei o distro, e deu esses erros, porém com o distro que veio ele abre normalmente em sqlite, porém quando mudo pra mysql ele trava o distro, por isso troquei. ai o erro quando mudo pra mysql... deixando sqlite funfa perfeitamente
  19. [RESOLVIDO]
  20. Leolinduxo postou uma resposta no tópico em Suporte Tibia OTServer
    Gente, Estou com o seguinte erro e não consigo logar nenhum char no jogo! fica apenas na tela de personagem e nunca conecta. OBS: i char não loga, mas quando cancelo o login aparece logged out. segue os códigos: LOGIN.LUA local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } function onLogin(cid) if getCreatureOutfit(cid).lookType == 306 and getPlayerStorageValue(cid, 121219) ~= 1 then doCreatureChangeOutfit(cid, getPlayerSex(cid) == 0 and {lookType = 136} or {lookType = 128}) end if(getBooleanFromString(getConfigValue('accountManager')) == false) then if (getCreatureName(cid) == "Account Manager") then return doRemoveCreature(cid, true) end end local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10) end local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str .. " Please choose your outfit." doPlayerSendOutfitWindow(cid) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then addEvent(valid(doCreatureSay), 500, cid, "Hello, it appears that your character has been locked for name violating rules, what new name would you like to have?", TALKTYPE_PRIVATE_NP, true, cid) elseif(accountManager == MANAGER_ACCOUNT) then addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to manage your account. If you would like to start over, type {cancel} anywhere.", TALKTYPE_PRIVATE_NP, true, cid) else addEvent(valid(doCreatureSay), 500, cid, "Hello, type {account} to create an account or {recover} to recover an account.", TALKTYPE_PRIVATE_NP, true, cid) end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end if getPlayerStorageValue(cid, 54304) > 0 then doPlayerSetStorageValue(cid, 54304, 0) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Bem Vindo!") if getPlayerLevel(cid) < 717217 then registerCreatureEvent(cid, "AdvanceTeleport") end registerCreatureEvent(cid, "DesertDeath") registerCreatureEvent(cid, "DesertCombat") registerCreatureEvent(cid, "BattleDeath") registerCreatureEvent(cid, "ZombieThink") registerCreatureEvent(cid, "ZombieDeath") registerCreatureEvent(cid, "BattleCombat") registerCreatureEvent(cid, "FireStorm") registerCreatureEvent(cid, "ctf") registerCreatureEvent(cid, "zombieevent") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "tpquest") registerCreatureEvent(cid, "CombatDodge") registerCreatureEvent(cid, "recompensa") registerCreatureEvent(cid, "SkullAmulet") registerCreatureEvent(cid, "BountyHunter") registerCreatureEvent(cid, "PlayerDeath") registerCreatureEvent(cid, "rewardpoints") registerCreatureEvent(cid, "autoloot") registerCreatureEvent(cid, "Auto Loot") registerCreatureEvent(cid, "RecordIp") if (InitArenaScript ~= 0) then InitArenaScript = 1 -- make arena rooms free for i = 42300, 42309 do setGlobalStorageValue(i, 0) setGlobalStorageValue(i+100, 0) end end registerCreatureEvent(cid, "Mail") if(getPlayerOperatingSystem(cid) >= CLIENTOS_OTCLIENT_LINUX) then registerCreatureEvent(cid, "ExtendedOpcode") end registerCreatureEvent(cid, "ReportBug") if(config.useFragHandler) then registerCreatureEvent(cid, "SkullCheck") end registerCreatureEvent(cid, "GuildEvents") registerCreatureEvent(cid, "critical") registerCreatureEvent(cid, "BroadDeath") registerCreatureEvent(cid, "AdvanceSave") registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "fraglook") registerCreatureEvent(cid, "blesscheck") registerCreatureEvent(cid, "DeathBroadcast") registerCreatureEvent(cid, "addons") registerCreatureEvent(cid, "onPrepareDeath") registerCreatureEvent(cid, "fraglook") registerCreatureEvent(cid, "antimb") registerCreatureEvent(cid, "antimagebomb") registerCreatureEvent(cid, "FimVip") registerCreatureEvent(cid, "ExpVip") registerCreatureEvent(cid, "VipReceive") registerCreatureEvent(cid, "redSkullAmulet") registerCreatureEvent(cid, "FullHpMana") registerCreatureEvent(cid, "killitem") registerCreatureEvent(cid, "huntdeath") registerCreatureEvent(cid, "loguthunt") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "CastleExp") registerCreatureEvent(cid, "AdvEffect") registerCreatureEvent(cid, "dodge") registerCreatureEvent(cid, "town") registerCreatureEvent(cid, "recompensaLvl") if getPlayerStorageValue(cid, 48902) == -1 then setPlayerStorageValue(cid, 48902, 0) end registerCreatureEvent(cid, "critical") if getPlayerName(cid) == "Account Manager" and #getPlayersByIp(getPlayerIp(cid)) > 10 then return false end if getPlayerSlotItem(cid, 2).itemid == 7889 then doPlayerAddBlessing(cid, 1) doPlayerAddBlessing(cid, 2) doPlayerAddBlessing(cid, 3) doPlayerAddBlessing(cid, 4) doPlayerAddBlessing(cid, 5) doSendMagicEffect(getPlayerPosition(cid), 49) else doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end if getPlayerStorageValue(cid, 48903) == -1 and getPlayerStorageValue(cid, 48902) == -1 then setPlayerStorageValue(cid, 48903, 0) setPlayerStorageValue(cid, 48902, 0) end return true end FUCTION.LUA function getGuildNameByID(gid) -- By Killua local query = db.getResult("SELECT `name` FROM `guilds` WHERE `id` = '"..gid.."'") if query:getID() == -1 then return false end local name = query:getDataString("name") query:free() return name end function isWalkable(pos, creature, proj, pz) if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and pz then return false, true end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function isInArray(array, value, caseSensitive) if(caseSensitive == nil or caseSensitive == false) and type(value) == "string" then local lowerValue = value:lower() for _, _value in ipairs(array) do if type(_value) == "string" and lowerValue == _value:lower() then return true end end else for _, _value in ipairs(array) do if (value == _value) then return true end end end return false end ARMY = { [1] = {50, 350, "Soldado Raso", 1}, -- [Número] = {Pontos Kill, Points para UP, "Nome",PLATINIUM COINS POR KILL}, [2] = {50, 1500, "Soldado de Primeira Classe", 50000000}, [3] = {50, 2000, "Cabo", 60000000}, [4] = {50, 3000, "Sargento", 70000000}, [5] = {50, 3500, "Sargento-Ajudante 1", 90000000}, [6] = {50, 5000, "Sargento-Ajudante 2", 11000000}, [7] = {50, 5500, "Sargento-Chefe", 15000000}, [8] = {50, 6000, "Sargento-Mestre 1", 18000000}, [9] = {50, 6500, "Sargento-Mestre 2", 20000000}, [10] = {50, 7000, "Sargento-Mestre 3", 22000000}, [11] = {50, 7600, "Sargento-Mestre 4", 24000000}, [12] = {50, 8200, "Sargento-Mor do Comando", 26000000}, [13] = {50, 9000, "Segundo-Tenente 1", 28000000}, [14] = {50, 9600, "Segundo-Tenente 2", 30000000}, [15] = {50, 10200, "Segundo-Tenente 3", 32000000}, [16] = {50, 11000, "Segundo-Tenente 4", 34000000}, [17] = {50, 11500, "Primeiro-Tenente 1", 36000000}, [18] = {50, 12000, "Primeiro-Tenente 2", 38000000}, [19] = {50, 13000, "Primeiro-Tenente 3", 40000000}, [20] = {50, 14000, "Primeiro-Tenente 4", 45000000}, [21] = {50, 15000, "Primeiro-Tenente 5", 55000000}, [22] = {50, 16000, "Capitao 1", 60000000}, [23] = {50, 17000, "Capitao 2", 70000000}, [24] = {50, 18000, "Capitao 3", 80000000}, [25] = {50, 19000, "Capitao 4", 90000000}, [26] = {50, 20000, "Capitao 5", 100000000}, [27] = {50, 21000, "Major 1", 110000000}, [28] = {50, 21500, "Major 2", 120000000}, [29] = {50, 22000, "Major 3", 130000000}, [30] = {50, 23000, "Major 4", 140000000}, [31] = {50, 23500, "Major 5", 150000000}, [32] = {50, 24000, "Tenente-Coronel 1", 160000000}, [33] = {50, 25000, "Tenente-Coronel 2", 170000000}, [34] = {50, 26000, "Tenente-Coronel 3", 180000000}, [35] = {50, 27000, "Tenente-Coronel 4", 190000000}, [36] = {50, 28000, "Tenente-Coronel 5", 200000000}, [37] = {50, 29000, "Coronel 1", 210000000}, [38] = {50, 30000, "Coronel 2", 220000000}, [39] = {50, 31000, "Coronel 3", 230000000}, [40] = {50, 32000, "Coronel 4", 400000000}, [41] = {50, 35000, "Coronel 5", 500000000}, [42] = {50, 100000, "General", 1000000000}, } ARMY_LEVEL = 2014159 ARMY_EXPERIENCE = 2014160 function doAddPoints(cid, points) db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";") end function doPlayerGiveItem(cid, itemid, amount, subType) local item = 0 if(isItemStackable(itemid)) then item = doCreateItemEx(itemid, amount) if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then return false end else for i = 1, amount do item = doCreateItemEx(itemid, subType) if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then return false end end end return true end function doPlayerGiveItemContainer(cid, containerid, itemid, amount, subType) for i = 1, amount do local container = doCreateItemEx(containerid, 1) for x = 1, getContainerCapById(containerid) do doAddContainerItem(container, itemid, subType) end if(doPlayerAddItemEx(cid, container, true) ~= RETURNVALUE_NOERROR) then return false end end return true end function doPlayerTakeItem(cid, itemid, amount) return getPlayerItemCount(cid, itemid) >= amount and doPlayerRemoveItem(cid, itemid, amount) end function doPlayerSellItem(cid, itemid, count, cost) if(not doPlayerTakeItem(cid, itemid, count)) then return false end if(not doPlayerAddMoney(cid, cost)) then error('[doPlayerSellItem] Could not add money to: ' .. getPlayerName(cid) .. ' (' .. cost .. 'gp).') end return true end function doPlayerWithdrawMoney(cid, amount) if(not getBooleanFromString(getConfigInfo('bankSystem'))) then return false end local balance = getPlayerBalance(cid) if(amount > balance or not doPlayerAddMoney(cid, amount)) then return false end doPlayerSetBalance(cid, balance - amount) return true end function doPlayerDepositMoney(cid, amount) if(not getBooleanFromString(getConfigInfo('bankSystem'))) then return false end if(not doPlayerRemoveMoney(cid, amount)) then return false end doPlayerSetBalance(cid, getPlayerBalance(cid) + amount) return true end function doPlayerAddStamina(cid, minutes) return doPlayerSetStamina(cid, getPlayerStamina(cid) + minutes) end function isPremium(cid) return (isPlayer(cid) and (getPlayerPremiumDays(cid) > 0 or getBooleanFromString(getConfigValue('freePremium')))) end function getMonthDayEnding(day) if(day == "01" or day == "21" or day == "31") then return "st" elseif(day == "02" or day == "22") then return "nd" elseif(day == "03" or day == "23") then return "rd" end return "th" end function getMonthString(m) return os.date("%B", os.time{year = 1970, month = m, day = 1}) end function getArticle(str) return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a" end function doNumberFormat(i) local str, found = string.gsub(i, "(%d)(%d%d%d)$", "%1,%2", 1), 0 repeat str, found = string.gsub(str, "(%d)(%d%d%d),", "%1,%2,", 1) until found == 0 return str end function doPlayerAddAddons(cid, addon) for i = 0, table.maxn(maleOutfits) do doPlayerAddOutfit(cid, maleOutfits[i], addon) end for i = 0, table.maxn(femaleOutfits) do doPlayerAddOutfit(cid, femaleOutfits[i], addon) end end function getTibiaTime(num) local minutes, hours = getWorldTime(), 0 while (minutes > 60) do hours = hours + 1 minutes = minutes - 60 end if(num) then return {hours = hours, minutes = minutes} end return {hours = hours < 10 and '0' .. hours or '' .. hours, minutes = minutes < 10 and '0' .. minutes or '' .. minutes} end function doWriteLogFile(file, text) local f = io.open(file, "a+") if(not f) then return false end f:write("[" .. os.date("%d/%m/%Y %H:%M:%S") .. "] " .. text .. "\n") f:close() return true end function getExperienceForLevel(lv) lv = lv - 1 return ((50 * lv * lv * lv) - (150 * lv * lv) + (400 * lv)) / 3 end function doMutePlayer(cid, time) local condition = createConditionObject(CONDITION_MUTED, (time == -1 and time or time * 1000)) return doAddCondition(cid, condition, false) end function doSummonCreature(name, pos) local cid = doCreateMonster(name, pos, false, false) if(not cid) then cid = doCreateNpc(name, pos) end return cid end function getPlayersOnlineEx() local players = {} for i, cid in ipairs(getPlayersOnline()) do table.insert(players, getCreatureName(cid)) end return players end function getPlayerByName(name) local cid = getCreatureByName(name) return isPlayer(cid) and cid or nil end function isPlayer(cid) return isCreature(cid) and cid >= AUTOID_PLAYERS and cid < AUTOID_MONSTERS end function isPlayerGhost(cid) return isPlayer(cid) and (getCreatureCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE, CONDITIONID_DEFAULT) or getPlayerFlagValue(cid, PLAYERFLAG_CANNOTBESEEN)) end function isMonster(cid) return isCreature(cid) and cid >= AUTOID_MONSTERS and cid < AUTOID_NPCS end function isNpc(cid) -- Npc IDs are over int32_t range (which is default for lua_pushnumber), -- therefore number is always a negative value. return isCreature(cid) and (cid < 0 or cid >= AUTOID_NPCS) end function isUnderWater(cid) return isInArray(underWater, getTileInfo(getCreaturePosition(cid)).itemid) end function doPlayerAddLevel(cid, amount, round) local experience, level, amount = 0, getPlayerLevel(cid), amount or 1 if(amount > 0) then experience = getExperienceForLevel(level + amount) - (round and getPlayerExperience(cid) or getExperienceForLevel(level)) else experience = -((round and getPlayerExperience(cid) or getExperienceForLevel(level)) - getExperienceForLevel(level + amount)) end return doPlayerAddExperience(cid, experience) end function doPlayerAddMagLevel(cid, amount) local amount = amount or 1 for i = 1, amount do doPlayerAddSpentMana(cid, getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid), false) end return true end function doPlayerAddSkill(cid, skill, amount, round) local amount = amount or 1 if(skill == SKILL__LEVEL) then return doPlayerAddLevel(cid, amount, round) elseif(skill == SKILL__MAGLEVEL) then return doPlayerAddMagLevel(cid, amount) end for i = 1, amount do doPlayerAddSkillTry(cid, skill, getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill), false) end return true end function isPrivateChannel(channelId) return channelId >= CHANNEL_PRIVATE end function doBroadcastMessage(text, class) local class = class or MESSAGE_STATUS_WARNING if(type(class) == 'string') then local className = MESSAGE_TYPES[class] if(className == nil) then return false end class = className elseif(class < MESSAGE_FIRST or class > MESSAGE_LAST) then return false end for _, pid in ipairs(getPlayersOnline()) do doPlayerSendTextMessage(pid, class, text) end print("> Broadcasted message: \"" .. text .. "\".") return true end function doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost) local checkFlag, ghost, class = checkFlag or true, ghost or false, class or TALKTYPE_BROADCAST if(checkFlag and not getPlayerFlagValue(cid, PLAYERFLAG_CANBROADCAST)) then return false end if(type(class) == 'string') then local className = TALKTYPE_TYPES[class] if(className == nil) then return false end class = className elseif(class < TALKTYPE_FIRST or class > TALKTYPE_LAST) then return false end for _, pid in ipairs(getPlayersOnline()) do doCreatureSay(cid, text, class, ghost, pid) end print("> " .. getCreatureName(cid) .. " broadcasted message: \"" .. text .. "\".") return true end function doCopyItem(item, attributes) local attributes = ((type(attributes) == 'table') and attributes or { "aid" }) local ret = doCreateItemEx(item.itemid, item.type) for _, key in ipairs(attributes) do local value = getItemAttribute(item.uid, key) if(value ~= nil) then doItemSetAttribute(ret, key, value) end end if(isContainer(item.uid)) then for i = (getContainerSize(item.uid) - 1), 0, -1 do local tmp = getContainerItem(item.uid, i) if(tmp.itemid > 0) then doAddContainerItemEx(ret, doCopyItem(tmp, true).uid) end end end return getThing(ret) end function doSetItemText(uid, text, writer, date) local thing = getThing(uid) if(thing.itemid < 100) then return false end doItemSetAttribute(uid, "text", text) if(writer ~= nil) then doItemSetAttribute(uid, "writer", tostring(writer)) if(date ~= nil) then doItemSetAttribute(uid, "date", tonumber(date)) end end return true end function getItemWeightById(itemid, count, precision) local item, count, precision = getItemInfo(itemid), count or 1, precision or false if(not item) then return false end if(count > 100) then -- print a warning, as its impossible to have more than 100 stackable items without "cheating" the count print('[Warning] getItemWeightById', 'Calculating weight for more than 100 items!') end local weight = item.weight * count return precission and weight or math.round(weight, 2) end function choose(...) local arg, ret = {...} if type(arg[1]) == 'table' then ret = arg[1][math.random(#arg[1])] else ret = arg[math.random(#arg)] end return ret end function doPlayerAddExpEx(cid, amount) if(not doPlayerAddExp(cid, amount)) then return false end local position = getThingPosition(cid) doPlayerSendTextMessage(cid, MESSAGE_EXPERIENCE, "You gained " .. amount .. " experience.", amount, COLOR_WHITE, position) local spectators, name = getSpectators(position, 7, 7), getCreatureName(cid) for _, pid in ipairs(spectators) do if(isPlayer(pid) and cid ~= pid) then doPlayerSendTextMessage(pid, MESSAGE_EXPERIENCE_OTHERS, name .. " gained " .. amount .. " experience.", amount, COLOR_WHITE, position) end end return true end function getItemTopParent(uid) local parent = getItemParent(uid) if(not parent or parent.uid == 0) then return nil end while(true) do local tmp = getItemParent(parent.uid) if(tmp and tmp.uid ~= 0) then parent = tmp else break end end return parent end function getItemHolder(uid) local parent = getItemParent(uid) if(not parent or parent.uid == 0) then return nil end local holder = nil while(true) do local tmp = getItemParent(parent.uid) if(tmp and tmp.uid ~= 0) then if(tmp.itemid == 1) then -- a creature holder = tmp break end parent = tmp else break end end return holder end function valid(f) return function(p, ...) if(isCreature(p)) then return f(p, ...) end end end function addContainerItems(container,items) local items_mod = {} for _, it in ipairs(items) do if( isItemStackable(it.id) and it.count > 100) then local c = it.count while( c > 100 ) do table.insert(items_mod,{id = it.id,count = 100}) c = c - 100 end if(c > 0) then table.insert(items_mod,{id = it.id,count = c}) end else table.insert(items_mod,{id = it.id,count = 1}) end end local free = getContainerCap(container.uid) - (getContainerSize(container.uid) ) local count = math.ceil(#items_mod/ free) local main_bp = container.uid local insert_bp = main_bp local counter = 1 for c,it in ipairs(items_mod) do local _c = isItemStackable(it.id) and (it.count > 100 and 100 or it.count) or 1 if count > 1 then if (counter < free) then doAddContainerItem(insert_bp, it.id, _c) else insert_bp = doAddContainerItem(insert_bp, container.itemid, 1) count = (#items_mod)-(free-1) free = getContainerCap(insert_bp) count = math.ceil(count/ free) doAddContainerItem(insert_bp, it.id, _c) counter = 1 end counter = counter + 1 else doAddContainerItem(insert_bp, it.id, _c) end end return main_bp end
  21. Sim, mas não entendo tão bem ... olha: Index 14 :
  22. O que vale é a intenção! obrigado e boa noite.
  23. Eu já fiz isso também, porém ainda continua mesma coisa. Quando faço isso acontece isso:
  24. Gente, é o seguinte recentemente estou querendo deixar um servidor online, mas para isso é necessário testar e tals, site e jogo, porém, não está ocorrendo tudo tão perfeitamente. Primeiramente baixei esses arquivos: até ai tudo bem! então segui em frente e extraí o htdocs para a pasta htdocs no XXAMP! Logo em seguida dentro do BaiakCiteron Tem outra pasta coma database: Então fui lá no localhost/phpmyadmin, prossegui o processo de criar a database e importar a mesma, até a importação ocorreu tudo com sucesso! Após isso fui na pasta do servidor né, botei lá database otserv e tudo bem. Agora que vem o problema! Quando vou abrir o site né no caso localhost aparece a seguinte mensagem: Warning: parse_ini_file(C:\Users\Leo\Downloads\Compressed\server\config.lua): failed to open stream: No such file or directory in C:\xampp\htdocs\config-and-functions.php on line 13 Database error. Unknown database type in C:\Users\Leo\Downloads\Compressed\server\config.lua . Must be equal to: "mysql" or "sqlite". Now is: "" Sendo assim.. lá vou eu configurar.... fui até o arquivo config.ini que tem o seguinte código: install = "no" server_path = "C:\Users\Leo\Downloads\Compressed\server\" signatures = "1" Então, como podem ver já botei o diretório corretamente, ( obs: já tentei server\config.lua\" porém não foi também.... e então! estou enroscado ai. Obs: já aumentei os limites de upload do XXamp para 750mb, se alguém poder me ajudar agradeço, tá ai meu whatsapp ou facebook se alguém quiser me da uma força a resolver esse problema. (87) 99112 - 9992 - Whatsapp Facebook: https://www.facebook.com/Leeo.Oliiveira1 Obrigado por a atenção de todos!
  25. Devo adquirir um servidor Linux ou windows? tem algum tópico explicando melhor sobre vps? também tenho dúvidas, como deixar o site com um ip dinamico

Informação Importante

Confirmação de Termo