21 minutos atrás, Sphynx disse:Versão do Servidor: TFS - 1.2Tipo de Script: spellCódigo:local tempo = 1 local combat = Combat() combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE) local condition = Condition(CONDITION_FIRE) condition:setParameter(CONDITION_PARAM_DELAYED, true) condition:addDamage(5, 2000, -15) condition:addDamage(5, 1000, -5) combat:setCondition(condition) function onGetFormulaValues(player, level, magicLevel) local min = (level / 5) + (magicLevel * 1.4) + 8 local max = (level / 5) + (magicLevel * 2.2) + 14 return -min, -max end combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") function onCastSpell(cid, var, time) mayNotMove(cid,true) addEvent(function() if isPlayer(cid) then mayNotMove(cid,false) end end,time * 1000) local homem = {lookType = 907, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookTypeEx = getCreatureOutfit(cid), lookAddons = getCreatureOutfit(cid)} local mulher = {lookType = 907, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookTypeEx = getCreatureOutfit(cid), lookAddons = getCreatureOutfit(cid)} local sex = getPlayerSex(cid) if sex == 0 then doSetCreatureOutfit(cid, mulher, tempo*1000) else doSetCreatureOutfit(cid, homem, tempo*1000) end return doCombat(cid, combat, var) end
Já que tas usando o TFS 1.2, talvez a função seja diferente, algo como creature:setNoMove(), não sei, só vendo.




info
Grupo: Campones
Registrado: 14/04/19
Posts: 13
Reputação: +1
Olá, preciso muito de ajuda!
Aos poucos eu estou construindo uma spell, mas cheguei no momento que eu estou empacado, eu gostaria que durante o tempo de conjuração(o tempo que o looktype é trocado) o player ficasse congelado, ou seja, um segundo de congelamento após castar a spell, eu já tentei de tudo, doCreatureSetNoMove, doPlayerSetNoMove, tudo... O mesmo erro é mostrado na tela.
"Lua Script Error: [Spell Interface]
data/spells/scripts/attack/ice_strike.lua:onCastSpell
data/spells/scripts/attack/ice_strike.lua:23: attempt to call global 'mayNotMove' (a nil value)
stack traceback:
[C]: in function 'mayNotMove'
data/spells/scripts/attack/ice_strike.lua:23: in function <data/spells/scripts/attack/ice_strike.lua:22>"
Alguém já passou por isso e pode me ajudar?