Sir Islam
Never Give Up
i use tibia 8.70
1 ) doCreatureSetNoMove no work good because i can move by mouse but keyboard no
2 ) EXHAUST not work i can use heal rune or anther runes
i tried to fixed but i fail
the script freeze rune
1 ) doCreatureSetNoMove no work good because i can move by mouse but keyboard no
2 ) EXHAUST not work i can use heal rune or anther runes
i tried to fixed but i fail
the script freeze rune
Lua:
local freezetime = 8
local cooldown = 10 -- time to use again
local storage = 19002
local condition1 = createConditionObject(CONDITION_INFIGHT)
setConditionParam(condition1, CONDITION_PARAM_TICKS, -1)
local condition2 = createConditionObject(CONDITION_MUTED)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 10000)
local condition3 = createConditionObject(CONDITION_FREEZING)
setConditionParam(condition3, CONDITION_PARAM_DELAYED, 10000)
local condition4 = createConditionObject(CONDITION_PACIFIED)
setConditionParam(condition4, CONDITION_PARAM_TICKS, 10000)
local condition5 = createConditionObject(CONDITION_EXHAUST)
setConditionParam(condition5, CONDITION_PARAM_TICKS, 1000)
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ICE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, EXHAUST_COMBAT)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, -1)
setCombatCondition(combat, exhaust)
local exhaustt = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaustt, CONDITION_PARAM_SUBID, EXHAUST_HEALING)
setConditionParam(exhaustt, CONDITION_PARAM_TICKS, -1)
setCombatCondition(combat, exhaustt)
function countDown(number, pos, effect, msgonend, effectonend)
local n = number
for i = 1, number do
addEvent(doSendAnimatedText,i* 1000, pos, n > 1 and n.."" or msgonend .."", n < 6 and TEXTCOLOR_RED or TEXTCOLOR_GREEN)
addEvent(doSendMagicEffect,i* 1000, pos, n > 1 and effect or effectonend )
n = n -1
end
n = number
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if exhaustion.get(cid,storage) then
return doPlayerSendCancel(cid,"You can't use this yet.")
end
if isPlayer(cid) and getTileInfo(getThingPos(cid)).protection then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE)
else
local s = getTileInfo(toPosition)
if isPlayer(cid) and s.protection then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_ACTIONNOTPERMITTEDINPROTECTIONZONE)
elseif s.nopvp then
return doPlayerSendCancel(cid, "You can\'t use this here.")
end
end
local function removed(cid)
return isPlayer(itemEx.uid) and doCreatureSetNoMove(cid, false) and doRemoveCondition(itemEx.uid,CONDITION_EXHAUST,1) and doRemoveCondition(itemEx.uid,CONDITION_EXHAUST,2) and doRemoveCondition(itemEx.uid, CONDITION_INFIGHT)and doRemoveCondition(itemEx.uid, CONDITION_MUTED)and doRemoveCondition(itemEx.uid, CONDITION_FREEZING) and doRemoveCondition(itemEx.uid, CONDITION_PACIFIED) and doRemoveCondition(itemEx.uid, CONDITION_EXHAUST)
end
if not isPlayer(itemEx.uid) or cid == itemEx.uid or getPlayerGroupId(itemEx.uid) > 2 then
return doPlayerSendCancel(cid,"You can only use this on another players.")
end
doSendAnimatedText(getThingPos(itemEx.uid),"Freezed!", TEXTCOLOR_BLUE)
doCreatureSetStorage(itemEx.uid, 18000, 1)
doAddCondition(itemEx.uid, condition1)
doAddCondition(itemEx.uid, condition2)
doAddCondition(itemEx.uid, condition3)
doAddCondition(itemEx.uid, condition4)
doAddCondition(itemEx.uid, condition5)
exhaustion.set(cid,storage,cooldown)
doCombat(cid, combat, numberToVariant(itemEx.uid))
doCreatureSetNoMove(itemEx.uid, 1)
countDown(freezetime , toPosition, 0, "melted", 5)
addEvent(removed,freezetime*1000,itemEx.uid)
return true
end
Last edited: