• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.3.6 Spell transform

metiu11

Member
Joined
Mar 26, 2011
Messages
94
Solutions
2
Reaction score
5
Heyo,
I found script, which add effect on player but i want to change lookType, so i edit it like this:
Code:
local tempo = 60 -- tempo em segundos.
   
local ml = 35 -- quantos ira aumentar o skill de ML
local skillfist = 35 -- quantos ira aumentar o skill de Fist
local skillsword = 35 -- quantos ira aumentar o skill de Sword
local skillaxe = 35 -- quantos ira aumentar o skill de Axe
local skillclub = 35 -- quantos ira aumentar o skill de Club
local skilldistance = 35 -- quantos ira aumentar o skill de Distance
local skillshield = 35 -- quantos ira aumentar o skill de Shield
local health = 80 -- A cada 1 segundo quantos aumentar de vida
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
   
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist)
setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword)
setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe)
setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
setCombatCondition(combat, condition)
   
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)
   
local condition = createConditionObject(CONDITION_REGENERATION)
setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000)
setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
setCombatCondition(combat, condition)
           
function magicEffect2(tempo2,tempo3,cid)
if (isCreature(cid)) then
    if getPlayerStorageValue(cid, 9081) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then
        do
doSetCreatureOutfit(cid, {lookType=91}, 3000)
        end
    end
end
end
                 
function onCastSpell(cid, var)

if getPlayerStorageValue(cid, 9081) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then
    doCombat(cid, combat, var)
    tempo2 = 0
    while (tempo2 ~= (tempo*1000)) do
        addEvent(magicEffect2, tempo2, tempo2, tempo*1000, cid)
        tempo2 = tempo2 + 300
    end
    setPlayerStorageValue(cid, 9081,1) -- storage verifica transformado, quando = 1 player esta transformado.
    doCreatureSay(cid, "Gate open!", TALKTYPE_MONSTER)
else
    doPlayerSendCancel(cid, "Sorry, you are transformed.")
end
end
Code:
          <instant name="open gate" words="open gate" aggressive="0" prem="0" selftarget="1" lvl="1" mana="1"  exhaustion="1000" script="lee/opengate.lua">
    <vocation id="80"/>
   </instant>

Its worked, but i need one more script like this, so i was clone it, change name in spells.xml etc. and its doesnt worked.
What i need to change to copy that spell few times?
I just wanna spell like buff who change looktype and give some buffs.
 
Back
Top