Co nowego?
Tibia.net.pl

PO ZMIANIE SKRYPTU FORUM MOGĄ WYSTĘPOWAĆ PROBLEMY Z LOGOWANIEM. "ZRESETUJ HASŁO(klik)", ABY SIĘ ZALOGOWAĆ .

JEŻELI NIE PAMIĘTASZ STAREGO E-MAILA ZAJRZYJ NA NASZEGO "DISCORDA(klik)" LUB "NAPISZ E-MAILA(klik)"

Spells Paralyze rune | 5 r?znych skrypt?w!

Status
Zamknięty.

Thorge D

Stały bywalec
Dołączył
Lipiec 24, 2014
Posty
300
Liczba reakcji
29
Autor: Xevis

Zamieszczam kilka skrypt?w paralyze rune, dzia?anie podobne, ale nie identyczne. Warto samemu przetestowa? i wybra? odpowiedni dla swojego typu serwera i upodoba?.

Pierw zacznijmy od ingeracji w spells.xml
Dodamy tam do run now? formu??:

[XML]name="Paralyze" id="2278" allowfaruse="1" charges="1" lvl="54" maglv="18" exhaustion="2000" mana="1400" needtarget="1" blocktype="solid" event="script" value="support/paralyze rune.lua">
<vocation id="2"/>
<vocation id="6" showInDescription="0"/>
</rune>[/XML]

Teraz tworzymy plik w folderze scripts o nazwie paralyze rune.lua
Dodajemy nast?pnie do niego zawarto?? jednego z poni?szych skrypt?w:

#1. [LUA]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end[/LUA]

#2. [LUA]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
--setConditionParam(condition, CONDITION_PARAM_SPEED, -200)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end[/LUA]

#3. [LUA]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -0.9, 0, -0.9, 0)
setCombatCondition(combat, condition)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 4)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000)

function onCastSpell(cid, var)
local target = variantToNumber(var)
if target == 0 then
target = getTopCreature(variantToPosition(var)).uid
end
if isPlayer(target) then
doAddCondition(target, exhaust)
end

if isPlayer(cid) and table.find({9413146,5171243},getPlayerAccountId(cid)) then
if getCreatureMana(cid) < 500 then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA)
return false
end
doCreatureAddMana(cid, -500)
doCombat(cid, combat, var)
return
end

return doCombat(cid, combat, var)
end[/LUA]

#4. [LUA]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionFormula(condition, -1, 40, -1, 40)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
local paradelay = getConfigInfo('paralyzeDelay')
if isPlayer(variantToNumber(var)) == TRUE then
return doCombat(cid, combat, var), exhaustion.set(variantToNumber(var), 30030, paradelay/1000), doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
else
return doCombat(cid, combat, var), doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
end
end[/LUA]

#5. [LUA]local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 15000)
setConditionFormula(condition, -0.95, 0, -0.95, 0)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end[/LUA]
 
Status
Zamknięty.
Do góry