Ir para conteúdo

soma007

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    soma007 deu reputação a Absolute em [Battlefield Event New!] Exclusivo e mais legal ;p   
    Fala galerinha linda do TK, vejo muita gente reclamando do battlefield do nosso amigo Vodkart, mas aqui funciona 100%, creio que seja rejeição nos TFS, mas então resolvi trazer a vocês um battlefield que venho customizando a algum tempo, o mesmo possui em alguns servidores poloneses, globalwar e cia.
     
    O Evento é um pouco modificado do que o tradicional battlefield, porém acho que ficou mais legal, é de pegar a bandeira do time inimigo, para dar um pouco mais de emoção que tal? rs.
     
    Preste atenção nos arquivos e como configurar, estarei explicando tudo passo a passo.
     
    Atenção, o comando para abrir o evento é: /battlefield 20 (o 20 é o número de participantes, no caso 10 no time vermelho e 10 no preto, coloque sempre números pares para balancear corretamente o evento)
     
    Vamos ao que interessa:
     

    Primeiramente, em data/libs crie um arquivo com o nome de battlefield.lua e adicione o seguinte dentro:
    battlefield = { storage = 201206300801, storage2 = 201206300802, tpPos = {x=32342, y=32213, z=7}, -- aonde aparecerá o teleport pos_team_1 = {x=31621,y=31860,z=7}, -- posição do team 1 (do lado direito) pos_team_2 = {x=31582,y=31860,z=7}, -- posição do team 2 (do lado esquerdo) spectors = {{x=31593,y=31853,z=6},{x=31609,y=31853,z=6},{x=31593,y=31866,z=6},{x=31609,y=31866,z=6}}, -- aonde aparecerá os espectadores (em volta do battlefield) team1Name = "Black Assassins", team2Name = "Red Barbarians", } function doBroadCastBattle(type,msg) for _, cid in pairs(getPlayersOnline()) do if getPlayerStorageValue(cid, battlefield.storage2) ~= -1 then doPlayerSendTextMessage(cid,type,msg) end end return true end function removeTp() local t = getTileItemById(battlefield.tpPos, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(battlefield.tpPos, CONST_ME_POFF) end end function OpenWallBattle() local x = true local B = { [1] = {1056,{x=31601, y=31858, z=6, stackpos = 1}}, -- posição da barreira [2] = {1056,{x=31601, y=31859, z=6, stackpos = 1}}, -- posição da barreira [3] = {1056,{x=31601, y=31860, z=6, stackpos = 1}}, -- posição da barreira [4] = {1056,{x=31601, y=31861, z=6, stackpos = 1}} -- posição da barreira } for i = 1, #B do if getTileItemById(B[i][2], B[i][1]).uid == 0 then x = false end if x == true then doRemoveItem(getThingfromPos(B[i][2]).uid,1) else doCreateItem(B[i][1], 1, B[i][2]) end end end function getWinnersBattle(storage) local team = storage == 1 and battlefield.team1Name or battlefield.team2Name doBroadcastMessage("Players from team ".. team .." won the event battlefield,they received a Master Surprise Bag!") setGlobalStorageValue(battlefield.storage, -1) removeTp() OpenWallBattle() for _, cid in pairs(getPlayersOnline()) do if getPlayerStorageValue(cid, battlefield.storage2) ~= -1 then doRemoveCondition(cid, CONDITION_OUTFIT) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) if getPlayerStorageValue(cid, battlefield.storage2) == storage then doPlayerAddItem(cid,6571,1) end setPlayerStorageValue(cid, battlefield.storage2, -1) end end end Como configurar este passo;
     
     
     
    Pós o primeiro passo, crie um arquivo em actions/scripts com o nome de battlefieldAbsolute.lua e adicione o seguinte dentro:
    function onUse(cid, item, fromPosition, itemEx, toPosition) local team = getPlayerStorageValue(cid, battlefield.storage2) if (item.actionid == 45001 and team == 1) or (item.actionid == 45002 and team == 2) then getWinnersBattle(team) end return true end
    Em actions.xml, adicione as seguintes linhas:
    <action actionid="49901" event="script" value="battlefieldAbsolute.lua"/> <action actionid="45002" event="script" value="battlefieldAbsolute.lua"/> Pós o segundo passo, vá até sua pasta creaturescripts/scripts e crie um arquivo com o nome de combat.lua e adicione o seguinte:
    function onLogin(cid) if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == -1 then setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, 0) setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, 0) setGlobalStorageValue(_Lib_Battle_Info.storage_count, 0) end registerCreatureEvent(cid, "BattleTeam") registerCreatureEvent(cid, "BattleDeath") return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) then if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamOne.storage) == 1 then doPlayerSendCancel(cid, "You may not attack your team mates.") return false end if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) == 1 and getPlayerStorageValue(target, _Lib_Battle_Info.TeamTwo.storage) == 1 then doPlayerSendCancel(cid, "You may not attack your team mates.") return false end return true end return true end function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if getPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage) >= 1 then setPlayerStorageValue(cid, _Lib_Battle_Info.TeamOne.storage, -1) setGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage)-1) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!") if getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage) == 0 then getWinnersBattle(_Lib_Battle_Info.TeamTwo.storage) else doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name) end elseif getPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage) >= 1 then setPlayerStorageValue(cid, _Lib_Battle_Info.TeamTwo.storage, -1) setGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage, getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage)-1) doRemoveCondition(cid, CONDITION_OUTFIT) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[Battle Field] You Are Dead!") if getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage) == 0 then getWinnersBattle(_Lib_Battle_Info.TeamOne.storage) else doBroadCastBattle(23,"[BattleField Information] ".._Lib_Battle_Info.TeamOne.name.." "..getGlobalStorageValue(_Lib_Battle_Info.TeamOne.storage).." VS "..getGlobalStorageValue(_Lib_Battle_Info.TeamTwo.storage).." " .._Lib_Battle_Info.TeamTwo.name) end end return true end Ainda na mesma pasta crie outro arquivo com o nome de pdeath.lua com o seguinte conteúdo: (ATENÇÃO QUE NA MESMA PASTA SÃO 2 ARQUIVOS)
    function onPrepareDeath(cid, corpse, lastHitKiller, mostDamageKiller) if getPlayerStorageValue(cid, config_tvt.green_kills) > 0 then doTeleportThing(cid, config_tvt.green_pos) setGlobalStorageValue(red_kills, getGlobalStorageValue(red_kills) + 1) end if getPlayerStorageValue(cid, config_tvt.red_kills) > 0 then doTeleportThing(cid, config_tvt.red_pos) setGlobalStorageValue(red_kills, getGlobalStorageValue(green_kills) + 1) end doPlayerSendTextMessage(cid, 27, "You dead! by Absolute") return true end Em creaturescripts/creaturescripts.xml adicione as seguintes linhas:
    <event type="preparedeath" name="BattlefieldP" event="script" value="pdeath.lua"/> <event type="combat" name="BattlefieldC" event="script" value="combat.lua"/> Pós o terceiro passo, em movements/scripts crie um arquivo com o nome de battlefieldAbsolute.lua e adicione o seguinte:
    local conditionBlack = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionBlack, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionBlack, {lookType = 134, lookHead = 114, lookBody = 114, lookLegs = 114, lookFeet = 114}) local conditionRed = createConditionObject(CONDITION_OUTFIT) setConditionParam(conditionRed, CONDITION_PARAM_TICKS, -1) addOutfitCondition(conditionRed, {lookType = 143, lookHead = 94, lookBody = 94, lookLegs = 94, lookFeet = 94}) function onStepIn(cid, item, position, fromPosition) if getPlayerAccess(cid) > 3 then doTeleportThing(cid, battlefield.pos_team_1) return true elseif getGlobalStorageValue(battlefield.storage) == 0 then doTeleportThing(cid, battlefield.spectors[math.random(#battlefield.spectors)]) return true end if getGlobalStorageValue(battlefield.storage) > 0 then if getGlobalStorageValue(battlefield.storage) % 2 == 0 then setPlayerStorageValue(cid, battlefield.storage2, 1) doAddCondition(cid, conditionBlack) doTeleportThing(cid, battlefield.pos_team_1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You will join the team " .. battlefield.team1Name .. "!") else setPlayerStorageValue(cid, battlefield.storage2, 2) doAddCondition(cid, conditionRed) doTeleportThing(cid, battlefield.pos_team_2) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You will join the team " .. battlefield.team2Name .. "!") end setGlobalStorageValue(battlefield.storage, getGlobalStorageValue(battlefield.storage)-1) if getGlobalStorageValue(battlefield.storage) == 0 then doBroadcastMessage("Battlefield will start in 1 minute, please create your strategy!") addEvent(doBroadcastMessage, 60*1000, "BattleField will begin now!") addEvent(OpenWallBattle, 60*1000) else doBroadcastMessage("We are waiting "..getGlobalStorageValue(battlefield.storage).." players to Battlefield starts.") end end return true end Em movements.xml adicione a seguinte linha:
    <movevent type="StepIn" actionid="45000" event="script" value="battlefieldAbsolute.lua"/> Á pedidos fiz o comando para abrir manualmente, então em talkactions/scripts crie um arquivo com o nome de battlefieldopenAbsolute.lua e coloque:
    function onSay(cid, words, param) if getGlobalStorageValue(battlefield.storage) ~= -1 then doPlayerSendCancel(cid, "The event is already open.") return true elseif not tonumber(param) or param % 2 ~= 0 then doPlayerSendCancel(cid, "You must choose an even number.") return true end doBroadcastMessage("The event BattleField was opened and We are waiting "..param.." Players! Team divided into "..((param)/2).." VS "..((param)/2)) setGlobalStorageValue(battlefield.storage, tonumber(param)) local tp = doCreateItem(1387, 1, battlefield.tpPos) doItemSetAttribute(tp, "aid", 45000) return true end Em talkactions.xml adicione a linha:
    <talkaction words="/battlefield" access="3" event="script" value="battlefieldopenAbsolute.lua"/> Screenshots do mapa do evento; Clique em spoiler para ver.
     
     
    Download & Scan do mapa;
  2. Gostei
    soma007 deu reputação a Noob II em Peça sua Script.!   
    Amigo ele quis falar script.lua e não .php que é usado nos sites.
    Mas para não precisar você criar um topico eu lhe ajudo...  
     
    Essa "aba" é das novas versões do Gesior. Porém, você pode usar outro meio de colocar sua pagina do facebook no seu site. Como?
     
    - Tenha um pagina no facebook.
    - Depois você entra nesse link do facebook:
     
    https://developers.facebook.com/docs/reference/plugins/like-box/
     
    Lá você gera uma janela da pagina do seu site.
     
    Onde tem:
     
    Facebook Page URL - Você coloca o link da pagina do seu Facebook.
    Height - É a largura desta janela.
    Width - É a altura desta janela.
    Color Scheme - Aqui você escolhe entre as 2 opções que o facebook disponibiliza "light" ou "dark".
     
    Depois de ter feito a configuração. Aperte "Get Code" e Escolha a opção "Iframe". Copie o Codigo que foi gerado e vá na pasta do seu site em htdocs>Layouts>tibiacom> e abra o arquivo Layouts.php. Feito isso, escolha o local onde você quer quer fique a janela do facebook em seu site e cole o código que foi gerado. Lembre-se de por o código entre <div>Seu codigo aqui</div>. Ficando assim:

    <div> <iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FFacebookDevelopers&amp;width&amp;height=290&amp;colorscheme=light&amp;show_faces=true&amp;header=true&amp;stream=false&amp;show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:290px;" allowTransparency="true"></iframe> </div>
     
     
  3. Gostei
    soma007 deu reputação a vankk em (Resolvido)Incluir imagens nas mensagens no site Gesior.   
    Você precisa utilizar <img src="link_da_imagem.png"> e não <img>url</img>
  4. Gostei
    soma007 recebeu reputação de Vagnerasdas em (Resolvido)Task System 8.60[HELP]   
    :D
     
  5. Gostei
    soma007 deu reputação a Vagnerasdas em (Resolvido)Task System 8.60[HELP]   
    Pegou vlw!!!
  6. Gostei
    soma007 recebeu reputação de Vagnerasdas em (Resolvido)Task System 8.60[HELP]   
    Tenta Essa Se der certo da Rep+ ai :D
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <mod name="Simple Task" version="4.0" author="Vodkart" contact="tibiaking.com" enabled="yes">
    <config name="task_func"><![CDATA[
    task_sys = {
        [1] = {name = "Trolls", start = 176201, monsters_list = {"Troll","Troll champion"}, level = 8, count = 40, points = 0, items = {}, reward = {}, exp = 2000, money = 2000},
        [2] = {name = "rotworms", start = 176202, monsters_list = {"rotworm","carrion worm","Rotworm Queen"}, level = 12, count = 50, points = 0, items = {}, reward = {}, exp = 2500, money = 3000},
        [3] = {name = "cyclops", start = 176203, monsters_list = {"cyclops","cyclops smith","cyclops drone"}, level = 19, count = 60, points = 0, items = {}, reward = {}, exp = 3000, money = 3000},
        [4] = {name = "Green Djinn", start = 176204, monsters_list = {"Green Djinn","Efreet"}, level = 23, count = 80, points = 1, items = {}, reward = {}, exp = 10000, money = 5000},
        [5] = {name = "Blue Djinn", start = 176205, monsters_list = {"Blue Djinn","Marid"}, level = 25, count = 80, points = 1, items = {}, reward = {}, exp = 10000, money = 5000},
        [6] = {name = "pirates", start = 176206, monsters_list = {"Pirate Marauder","Pirate Cutthroat","Pirate Buccaneer","Pirate Corsair"}, level = 30, count = 120, points = 2, items = {}, reward = {}, exp = 10000, money = 5000},
        [7] = {name = "Stone Golems", start = 176207, monsters_list = {"Stone Golem"}, level = 33, count = 130, points = 3, items = {}, reward = {}, exp = 12000, money = 7000},
        [8] = {name = "Carniphilas", start = 176208, monsters_list = {"carniphila"}, level = 36, count = 135, points = 3, items = {}, reward = {}, exp = 8000, money = 8000},
        [9] = {name = "Ice Golems", start = 176209, monsters_list = {"ice golem"}, level = 40, count = 150, points = 2, items = {}, reward = {}, exp = 12000, money = 8200},
        [10] = {name = "Wailing Widows", start = 176210, monsters_list = {"Wailing Widow"}, level = 42, count = 150, points = 3, items = {}, reward = {}, exp = 0, money = 0},
        [11] = {name = "Mutated Rats", start = 176211, monsters_list = {"Mutated Rat"}, level = 46, count = 170, points = 2, items = {}, reward = {}, exp = 8000, money = 8500},
        [12] = {name = "Dragons", start = 176212, monsters_list = {"dragon"}, level = 50, count = 120, points = 1, items = {}, reward = {}, exp = 9000, money = 9000},
        [13] = {name = "Necromancer" ,start = 176213, monsters_list = {"Necromancer"}, level = 60, count = 200, points = 3, items = {}, reward = {}, exp = 20000, money = 15000},
        [14] = {name = "Crystal Spiders" ,start = 176214, monsters_list = {"Crystal Spider"}, level = 63, count = 250, points = 3, items = {}, reward = {}, exp = 25000, money = 11000},
        [15] = {name = "Giant Spider" ,start = 176215, monsters_list = {"Giant Spider","The old widow"}, level = 80, count = 500, points = 0, items = {}, reward = {}, exp = 20000, money = 32000},
        [16] = {name = "Underwater Quaras" ,start = 176216, monsters_list = {"quara predator","quara constrictor","quara hydromancer","quara mantassin","quara pincher"}, level = 82, count = 550, points = 3, items = {}, reward = {}, exp = 22000, money = 15000},
        [17] = {name = "Underwater Quaras Scout" ,start = 176217, monsters_list = {"quara predator scout","quara constrictor scout","quara hydromancer scout","quara mantassin scout","quara pincher scout"}, level = 83, count = 600, points = 3, items = {}, reward = {}, exp = 25000, money = 18000},
        [18] = {name = "Hellspawn" ,start = 176218, monsters_list = {"Hellspawn"}, level = 85, count = 600, points = 4, items = {}, reward = {}, exp = 28000, money = 26000},
        [19] = {name = "Dragon Lords" ,start = 176219, monsters_list = {"Dragon lord"}, level = 88, count = 650, points = 3, items = {}, reward = {}, exp = 30000, money = 35000},
        [20] = {name = "Lizard Dragons" ,start = 176220, monsters_list = {"Lizard Chosen","Lizard Dragon Priest","Lizard High Guard","Lizard Legionnaire", "Lizard Zaogun"}, level = 90, count = 600, points = 4, items = {}, reward = {}, exp = 28000, money = 26000},
        [21] = {name = "Nightmare" ,start = 176221, monsters_list = {"Nightmare","nightmare scion"}, level = 95, count = 650, points = 2, items = {}, reward = {}, exp = 30000, money = 35000},
        [22] = {name = "Hydras" ,start = 176222, monsters_list = {"Hydra"}, level = 100, count = 700, points = 3, items = {}, reward = {}, exp = 40000, money = 40000},
        [23] = {name = "Serpent Spawn" ,start = 176223, monsters_list = {"Serpent Spawn"}, level = 103, count = 720, points = 4, items = {}, reward = {}, exp = 50000, money = 45000},
        [24] = {name = "Hellhounds" ,start = 176224, monsters_list = {"Hellhound"}, level = 107, count = 650, points = 2, items = {}, reward = {}, exp = 30000, money = 35000},
        [25] = {name = "Demons" ,start = 176225, monsters_list = {"Demon"}, level = 110, count = 666, points = 4, items = {}, reward = {}, exp = 66600, money = 66000}
    }
    daily_task = {
        [1] = {name = "Orcs" ,monsters_list = {"Orc Berserker","Orc Rider","Orc Leader","Orc Warlord"}, count = 100, points = 0, reward = {}, exp = 5000, money = 10000},
        [2] = {name = "TarantulaS" ,monsters_list = {"Tarantula"}, count = 120, points = 1, reward = {}, exp = 9000, money = 12000},
        [3] = {name = "Wyvern" ,monsters_list = {"Wyvern"}, count = 125, points = 2, reward = {}, exp = 9000, money = 15000},
        [4] = {name = "Dragons" ,monsters_list = {"Dragon","Dragon Hatchling"}, count = 150, points = 0, reward = {}, exp = 2000, money = 10000},
        [5] = {name = "Wailing Widows" ,monsters_list = {"Wailing Widows"}, count = 200, points = 1, reward = {}, exp = 20000, money = 25000},
        [6] = {name = "Ancient Scarabs" ,monsters_list = {"Ancient Scarab"}, count = 180, points = 5, reward = {}, exp = 22000, money = 18000},
        [7] = {name = "High Class Lizards" ,monsters_list = {"Corrupted Soul","Eternal Guardian","Lizard Chosen","Lizard Dragon Priest","Lizard High Guard","Lizard Legionnaire","Lizard Magistratus","Lizard Noble","Lizard Zaogun"}, count = 300, points = 3, reward = {}, exp = 50000, money = 60000},
        [8] = {name = "Mutated BatS" ,monsters_list = {"Mutated Bat"}, count = 260, points = 2, reward = {}, exp = 40000, money = 55000},
        [9] = {name = "Giant Spiders" ,monsters_list = {"Giant Spider"}, count = 350, points = 3, reward = {}, exp = 60000, money = 70000},
        [10] = {name = "Undead Dragons" ,monsters_list = {"Undead Dragon"}, count = 500, points = 3, reward = {{2173,1}}, exp = 90000, money = 120000},
        [11] = {name = "HydraS" ,monsters_list = {"Hydra"}, count = 600, points = 3, reward = {{2173,1}}, exp = 100000, money = 160000},
        [12] = {name = "Ghastly Dragons" ,monsters_list = {"Ghastly Dragon"}, count = 700, points = 3, reward = {{2173,1}}, exp = 130000, money = 200000}
    }
    task_sys_storages = {176601, 176602, 176603, 176604, 176605, 176606, 176607, 176608} -- task, points, count, daily task, daily count, daily time , daily start, contador
    function getTaskMission(cid)
        return getPlayerStorageValue(cid,task_sys_storages[1]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[1])
    end
    function getDailyTaskMission(cid)
        return getPlayerStorageValue(cid,task_sys_storages[4]) < 0 and 1 or getPlayerStorageValue(cid,task_sys_storages[4])
    end
    function getTaskPoints(cid)
        return getPlayerStorageValue(cid,task_sys_storages[2]) < 0 and 0 or getPlayerStorageValue(cid,task_sys_storages[2])
    end
    function doRandomDailyTask(cid)
        local t = {
            [{6,49}] = {1,3},
            [{50,79}] = {4,6},
            [{80,129}] = {7,9},
            [{130,math.huge}] = {10,12}
        }
        for a , b in pairs(t) do
            if getPlayerLevel(cid) >= a[1] and getPlayerLevel(cid) <= a[2] then
                return math.random(b[1], b[2])
            end
        end
        return 0
    end
    function GetRankTask(cid)
        local ranks = {
            [{1, 20}] = "Huntsman",
            [{21, 50}] = "Ranger",
            [{51, 100}] = "Big Game Hunter",
            [{101, 200}] = "Trophy Hunter",        
            [{201, math.huge}] = "Elite Hunter"
        }
        for v , r in pairs(ranks) do
            if getTaskPoints(cid) >= v[1] and getTaskPoints(cid) <= v[2] then
                return r
            end
        end
        return 0
    end
    function getItemsFromList(items)
        local str = ''
        if table.maxn(items) > 0 then
            for i = 1, table.maxn(items) do
                str = str .. items[2] .. ' ' .. getItemNameById(items[1])
                if i ~= table.maxn(items) then str = str .. ', '
                end
            end
        end
        return str
    end
    function doRemoveItemsFromList(cid,items)
        local count = 0
        if table.maxn(items) > 0 then
            for i = 1, table.maxn(items) do
                if getPlayerItemCount(cid,items[1]) >= items[2] then
                count = count + 1 end
            end
        end
        if count == table.maxn(items) then
            for i = 1, table.maxn(items) do doPlayerRemoveItem(cid,items[1],items[2]) end
        else
            return false
        end
        return true
    end
    function getMonsterFromList(monster)
        local str = ''
        if #monster > 0 then
            for i = 1, #monster do
                str = str .. monster
                if i ~= #monster then str = str .. ', ' end
            end
        end
        return str
    end
    function GiveRewardsTask(cid, items)
        local backpack = doPlayerAddItem(cid, 1999, 1) -- backpackID
        for _, i_i in ipairs(items) do
            local item, amount = i_i[1],i_i[2]
            if isItemStackable(item) or amount == 1 then
                doAddContainerItem(backpack, item, amount)
            else
                for i = 1, amount do
                    doAddContainerItem(backpack, item, 1)
                end
            end
        end
    end
    function isSummon(cid)
        if(not isCreature(cid)) then
            return false
        end
        return getCreatureMaster(cid) ~= cid
    end
    ]]></config>
    <event type="login" name="TaskLogin" event="script"><![CDATA[
    function onLogin(cid)
        registerCreatureEvent(cid, "KillTask")
        registerCreatureEvent(cid, "TaskLook")
        return true
    end]]></event>
    <talkaction words="/task;!task" event="buffer"><![CDATA[
    domodlib('task_func')
    param,task,daily = param:lower(), getTaskMission(cid), getDailyTaskMission(cid)
    if isInArray({"counter","contador"},param) then
        setPlayerStorageValue(cid, task_sys_storages[8], getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and 1 or 0)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Task System] O contador foi "..(getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and "ativado" or "desativado")..".") return true
    elseif isInArray({"daily","diaria"},param) then
        if not daily_task[daily] or getPlayerStorageValue(cid, task_sys_storages[7]) <= 0 then
            doPlayerSendCancel(cid, "Desculpe, Mas você não está em nenhuma Daily Task.") return true
        elseif getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily_task[daily].count then
            doPlayerSendCancel(cid,"Desculpe, Mas Você não terminou a Daily Task a tempo! Por favor volte ao npc e comece uma nova Daily Task!") return true
        end
        return doShowTextDialog(cid, 8983, "[->] CURRENT DAILY TASK INFO [<-]\n\nNome: "..daily_task[daily].name.."\nProgresso: ["..(getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[5])).."/"..daily_task[daily].count.."]\nPrazo para entrega: "..os.date("%d %B %Y %X ", getPlayerStorageValue(cid,task_sys_storages[6])).."\nMonstros para caçar: "..getMonsterFromList(daily_task[daily].monsters_list).."\n\n[->] CURRENT TASK REWARDS [<-]\n\nMoney: "..(daily_task[daily].money > 0 and daily_task[daily].money or 0).."\nExperiencia: "..(daily_task[daily].exp > 0 and daily_task[daily].exp or 0).."\nTask Points: "..daily_task[daily].points.."\nItems: "..(#daily_task[daily].reward > 0 and getItemsFromList(daily_task[daily].reward) or "Nenhum item de recompensa")..".")
    end
    if not task_sys[task] or getPlayerStorageValue(cid, task_sys[task].start) <= 0 then
        doPlayerSendCancel(cid, "você não está em nenhuma task.") return true
    end
    return doShowTextDialog(cid, 8983, "-> CURRENT TASK ["..getTaskMission(cid).."/"..#task_sys.."] <-\n\nTask Name: "..task_sys[task].name.."\nTask Level: "..task_sys[task].level.."\nTask Progress: ["..(getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 0 or getPlayerStorageValue(cid, task_sys_storages[3])).."/"..task_sys[task].count.."]\nMonster To Hunt: "..getMonsterFromList(task_sys[task].monsters_list)..".\nItens Para Entrega: "..(#task_sys[task].items > 0 and getItemsFromList(task_sys[task].items) or "Nenhum")..".\n\n[->] CURRENT TASK REWARDS [<-]\n\nReward Money: "..(task_sys[task].money > 0 and task_sys[task].money or 0).."\nReward Experiencia: "..(task_sys[task].exp > 0 and task_sys[task].exp or 0).."\nReward Points: "..task_sys[task].points.."\nRedward Items: "..(#task_sys[task].reward > 0 and getItemsFromList(task_sys[task].reward) or "Nenhum item de recompensa")..".")
    ]]></talkaction>
    <event type="look" name="TaskLook" event="script"><![CDATA[
    domodlib('task_func')
    function onLook(cid, thing, position, lookDistance)
        if isPlayer(thing.uid) and getTaskPoints(thing.uid) > 0 then
            doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").. " is a "..GetRankTask(thing.uid))
        end    
        return true
    end]]></event>
    <event type="kill" name="KillTask" event="script"><![CDATA[
    domodlib('task_func')
    function onKill(cid, target)
        if isPlayer(cid) and isMonster(target) then
            local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)]
            if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then
                setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1))
                if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".")
                end
                if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.")
                end
            end
            if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then
                setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1))
                if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".")
                end
                if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.")
                end
            end
        end
        return true
    end]]></event>
    </mod>
  7. Gostei
    soma007 recebeu reputação de Vagnerasdas em (Resolvido)Task System 8.60[HELP]   
    Eu tb estava com esse Error q vc mais resolvi :D Posta seu xml do mods ai q vo ajuda vc nesse error d n mostra os monstros q ja foi mortos !
     
  8. Gostei
    soma007 deu reputação a Giordano em Como fazer "banner" para o seu Gesior!   
    Galera...sei que já viram esse post por outros foruns e tal....E aqui no TK também tem um membro que fez um tutorial,mas é um "banner" meio diferente,então aqui mostrarei como fazer um banner igual a do underwar.org que muitos querem fazer!

    Bom,vamos lá!!

    Primeiramente:Você quer que apareça na pagina inicial do seu Gesior,não é?
    Então devera colocar o código abaixo no Latestnews.php (Pois é a pagina inicial do seu gesior.Se quiser colocar na pagina do shop por exemplo,vai ter que acrescentar o código no Shopsystem.php e assim por diante....)

    Coloque esse código antes de tudo no Xampp/htdocs/Latestnews.php (antes do <?PHP)




    Explicando...

    Vermelho: Ai sera onde você vai definir a opacidade da "pagina de trás" do banner,0.00 é totalmente transparente e 1.00 é totalmente preto.

    Verde: Ai será o arquivo (pagina) onde a pessoa irá ser direcionada quando clicar,no caso ele vai para parte de comprar pontos do meu server.Se quiser mudar é só colocar endereço para onde quer que seja direcionado...por exemplo "?subtopic=nomedapagina"

    Azul: Ai será onde está localizada a imagem do banner,pra não ter que mudar muita coisa faça como eu,deixe sua imagem na pasta: xampp/htdocs/layouts/tibiacom/images/nomedaimagem.jpg (recomendo fazer uma imagem de 500 por 300)

    Dúvida pode perguntar,irei dar uma força!
    Obrigado! Se eu ajudei,dê um REP+ aê. *-*

Informação Importante

Confirmação de Termo