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

TFS 1.5 Sharpshooter Problem

Oplner

New Member
Joined
Jan 25, 2023
Messages
3
Reaction score
3
I'm having a problem with my sharpshooter spell, the player can't use potions while casting it, everything else works fine.

Would be thankful if anyone can help!
 

Attachments

I'm having a problem with my sharpshooter spell, the player can't use potions while casting it, everything else works fine.

Would be thankful if anyone can help!

You can see in your sharpshooter spell you're doing the following.

Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 10000)
setCombatCondition(combat, exhaust)

You're giving the player the condition CONDITION_EXHAUST_HEAL for 10 seconds.

If we then go to potions.lua we can see the following code

Lua:
    if player:getCondition(CONDITION_EXHAUST_HEAL) then
        player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_YOUAREEXHAUSTED))
        return true
    end

It's basically saying that if the player has the condition CONDITION_EXHAUST_HEAL (Which they do because they just used sharpshooter) then it will send them a you're exhausted message and end the script. So that's whats happening.
 
Last edited:
Back
Top