• 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!

SUMMON SPELL NOT ENOUGH ROOM?

dantexd

Member
Joined
Sep 1, 2010
Messages
97
Reaction score
23
Hello, sorry for bothering but I downloaded a data pack to work on it but I`m having some issues anyone has an idea of what is happening here?
Though if someone can add a link for spells or some type of learning place so I can study what is going on with the next problems?
I have no knowledge at scripting sorry but with an example I will be able to fix all the problems like this.


local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 134)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7, -70, -7, -75, 10, 10, 5.1, 5.5)

function onCastSpell(cid, var)
local position1 = {x=getThingPosition(getCreatureTarget(cid)), y=getThingPosition(getCreatureTarget(cid)).y, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 157)
return doCombat(cid, combat, var)
end
 
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 134)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7, -70, -7, -75, 10, 10, 5.1, 5.5)

function onCastSpell(cid, var)
  -- we already know that cid exist because cid is casting the spell
  local target = getCreatureTarget(cid)
  -- what we don't know is if the cid has a target
  if not target then
    -- if it doesn't then end the script
    return false
  end

  -- get the target's position
  local position = getThingPosition(target)
  -- check to see if the target has a position
  if position then
    -- send the magic effect to that position
    doSendMagicEffect(position, 157)
    -- return & execute doCombat
    return doCombat(cid, combat, var)
  end
  -- if there is no position then return false and end the script
  return false
end
 
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 134)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -7, -70, -7, -75, 10, 10, 5.1, 5.5)

function onCastSpell(cid, var)
  -- we already know that cid exist because cid is casting the spell
  local target = getCreatureTarget(cid)
  -- what we don't know is if the cid has a target
  if not target then
    -- if it doesn't then end the script
    return false
  end

  -- get the target's position
  local position = getThingPosition(target)
  -- check to see if the target has a position
  if position then
    -- send the magic effect to that position
    doSendMagicEffect(position, 157)
    -- return & execute doCombat
    return doCombat(cid, combat, var)
  end
  -- if there is no position then return false and end the script
  return false
end

Thank you for the explanaiton my friend really refreshed my mind still.. the thing is when I cast the spell I get a white message saying I dont have enough room o,o.
I dont have idea what it could be any guess?
 
Back
Top