Ir para conteúdo

marcosb

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    marcosb deu reputação a Vodkart em [8.6] Task System 4.0! (Task system + Daily Task System)   
    tenta deixar essa linha:
    if isPlayer(cid) and isMonster(target) and not isSummon(target) then assim
    if isPlayer(cid) and isMonster(target) then  
    e testa
  2. Gostei
    marcosb deu reputação a thelifeofpbion em (Resolvido)ERROR   
    tive esse problema, usei essa e resolveu...
     

    caso nao resolva, use essa.
     
     
  3. Gostei
    marcosb deu reputação a Lyon em (Resolvido)War System (Do Matheus) - Erro Distro 0.4   
    Tente trocar por este:
    function onSay(cid, words, param, channel) local guild = getPlayerGuildId(cid) if(not guild or getPlayerGuildLevel(cid) < GUILDLEVEL_LEADER) then doPlayerSendChannelMessage(cid, "", "You cannot execute this talkaction.", TALKTYPE_CHANNEL_W, 0) return true end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendChannelMessage(cid, "", "Not enough param(s).", TALKTYPE_CHANNEL_W, 0) return true end local enemy = getGuildId(t[2]) if(not enemy) then doPlayerSendChannelMessage(cid, "", "Guild \"" .. t[2] .. "\" does not exists.", TALKTYPE_CHANNEL_W, 0) return true end if(enemy == guild) then doPlayerSendChannelMessage(cid, "", "You cannot perform war action on your own guild.", TALKTYPE_CHANNEL_W, 0) return true end local enemyName, tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(tmp:getID() ~= -1) then enemyName = tmp:getDataString("name") tmp:free() end if(isInArray({"accept", "reject", "cancel"}, t[1])) then local query = "`guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild if(t[1] == "cancel") then query = "`guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy end tmp = db.getResult("SELECT `id`, `begin`, `end`, `payment` FROM `guild_wars` WHERE " .. query .. " AND `status` = 0") if(tmp:getID() == -1) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending invitation for a war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end if(t[1] == "accept") then local _tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = _tmp:getID() < 0 or _tmp:getDataInt("balance") < tmp:getDataInt("payment") _tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low to accept this invitation.", TALKTYPE_CHANNEL_W, 0) return true end db.query("UPDATE `guilds` SET `balance` = `balance` - " .. tmp:getDataInt("payment") .. " WHERE `id` = " .. guild) end query = "UPDATE `guild_wars` SET " local msg = "accepted " .. enemyName .. " invitation to war." if(t[1] == "reject") then query = query .. "`end` = " .. os.time() .. ", `status` = 2" msg = "rejected " .. enemyName .. " invitation to war." elseif(t[1] == "cancel") then query = query .. "`end` = " .. os.time() .. ", `status` = 3" msg = "canceled invitation to a war with " .. enemyName .. "." else query = query .. "`begin` = " .. os.time() .. ", `end` = " .. (tmp:getDataInt("end") > 0 and (os.time() + ((tmp:getDataInt("begin") - tmp:getDataInt("end")) / 86400)) or 0) .. ", `status` = 1" end query = query .. " WHERE `id` = " .. tmp:getDataInt("id") if(t[1] == "accept") then doGuildAddEnemy(guild, enemy, tmp:getDataInt("id"), WAR_GUILD) doGuildAddEnemy(enemy, guild, tmp:getDataInt("id"), WAR_ENEMY) end tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. msg, MESSAGE_EVENT_ADVANCE) return true end if(t[1] == "invite") then local str = "" tmp = db.getResult("SELECT `guild_id`, `status` FROM `guild_wars` WHERE `guild_id` IN (" .. guild .. "," .. enemy .. ") AND `enemy_id` IN (" .. enemy .. "," .. guild .. ") AND `status` IN (0, 1)") if(tmp:getID() ~= -1) then if(tmp:getDataInt("status") == 0) then if(tmp:getDataInt("guild_id") == 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 tmp:free() end if(str ~= "") then doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_W, 0) return true 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.max(100000, math.min(1000000000, payment)) tmp = db.getResult("SELECT `balance` FROM `guilds` WHERE `id` = " .. guild) local state = tmp:getID() < 0 or tmp:getDataInt("balance") < payment tmp:free() if(state) then doPlayerSendChannelMessage(cid, "", "Your guild balance is too low for such payment.", TALKTYPE_CHANNEL_W, 0) return true 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` (`guild_id`, `enemy_id`, `begin`, `end`, `frags`, `payment`) VALUES (" .. guild .. ", " .. enemy .. ", " .. begining .. ", " .. ending .. ", " .. frags .. ", " .. payment .. ");") doBroadcastMessage(getPlayerGuildName(cid) .. " has invited " .. enemyName .. " to war till " .. frags .. " frags.", MESSAGE_EVENT_ADVANCE) return true end if(not isInArray({"end", "finish"}, t[1])) then return false end local status = (t[1] == "end" and 1 or 4) tmp = db.getResult("SELECT `id` FROM `guild_wars` WHERE `guild_id` = " .. guild .. " AND `enemy_id` = " .. enemy .. " AND `status` = " .. status) if(tmp:getID() ~= -1) then local query = "UPDATE `guild_wars` SET `end` = " .. os.time() .. ", `status` = 5 WHERE `id` = " .. tmp:getDataInt("id") tmp:free() doGuildRemoveEnemy(guild, enemy) doGuildRemoveEnemy(enemy, guild) db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has " .. (status == 4 and "mend fences" or "ended up a war") .. " with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end if(status == 4) then doPlayerSendChannelMessage(cid, "", "Currently there's no pending war truce from " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end tmp = db.getResult("SELECT `id`, `end` FROM `guild_wars` WHERE `guild_id` = " .. enemy .. " AND `enemy_id` = " .. guild .. " AND `status` = 1") if(tmp:getID() ~= -1) then if(tmp:getDataInt("end") > 0) then tmp:free() doPlayerSendChannelMessage(cid, "", "You cannot request ending for war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end local query = "UPDATE `guild_wars` SET `status` = 4, `end` = " .. os.time() .. " WHERE `id` = " .. tmp:getDataInt("id") tmp:free() db.query(query) doBroadcastMessage(getPlayerGuildName(cid) .. " has signed an armstice declaration on a war with " .. enemyName .. ".", MESSAGE_EVENT_ADVANCE) return true end doPlayerSendChannelMessage(cid, "", "Currently there's no active war with " .. enemyName .. ".", TALKTYPE_CHANNEL_W, 0) return true end
  4. Curtir
    marcosb deu reputação a falling em [Script] Criar item   
    Olá pessoal estava tentando modificar este script da arena, movement que quando pisa no tile, aparece um goblet emcima da bancada, com a desc de bravura pro kra.
     
     
    Mais eu tentei por outro item, só mudei o ID e a QUANTIDADE e mesmo assim nao vai, tem como arrumar?
    function onStepIn(cid, item, position, fromPosition) local gobletPos = getThingPos(item.uid) if item.actionid == 42360 then if getPlayerStorageValue(cid, 42360) ~= 1 then setPlayerStorageValue(cid, 42360, 1) local goblet = doCreateItemEx(10572, 15) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena greenhorn difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end elseif item.actionid == 42370 then if getPlayerStorageValue(cid, 42370) ~= 1 then setPlayerStorageValue(cid, 42370, 1) local goblet = doCreateItemEx(10572, 25) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena scrapper difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end elseif item.actionid == 42380 then if getPlayerStorageValue(cid, 42380) ~= 1 then setPlayerStorageValue(cid, 42380, 1) local goblet = doCreateItemEx(10572, 30) doItemSetAttribute(goblet, "description", "It is given to the courageous victor of the barbarian arena warlord difficulty.\nAwarded to " .. getCreatureName(cid) .. ".") doTileAddItemEx({x=gobletPos.x,y=gobletPos.y-1,z=gobletPos.z}, goblet) end end doTransformItem(item.uid, item.itemid - 1) return TRUE end function onStepOut(cid, item, pos) doTransformItem(item.uid, item.itemid + 1) return TRUE end
  5. Gostei
    marcosb deu reputação a Absolute em [UP-LEVEL] Recompensa ao subir de level   
    Fala TKZIANOS de plantão WTF? AUEHAUHEA Mas ok...
     
    Venho hoje trazer a vocês um sistema de ganhar uma recompensa ao conquistar determinado nível (Configurável)
     
     
    Como funciona?

    Quando o jogador conquistar determinado level ele recebe como recompensa X item ou GOLD!
    Mais Absolute, o cara vai ficar se matando e upando de novo para ficar pegando a recompensa... NÃO! Quando o player conquista o level ele recebe uma STORAGE, essa storage faz com que salve isto, ou seja faz com que marque que o jogador já recebeu, se ele tentar burlar o sistema ele não vai receber pelo fato da tal STORAGE já estar gravada nele =p
     
     
     
    Em data/creaturescripts/scripts crie um arquivo chamado uplevelabsolute.lua e coloque o seguinte dentro:
     
    function onAdvance(cid, skill, oldLevel, newLevel) local config = { [50] = {item = 2160, count = 5}, [100] = {item = 2160, count = 15}, [150] = {item = 2160, count = 20}, [200] = {item = 2160, count = 25}, [250] = {item = 2160, count = 30}, [300] = {item = 2160, count = 50}, [350] = {item = 4891, count = 1}, [400] = {item = 4892, count = 1}, } if skill == 8 then for level, info in pairs(config) do if newLevel >= level and (getPlayerStorageValue(cid, 30700) == -1 or not (string.find(getPlayerStorageValue(cid, 30700), "'" .. level .. "'"))) then doPlayerAddItem(cid, info.item, info.count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Parabéns, você atingiu o level "..newLevel.." e ganhou "..info.count.." "..getItemNameById(info.item)..".") local sat = getPlayerStorageValue(cid, 30700) == -1 and "Values: '" .. level .. "'" or getPlayerStorageValue(cid, 30700) .. ",'" .. level .. "'" setPlayerStorageValue(cid, 30700, sat) end end end return TRUE end Em data/creaturescripts/creaturescripts.xml adicione a seguinte linha:
    <event type="advance" name="UpAbsolute" event="script" value="uplevelabsolute.lua"/> Em data/creaturescripts/scripts/login.lua abaixo de registerCreatureEvent(cid, "Mail") adicione a seguinte linha:
    registerCreatureEvent(cid, "UpAbsolute") Pronto, você implantou o sistema em seu servidor.

     

    Como configurar:
    [50] = {item = 2160, count = 5}, [50] = level que o player vai receber a tal recompensa
    2160 = item que o player vai receber, no caso 2160 é o Crystal Coin
    count = 5 = quantidade do item, no caso 5 Crystal Coins
     
     
     
    Observação: Ao atingir o level o player receberá uma mensagem e o prêmio estará diretamente em sua backpack.

     
     
     
    Qualquer dúvida peço que poste =D
     
     
     
    Até o próximo sisteminha bb's.
  6. Gostei
    marcosb deu reputação a tddf1995 em (Resolvido)[spells]   
    Vai na pasta do seu ot clica com botão direito no arquivo config.lua, vá em editar e procure por:
    emoteSpells
     
    Deve estar assim:
    emoteSpells = false

    Mude para:
    emoteSpells = true
  7. Obrigado
    marcosb deu reputação a xWhiteWolf em (Resolvido)Magia de Buff para :Life, Skill, e mana   
    utevosio:
    --Spell Method by Night Wolf local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 39) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local config = { tempo = 15, --- tempo que vai ficar recuperando mana (tempo total) mana = 15, -- quanto de mana ganha a cada intervalo intervalo = 1  --- intervalo que leva pra recuperar X de mana,  } local condition = createConditionObject(CONDITION_FOOD) setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_MANAGAIN, config.mana) setConditionParam(condition, CONDITION_PARAM_MANATICKS, config.intervalo*1000) setCombatCondition(combat, condition) function onCastSpell(cid, var) return doCombat(cid, combat, var) end   exorisio
    --Spell Method by Night Wolf local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 39) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local config = { tempo = 60, --- tempo que vai durar a spell percent = 20 -- quanto % vai aumentar } local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUBPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORDPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_AXEPERCENT, 100+config.percent) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 100+config.percent) setCombatCondition(combat, condition) function onCastSpell(cid, var) return doCombat(cid, combat, var) end utamogransio
     
    --Spell Method by Night Wolf local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 39) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local config = { tempo = 60, --- tempo que vai durar a spell percent = 25 -- quanto % vai aumentar } local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, 100+config.percent) setCombatCondition(combat, condition) function onCastSpell(cid, var) return doCombat(cid, combat, var) end vitagransio
     
    --Spell Method by Night Wolf local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 39) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local config = { tempo = 60, --- tempo que vai durar a spell percent = 25 -- quanto % vai aumentar } local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, config.tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setConditionParam(condition, CONDITION_PARAM_STAT_MAXHITPOINTSPERCENT, 100+config.percent) setCombatCondition(combat, condition) function onCastSpell(cid, var) return doCombat(cid, combat, var) end e no spells.xml
     
    <instant name="Buff Mana" words="utevo sio" lvl="40" mana="100" maglv="90" prem="1" aggressive="0" needtarget="1" params="1" exhaustion="1500" needlearn="0" event="script" value="especiais/utevosio.lua"> </instant> <instant name="Buff Skills" words="exori sio" lvl="40" mana="100" maglv="90" prem="1" aggressive="0" needtarget="1" params="1" exhaustion="1500" needlearn="0" event="script" value="especiais/exorisio.lua"> </instant> <instant name="Buff Shield" words="utamo gran sio" lvl="40" mana="100" maglv="120" prem="1" aggressive="0" needtarget="1" params="1" exhaustion="1500" needlearn="0" event="script" value="especiais/utamogransio.lua"> </instant> <instant name="Buff Hit Points" words="vita gran sio" lvl="40" mana="100" maglv="120" prem="1" aggressive="0" needtarget="1" params="1" exhaustion="1500" needlearn="0" event="script" value="especiais/vitagransio.lua"> com base nisso vc cria as outras.. espero ter ajudado.
  8. Gostei
    marcosb deu reputação a thelifeofpbion em (Resolvido)Item que adiciona HP e Mana   
    <attribute key="maxManaPoints" value="3000"/>
  9. Gostei
    marcosb deu reputação a Vodkart em [Sistema] Battlefield Event! V.1   
    Mapa BattleField Feito Por AnneMotta :

    Mapa Battlefield.rar

    Scan: https://www.virustot...sis/1346548669/


    Imagens do mapa



    Descrição:

    - O evento é automático e acontece em determinado dia e hora da semana
    - Logo após é aberto um teleport então apenar um número limitado de players entra no evento
    - São formados por dois times, os "Black Assassins" e os "Red Barbarians"
    - Os times são balanceados automaticamente, quando o último jogador entra, esse teleport é fechado e depois de 5 minutos o evento começa, os 5 minutos são para os players ter tempo de planejar um ataque.
    - O sistema tem por finalidade matar todos do time inimigo, e os players que sobreviverem recebem um prêmio.

    Bônus:

    - Durante o evento é mostrado na tela somente dos jogadores que estão no evento um placar de times.

    - Até o último player entrar no evento, ficam mandando broadcast dizendo quanto players faltam para dar inicio ao jogo.

    - Se o evento abrir e não atingir a meta de players colocada, o evento é finalizado e os players voltam para o templo.




    Lembre-se:

    - De colocar Pvp Tool na área
    - De colocar área NoLogout


    Imagens:




    Instalação:

     
    Data > Lib       Data > CreatureScript > Script     Data > GlobalEvents > Scripts       Data > Movements > Script             Configurações do evento
  10. Gostei
    marcosb deu reputação a Danihcv em (Resolvido)Como Mudar a Imagem de Fundo do meu site?   
    Vá no arquivo layout.php localizado na pasta xampp\htdocs\layouts\tibiacom
    Agora procure por:
     
    A parte destacada é o diretório da imagem de fundo.
     
    Ou seja, pra mudar a imagem de fundo, salve ela dentro de alguma pasta (dentro da pasta htdocs) e coloque o no local indicado acima o diretório da imagem seguido de /ARQUIVO-DA-IMAGEM.EXTENSÃO-DA-IMAGEM
     
    Se ajudei, REP+ pf
  11. Gostei
    marcosb deu reputação a MaXwEllDeN em [CTF] Capture The Flag 2.0(Automático)   
    #Introdução

    Este é um sistema de rouba bandeira, no qual tem dois times que se enfrentam e tentam se infiltrar na fortaleza do inimigo, roubar a bandeira dele e retornar para sua base com ela.
     
     
     
    #Instalação

    Faça o download do sistema (anexado ao tópico) e cole na pasta do seu servidor.
    Atualizado 28/03/2014 Após ter instalado os arquivos nas suas respectivas pastas e instalado as tags
    nos arquivos xml, abra a pasta do seu servidor, e em seguida abra a pasta spells/scripts/support, e abra o arquivo invisible.lua com algum editor de texto, depois de






    function onCastSpell(cid, var) cole isso:
     
    if (getPlayerStorageValue(cid, 16700) ~= -1) then return doPlayerSendCancel(cid, "Você não pode usar invisible durante o CTF!") and doSendMagicEffect(getThingPos(cid), 2) end ficando assim:
     
    local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_INVISIBLE) setConditionParam(condition, CONDITION_PARAM_TICKS, 200000) setCombatCondition(combat, condition) function onCastSpell(cid, var) if (getPlayerStorageValue(cid, 16700) ~= -1) then return doPlayerSendCancel(cid, "Você não pode usar invisible durante o CTF!") and doSendMagicEffect(getThingPos(cid), 2) end return doCombat(cid, combat, var) end #Configuração

    Como na maioria dos meus códigos: as configurações ficam na lib, então:

     






    waitpos = {x = 93, y = 117, z = 6}, -- Posição da sala de espera tppos = {x = 92, y = 117, z = 7}, -- Onde o TP vai aparecer   days = {2, 5, 7}, -- Dias que o evento vai abrir xp_percent = 0.5, -- Porcentagem de xp que o player vai receber quando ganhar timeclose = 1, -- Tempo para iniciar o CTF winp = 10, waitpos = {x = 93, y = 117, z = 6}, -- Posição da sala de espera  
    Posição onde os players que entrarem no teleport vão ficar esperando, até o evento iniciar
     
    tppos = {x = 92, y = 117, z = 7}, -- Onde o TP vai aparecer Posição de onde o teleport vai aparecer
     
    days = {2, 5, 7}, -- Dias que o evento vai abrir  
    Dias que o evento vai iniciar.
     
    xp_percent = 0.5, -- Porcentagem de exp que o player vai ganhar  
    Quando o evento acaba, os players da equipe que venceu ganham uma quantidade de experiência baseada na experiência que eles já têm, exemplo:
     
    Meu player tem 1200000000 de exp, quando o evento acabar, ele vai ganhar 0.5% da exp que ele tem, no caso desse exemplo 6000000 de exp.
     
    timeclose = 1, -- Tempo, em minutos, para iniciar o CTF  
    Tempo para o teleport sumir e os players que estão na sala de espera serem teletransportados para o evento.

     
    winp = 10, -- Quantos pontos uma equipe precisa marcar para vencer  
    Quantos pontos uma equipe precisa marcar para vencer o evento.
     
     
    Para configurar o horário que o evento vai abrir, é só você modificar na tag do globalevents.xml:
     
    <globalevent name="CTFCheck" time="19:33:00" event="script" value="CTFMax.lua"/>  
    Você não precisa criar as bandeiras pelo map editor. O script irá adicioná-las automaticamente.
     
    É isso, essa versão é uma remake, vários bugs reportados pela galera na v.1 foram corrigidos, o script ficou mais simples
    Capture The Flag.rar

Informação Importante

Confirmação de Termo