What's new

Skrypty & Kody tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

Tomekchleje

Advanced User
Joined
Jan 4, 2014
Messages
489
Reaction score
65
Witam, Chcialbym zrobi?, aby UH runka leczy?a druida i sorka jako inna warto??.
Mianowicie Druida za 1hp a sorka za 2 hapsy.

Pr?bowa?em ju? na wiele sposob?w i rezultat jest taki, ?e albo nie leczy albo wywala w konsoli.
A wi?c na pisze tutaj mo?e kto? to ma w jednym palcu… oby tylko nie ?rodkowym. xD


Orygina? runki:


[LUA]
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, maglevel)
local min = (level / 5) + (maglevel * 7.3) + 42
local max = (level / 5) + (maglevel * 12.4) + 90
return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
[/LUA]


Modyfikacja: Wydaj si?, ?e nie bie?e ifa...
[LUA]
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, maglevel)


if isInArray({2, 6}, playerVocation) then -- Druid, Ed
local min = 1
local max = 1
elseif isInArray({1, 5}, playerVocation) then -- Sorcerer, Ms
local min = 2
local max = 2
end

return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
[/LUA]

Je?li kto? ma rozwi?zanie lub jakie? pomys?y to by?bym wdzi?czny. :smile:
 

buchaLL

bez spiny, luźno
Joined
Aug 2, 2011
Messages
1,013
Reaction score
68
Age
27
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

[lua]if isInArray({2, 6}, playerVocation) then -- Druid, Ed
local min = 1
local max = 1
elseif isInArray({1, 5}, playerVocation) then -- Sorcerer, Ms
local min = 2
local max = 2
end[/lua]


[lua]if player:getVocation():getId() == 2 or player:getVocation():getId() == 6 then
local min = 1
local max = 1
elseif player:getVocation():getId() == 1 or player:getVocation():getId() == 5 then
local min = 2
local max = 2
end
[/lua]
 

Tomekchleje

Advanced User
Joined
Jan 4, 2014
Messages
489
Reaction score
65
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

Tak tez ju? pr?bowa?em niestety nie dzia?a. ;s

EDP9q8U.png


tutaj wywala:
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOP MOST, true)

jak to usun? to nie leczy. ;s
 

buchaLL

bez spiny, luźno
Joined
Aug 2, 2011
Messages
1,013
Reaction score
68
Age
27
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

Usu? spacj? mi?dzy TARGETCASTERORTOP a MOST.
[lua]setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)[/lua]
 
Last edited:

Tomekchleje

Advanced User
Joined
Jan 4, 2014
Messages
489
Reaction score
65
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

[LUA]
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOP MOST, true)
[/LUA]

Nie nie jest spacja, ten skrypt tak nie zadzia?a pod tfs 1.2 tak mi si? wydaje...


hqdefault.jpg


---------- Tre?? dodana o 19:04 ----------

[LUA]setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)[/LUA]

tak te? nie dzia?a. ;s
 

buchaLL

bez spiny, luźno
Joined
Aug 2, 2011
Messages
1,013
Reaction score
68
Age
27
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

To mo?e hmm.. W swoim oryginale zmie?
playerVocation na player:getVocation():getId().
 

Tomekchleje

Advanced User
Joined
Jan 4, 2014
Messages
489
Reaction score
65
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

[LUA]local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, maglevel)

player:getVocation():getId()

if isInArray({2, 6}, player:getVocation():getId()) then -- Druid, Ed
local min = 1
local max = 1
elseif isInArray({1, 5}, player:getVocation():getId()) then -- Sorcerer, Ms
local min = 2
local max = 2
end

return min, max
end[/LUA]

rezultat:
fvqhNzp.png


[LUA]local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOP MOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, maglevel)

player:getVocation():getId()

if isInArray({2, 6}, player:getVocation():getId()) then -- Druid, Ed
local min = 1
local max = 1
elseif isInArray({1, 5}, player:getVocation():getId()) then -- Sorcerer, Ms
local min = 2
local max = 2
end

return min, max
end
[/LUA]

rezultat:
EDP9q8U.png
 

Tysha

New User
Joined
Feb 18, 2017
Messages
1
Reaction score
0
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

[LUA]local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOP MOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, maglevel)
local vocation = player:getVocation():getId()
local min = (level / 5) + (maglevel * 7.3) + 42
local max = (level / 5) + (maglevel * 12.4) + 90
if isInArray({2, 6}, vocation) then -- Druid, Ed
local min = 1
local max = 1
elseif isInArray({1, 5}, vocation) then -- Sorcerer, Ms
local min = 2
local max = 2
end
return min, max
end[/LUA]
 

Tomekchleje

Advanced User
Joined
Jan 4, 2014
Messages
489
Reaction score
65
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie


Up [MENTION=441710]Tysha[/MENTION] tez nie. ;s
wysypuje ...
EDP9q8U.png

 

buchaLL

bez spiny, luźno
Joined
Aug 2, 2011
Messages
1,013
Reaction score
68
Age
27
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

I t? spacj? usu?, bo tam ci?gle b??d wywala.

[lua]local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, maglevel)
local voc = player:getVocation():getId()

if isInArray({2, 6}, voc) then
local min = 1
local max = 1
elseif isInArray({1, 5}, voc) then
local min = 2
local max = 2
end

return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end[/lua]
 
Last edited:

Tomekchleje

Advanced User
Joined
Jan 4, 2014
Messages
489
Reaction score
65
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

B??du ju? nie ma teraz ale za to nic nie leczy. :no:
 

Tysha

New User
Joined
Feb 18, 2017
Messages
1
Reaction score
0
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

[lua]local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, maglevel)
local voc = player:getVocation():getId()
local min = (level / 5) + (maglevel * 7.3) + 42
local max = (level / 5) + (maglevel * 12.4) + 90
if isInArray({2, 6}, voc) then
local min = 1
local max = 1
elseif isInArray({1, 5}, voc) then
local min = 2
local max = 2
end

return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end[/lua]
 

Tomekchleje

Advanced User
Joined
Jan 4, 2014
Messages
489
Reaction score
65
Odp: tfs 1.2 Ultimate Healing Rune, Specyficzne Leczenie Tibijskie

[LUA]
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
combat:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false)

function onGetFormulaValues(player, level, maglevel)
local voc = player:getVocation():getId()
local min = (level / 5) + (maglevel * 7.3) + 42 --Zwraca tylko te standardowe warto?ci
local max = (level / 5) + (maglevel * 12.4) + 90
if isInArray({2, 6}, voc) then -- Tego ifa ju? nie ?apie.
local min = 1
local max = 1
elseif isInArray({1, 5}, voc) then
local min = 2
local max = 2
end

return min, max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
[/LUA]

---------- Tre?? dodana o 21:04 ----------

Nadal dupa, ?atwy skrypt to chyba nie jest ;d

---------- Tre?? dodana 12-04-17 0 00:04 ----------

IMG_1109-e1485370783112.jpg


Temat do zamkni?cia :)
 
Top