Demorei mais terminei, achei até legal a weapon =)
Vai em "dat/creaturescripts/creaturescripts.xml" poem a tag:
<event type="attack" name="SwordPar" event="script" value="sworpar.lua"/>
Agora abra a pasta "creaturescripts/scripts", encontre o seu arquivo login.lua abra e cole a tag:
registerCreatureEvent(cid, "SwordPar")
Agora o principal, copie e cole um arquivo dessa mesma pasta e renomeie para "swordpar" sem as aspas e nele cole:
-- <Script by jhon992> --
local weaponpar = 2377 -- id do item que dara paralize
local chancepar = 5 -- chance de ocorrer o paralize (10 = 10%, 20 = 20%, 30 = 30%, 1 = 1%, 5 = 5%) e assim por diante
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0) -- aqui edita os valores pro dano de paralize, vai mudando ae e testando até achar o desejado
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000) -- aqui vai o tempo de paralyze, 1000 = 1 segundo
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)
function onAttack(cid, target)
if ((getCreaturePosition(target).x == getCreaturePosition(cid).x or getCreaturePosition(target).x == getCreaturePosition(cid).x+1 or getCreaturePosition(target).x == getCreaturePosition(cid).x-1) and (getCreaturePosition(target).y == getCreaturePosition(cid).y or getCreaturePosition(target).y == getCreaturePosition(cid).y+1 or getCreaturePosition(target).y == getCreaturePosition(cid).y-1)) then
if (getPlayerSlotItem(cid, 5).itemid == weaponpar or getPlayerSlotItem(cid, 6).itemid == weaponpar) then
if (math.random(1,100) > (100 - chancepar)) then
doPlayerSendTextMessage(cid, 23, getCreatureName(target).." has paralized.")
doAddCondition(target, condition)
return true
else
return true
end
end
end
return true
end
é isso aew, espero te ajudar e ajudar muitos outros com a mesma dúvida. =)