Hi!
i make some great mana potios scripts and don't work
im use TFS 1.0
i dont know where is the error :c
Script 1:
SCRIPT 2
for first script i'm use: [TFS 1.0] LUA Functions
i make some great mana potios scripts and don't work
im use TFS 1.0
i dont know where is the error :c
Script 1:
Code:
local greatManaPot = 7590
antidote:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
antidote:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
antidote:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
antidote:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
antidote:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON)
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
exhaust:setParameter(CONDITION_PARAM_TICKS, (configManager.getNumber(configKeys.EX_ACTIONS_DELAY_INTERVAL) - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey)
if itemEx.itemid ~= 1 or itemEx.type ~= THING_TYPE_PLAYER then
return true
end
local player = Player(cid)
if player:getCondition(CONDITION_EXHAUST_HEAL) then
player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED))
return true
end
if item.itemid == greatManaPot then
end
if (getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 49) and (getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8) then
doPlayerAddMana(cid, 200)
player:addCondition(exhaust)
player:say("Aaaah...", TALKTYPE_MONSTER_SAY)
elseif (getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) <= 99) and (getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8) then
doPlayerAddMana(cid, 400)
player:addCondition(exhaust)
player:say("Aaaah...", TALKTYPE_MONSTER_SAY)
elseif (getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 1000) and (getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8) then
doPlayerAddMana(cid, 700)
player:addCondition(exhaust)
player:say("Aaaah...", TALKTYPE_MONSTER_SAY)
end
end
SCRIPT 2
Code:
local antidote = Combat()
antidote:setParameter(COMBAT_PARAM_TYPE, COMBAT_HEALING)
antidote:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
antidote:setParameter(COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
antidote:setParameter(COMBAT_PARAM_AGGRESSIVE, false)
antidote:setParameter(COMBAT_PARAM_DISPEL, CONDITION_POISON)
function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey)
if (getPlayerLevel(cid) >= 1 and getPlayerLevel(cid) <= 49) and (getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8) then
doSendAnimatedText(getPlayerPosition(cid), "Ahhhh...!", TEXTCOLOR_ORANGE)
doCreatureAddHealth(cid,200)
elseif (getPlayerLevel(cid) >= 50 and getPlayerLevel(cid) <= 99) and (getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8) then
doSendAnimatedText(getPlayerPosition(cid), "Ahhhh...!", TEXTCOLOR_ORANGE)
doCreatureAddHealth(cid,400)
elseif (getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 199) and (getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8) then
doSendAnimatedText(getPlayerPosition(cid), "Ahhhh...!", TEXTCOLOR_ORANGE)
doCreatureAddHealth(cid,700)
end
end
for first script i'm use: [TFS 1.0] LUA Functions