Postado Dezembro 4, 2017 7 anos Olá Caros, Bom gostaria de vir por meio deste tópico pedir um script de spell, esta teria um stage de dano de acordo com o level do player. Ex: Player level 20 , Dano base = 50 . Player Level 100 , Dano base = 150 E a fórmula desta spell funcionaria da seguinte maneira: (Dano Base da Spell + First Fight + Magic level + Level do Player + Axe Fighting + Club Fighting + Distance Fighting + Sword Fighting = Dano Total) A spell iria basicamente lançar um missil no target. Durante certo tempo. Ex= 30 segundos . O Player iria ficar com a outfit X e depois voltaria para a outfit anterior, ou seja, da vocation. Quem puder me ajudar, Grato! Editado Dezembro 4, 2017 7 anos por TheKiler (veja o histórico de edições)
Postado Dezembro 10, 2017 7 anos Solução Não sei se entendi exatamente o que é que você precisa e também não sei a versão do servidor mas vê se isso ai te ajuda: spells.xml Spoiler <instant group="attack" spellid="400" name="Arrow" words="arrow" level="1" mana="500" premium="1" range="10" needtarget="1" blockwalls="1" cooldown="30000" groupcooldown="2000" needlearn="0" script="attack/arrow.lua"> <vocation name="Knight" /> <vocation name="Elite Knight" /> <vocation name="Sorcerer" /> <vocation name="Master Sorcerer" /> <vocation name="Druid" /> <vocation name="Elder Druid" /> <vocation name="Paladin" /> <vocation name="Royal Paladin" /> </instant> arrow.lua Spoiler local damages = { {level = 20, base = 50}, {level = 50, base = 150} } local config = { damageType = COMBAT_FIREDAMAGE, distanceEffect = CONST_ANI_INFERNALBOLT, outfit = 145, transformEffect = CONST_ME_MAGIC_BLUE, transformTime = 30 } local condition = Condition(CONDITION_OUTFIT) condition:setTicks(config.transformTime * 1000) local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, config.damageType) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, config.distanceEffect) function onGetFormulaValues(player) for i = 1, #damages do if i == #damages then base = damages[i].base break end if player:getLevel() <= damages[i].level then base = damages[i].base break end end local damage = base + player:getLevel() + player:getSkillLevel(SKILL_FIST) + player:getSkillLevel(SKILL_SWORD) + player:getSkillLevel(SKILL_AXE) + player:getSkillLevel(SKILL_CLUB) + player:getSkillLevel(SKILL_DISTANCE) + player:getMagicLevel() return -damage, -damage end combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(creature, variant) local outfit = creature:getOutfit() outfit.lookType = config.outfit condition:setOutfit(outfit) creature:addCondition(condition) creature:getPosition():sendMagicEffect(config.transformEffect) return combat:execute(creature, variant) end
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.