Postado Outubro 14, 2016 8 anos Teria como adicionar esses 3 scripts em 1 só ? é uma sword no caso. Spoiler local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_REDSPARKS)setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)local combat1 = createCombatObject()setCombatParam(combat1, COMBAT_PARAM_BLOCKARMOR, 1)setCombatParam(combat1, COMBAT_PARAM_BLOCKSHIELD, 1)setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatParam(combat1, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)setCombatFormula(combat1, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)local combat2 = createCombatObject()setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, 1)setCombatParam(combat2, COMBAT_PARAM_BLOCKSHIELD, 1)setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)local function onUseWeapon1(parameters)doCombat(parameters.cid, combat, parameters.var)endlocal function onUseWeapon2(parameters)doCombat(parameters.cid, combat1, parameters.var)endlocal function onUseWeapon3(parameters)doCombat(parameters.cid, combat2, parameters.var)endfunction onUseWeapon(cid, var)local parameters = { cid = cid, var = var, combat = combat, combat1 = combat1, combat2 = combat2 }if getPlayerLevel(cid) >= 20 thenlocal chance = math.random(1,10)if chance == 1 thenaddEvent(onUseWeapon1, 1, parameters)addEvent(onUseWeapon2, 400, parameters)doSendAnimatedText(getPlayerPosition(cid),"Doublehit", TEXTCOLOR_RED)elseaddEvent(onUseWeapon3, 1, parameters)endelsedoPlayerSendCancel(cid, 'You need level 20 to use this weapon.')endend Spoiler local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)local condition = createConditionObject(CONDITION_PARALYZE)setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)setConditionParam(condition, CONDITION_PARAM_SPEED, -150)setCombatCondition(combat, condition)local combat2 = createCombatObject()setCombatParam(combat2, COMBAT_PARAM_BLOCKARMOR, 1)setCombatParam(combat2, COMBAT_PARAM_BLOCKSHIELD, 1)setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatFormula(combat2, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)function onUseWeapon(cid, var)local target = getCreatureTarget(cid)if getPlayerLevel(cid) >= 20 thenlocal chance = math.random(1,10)if chance == 1 thendoCombat(cid, combat, var)doSendAnimatedText(getPlayerPosition(target),"Paralyzed", TEXTCOLOR_YELLOW)elsedoCombat(cid, combat2, var)endelsedoPlayerSendCancel(cid, 'You need level 20 to use this weapon.')endend Spoiler local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)setCombatFormula(combat, COMBAT_FORMULA_SKILL, 0, 0, 1.0, 0)function onUseWeapon(cid, var)local skill = getPlayerSkill(cid,SKILL_SWORD) -- Change this to the type of weapon you are usinglocal mat = 0.085*0.5*50*skill+(getPlayerLevel(cid)/5) -- Change 50 to the attack of the weaponlocal min = 5 -- this means 5% minimum healinglocal max = 15 -- this means 15% maximum healinglocal addhealth = math.random((mat * (min/100)), (mat * (max/100)))if getPlayerLevel(cid) >= 20 thendoCreatureAddHealth(cid, addhealth)doSendAnimatedText(getPlayerPosition(cid),"+"..addhealth.."", TEXTCOLOR_GREEN)doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) doCombat(cid, combat, var)elsedoPlayerSendCancel(cid, 'You need level 20 to use this weapon.')endend[/LUA]healingwand.lua[LUA] local combat = createCombatObject()setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)function onGetFormulaValues(cid, level, maglevel)min = -(maglevel*4) -level/5 max = -(maglevel*6) -level/5return min, maxendsetCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")function onUseWeapon(cid, var)local level, magic, target = getPlayerLevel(cid), getPlayerMagLevel(cid), getCreatureTarget(cid)local mat1, mat2 = magic*2+level/10, magic*3+level/10 -- 50% from the min/max abovelocal xmat1, xmat2 = magic*4+level/5, magic*6+level/5 -- same as the min/max abovelocal percent = 10 -- change here the % of the healing. local health, xhealth = math.random((mat1 * (percent/100)), (mat2 * (percent/100))), math.random((xmat1 * (percent/100)), (xmat2 * (percent/100)))if isPlayer(target) thendoCreatureAddHealth(cid, health)doSendAnimatedText(getPlayerPosition(cid),"+"..health.."", TEXTCOLOR_GREEN)doCombat(cid, combat, var)elsedoCreatureAddHealth(cid, xhealth)doSendAnimatedText(getPlayerPosition(cid),"+"..xhealth.."", TEXTCOLOR_GREEN)doCombat(cid, combat, var)endreturn trueend
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.