Ir para conteúdo
  • Cadastre-se

[TFS 0.4 / TFS 1.x] Wand/Rod Elemental


Posts Recomendados

Quem já me conhece aqui do fórum sabe que minha área não é script ou nada do gênero. Estou fazendo esse post para ajudar um membro, o @KillerWatts, e outros mais, talvez. 

 

Introdução:

Wand/rod que dispara vários elementos aleatórios. O uso dos elementos não é configurável como o modal do @tataboy67, lembrando que esse script é velho e foi testado em OTs versões 8.40 até 8.60

 

Guia: 

ef - efeito que irá fazer no alvo (além do efeito comum já do elemento).

sh - shoot type que traçará o "ar" até o alvo.

dmg - tipo de dano que causará no alvo.

 

Eu usei a Jester Staff  Jester Staff.gif (ID: 7958). Você pode usar o item que desejar.

 

Lista de itens para utilizar como rod/wand:

Spoiler

Crystal Wand.gif

Crystal Wand (ID: 2184)

 

Lunar Staff.gif

Lunar Staff (ID: 7424)

 

Light Mace.gif

Light Mace (ID: 2437)

 

Northern Star.gif

Northern Star (ID: 7409)

 

Blessed Sceptre.gif

Blessed Sceptre (ID: 7429)

 

Arcane Staff.gif

Arcane Staff (ID: 2453)

 

Replica of the Sceptre.gif

Replica of the Sceptre (ID: 12288)

 

Spellwand.gif

Spellwand (ID: 7735)

 

Shadow Sceptre.gif

Shadow Sceptre (ID: 7451)

 

Queen's Sceptre.gif

Queen's Sceptre (ID: 7410)

 

Snake God's Sceptre.gif

Snake God's Sceptre (ID: 12609)

 

Magic Light Wand.gif

Magic Light Wand (ID: 2162)

 

Skull Staff.gif

Skull Staff (ID: 2436)

 

Abyss Hammer.gif

Abyss Hammer (ID: 7414)

 

Amber Staff.gif

Amber Staff (ID: 7426)

 

Diamond Sceptre.gif

Diamond Sceptre (ID: 7387)

 

Lich Staff.gif

Lich Staff (ID: 3961)

 

 

 

Em weapons/scripts crie um arquivo "wandelement.lua":

Spoiler

local min, max = 81,111 --Ataque mínimo e ataque máximo

local w = {
    [1] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
    [2] = {ef = 52, sh = 28, dmg = COMBAT_ICEDAMAGE},
    [3] = {ef = 46, sh = 29, dmg = COMBAT_POISONDAMAGE},
    [4] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
    [5] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
    [6] = {ef = 31, sh = 40, dmg = COMBAT_PHYSICALDAMAGE},
    [7] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
}

function onUseWeapon(cid, var)
        local effect = getPlayerStorageValue(cid, 4561)
        local target = getCreatureTarget(cid)
        
        if target ~= 0 then
                local wx = w[effect] or w[math.random(#w)]
                doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
                addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
        end
        return true
end

 

 

 

Para TFS 1.x  (créditos e agradecimento ao @FlavioHulk pelo desenvolvimento):

Spoiler

local damage = { --Ataque mínino e ataque máximo
    min = 81,
    max = 111
}

local effects = {
    [1] = {effect = 36, shootEffect = 3, damageEffect = COMBAT_FIREDAMAGE},
    [2] = {effect = 52, shootEffect = 28, damageEffect = COMBAT_ICEDAMAGE},
    [3] = {effect = 46, shootEffect = 29, damageEffect = COMBAT_POISONDAMAGE},
    [4] = {effect = 17, shootEffect = 31, damageEffect = COMBAT_DEATHDAMAGE},
    [5] = {effect = 47, shootEffect = 35, damageEffect = COMBAT_ENERGYDAMAGE},
    [6] = {effect = 31, shootEffect = 40, damageEffect = COMBAT_PHYSICALDAMAGE},
    [7] = {effect = 49, shootEffect = 37, damageEffect = COMBAT_HOLYDAMAGE}
}

function onUseWeapon(player, variant)
    local effect, target = player:getStorageValue(4561), player:getTarget()
    if target then
        local random = effects[effect] or effects[math.random(#effects)]
        player:getPosition():sendDistanceEffect(target:getPosition(), random.shootEffect)
        addEvent(doAreaCombatHealth, 100, player, random.damageEffect, target:getPosition(), 0, -damage.min, -damage.max, random.effect)
    end
    return true
end

 

 

Em weapons.xml adicione a tag:

Spoiler

    


<wand id="7958" level="100" mana="35" event="script" value="wandelement.lua">
    <vocation id="1"/>
    <vocation id="2"/>
    <vocation id="5" showInDescription="0"/>
    <vocation id="6" showInDescription="0"/>
    </wand>

 

 

 

Em items.xml (aqui tanto faz como vai estar, tirando o "range" que é válido, o que vai contar para o resto é o script em weapons):

Spoiler

    


<item id="7958" article="a" name="fusion elemental staff">
        <attribute key="weight" value="2550" />
        <attribute key="weaponType" value="wand" />
        <attribute key="shootType" value="smallholy" />
        <attribute key="range" value="4" />
    </item>

 

 

Funcionamento:

bloggif_5c46348178746.gif.94f6f505007315a2e280b7aea8146784.gif

 

Editado por DdJs (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • FlavioHulk mudou o título para [TFS 0.4 / TFS 1.x] Wand/Rod Elemental

Parabéns, seu tópico de conteúdo foi aprovado!
Muito obrigado pela sua contribuição, nós do Tibia King agradecemos.
Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.

Spoiler

Congratulations, your content has been approved!
Thank you for your contribution, we of Tibia King we are grateful.
Your content will help many other users, you received +1 REP.

 

Link para o post
Compartilhar em outros sites
4 horas atrás, DdJs disse:

Quem já me conhece aqui do fórum sabe que minha área não é script ou nada do gênero. Estou fazendo esse post para ajudar um membro, o @KillerWatts, e outros mais, talvez. 

 

Introdução:

Wand/rod que dispara vários elementos aleatórios. O uso dos elementos não é configurável como o do @tataboy67, lembrando que esse script é velho e foi testado em OTs versões 8.40 até 8.60

 

Guia: 

ef - efeito que irá fazer no alvo (além do efeito comum já do elemento).

sh - shootype que traçara o "ar".

dmg - tipo de dano que causará no alvo.

 

 

Em weapons/scripts crie um arquivo "wandelement.lua":

 

  Ocultar conteúdo

local min, max = 81,111 --Ataque mínino e ataque máximo

local w = {
    [1] = {ef = 36, sh = 3, dmg = COMBAT_FIREDAMAGE},
    [2] = {ef = 52, sh = 28, dmg = COMBAT_ICEDAMAGE},
    [3] = {ef = 46, sh = 29, dmg = COMBAT_POISONDAMAGE},
    [4] = {ef = 17, sh = 31, dmg = COMBAT_DEATHDAMAGE},
    [5] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
    [6] = {ef = 31, sh = 40, dmg = COMBAT_PHYSICALDAMAGE},
    [7] = {ef = 49, sh = 37, dmg = COMBAT_HOLYDAMAGE}
}

function onUseWeapon(cid, var)
        local effect = getPlayerStorageValue(cid, 4561)
        local target = getCreatureTarget(cid)
        
        if target ~= 0 then
                local wx = w[effect] or w[math.random(#w)]
                doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
                addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
        end
        return true
end

 

 

Para TFS 1.x (créditos e agradecimento ao @FlavioHulk pelo desenvolvimento):

 

  Ocultar conteúdo


local damage = { --Ataque mínino e ataque máximo
    min = 81,
    max = 111
}

local effects = {
    [1] = {effect = 36, shootEffect = 3, damageEffect = COMBAT_FIREDAMAGE},
    [2] = {effect = 52, shootEffect = 28, damageEffect = COMBAT_ICEDAMAGE},
    [3] = {effect = 46, shootEffect = 29, damageEffect = COMBAT_POISONDAMAGE},
    [4] = {effect = 17, shootEffect = 31, damageEffect = COMBAT_DEATHDAMAGE},
    [5] = {effect = 47, shootEffect = 35, damageEffect = COMBAT_ENERGYDAMAGE},
    [6] = {effect = 31, shootEffect = 40, damageEffect = COMBAT_PHYSICALDAMAGE},
    [7] = {effect = 49, shootEffect = 37, damageEffect = COMBAT_HOLYDAMAGE}
}

function onUseWeapon(player, variant)
    local effect, target = player:getStorageValue(4561), player:getTarget()
    if target then
        local random = effects[effect] or effects[math.random(#effects)]
        player:getPosition():sendDistanceEffect(target:getPosition(), random.shootEffect)
        addEvent(doAreaCombatHealth, 100, player, random.damageEffect, target:getPosition(), 0, -damage.min, -damage.max, random.effect)
    end
    return true
end

 

 

Em weapons.xml adicione a tag:

 

  Ocultar conteúdo

    <wand id="7958" level="100" mana="35" event="script" value="wandelement.lua">
    <vocation id="1"/>
    <vocation id="2"/>
    <vocation id="5" showInDescription="0"/>
    <vocation id="6" showInDescription="0"/>
    </wand>

 

 

Em items.xml (aqui tanto faz como vai estar, tirando o "range" que é válido, o que vai contar para o resto é o script em weapons):

 

  Ocultar conteúdo

    <item id="7958" article="a" name="fusion elemental staff">
        <attribute key="weight" value="2550" />
        <attribute key="weaponType" value="wand" />
        <attribute key="shootType" value="smallholy" />
        <attribute key="range" value="4" />
    </item>

 

 

muito bom cara !!! me ajudou muito rodou certinho !!! REP+ ... deixa eu perguntar, vc sabe se é possivel isso com uma sword? por exemplo uma sword da vários atks e cada atk muda o elemento !!! ?

 

Link para o post
Compartilhar em outros sites
1 hora atrás, KillerWatts disse:

muito bom cara !!! me ajudou muito rodou certinho !!! REP+ ... deixa eu perguntar, vc sabe se é possivel isso com uma sword? por exemplo uma sword da vários atks e cada atk muda o elemento !!! ?

 

 

@KillerWatts Não sei te dizer se é possivel, eu particularmente nunca vi em nenhum server ou script sobre no forum. 

Link para o post
Compartilhar em outros sites
6 minutos atrás, DdJs disse:

@KillerWatts Não sei te dizer se é possivel, eu particularmente nunca vi em nenhum server ou script sobre no forum. 

 

Entendi :S bom se souber de algo poderia me avisa !!! Muito obrigado parceiro me ajudou muito ... e poderia me ajuda rapidinho com uma coisa ?

 

o script da minha wand, efeito e mostrado no default em laranja, sera que teria como por em uma lista onde eu poderia escolher entre eles ? tipo lista de escolher o char !!!

 

 

aqui o script

 

Spoiler

local config = {
    wand_id = 12288, --ID da wand

    types = {
    ["all"] = -1, --Ataca os elementos aleatoriamente
    ["fire"] = 1,
    ["ice"] = 2,
    ["poison"] = 3,
    ["death"] = 4,
    ["energy"] = 5,
    ["physical"] = 6,
    ["holy"] = 7
    }
}

function onSay(cid, words, param)
    local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid
    local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid 

    if wand_left ~= config.wand_id and wand_right ~= config.wand_id then
        doPlayerSendCancel(cid, "Voce deve estar equipado com uma ".. getItemNameById(config.wand_id) .." para usar este comando.")
        return true
    end
    
    if config.types[param] then
        setPlayerStorageValue(cid, 4561, config.types[param])
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "Sua Staff ira atacar ".. param .. ".")
    else
        local str = ""
        
        for i, _ in pairs(config.types) do
            str = str .. ", ".. i
        end
        
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "Os elementos disponiveis sao: ".. string.sub(str, 3, #str) ..".")
    end

    return true
end

 

Editado por KillerWatts (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

@KillerWatts Meu conhecimento de script é muito baixo, infelizmente não tenho a ajuda que você precisa. Eu só fiz esse post porque você pediu algo parecido para 8.60 lá no tópico do @tataboy67. Acredito que ele e o @FlavioHulk são mais indicados para te auxiliar nesse quesito.

Editado por DdJs (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Depois eu posso fazer 1 com configuração legal para TFS 8.60, só peço 1 pouco de tempo e que me lembrem ... Porque estou meio enrolado até o dia 29/10

Link para o post
Compartilhar em outros sites
  • 1 month later...
  • 2 weeks later...

Caraaaa olha eu de novo ! hahaha mano esse script ficou muito bom ! vários players curtiram, queria uma ajuda, eu fiz uma weapon no meu server que no caso é de paladin com esse script porem ela fica como uma wand... sera que teria como colocar atk dela ser conforme a SKILL DISTANCE do player !?

Obrigado mais uma vez!!! REP +

Link para o post
Compartilhar em outros sites
  • 1 month later...

tu fez para tfs 1.3, eu gostaria, se puder disponibiliza..

 

Em 19/10/2018 em 23:06, FlavioHulk disse:

Parabéns, seu tópico de conteúdo foi aprovado!
Muito obrigado pela sua contribuição, nós do Tibia King agradecemos.
Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.

  Mostrar conteúdo oculto

Congratulations, your content has been approved!
Thank you for your contribution, we of Tibia King we are grateful.
Your content will help many other users, you received +1 REP.

 

 

 

Link para o post
Compartilhar em outros sites

tem certeza q no tfs 1.3 é usado desse jeito ?? eu coloco assim a arma fica dando dano nenhum..

 

event="script" value="wandelement.lua">

 

Citar

  <wand id="7958" level="100" mana="35" event="script" value="wandelement.lua">

 

9 horas atrás, DdJs disse:

@BilauX Está no corpo do post o que voce quer...

 

 

Editado por BilauX (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
Em 19/01/2019 em 08:12, BilauX disse:

tem certeza q no tfs 1.3 é usado desse jeito ??

Não. Eu nunca usei em tfs 1.3. Se não conseguir resolver seu problema, recomendo que faça um post solicitando ajuda. 

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Drafenous
      Fala galera, eu aqui novamente precisando de um help (infelizmente, ou felizmente para os que gostam de ajudar aqui no forum, assim como eu )...
      O problema de agora é o seguinte...
       
      Eu editei alguns itens em meu OT, porém, não consigo fazer eles adicionarem os atributos aos players... Ele aparece na mensagem dizendo que tem o atributo, porém, não adiciona na skill informations dos players.
       
      Segue os itens no items.xml do ot:
      <item id="8925" article="a" name="solar axe"> <attribute key="weight" value="11000" /> <attribute key="defense" value="30" /> <attribute key="attack" value="55" /> <attribute key="SkillAxe" value="3" /> <attribute key="weaponType" value="axe" /> <attribute key="extradef" value="3" /> <attribute key="showattributes" value="1" /> </item> <item id="8927" article="a" name="dark trinity mace"> <attribute key="weight" value="9900" /> <attribute key="defense" value="30" /> <attribute key="attack" value="55" /> <attribute key="weaponType" value="club" /> <attribute key="SkillClub" value="3" /> <attribute key="showattributes" value="1" /> <attribute key="extradef" value="3" /> </item> <item id="8930" article="an" name="emerald sword"> <attribute key="weight" value="4100" /> <attribute key="defense" value="30" /> <attribute key="attack" value="55" /> <attribute key="weaponType" value="sword" /> <attribute key="skillSword" value="3" /> <attribute key="extradef" value="3" /> <attribute key="showattributes" value="1" /> </item> <item id="7958" article="a" name="jester staff"> <attribute key="weight" value="725" /> <attribute key="weaponType" value="club" /> <attribute key="magiclevelpoints" value="3" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="energy" /> <attribute key="range" value="5" /> <attribute key="showattributes" value="1" /> </item> Em weapons.xml está assim:
      <melee id="8930" level="80" unproperly="1" event="function" value="default"/> <vocation name="knight"/> <vocation id="8" showInDescription="0"/> </melee> <melee id="8925" level="80" unproperly="1" event="function" value="default"/> <vocation name="knight"/> <vocation id="8" showInDescription="0"/> </melee> <melee id="8927" level="80" unproperly="1" event="function" value="default"/> <vocation name="knight"/> <vocation id="8" showInDescription="0"/> </melee> <wand id="7958" range="10" lvl="80" mana="10" enabled="1" exhaustion="0" script="1.lua"> <vocation id="1"/> <vocation id="5"/> </wand> Como eu vi na Jester Staff, ele puxa o arquivo 1.lua, então, segue o código do arquivo:
      local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 31) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 30) setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.0, -90, 1.6, -150) function onUseWeapon(cid, var) return doCombat(cid, combat, var) end Como dito, quando eu dou look nos itens, eles aparecem que tem o atributo, porém, não adiciona ao player, alguém pode me ajudar? eu dou um rep+ legalzinho a quem conseguir ajudar :3
       
    • Por Original
      Olá,estou precisando urgente de um script de uma wand,
      gostaria de por minha wand pra atacar em music,estilo aqueles sons azuis que saem do piano
      obrigado!
    • Por Kolisium
      Olá pessoal, eu uso o script abaixo do Mock de Upgrade e eu gostaria de saber como faço para que quando eu usasse o item em uma wand ele aumentasse o dano causado pela wand, alguem pode me ajudar?!
      --- Perfect refine system by Mock the bear (MTB). --- Email: [email protected]<script cf-hash='f9e31' type="text/javascript"> /* */</script> -- &a = weapon attack -- &d = weapon defense -- &s = shield defense -- &p = armor defense -- # = nivel do item -- @ = max level local gain = { gainArmor='&p+(1)',loseArmor='&p-(1)', gainShield='&s+#',loseShield='&s-(#+1)', gainAttack='&a+(1*(#))',loseAttack='&a-(1*(#+1))', gainDefense='&d+(1*(#))',loseDefense='&d-(1*(#+1))', chance='(100/math.sqrt((((@/4)+(#*2))/@)*#))', maxlvl = 10, blocked_ids = {8881} } local it = { --[itemid] = [percent] [8306] = 0, -- 0% additional [8305] = 100, -- 50% } if not setItemName then function setItemName(uid,name) return doItemSetAttribute(uid,'name',name) end function setItemArmor(uid,name) return doItemSetAttribute(uid,'armor',name) end function setItemDefense(uid,name) return doItemSetAttribute(uid,'defense',name) end function setItemAttack(uid,name) return doItemSetAttribute(uid,'attack',name) end function getItemAttack(uid) return getItemAttribute(uid,'attack') end function getItemDefense(uid) return getItemAttribute(uid,'defense') end function getItemArmor(uid) if type(uid) == 'number' then return getItemAttribute(uid,'armor') else return getItemInfo(uid.itemid).armor end 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 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 local function doTransform(s,i) -- Function by Mock the bear. local c = string.gsub(s,'@',gain.maxlvl) local c = string.gsub(c,'&a',(getItemAttack(i.uid) ~= 0 and getItemAttack(i.uid) or getItemInfo(i.itemid).attack)) local c = string.gsub(c,'&d',(getItemDefense(i.uid) ~= 0 and getItemDefense(i.uid) or getItemInfo(i.itemid).defense)) local c = string.gsub(c,'&s',(getItemDefense(i.uid) ~= 0 and getItemDefense(i.uid) or getItemInfo(i.itemid).defense)) local c = string.gsub(c,'&p',(getItemArmor(i.uid) ~= 0 and getItemArmor(i.uid) or getItemInfo(i.itemid).armor)) local c = string.gsub(c,'#',getWeaponLevel(i)) local q = assert(loadstring('return '..c)) return math.floor(assert(q())) end function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 0 or item.itemid == 0 then return false end toPosition.stackpos = 255 if isInArray(gain.blocked_ids, 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 doPlayerSendTextMessage(cid, 24,"You cant refine this item.") return TRUE end if isCreature(itemEx.uid) == TRUE then return FALSE end local level = getWeaponLevel(itemEx) local chance = doTransform(gain.chance,itemEx) if level == gain.maxlvl then doSendMagicEffect(toPosition, 2) return doPlayerSendTextMessage(cid, 24,"Your item is on max level, you can't upgrade it.") end doPlayerSendTextMessage(cid, 24,"Trying refine with "..(chance+it[item.itemid] > 100 and 100 or chance+it[item.itemid]).."% of sucess!") if chance+it[item.itemid] >= math.random(0,100) then local nm = getItemName(itemEx.uid) local slot = nm:match('(%[.+%])') or '' ---If you server use slot system dont change it slot = slot~='' and ' '..slot or slot setItemName(itemEx.uid, getItemNameById(itemEx.itemid)..' +'..(level+1)..slot) addEvent(doPlayerSendTextMessage,500,cid, 24,"Your item has been upgrated to +"..(level+1)..slot..".") doSendMagicEffect(toPosition, 39) if isArmor(itemEx) then local get = doTransform(gain.gainArmor,itemEx) setItemArmor(itemEx.uid,get) elseif isBow(itemEx.uid) then setItemAttack(itemEx.uid, doTransform(gain.gainAttack,itemEx)) elseif isWeapon(itemEx.uid) then setItemAttack(itemEx.uid, doTransform(gain.gainAttack,itemEx)) setItemDefense(itemEx.uid, doTransform(gain.gainDefense,itemEx)) elseif isShield(itemEx.uid) then setItemDefense(itemEx.uid, doTransform(gain.gainShield,itemEx)) end else if level == 0 then addEvent(doPlayerSendTextMessage,500,cid, 24,"No effect.") doSendMagicEffect(toPosition, 2) elseif level > 0 then local nm = getItemName(itemEx.uid) local slot = nm:match('(%[.+%])') or '' ---If you server use slot system dont change it slot = slot~='' and ' '..slot or slot if level == 1 then setItemName(itemEx.uid, getItemNameById(itemEx.itemid)..slot) addEvent(doPlayerSendTextMessage,500,cid, 24,"Your item back to normal.") else setItemName(itemEx.uid, getItemNameById(itemEx.itemid)..' +'..(level-1)..slot) addEvent(doPlayerSendTextMessage,500,cid, 24,"Your item back to +"..(level-1)..slot..".") end if isArmor(itemEx) then setItemArmor(itemEx.uid,doTransform(gain.loseArmor ,itemEx)) elseif isWeapon(itemEx.uid) then setItemAttack(itemEx.uid, doTransform(gain.loseAttack,itemEx)) setItemDefense(itemEx.uid, doTransform(gain.loseDefense,itemEx)) elseif isBow(itemEx.uid) then setItemAttack(itemEx.uid, doTransform(gain.loseAttack,itemEx)) elseif isShield(itemEx.uid) then setItemDefense(itemEx.uid, doTransform(gain.loseShield,itemEx)) end end doSendMagicEffect(toPosition, 3) end doRemoveItem(item.uid,1) return true end
    • Por Yago Blind.
      Olá galerinha do TibiaKing , estou com um pequeno problema , e ja pesquisei diversas scripts parecidas , diferentes e editei o effect / dano , e o problema fica o mesmo , bom o problema é o seguinte a wand sai com o efeito normal , porem não dá dano nenhum !! Quem puder me ajudar darei REP++   

      Script da arma:
      local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 0) setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 0) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_POSIONDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, 54) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, 14) function onGetFormulaValues(cid, level, maglevel) min = -70 max = -150 return min, max end setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onUseWeapon(cid, var) local ret = doCombat(cid, combat, var) if(ret == LUA_ERROR) then return LUA_ERROR end return true end Weapons.xml já tentei de 2 formas, irei postar as 2 formas que tentei e não consegui.
      1° Forma:
      <!-- Staffs editis --> <wand id="7958" level="80" mana="15" event="script" value="mantusstaff.lua"> <!-- Mantus staff --> <vocation id="2"/> <vocation id="1"/> </wand> 2° Forma:
      <!-- Staffs editis --> <wand id="7958" level="80" mana="15" min="100" max="250" type="earth" event="script" value="mantusstaff.lua"> <!-- Mantus staff --> <vocation id="2"/> <vocation id="1"/> </wand>
    • Por rodrigorodriguess
      bom.. sou novo com isso de fuçar em script e tal, mas queria saber como é que defino um atk de uma wand por script.. sei mudar efeitos, danos e tal, mas só sei colocar pra atk conforme o magic level, queria saber como faço pra definir o atk da wand
       
      tipo: min: 500 max:600
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo