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

rune script

TriamerA

The Mystic One.
Joined
Nov 16, 2008
Messages
1,257
Reaction score
18
Location
Poland
I have no idea why this script is not working
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)

local condition = createConditionObject(CONDITION_FIRE)
if getPlayerLevel(cid) < 27 then
				local round = 20
	elseif (getPlayerLevel(cid) > 27) and (getPlayerLevel(cid) < 40) then
				local round = 27
	elseif (getPlayerLevel(cid) > 39) and (getPlayerLevel(cid) < 62) then
				local round = 33
	elseif (getPlayerLevel(cid) > 61) and (getPlayerLevel(cid) < 83) then
				local round = 43
	elseif (getPlayerLevel(cid) > 105) and (getPlayerLevel(cid) < 174) then
				local round = 60
	elseif (getPlayerLevel(cid) > 172)  then
				local round = 85

setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, round, 9000, -10)
setCombatCondition(combat, condition)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Nice attempt, but that'll never work (if it was only so simple ..)

To get this to work, you have to create lots of conditions, check player's level in onCastSpell, and then add the correct condition to the player.
 
Back
Top