• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[SOLVED] [Spells] MagicWall Countdown [1.0]

Eldin

Eldin Projects
Joined
Jun 12, 2008
Messages
1,334
Reaction score
615
Location
Sweden
SPELLS:
My intention is the make the Magic Wall Rune show time ticks above it, 20, 19, 18 etc until its gone.
Im using TFS 1.0

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)
function onCastSpell(cid, var)
function MagicWallTime(pos, delay)
doSendAnimatedText(pos, delay, 145)
if delay ~= 1 then addEvent(MagicWallTime, 1000, pos, delay -1) end
end

local pos,duration = variantToPosition(var),20
MagicWallTime(pos,duration)
return doCombat(cid, combat, var)
end

LOGG ERROR:
Code:
The error pointed towards "doSendAnimatedText" and I changed it to: doCreatureSay instead.
I had no error but the MagicWall wont show tics. Anyone? :)

TALKING SIGNS FOR TFS 1.0, MAYBE SOMETHING THAT I COULD COMBINE FOR M-WALL?
Code:
local t = {
  {"test", {x=1000, y=1000, z=7}, CONST_ME_TELEPORT},
  {"test2", {x=1001, y=1000, z=7}, CONST_ME_GIFT_WRAPS},
  {"test3", {x=1002, y=1000, z=7}, CONST_ME_POFF}
}

function onThink(interval)
  local people = getOnlinePlayers()
  if #people == 0 then
  return true
  end

  for i = 1, #t do
  local v = t[i]
  doCreatureSay(people[1], v[1], TALKTYPE_ORANGE_1, false, 0, v[2])
  doSendMagicEffect(v[2], v[3])
  end
  return true
end


Kind Regards,
Eldin.
 
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ENERGY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, ITEM_MAGICWALL)

function onCastSpell(cid, var)
    local people = getOnlinePlayers()
    if #people == 0 then
        return true
    end
   
    function MagicWallTime(pos, delay)
        if delay ~= 1 then
            addEvent(MagicWallTime, 1000, pos, delay - 1)
        end
       
        doCreatureSay(people[1], delay, TALKTYPE_ORANGE_1, false, 0, pos)
    end
   
    local pos,duration = variantToPosition(var), 20
    MagicWallTime(pos,duration)
    return doCombat(cid, combat, var)
end
 
Back
Top