Muito legal o script !
Obrigado por compartilhar conosco
info
Grupo: Grão-Duque
Registrado: 02/10/06
Posts: 3.3k
Reputação: +151
Gênero: Masculino

Muito legal o script !
Obrigado por compartilhar conosco
info
Grupo: Visconde
Registrado: 05/02/14
Posts: 411
Reputação: +285
Gênero: Masculino
Char no Tibia: Zeh Sergipano

Bem legal esse negocio de upa a spell mas acho que você deveria ter criado um lopping assim diminuiria muito o tamanho do script.
info
Grupo: Campones
Registrado: 22/12/15
Posts: 8
Reputação: 0

Como funciona:
*Ao usar uma spell certo número de vezes, esta avançará de nÃvel, aumentando o dano e caso queiram, mudando seu efeito.
Adicionando no servidor:
1º - Crie um arquivo .lua com o nome de rockthrow em Data / Spells / Scripts com o seguinte conteúdo:
local combat_lv1 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, X)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -2, 1, -4, 1)
local combat_lv2 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, Y)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -3, 1, -6, 1)
local combat_lv3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_DISTANCEEFFECT, Z)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -4, 1, -8, 1)
local function onCastSpell1(parameters)
doCombat(parameters.cid, combat_lv1, parameters.var)
end
local function onCastSpell2(parameters)
doCombat(parameters.cid, combat_lv2, parameters.var)
end
local function onCastSpell3(parameters)
doCombat(parameters.cid, combat_lv3, parameters.var)
end
function onCastSpell(cid, var)
local parameters = { cid = cid, var = var}
local spell_storage = 44102
if getPlayerStorageValue(cid, spell_storage) < A then
addEvent(onCastSpell1, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)
elseif getPlayerStorageValue(cid, spell_storage) == A then
addEvent(onCastSpell2, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)
doPlayerSendTextMessage(cid, 22, "Voce melhorou sua spell!")
doSendMagicEffect(getCreaturePosition(cid),W)
doSendAnimatedText(getCreaturePosition(cid), 'Spell Level UP', 210)
elseif getPlayerStorageValue(cid, spell_storage) > A and getPlayerStorageValue(cid, spell_storage) < B then
addEvent(onCastSpell2, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)
elseif getPlayerStorageValue(cid, spell_storage) == B then
addEvent(onCastSpell3, 0, parameters)
setPlayerStorageValue(cid, spell_storage, getPlayerStorageValue(cid, spell_storage)+1)
doPlayerSendTextMessage(cid, 22, "Voce melhorou sua spell!")
doSendMagicEffect(getCreaturePosition(cid),W)
doSendAnimatedText(getCreaturePosition(cid), 'Spell Level UP', 210)
elseif getPlayerStorageValue(cid, spell_storage) > B then
addEvent(onCastSpell3, 0, parameters)
setPlayerStorageValue(cid, spell_storage,
getPlayerStorageValue(cid, spell_storage)+1)
end
return TRUE
end
2º- Adicione esta tag no arquivo spells.xml (Data / Spells):
<instant name="Rock Throw" words="rock throw" lvl="100" needtarget="1" mana="120" aggressive="1" exhaustion="1000" needlearn="0" event="script" value="rockthrow.lua">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="3"/>
<vocation id="4"/>
<vocation id="5"/>
<vocation id="6"/>
<vocation id="7"/>
<vocation id="8"/>
</instant>
Modificando o arquivo rockthrow.lua:
*TODAS AS LETRAS EM DESTAQUE DEVEM SER SUBSTITUÃDAS DA SEGUINTE MANEIRA:
x = Distance Effect da spell nÃvel 1;
y = Distance Effect da spell nÃvel 2;
z = Distance Effect da spell nÃvel 3;
w = Efeito que surgirá no player quando avançar a spell de nÃvel;
a = Número de vezes que a spell deve ser usada para upar ao nÃvel 2;
b = Número de vezes que a spell deve ser usada para upar ao nÃvel 3.
Bom uso.
Att,
Omnia.
Legal
info
Grupo: Campones
Registrado: 22/09/15
Posts: 11
Reputação: +9
Como funciona:
*Ao usar uma spell certo número de vezes, esta avançará de nível, aumentando o dano e caso queiram, mudando seu efeito.
Adicionando no servidor:
1º - Crie um arquivo .lua com o nome de rockthrow em Data / Spells / Scripts com o seguinte conteúdo:
local combat_lv1 = createCombatObject()
2º- Adicione esta tag no arquivo spells.xml (Data / Spells):
<instant name="Rock Throw" words="rock throw" lvl="100" needtarget="1" mana="120" aggressive="1" exhaustion="1000" needlearn="0" event="script" value="rockthrow.lua">
Modificando o arquivo rockthrow.lua:
*TODAS AS LETRAS EM DESTAQUE DEVEM SER SUBSTITUÍDAS DA SEGUINTE MANEIRA:
x = Distance Effect da spell nível 1;
y = Distance Effect da spell nível 2;
z = Distance Effect da spell nível 3;
w = Efeito que surgirá no player quando avançar a spell de nível;
a = Número de vezes que a spell deve ser usada para upar ao nível 2;
b = Número de vezes que a spell deve ser usada para upar ao nível 3.
Bom uso.
Att,
Omnia.