• 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 Bug utito tempo san

Elexonic

Well-Known Member
Joined
Jun 18, 2008
Messages
1,920
Reaction score
59
I have bug in spells utito tempo san , when i used this spell i CAN healt but no can atack , exori con,exori san etc.. and I think it's the opposite, in tibia cip soft..

This is my utito tempo san.. :

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

local speed = createConditionObject(CONDITION_PARALYZE)
setConditionParam(speed, CONDITION_PARAM_TICKS, 10000)
setConditionFormula(speed, -0.7, 56, -0.7, 56)
setCombatCondition(combat, speed)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

And my exori san..

Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1, -10, -1, -20, 5, 5, 1.4, 2.1)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

why this happens
 
Last edited by a moderator:
Now don't trust this I'm just going off of my gut xD
Replace this
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
 
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
 
local speed = createConditionObject(CONDITION_PARALYZE)
setConditionParam(speed, CONDITION_PARAM_TICKS, 10000)
setConditionFormula(speed, -0.7, 56, -0.7, 56)
setCombatCondition(combat, speed)
 
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)
 
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

with this
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, true)
 
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
 
local speed = createConditionObject(CONDITION_PARALYZE)
setConditionParam(speed, CONDITION_PARAM_TICKS, 10000)
setConditionFormula(speed, -0.7, 56, -0.7, 56)
setCombatCondition(combat, speed)
 
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)
 
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Problem is in spells.xml, make sure you have this:
XML:
	<instant name="Sharpshooter" words="utito tempo san" lvl="60" mana="450" prem="1" aggressive="0" selftarget="1" exhaustion="2000" groups="2,10000;3,10000" icon="135" needlearn="0" event="script" value="support/sharpshooter.lua">
		<vocation id="3"/>
		<vocation id="7"/>
	</instant>
 
I have this in spells.xml -- is 8.6 servers..

<instant name="Sharpshooter" words="utito tempo san" lvl="60" mana="450" prem="1" aggressive="0" selftarget="1" exhaustion="1000" needlearn="0" event="script" value="support/sharpshooter.lua">
<vocation id="3"/>
<vocation id="7"/>
</instant>
 
Mm what folder?

i have 034-exaustion.lua

exhaustion =
{
check = function (cid, storage)
if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
return false
end

return getPlayerStorageValue(cid, storage) >= os.time()
end,

get = function (cid, storage)
if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
return false
end

local exhaust = getPlayerStorageValue(cid, storage)
if(exhaust > 0) then
local left = exhaust - os.time()
if(left >= 0) then
return left
end
end

return false
end,

set = function (cid, storage, time)
setPlayerStorageValue(cid, storage, os.time() + time)
end,

make = function (cid, storage, time)
local exhaust = exhaustion.get(cid, storage)
if(not exhaust) then
exhaustion.set(cid, storage, time)
return true
end

return false
end
}
 
Put this in your spells/scripts/support/sharpshooter.lua (Works fine for me. Also 8.60)

PHP:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

local speed = createConditionObject(CONDITION_PARALYZE)
setConditionParam(speed, CONDITION_PARAM_TICKS, 10000)
setConditionFormula(speed, -0.7, 56, -0.7, 56)
setCombatCondition(combat, speed)

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Up: No don`t work.. i say spells and no advance skill distance.. and don`t paralice.. and don`t see icon of spells.. :S ,
but yes.. can say exori con xDD

Thanks
 
I can help you?

For axample...

Code:
setConditionParam(condition, CONDITION_PARAM_SKILL_XX, NUMBER)

and in your case...

Params...
SKILL_AXE
SKILL_SWORD
SKILL_SHIELD
SKILL_FISHING
SKILL_CLUB
SKILL_DISTANCE
SPEED
STAT_MAGICPOINTS
STAT_MAXHITPOINTS
STAT_MAXMANAPOINTS.

Sorry but I don't remember more...

Change...

setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)

for

setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 150)
 
Last edited:
Test it:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
 
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
 
local speed = createConditionObject(CONDITION_PARALYZE)
setConditionParam(speed, CONDITION_PARAM_TICKS, 10000)
setConditionFormula(speed, -0.7, 56, -0.7, 56)
setCombatCondition(combat, speed)
 
function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

Xml:
Code:
<instant name="Sharpshooter" words="utito tempo san" lvl="60" mana="450" prem="1" aggressive="0" selftarget="1" exhaustion="2000" groups="2,10000;3,10000" icon="135" needlearn="0" event="script" value="support/sharpshooter.lua">
		<vocation id="3"/>
		<vocation id="7"/>
	</instant>
 
Last edited:
Xml i think is for spells 8,7+ .. i using 8.6 .. i think don`t work or fail for xml..
groups="2,10000;3,10000" icon="135"
i tets you script in 10 min! thanks you!


edit_ I thinks work great Michy =O

Mmm if i removed The script seems to work well.
you use it in your ot so?
tibia is as real?
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 2)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)
 
Last edited:
try use this one might work:
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, 49)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 25000)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 200)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, 300)
setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
setCombatCondition(combat, condition)


function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Back
Top