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

Swimming script edit

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
1,512
Solutions
27
Reaction score
865
Location
Santiago - Chile
GitHub
ralke23
Twitch
ralke23
Hi, I need to request some stuff for the swimming script, if someone could help, i'll be very appreciated! Pheraps this will help more people. i'm using Nekiro's 8.6 downgraded (TFS 1.3).

The things I need are:
a) you cant attack monsters while swimming, you are allowed to attack players only
b) monsters can't step in swimmable tiles (4820,4821,4822,4823,4824,4825)
c) you can receive monster attacks while swimming (from range)

Here is the default swimming.lua…

Lua:
local condition = Condition(CONDITION_OUTFIT)
condition:setOutfit({lookType = 267})
condition:setTicks(-1)

function onStepIn(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return false
    end

    creature:addCondition(condition)
    return true
end

function onStepOut(creature, item, position, fromPosition)
    if not creature:isPlayer() then
        return false
    end

    creature:removeCondition(CONDITION_OUTFIT)
    return true
end

Thanks for your help!
 
Bump.. How do I add this condition when player step on swimming tiles? in addition to CONDITION_OUTFIT
Lua:
local pacified = Condition(CONDITION_PACIFIED)
pacified:setParameter(CONDITION_PARAM_TICKS, 10000) --- change to "infinite" unless player step Out
combat:addCondition(pacified)

If is posible to avoid attack monsters and only attack players Will be a lot better, but I need to start with something
 
Last edited:
Back
Top