Ir para conteúdo

Reds

Membro
  • Registro em

  • Última visita

Solutions

  1. Reds's post in [SQLite] -=[TFS]=- 0.4 8.60 Toda Vez que loga aparece essa mensagem em vermelho no default was marked as the answer   
    Você precisa criar um creaturescript com o evento de onLogin e fazer a lógica.
  2. Reds's post in [SQLite] -=[TFS]=- 0.4 8.60 Problema com Stamina & Canal Abri Automaticamente. was marked as the answer   
    Opa, beleza?
    Veja se no seu config.lua está habiltiada stamina, no tfs 1.4 tem essa propriedade:
    staminaSystem = true
    deve ser marcada como true.

    Caso não consiga, me manda o github do lugar onde vc pegou sua base ou me fala a versão do tfs que a gente vê mais a fundo.

    ------------

    Para abrir canal automaticamente, vai no creaturescript login.lua

    e adiciona isso antes do return true:
    player:openChannel(9)
    player:openChannel(15)
  3. Reds's post in Machete Não Está Cortando Grav was marked as the answer   
    O tk tava fora ai não postei antes..
    Script:
    function onUse(cid, item, fromPosition, itemEx, toPosition)
        if (itemEx.itemid == idDaGrowth) then     
            doSendMagicEffect(toPosition, CONST_ME_POFF)
            destroyItem(cid, itemEx, toPosition)
            return true
        end
        return false
    end
     
    E no XML:
    <action itemid="idMachete" event="script" value="machet.lua"/>
     
    Isso resolve a machete, para não remover wild growth, você precisa identificar a Action que existe dela e modificar.
  4. Reds's post in (Resolvido)Ajuda Rank Reset DB was marked as the answer   
    local displayoutput = {"Level","Magic Level","Fist Fighting","Club Fighting","Sword Fighting","Axe Fighting","Distance Fighting","Shielding", "Resets"} local itemtype = {9969,9933,5896,8929,8932,7388,8849,8906,2580, xxxx} function onSay(cid, words, param) number = 1 param = string.lower(param) skilllist = "" command = TRUE if param == "level" then display = 1 elseif param == "magic" then display = 2 elseif param == "club" then id = 1 display = 4 elseif param == "sword" then id = 2 display = 5 elseif param == "axe" then id = 3 display = 6 elseif param == "distance" then id = 4 display = 7 elseif param == "shield" then id = 5 display = 8 elseif param == "resets" then display = 9 else error = 'Highscore Commands:\n\n!rank level\n!rank magic\n!rank fist\n!rank club\n!rank sword\n!rank axe\n!rank distance\n!rank shield\n' doShowTextDialog(cid, 5958, error) command = FALSE end if command ~= FALSE then if display == 1 then local player = db.getResult("SELECT `name`, `level` FROM `players` WHERE group_id < '2' ORDER BY `level` DESC LIMIT 50;") if(player:getID() ~= -1) then while (true) do local name = player:getDataString("name") local level = player:getDataInt("level") skilllist = skilllist.. "\n#"..string.format("%5s",number.." "..name.." - "..level) number = number + 1 if not(player:next()) then break end end player:free() end elseif display == 2 then local player = db.getResult("SELECT `name`, `maglevel` FROM `players` WHERE group_id < '2' ORDER BY `maglevel` DESC LIMIT 50;") if(player:getID() ~= -1) then while (true) do local name = player:getDataString("name") local maglevel = player:getDataInt("maglevel") skilllist = skilllist.. "\n#"..string.format("%5s",number.." "..name.." - "..maglevel) if not(player:next()) then break end number = number + 1 end end player:free() elseif display == 9 then local player = db.getResult("SELECT 'name', 'resets' FROM 'players' WHERE group_id < '2' ORDER BY 'resets' DESC LIMIT 50;") if(player:getID() ~= -1) then while (true) do local name = player:getDataString("name") local resets = player:getDataInt("resets") skilllist = skilllist.. "\n#"..string.format("%5s",number.." "..name.." - "..resets) if not(player:next()) then break end number = number + 1 end end player:free() else local skills = db.getResult("SELECT `player_id`, `value`, `skillid` FROM `player_skills` WHERE `skillid` = "..id.." ORDER BY `value` DESC;") while (true) do local GUID = skills:getDataInt("player_id") local value = skills:getDataInt("value") local skillid = skills:getDataInt("skillid") local player = db.getResult("SELECT `name` FROM `players` WHERE `id` = "..GUID.." and group_id < '2' ") if(player:getID() ~= -1) then local name = player:getDataString("name") skilllist = skilllist.. "\n#"..string.format("%5s",number.." "..name.." - "..value) number = number + 1 player:free() end if number > 50 then break end if not(skills:next()) then break end end skills:free() end dialog = ""..displayoutput[display].." Highscores: \n "..skilllist.."" doShowTextDialog(cid, itemtype[display], dialog) end end só configura o item que você quer que apareça no lugar de xxxx
  5. Reds's post in (Resolvido)Itens de outra versão no 8.60 was marked as the answer   
    Sim, para isso você precisa conseguir alterar seu .spr e seu .dat, aqui no tibiaking tem vários tutoriais sobre isso.
     
    Como esse:
     
  6. Reds's post in (Resolvido)[Ajuda] Bug de atacar SD no ar was marked as the answer   
    Coloca para precisar target no spells.xml
     
    Dependendo a versão do seu server vai ser
     
    target="true"
    Ou
    needTarget="true"
     
    Olha em alguma outra spell
  7. Reds's post in (Resolvido)[ juda ] Dano Da Wand Por Magic Level was marked as the answer   
    local combat_types = { [1] = {cond = CONDITION_FREEZING, effect = CONST_ME_ICEATTACK, anim = CONST_ANI_ICE, damage = COMBAT_ICEDAMAGE}, [2] = {cond = CONDITION_FIRE, effect = CONST_ME_FIREATTACK, anim = CONST_ANI_FIRE, damage = COMBAT_FIREDAMAGE}, [3] = {cond = CONDITION_POISON, effect = CONST_ME_SMALLPLANTS, anim = CONST_ANI_EARTH, damage = COMBAT_EARTHDAMAGE}, [4] = {cond = CONDITION_ENERGY, effect = CONST_ME_ENERGYHIT, anim = CONST_ANI_ENERGY, damage = COMBAT_ENERGYDAMAGE}, [5] = {effect = CONST_ME_HOLYDAMAGE, anim = CONST_ANI_HOLY, damage = COMBAT_HOLYDAMAGE}, [6] = {cond = CONDITION_CURSED, effect = CONST_ME_MORTAREA, anim = CONST_ANI_SUDDENDEATH, damage = COMBAT_DEATHDAMAGE}, default = {damage = COMBAT_PHYSICALDAMAGE}, } local config = { storage = 303030, block_armor = true, condition_rounds = 0, condition_value = 0, condition_time = 2000, } for key, combat in pairs(combat_types) do combat.object = createCombatObject() setCombatParam(combat.object, COMBAT_PARAM_TYPE, combat.damage or COMBAT_PHYSICALDAMAGE) setCombatParam(combat.object, COMBAT_PARAM_EFFECT, combat.effect or CONST_ME_NONE) setCombatParam(combat.object, COMBAT_PARAM_DISTANCEEFFECT, combat.anim or CONST_ANI_NONE) setCombatParam(combat.object, COMBAT_PARAM_BLOCKARMOR, config.block_armor and 1 or 0) function onGetFormulaValues(cid, level, maglevel) min = -(100 * maglevel) max = -(240 * maglevel) return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") if combat.cond then local condition = createConditionObject(combat.cond) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, config.condition_rounds, config.condition_time, config.condition_value) setCombatCondition(combat.object, condition) end end local function find_combat(id) return combat_types[id] or false end function onUseWeapon(cid, var) local combat = find_combat(getCreatureStorage(cid, config.storage)) if not combat then if getDistanceBetween(getThingPosition(cid), getThingPosition(var.number)) > 1 then return false end combat = combat_types.default end return doCombat(cid, combat.object, var) end
  8. Reds's post in (Resolvido)[SPELL] Continuar dano ao subir escada was marked as the answer   
    pronto amigo, até dei uma organizada no script kkkkkk
     
  9. Reds's post in (Resolvido)Effect em Dodge e Critical System was marked as the answer   
    local lvldodge = 48902 local percent = 0.5 function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS and isCreature(attacker) then if (getPlayerStorageValue(cid, lvldodge)*3) >= math.random (0,1000) then value = math.ceil(value*(percent)) doTargetCombatHealth(attacker, cid, combat, -value, -value, 255) doSendAnimatedText(getCreaturePos(cid), "DODGE", 6) doSendMagicEffect(getCreaturePos(cid), 43) return false end end return true end
  10. Reds's post in (Resolvido)[PEDIDO] Spell Shunkanido Somente Em Player was marked as the answer   
    local combat = createCombatObject()
    setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
    setCombatParam(combat, COMBAT_PARAM_EFFECT, 10)
    setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -350.0, 0, -365.0, 0)
    function onCastSpell(cid, var)
    alvo = getCreatureTarget(cid)
    if not isPlayer(alvo) then
    local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
    local target = getCreatureTarget(cid)
    local enemypos = getCreaturePosition(target)
    if target == isMonster or isCreature then
    doTeleportThing(cid, enemypos)
    doSendMagicEffect(position1, 54)
    end
    return doCombat(cid, combat, var)
    end
    else
    return false
    end
  11. Reds's post in Calculo de fatorial de um vetor was marked as the answer   
    /*Questão 01: Elabore um programa em Linguagem C que receba um vetor A de dez elementos inteiros.
    Esse programa deve calcular o fatorial de cada elemento de A e armazená-los em um vetor B.
    O programa deve mostrar o vetor A e o vetor B ao seu final.*/
    #include<stdio.h>
    int main()
    {
        int v[3],i,n[3],fat,a;
        printf("Digite 10 valores inteiros para um vetor.\n");
        for(i=0;i<3;i++)//Guardando um vetor fornecido
        {
            scanf("%d",&v);
            fat=1;
            for(a=1;a<=v[a];a++)
                fat = fat*a;
                fat=n[a];
        }
        for(i=0;i<3;i++)
            printf("A %d casa do vetor fornecido possui valor: %d\n",i,v);
         for(i=0;i<3;i++)
            printf("A %d casa do vetor fatorial possui valor: %d\n",i,n);
    }
     
     
    quando vc ta calculando seus fatoriais, vc tá esquecendo de colocar o por exemplo na variavel
  12. Reds's post in (Resolvido)Criar Action para remover item was marked as the answer   
    ---Config local conf = { maxSlotCount=2, ignoredIds={} } --End function choose(...)          local arg = {...}         return arg[math.random(1,#arg)] end if not getItemAttack then         function getItemAttack(uid)                 return getItemAttribute(uid,'attack')         end         function getItemDefense(uid)                 return getItemAttribute(uid,'defense')         end end local function isArmor(uid) -- Function by Mock the bear.     if (getItemInfo(uid.itemid).armor ~= 0) and (getItemWeaponType(uid.uid) == 0) then                 return true         end         return false end local function isWeapon(uid) -- Function by Mock the bear.         uid = uid or 0         local f = getItemWeaponType(uid)         if f == 1 or f == 2 or f == 3 then                 return true         end         return false end local function isShield(uid) -- Function by Mock the bear.         uid = uid or 0         if getItemWeaponType(uid) == 4 then                 return true         end         return false end local function isBow(uid) -- Function by Mock the bear.         uid = uid or 0         if getItemWeaponType(uid) == 5 and not isItemStackable(uid) then                 return true         end         return false end local function getWeaponLevel(uid) -- Function by Mock the bear. uid = uid or 0 local name = getItemName(uid.uid) or getItemInfo(uid.itemid).name or '' local lvl = string.match(name,'%s%+(%d+)%s*') return tonumber(lvl) or 0 end function onUse(cid, item, fromPosition, itemEx, toPosition)          if item.uid == 0 or item.itemid == 0 then return false end         toPosition.stackpos = 255         if item.uid == 0 or item.itemid == 0 then return false end         toPosition.stackpos = 255     if isInArray(conf.ignoredIds, itemEx.itemid)         or (not getItemWeaponType(itemEx.uid) or getItemWeaponType(itemEx.uid) > 5)         or (getItemWeaponType(itemEx.uid) == 0 and not isArmor(itemEx))         or itemEx.itemid == 0 or itemEx.type > 1 or isItemStackable(itemEx.uid) then         doPlayerSendCancel(cid, "You cant reset this item.")         return TRUE     end     if isCreature(itemEx.uid) then         return FALSE     end          local level = getWeaponLevel(itemEx)             if level > 0 then upgrade = refine                         doSendMagicEffect(toPosition,30)                 setItemName(itemEx.uid, getItemNameById(itemEx.itemid)..' +'..(level)) doPlayerSendCancel(cid, "All slots were removed.")                          doRemoveItem(item.uid,1)         else                   doSendMagicEffect(toPosition,30) setItemName(itemEx.uid, getItemNameById(itemEx.itemid))                 doPlayerSendCancel(cid, "All slots were removed.")        doRemoveItem(item.uid,1)         end         return true end       tenho esse que ta na pasta do meu sv, se n der, de tarde eu faço para vc
  13. Reds's post in (Resolvido)[Duvida] Posso duplicar Sprite? was marked as the answer   
    procure o item no .otb, duplique, assim ter um item novo
     
    OBS: ao duplicar fica tudo igual, só é necessario criar um item novo na .xml e as suas funçoes

Informação Importante

Confirmação de Termo