Ir para conteúdo

xugrude456

Campones
  • Total de itens

    36
  • Registro em

  • Última visita

Posts postados por xugrude456

  1. Em 03/02/2016 em 22:30, leonardo macedo disse:

    Alguem sabe colocar Fast atack em TFS ?

    igual o da Otx, porque tipo todas as tfs que procuro nenhuma funciona, só com o elfbot ativo

    No fórum tem um tutorial

  2. 3 minutos atrás, Dragon Ball Hiper disse:
    
    crie um arquivo em globalevents com nome removerbatle.lua
    
    
    
    local function removeBattle(cid)
        doRemoveCondition(cid, CONDITION_INFIGHT)
        return false
    end
    function onThink(interval)
        for _, cid in ipairs(getPlayersOnline()) do
            local pos, tile = getThingPos(cid), getTileThingByPos(getThingPos(cid))
            if getTilePzInfo(pos) == true then
                removeBattle(cid)
            end
        end
    return true
    end
    
    
    
    tag xml
    
    
    
    1000 é equivalente a 1 segundo em servidores milesegundos , caso contrário você deverá usar "1" 
    
    <globalevent name="removerbatle" interval="1000" event="script" value="removerbatle.lua"/>
    
    
    - Você pode retirar pela source também (o correto é por la.)
    caso queira.
    em 
    protocolgame.cpp
    
    Procura por 
    if(player->hasCondition(CONDITION_INFIGHT))
      Troque por:
    if(player->getZone() != ZONE_PROTECTION && player->hasCondition(CONDITION_INFIGHT))
        

     

    não funciono o script do global events, fico com battle no pz 

  3. 1 minuto atrás, gabriel28 disse:

    essa aki e a tag 

    <talkaction log="yes" words="/skill;/addskill" access="5" event="script" value="addskill.lua"/>

     

     

     

     

     

    local function getSkillId(skillName)
        if skillName == "club" then
            return SKILL_CLUB
        elseif skillName == "sword" then
            return SKILL_SWORD
        elseif skillName == "axe" then
            return SKILL_AXE
        elseif skillName:sub(1, 4) == "dist" then
            return SKILL_DISTANCE
        elseif skillName:sub(1, 6) == "shield" then
            return SKILL_SHIELD
        elseif skillName:sub(1, 4) == "fish" then
            return SKILL_FISHING
        else
            return SKILL_FIST
        end
    end

    local function getExpForLevel(level)
        level = level - 1
        return ((50 * level * level * level) - (150 * level * level) + (400 * level)) / 3
    end

    function onSay(cid, words, param)
        local player = Player(cid)
        if not player:getGroup(5):getAccess(5) then
            return true
        end

        if player:getAccountType() < ACCOUNT_TYPE_GOD then
            return false
        end

        local split = param:split(",")
        if split[2] == nil then
            player:sendCancelMessage("Insufficient parameters.")
            return false
        end

        local target = Player(split[1])
        if target == nil then
            player:sendCancelMessage("A player with that name is not online.")
            return false
        end

        -- Trim left
        split[2] = split[2]:gsub("^%s*(.-)$", "%1")

        local count = 1
        if split[3] ~= nil then
            count = tonumber(split[3])
        end

        local ch = split[2]:sub(1, 1)
        for i = 1, count do
            if ch == "l" or ch == "e" then
                target:addExperience(getExpForLevel(target:getLevel() + 1) - target:getExperience(), false)
            elseif ch == "m" then
                target:addManaSpent(target:getVocation():getRequiredManaSpent(target:getBaseMagicLevel() + 1) - target:getManaSpent())
            else
                local skillId = getSkillId(split[2])
                target:addSkillTries(skillId, target:getVocation():getRequiredSkillTries(skillId, target:getSkillLevel(skillId) + 1) - target:getSkillTries(skillId))
            end
        end
        return false
    end

     

  4. 11 minutos atrás, gabriel28 disse:

    @xugrude456
     

    
    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    local talkState = {}
    
    function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    function onCreatureSay(cid, type, msg)            npcHandler:onCreatureSay(cid, type, msg)        end
    function onThink()                    npcHandler:onThink()                    end
    
    function creatureSayCallback(cid, type, msg)
        if(not npcHandler:isFocused(cid)) then
            return false
        end
    
    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
    
    --------------------------- Configuração Inicial ------------------------------------
    local strg = 9785 -- Valor da Storage
    local item = xxxx -- id do item
    local quant = yyy --quantidade
    local vocs = {zzz, www} -- id das vocaçao que irao poder receber a permissao
    
    --------------------------- Configuração das Falas  -----------------------------------
    if (msgcontains(msg, 'storage')) then
            if getPlayerStorageValue(cid, strg) < 1 then
            selfSay('Deseja receber a permissao? Para isso, deve me trazer X quantia do item Y', cid)
            talkState[talkUser] = 1
        else
            selfSay('Voce ja recebeu a permissao.', cid)
            talkState[talkUser] = 0
        end
    
    --------------------------- Falas de Entrada  -----------------------------------
    
    elseif(msgcontains(msg, 'yes') or msgcontains(msg, 'sim') and talkState[talkUser] == 1) then
            if getPlayerStorageValue(cid, strg) < 1 then
    			if isInArray(vocs, getPlayerVocation(cid)) then
    				if doPlayerRemoveItem(cid, item, quant) then
    					setPlayerStorageValue(cid, strg, 1)
    					selfSay('Permissao concedida com sucesso.', cid)
    					talkState[talkUser] = 0
    				else
    					selfSay('Voce nao tem o item.', cid)
    					talkState[talkUser] = 0
    				end	
    			else
    				selfSay('Sua vocaçao nao pode receber a permissao.', cid)
    				return false
    			end	
            else
                selfSay('Permissao ja concedida anteriormente.', cid)
    			return false
            end
    
    --------------------------- Falas de Rejeição  -----------------------------------
    elseif(msgcontains(msg, 'no') or msgcontains(msg, 'nao') and isInArray({1}, talkState[talkUser])) then
            talkState[talkUser] = 0
            selfSay('Tudo bem entao.', cid)
    
    --------------------------- FIM do SCRIPT ---------------------------------------
        end
      return true
    end
    
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())

     

    obrigado sua ajuda foi muito boa s2

  5. 20 horas atrás, gabriel28 disse:

    @xugrude456
    Quando tiver pedidos assim, já posta o script junto pra agilizar. Essa minha resposta de agora já poderia conter a solução.

    me perdoe sou novo,

    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    local talkState = {}

    function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    function onCreatureSay(cid, type, msg)            npcHandler:onCreatureSay(cid, type, msg)        end
    function onThink()                    npcHandler:onThink()                    end

    function creatureSayCallback(cid, type, msg)
        if(not npcHandler:isFocused(cid)) then
            return false
        end

    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

    --------------------------- Configuração Inicial ------------------------------------
    local strg = 9785 -- Valor da Storage

    --------------------------- Configuração das Falas  -----------------------------------
    if (msgcontains(msg, 'storage')) then
            if getPlayerStorageValue(cid, strg) < 1 then
            selfSay('Deseja receber a permissao?', cid)
            talkState[talkUser] = 1
        else
            selfSay('Voce ja recebeu a permissao.', cid)
            talkState[talkUser] = 0
        end

    --------------------------- Falas de Entrada  -----------------------------------

    elseif(msgcontains(msg, 'yes') or msgcontains(msg, 'sim') and talkState[talkUser] == 1) then
            if getPlayerStorageValue(cid, strg) < 1 then
                setPlayerStorageValue(cid, strg, 1)
                selfSay('Permissao concedida com sucesso.', cid)
                talkState[talkUser] = 0
            else
                selfSay('Permissao ja concedida anteriormente.', cid)
            return false
            end

    --------------------------- Falas de Rejeição  -----------------------------------
    elseif(msgcontains(msg, 'no') or msgcontains(msg, 'nao') and isInArray({1}, talkState[talkUser])) then
            talkState[talkUser] = 0
            selfSay('Tudo bem entao.', cid)

    --------------------------- FIM do SCRIPT ---------------------------------------
        end
      return true
    end

    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...