Ir para conteúdo

Farathor

Membro
  • Registro em

  • Última visita

Tudo que Farathor postou

  1. Você tem, Skype, Facebook ou Whatsapp para conversarmos melhor?
  2. Olá, gostaria de saber se é possível por para que esse script adicione o prêmio para cada vocação local query = db.query or db.executeQuery local premios = { -- -- [chance] -- itemid,amount [{1, 5}] = {{12674}, {11754}}, [{10, 30}] = {{2390}, {2469}, {2646}, {8306,5}, {2408}, {9693}}, [{80, 100}] = {{2160,1000}} } local function getGuildNameById(id) local name = "" local query = db.getResult('SELECT `name` FROM `guilds` WHERE `id` = "'.. id ..'"') if query:getID() == -1 then return true end name = query:getDataString("name") query:free() return name end function pointNumber(number) if not tonumber(number) then return false end local str = "" number = tostring(number):reverse() local count = 0 for i = 1, number:len() do count = count + 1 if count <= 3 then if str == "" then str = number:sub(i, i) else str = str..number:sub(i, i) end else count = 1 str = str.."."..number:sub(i, i) end end return str:reverse() end function onStatsChange(cid, attacker, type, combat, value) if isMonster(cid) and isPlayer(attacker) and type == STATSCHANGE_HEALTHLOSS then if isInArray({"Castle Guardian I", "Castle Guardian II", "Castle Guardian III", "Castle Guardian IV", "Castle Generator", "Ice Crystal"}, getCreatureName(cid)) then doPlayerSetStorageValue(attacker, 1827311, getPlayerStorageValue(attacker, 1827311) + value) local quant = guild_hit_count[getPlayerGuildId(attacker)] and guild_hit_count[getPlayerGuildId(attacker)] or 0 guild_hit_count[getPlayerGuildId(attacker)] = quant + value end end return true end function onDeath(cid, corpse, deathList) local gid = 0 local winner = 0 if isMonster(cid) and getCreatureName(cid) == "Ice Crystal" then if not getPlayingGuilds() then return true end local guilds = getPlayingGuilds() local max = 0 for index, var in pairs(guild_hit_count) do if var > max then max = var gid = index end end setGlobalStorageValue(1823999, gid) query("UPDATE `castle_dono` SET `guild_id` = '"..gid.."' WHERE `guild_id` > 0") doBroadcastMessage("{Castle War} O evento acabou, a guild com maior desempenho foi "..getGuildNameById(gid)..", com "..pointNumber(max).." pontos sobre o castelo.") updateCastleData() setGlobalStorageValue(18219113, -1) if gid > 0 then local mx = 0 for _, pid in pairs(getPlayersOnline()) do if getPlayerGuildId(pid) == gid then local st = getPlayerStorageValue(pid, 1827311) if st > mx then mx = st winner = pid end end end if isPlayer(winner) then local r = math.random(1,100) for v, k in pairs(premios) do if r >= v[1] and r <= v[2] then local rand = k[math.random(#k)] itemr, amountr = rand[1], (not rand[2] and 1 or rand[1] and rand[2] or 1) end end local recompensa = doPlayerAddItem(winner, itemr, amountr) doBroadcastMessage("{Castle War} O jogador com maior desempenho foi "..getCreatureName(winner)..", com "..pointNumber(mx).." pontos sobre o castelo. Ele recebeu "..pointNumber(amountr).."x "..getItemNameById(itemr).." como premio.") doItemSetAttribute(recompensa, 'description', "Premio do jogador "..getCreatureName(winner).." ganho no evento castle war do dia "..os.date("%d/%m/%y")..".") local medal = doPlayerAddItem(winner, 10127, 1) doItemSetAttribute(medal, 'description', "Trofeu ganho pelo jogador "..getCreatureName(winner).." no evento castle war do dia "..os.date("%d/%m/%y")..".") end end for _, pid in pairs(getPlayersOnline()) do if isInArea(getThingPos(pid), {x = 494, y = 552, z = 6}, {x = 585, y = 620, z = 6}) or isInArea(getThingPos(pid), {x = 511, y = 588, z = 5}, {x = 556, y = 607, z = 5}) or isInArea(getThingPos(pid), {x = 511, y = 588, z = 4}, {x = 556, y = 607, z = 4}) or isInArea(getThingPos(pid), {x = 511, y = 588, z = 3}, {x = 556, y = 607, z = 3}) or isInArea(getThingPos(pid), {x = 481, y = 580, z = 7}, {x = 683, y = 798, z = 7}) then doTeleportThing(pid, {x = 540, y = 631, z = 6}) end end guild_hit_count = {} end return true end
  3. Dê ban IP
  4. Estou procurando membros para a equipe do meu projeto. O meu projeto é criar um servidor Mapa Próprio, com sistemas, magias e eventos exclusivos, o retro pvp, na versão 8.6 Atualmente, o servidor já tem sistema, eventos, magias e o mapa criado, PROCURO uma equipe para melhorar os mesmos. Estou procurando pessoas que possam me ajudar nesse projeto, os cargos são: Mapper -> Pessoa para me ajudar a criar novas areas, quests, etc para o servidor Scripter -> Pessoa para me ajudar a criar novos sistemas, magias, e scripts para quests, etc Websiter -> Pessoa responsável por criar páginas de eventos, e sistemas no site Divulgador -> Pessoa responsável à divulgar o nosso projeto ou mesmo o servidor quando estiver online Caso esteja interessado, por favor, poste o seguinte formulário abaixo. Nome: (Seu Nome) Função: (Mapper, Scripter, Websiter ou Divulgador) Experiência: (Sua Experiência) Tempo Disponível: (Seu tempo diponível)
  5. Uma dúvida, caso meu servidor reinicie, o item vai continuar contando o tempo?
  6. Olá pessoal, eu tenho um script aqui do shop.lua, aquele que entrega os itens comprados no site, gostaria de fizessem uma modificação nele, invés do ITEM ir para o jogador, ele iria ser enviado para o depot SHOP_MSG_TYPE = MESSAGE_STATUS_CONSOLE_RED SQL_interval = 30 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 container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end 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, '{Shopping System} Entrega do item '.. add_item_name ..' feita com sucesso!') 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 .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '{Shopping System} Sua backpack não tem espaço para receber o item '.. add_item_name ..' por favor abra espaço em sua backpack. Estaremos tentando entregar o item em '.. SQL_interval ..' segundos!.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '{Shopping System} Não foi possivel entregar o item '.. add_item_name ..' por causa que você está sem CAP. O peso do item é de '.. full_weight ..' oz, Você tem no momento '.. free_cap ..' oz. de capacidade livre. Coloque alguns itens no deposito e espere cerca de '.. SQL_interval ..' segundos para obte-lo.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end
  7. Olá, gostaria de saber se seria possivel criar um script assim: Existiria um item no meu servidor, que quando eu clicar nele, eu ganho uma certa storage, e essa storage fica no meu personagem por uma quantidade de dias (configuravel)
  8. Farathor postou uma resposta no tópico em Suporte Tibia OTServer
    Esse script é meu, se você tivesse me ajudado quando eu precisei. Talvez eu ajudaria você agora.
  9. coloca qualquer quantidade, depois eu mudo
  10. Farathor postou uma resposta no tópico em Suporte Tibia OTServer
    up
  11. Colega das antigas? Cara, mentir é feio
  12. ISSO QUE DÁ, PEGAR UM SERVIDOR DE UM DEDICADO PARTICULAR DE UMA PESSOA, PEGAR OS SCRIPTS QUE ESTÃO NO SERVIDOR E NÃO SABER COMO FUNCIONA OU COMO ENSINAR A USAR POR FAVOR, COLOQUE OS CRÉDITOS DO CRIADOR
  13. Olá, esse sistema foi criado por mim, não autorizei você postar, gostaria que exclui-se Roubaram o servidor, onde continha essas informações, portanto o script é meu, e não quero que ela seja postado sem eu aceitar Olá, esse sistema foi criado por mim, não autorizei você postar, gostaria que exclui-se Roubaram o servidor, onde continha essas informações, portanto o script é meu, e não quero que ela seja postado sem eu aceitar E outra, vc quer se passar por criador do script, mas não sei nem ensinar como usa-lo
  14. Olá, gostaria de um script que funciona-se assim, de um lado eu coloque o Hota (Não Full) e do outro as Small Enchanted Ruby, e teria uma certa chance do Forge dar certo, quando o Forge der certo, o item ce transforma em 1 Hota Full, caso não de certo, remove a Small e não acontece nada
  15. gente, eu to tentando instalar um site em linux ubuntu, deu tudo certo, mas o site não fica online. o PhpMyAdmin eu consigo entrar mas no site normal não. Da esse erro Not Found The requested URL / was not found on this server. Apache/2.4.10 (Ubuntu) Server at 158.69.209.254 Port 80
  16. Galera, gostaria de pedir um avatar para o youtube, tipo o do gameplayrj, mas pode ser um pouco diferentes sei la, fico agradecido se fizerem, valeu Ideias -> Um F com um play na frente em baixo escrito games, ou qualquer avatar legal escrito Farathor Games, vlw galera
  17. Por favor, esse script funciona em 8.6? EU USO OTX
  18. Farathor postou uma resposta no tópico em Suporte Tibia OTServer
    Erro: [5/12/2015 12:17:25] [Error - CreatureScript Interface] [5/12/2015 12:17:25] data/creaturescripts/scripts/CastleWar/CastleWar.lua:onDeath [5/12/2015 12:17:25] Description: [5/12/2015 12:17:25] (LuaInterface::luaDoPlayerAddItem) Item not found [5/12/2015 12:17:25] [Error - CreatureScript Interface] [5/12/2015 12:17:25] data/creaturescripts/scripts/CastleWar/CastleWar.lua:onDeath [5/12/2015 12:17:25] Description: [5/12/2015 12:17:25] data/lib/100-shortcut.lua:260: attempt to index a boolean value [5/12/2015 12:17:25] stack traceback: [5/12/2015 12:17:25] data/lib/100-shortcut.lua:260: in function 'getItemNameById' [5/12/2015 12:17:25] data/creaturescripts/scripts/CastleWar/CastleWar.lua:92: in function <data/creaturescripts/scripts/CastleWar/CastleWar.lua:52>
  19. Farathor postou uma resposta no tópico em Websites
    Erro interno do Servidor! O servidor encontrou um erro interno e não foi possível completar sua requisição. O servidor está sobrecarregado ou existe um erro em um script CGI. Se você acredita ter encontrado um problema no servidor, por favor entre em contato com o webmaster. Error 500 localhost 12/05/15 11:07:29 Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5
  20. Por exemplo, se eu quisesse fazer com que esse script ai, funciona-se como a entrada de uma quest, isso daria certo? Por exemplo, iriam ser muitos players passando em cima do piso para entrar na sala, dai um só mexe nas estatuas, isso daria certo?

Informação Importante

Confirmação de Termo