SA

Paralyze Sword

Por saulos, 30 de abr. de 2012 em Scripts

7
1.4k
saulosS
30 de abril de 2012 às 00:53

Hola eu gostaria muito da paralyze death sword e paralyze holy sword perfeitamente igual a do rozinx eu uso New Slayer Yoruts Obrigado!

dou rep+++++

VildenV
30 de abril de 2012 às 00:57

Amigo nem todo mundo joga esse servidor, você poderia por favor dar detalhes,

faça um pedido detalhado.

 

Pelo que entendi é uma sword que paralyze o player, isso?

PsyMcKenzieP
30 de abril de 2012 às 01:05

Abra a pasta "data/creaturescripts/scripts" duplique um arquivo qualquer e renomeie para "weaponpar" sem as aspas e nele cole:

 

-- <Script by jhon992> --

 

local weaponpar = {2377, 2378, 2379, 2380} -- id dos items que darão 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, 10000) -- aqui vai o tempo de paralyze, 1000 = 1 segundo

setConditionParam(condition, CONDITION_PARAM_SPEED, -400) -- velocidade que o monstro irá perder

setConditionFormula(condition, 0, 0, 0, 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

for i=0, #weaponpar do

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

end

return true

end

Agora no arquivo, "data/creaturescripts/creaturescripts.xml" cole a tag:

 

<event type="attack" name="WeaponPar" event="script" value="weaponpar.lua"/>

 

E por último, abra o arquivo login.lua que esta localizado em "data/creaturescripts/scripts" e cole a tag:

 

registerCreatureEvent(cid, "WeaponPar")

 

Créditos ao Jhon992

 

Espero ter ajudado.

Abraços!!

saulosS
30 de abril de 2012 às 10:52

vo testa aki

 

cara nem deu nao ataka

 

cra funfo direitinho eu so colokei o id dos itens qui eu queria e um e 2390 eu queria que ele ficase com efeito do /z 13 e o 7390 qui e o otro id queria que ficase /z 39 teria como?

 

Abra a pasta "data/creaturescripts/scripts" duplique um arquivo qualquer e renomeie para "weaponpar" sem as aspas e nele cole:

 

-- <Script by jhon992> --

 

local weaponpar = {2377, 2378, 2379, 2380} -- id dos items que darão 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, 10000) -- aqui vai o tempo de paralyze, 1000 = 1 segundo

setConditionParam(condition, CONDITION_PARAM_SPEED, -400) -- velocidade que o monstro irá perder

setConditionFormula(condition, 0, 0, 0, 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

for i=0, #weaponpar do

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

end

return true

end

Agora no arquivo, "data/creaturescripts/creaturescripts.xml" cole a tag:

 

<event type="attack" name="WeaponPar" event="script" value="weaponpar.lua"/>

 

E por último, abra o arquivo login.lua que esta localizado em "data/creaturescripts/scripts" e cole a tag:

 

registerCreatureEvent(cid, "WeaponPar")

 

Créditos ao Jhon992

 

Espero ter ajudado.

Abraços!!

Abra a pasta "data/creaturescripts/scripts" duplique um arquivo qualquer e renomeie para "weaponpar" sem as aspas e nele cole:

 

-- <Script by jhon992> --

 

local weaponpar = {2377, 2378, 2379, 2380} -- id dos items que darão 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, 10000) -- aqui vai o tempo de paralyze, 1000 = 1 segundo

setConditionParam(condition, CONDITION_PARAM_SPEED, -400) -- velocidade que o monstro irá perder

setConditionFormula(condition, 0, 0, 0, 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

for i=0, #weaponpar do

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

end

return true

end

Agora no arquivo, "data/creaturescripts/creaturescripts.xml" cole a tag:

 

<event type="attack" name="WeaponPar" event="script" value="weaponpar.lua"/>

 

E por último, abra o arquivo login.lua que esta localizado em "data/creaturescripts/scripts" e cole a tag:

 

registerCreatureEvent(cid, "WeaponPar")

 

Créditos ao Jhon992

 

Espero ter ajudado.

Abraços!!

 

vo testa aki

 

 

cra funfo direitinho eu so colokei o id dos itens qui eu queria e um e 2390 eu queria que ele ficase com efeito do /z 13 e o 7390 qui e o otro id queria que ficase /z 39 teria como?

Editado Abril 30 por saulins

PsyMcKenzieP
30 de abril de 2012 às 16:16

Não entendi direito,

pode explicar melhor o que tu quer?

saulosS
30 de abril de 2012 às 20:21

Não entendi direito,

pode explicar melhor o que tu quer?

olha a mudança que eu fiz :

 

-- <Script by jhon992> --

 

local weaponpar = {2390,7390} -- id dos items que darão 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, 10000) -- aqui vai o tempo de paralyze, 1000 = 1 segundo

setConditionParam(condition, CONDITION_PARAM_SPEED, -400) -- velocidade que o monstro irá perder

setConditionFormula(condition, 0, 0, 0, 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

for i=0, #weaponpar do

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

end

return true

end

eu gostaria que a sword do id 2390 tivese o efeito de /z 13 e o 7390 tivese o efeito de /z 39 teria como?:

PsyMcKenzieP
30 de abril de 2012 às 23:15

Tenta isso aqui:

-- <Script by jhon992> --

 

local weaponpar = {2390,7390} -- id dos items que darão 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)

setCombatParam(combat, COMBAT_PARAM_EFFECT, 13)

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, 10000) -- aqui vai o tempo de paralyze, 1000 = 1 segundo

setConditionParam(condition, CONDITION_PARAM_SPEED, -400) -- velocidade que o monstro irá perder

setConditionFormula(condition, 0, 0, 0, 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

for i=0, #weaponpar do

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

end

return true

end