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

Server Crash (Rune in Action)

beenii

Well-Known Member
Joined
Jul 26, 2010
Messages
586
Solutions
1
Reaction score
58
I have this script:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_CAKE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)

local area = createCombatArea(AREA_CIRCLE3X3)
setCombatArea(combat, area)
function onUse(cid, item, frompos, item2, topos)
return doCombat(cid, combat, positionToVariant(topos))
end

console is crashed and say: (getArea) Object on the stack is not a table
any have idea how fix?




or how make this rune in spells but remove item.uid on use?
 
Try it
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 1) + (mlevel * 1) - 50
local mana_maximum = (level * 1.2) + (mlevel * 1)
local mana_add = math.random(mana_minimum, mana_maximum)

doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doremoveitem(item.uid)
return TRUE
end
 
Back
Top