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

Lua [Spell] Problem!

Joined
May 23, 2010
Messages
185
Reaction score
23
I having problems with this script:

Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_STUN)
 
local condition = createConditionObject(CONDITION_DRUNK)
setConditionParam(condition, CONDITION_PARAM_TICKS, 6000)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
local playerpos = getCreaturePosition(cid)
local target = getCreatureTarget(cid)
local trapos = getCreaturePosition(target)
local level = getPlayerLevel(cid)
local damage = (getCreatureMaxHealth(cid)*30)/100

if target == isMonster or isCreature and exhaustion.check(cid, 1002) == false then
exhaustion.set(cid, 1002, 45)
doTeleportThing(cid,trapos)
doCreatureAddHealth(target, -damage)
doCreatureSay(cid, "DIE!", TALKTYPE_ORANGE_1, cid)
return doCombat(cid, combat, var)
else
doPlayerSendTextMessage(cid, 20, "You are exhausted, wait more " ..exhaustion.get(cid, 1002).." second(s) to use Leap Attack again.")
end
end

Let's see, the creature takes the damage but it doesn't show on the screen! The monsters lose life but doesn't show the damage !
The others problem is that i can't put a effect that is showed six times from second to second !
 
Back
Top