Líderes
Conteúdo Popular
Exibindo conteúdo com a maior reputação em 07/01/17 em todas áreas
-
Hail Xtibianos. Eu fiz esse sistema como pedido de um membro há um bom tempo, mas nunca tinha postado ele e diversos sistemas que uso no meu ot server; agora resolvi postá-los. Esse é o sistema que impede dos players da mesma party se atacarem ou, também dos membros da mesma guild. Em config.lua adicione: noDamageToGuildMates = false noDamageToPartyMembers = true Em creaturescripts.xml adicione: <event type="combat" name="combat" script="combat.lua"/> Em creaturescripts/scripts/login.lua adicione: registerCreatureEvent(cid, "combat") Na mesma pasta, crie um arquivo lua chamado combat e adicione isso nele: --[[> Marcryzius <]]--function onCombat(cid, target) if(isPlayer(cid) and isPlayer(target)) then if(getConfigValue("noDamageToGuildMates") and getPlayerGuildId(cid) > 0 and getPlayerGuildId(cid) == getPlayerGuildId(target)) then return false elseif(getConfigValue("noDamageToPartyMembers") and isInParty(target) and getPartyLeader(target) == getPartyLeader(cid)) then return false end end return trueend Qualquer duvida ou erro deixe nos comentários.3 pontos
-
Nogard Graphic Gallery
JonatasLucasf e um outro reagiu a Nogard por um tópico no fórum
E aí pessoal, beleza? Este tópico servirá como minha galeria gráfica (não apenas sprites), vou atualizando. Confere aí! (:2 pontos -
Mapa PXG Cerulean / Saffron para continuar
ManoTobira reagiu a Michyalex por um tópico no fórum
Eu comencei o projeito de copiar as cidades da pxg mais desisti si alguem quer continuar vou deixar o map editor editado por mim para fazer as novas montanhas e os novos doodads, espero ajudar, contem 3 cidades nenhuma terminada (Viridian foi de alguem aqui no foro mais eu refiz para ser compativel com minhas sprites. (DXP V3 refeitas algumas) Cerulean: Saffron: Extras: Datos: Download: Créditos: Michyalex (pelo map e editar algumas sprites e o map editor) Viridian credits (Um membro do xtibia, nao sei o nombre)1 ponto -
Hail Xtibianos. Trago a vós uma serie de funções que eu uso no meu servidor e que pode ser úteis ao seu. Lembrando que algumas funções podem fazer uso de uma livraria xml criado por mim e posta nesse tópico. Essa função tem por objetivo criar uma data formatada (00:00:00) de um intervalo de tempo. function intervalClockFormat(ini,fim) --[[( Marcryzius )]]--local ini,fim = tonumber(ini),tonumber(fim)if not(ini or fim)then return "error",print('function intervalClock erro: type de variaveis invalidas') endlocal tienpo = fim-ini-- existe o parametro de dia, mas não está sendo retornado (usado).local day,hour,minu,seco = tienpo/60/60/23%30,math.floor(tienpo/60/60%23), math.floor(tienpo/60%60),math.floor(tienpo%60) return (hour < 10 and "0"..hour or hour)..":"..(minu < 10 and "0"..minu or minu)..":"..(seco < 10 and "0"..seco or seco)endEx: print(intervalClockFormat(os.time(),os.time()+98)) >> 00:01:38print(intervalClockFormat(os.time(),os.time()+6598)) >> 01:49:58 Essas funções tem por objetivo salvar as informações de uma determinada quest e saber se o player tem essa quest salva em seu histórico. function saveQuestsInfor(uid,name,cid,other) --[[( Marcryzius )]]----[[ uid = Item.uid usado no bau(entre outros) para receber o item da Quest name = nome do item dado ao player ou nome da quest cid = identificacao do player other = informacoes adicionais para serem salvas junto a quest]]--if not(db.executeQuery("SELECT * FROM `server_quests`;"))then -- caso a table não exista, será criada db.executeQuery("CREATE TABLE `server_quests` (`uid` INTEGER, `name` VARCHAR(255), `name_player` VARCHAR(255), `pos` VARCHAR(255), `other` TEXT);")end-- caso o parametro uid seja numero, se pega a posição do item ou, caso não, se pega a posição do player.local other,pos2 = other or '',''local pos = type(uid) == 'number' and getThingPos(uid) or getCreaturePosition(cid) pos2 = 'x='..pos.x..', y='..pos.y..', z='..pos.z -- verifica se tudo está correto. if not(type(name) == 'string') or not(tonumber(cid))then return false, print('Funcao requer parametros: name,cid') end -- salva as informações na database. db.executeQuery("INSERT INTO `server_quests` (`uid`, `name`, `name_player`,`pos`,`other`) VALUES ("..(uid or tonumber(pos.x..''..pos.y..''..pos.z))..",'"..name.."', '"..getCreatureName(cid).."','"..pos2.."','"..other.."');") return trueendfunction getSaveQuestsInfor(uid,cid) --[[( Marcryzius )]]--local str = false if(tonumber(uid))then str = db.getResult("SELECT * FROM `server_quests` WHERE `uid` = '"..uid.."' AND `name_player` = ".. db.escapeString(getCreatureName(cid))..";") elseif(type(uid) == 'string')then str = db.getResult("SELECT * FROM `server_quests` WHERE `name_player` = " ..db.escapeString(getCreatureName(cid)).. " AND `name` = '"..uid.."';") else return false,print('getSaveQuestInfor: tipo de uid invalido > '..tostring(type(uid))) end return (str:getID() == -1) and true or false end Essa função serve para por a primeira letra de cada palavra da 'msg' em maiúscula. function upperPrimer(msg) --[[( Marcryzius )]]--local txt = '' for k in string.gmatch(msg,'%a+') do if(#k > 1)then txt = txt..' '..k:gsub("^%a", function(s) return s:upper() end) else txt = txt..' '..k end end return txt:sub(2,-1)endEx:print(upperPrimer("toda primeira letra de cada palavra desse texto foi colocada em maiusculo")) >> Toda Primeira Letra De Cada Palavra Desse Texto Foi Colocada Em Maiusculo Função criada para determinar o valor inteiro mais próximo de uma fração. function math.proxInteger(value) --[[( Marcryzius )]]-- local value = tonumber(value) if not(value)then return 0,print('Function error: math.proxInteger() > valor => '..type(value)) end return value-math.floor(value) < 0.5 and math.floor(value) or math.ceil(value)end Essa função converte a 'string' em números e devolve a soma de todos os números. function getStoreString(str) --[[( Marcryzius )]]--local store = 0 if(type(str) == 'string')then for pos = 1,#str do store = store+str:sub(pos,pos):byte() end elseif(type(str) == 'number')then return str else print('function getStoreString adverte: tipo de parametro invalido. ('..type(str)..')') end return storeendEx:print(getStoreString("lua")) >> 322 Pega o level necessário para usar a arma dentro do arquivo weapons.xml function getLevelNeedToWeaponById(itemid) --[[( Marcryzius )]]--local xfile = xml:load("data/weapons/weapons.xml"):find('%a+','id',itemid) return tonumber(xfile and xfile.level) or 0end Essa função faz uma verificação se há um town em uma determinada área. function getTownInArea(pos, ranger) --[[( Marcryzius )]]--local ranger,townid,bloked = ranger or 200,1,{getTownId('Gods Island'),getTownId('Isle of Destiny')} -- towns suprimidos while getTownName(townid) do local get = getTownTemplePosition(townid) if not(isInArray(bloked,townid)) and ((pos.x >= get.x-ranger and pos.x <= get.x+ranger)and(pos.y >= get.y-ranger and pos.y <= get.y+ranger))then return townid else townid = townid+1 end end return 0 --retorna 0 (zero) para servir como condição.end Pega o nome e o level do top function getTopLevel() --[[( Marcryzius )]]--local target,name,level = db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` <= 2 ORDER BY 'level' DESC;"),"",0 if(target:getID() ~= -1) then repeat local glevel = target:getDataInt("level") if(level < glevel)then name,level = target:getDataString("name"), glevel end until not(target:next()) end target:free() return name,levelend Verifica se existe o nome de um player mesmo ele estando offline. function playerExistName(nome) --[[( Marcryzius )]]--local db = db.getResult("SELECT `name` FROM `players` WHERE `id` = " ..getPlayerGUIDByName(nome).. ";") if not(db:getID() == -1) then return db:getDataString("name") end return falseend Retorna o tempo vigente apenas em segundos function HorasParaSegundos() --[[( Marcryzius )]]-- local hour,minu,second = tostring(os.date("%H:%M:%S")):match('(%d+)%d+)%d+)') return ((tonumber(hour) or 0)*3600)+((tonumber(minu) or 0)*60)+secondend1 ponto
-
function onSay(cid, words, param, channel)local t = string.explode(param, ",")local name, days, boolean, motivo = t[1], tonumber(t[2]), t[3], t[4] if param == '' or not days or not name or not motivo then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite /ban nome,dias, true ou false (true para IP Banishment), motivo.") return true end local acc = getAccountIdByName(name) local player_ip = getPlayerIp(getPlayerByName(name)) if acc ~= 0 then local player_ip, player = getPlayerIp(getPlayerByName(name)), getPlayerByNameWildcard(name) if tostring(boolean) ~= "true" and tostring(boolean) ~= "false" then doPlayerSendTextMessage(cid, "O terceiro parâmetro deve ser true ou false. \n true = ban ip.\n /ban nome, dias, true ou false, motivo.") return true end if tostring(boolean) == "false" then print"ban normal" doAddAccountBanishment(acc, target, os.time() + 3600 * 24 * days, action, 2, 'Você foi banido por: ' .. getCreatureName(cid) .. ' \nMotivo: ' .. motivo ..'. \nQuantidade de dias: '.. days, 0) doBroadcastMessage("O jogador " .. t[1] .. " foi banido por ".. getCreatureName(cid).. ". \n Motivo:".. motivo .. ".", 25) else print "ban ip" doAddIpBanishment(player_ip) end if isPlayer(player) then doRemoveCreature(player) end endreturn trueend1 ponto
-
local saga = {[1] = {[1] = 71, level = XXXX, storage = YYYY, [2] = 66, [3] = 91, [4] = 18, [5] = 31, [6] = 92, [7] = 40, [8] = 49, [9] = 25, [10] = 179, [11] = 952, [12] = 951, [13] = 291, [14] = 302, [15] = 487, [16] = 54, [17] = 743, [18] = 1000, [19] = 1001, [20] = 954, [21] = 955, [22] = 953, effect = 111}, --[Vocation] = {[1] = Roupa, effect = Efeito da transformação}} if getPlayerStorageValue(cid, saga[t[1]].storage) < 1 and getPlayerLevel(cid) < saga[t[1]].level then return doPlayerSendCancel(cid, "storage :".. saga[t[1]].storage .." = " .. getPlayerStorageValue(cid, saga[t[1]].storage) .."\n level necessário: ".. saga[t[1].level) and false end1 ponto
-
Algumas horas, é relativo. O shenron mesmo eu fiz em várias etapas, em média 8 dias mexendo até me satisfazer, ou quase. Eu poderia ter entregue em 3 dias, talvez menos. Você precisa ter uma noção do "padrão comercial", observar os concorrentes é uma boa, muitas vezes o cliente prefere algo rápido, quase sempre. Sprites são BEM mais trabalhosas de se fazer do que a interface de um launcher por exemplo, pode ser bem cansativo.1 ponto
Líderes está configurado para São Paulo/GMT-03:00