• 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.X+ While in a party, you can deal DMG to your allies.

Kownikuzyt

Member
Joined
Feb 11, 2020
Messages
170
Solutions
1
Reaction score
8
While in a party, you can deal DMG to your allies. How can you soak it? Where can I look for a solution? Where can I find the code to share?
 
Last edited:
Solution
I have added this, but it gives me no reaction (Hence no trigger) do i need to register or do something else to activate it?
I'm using the latest TFS1.3

Lua:
function Creature:onTargetCombat(target)
    print("ontargetcombat")
    if not self then
        return true
    end

    if self:isPlayer() and target:isPlayer() then
        local party = self:getParty()
        print("players")
        if party then
            print("party")
            local targetParty = target:getParty()
            if targetParty and targetParty == party then
                return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
            end
        end
    end
    return true
end

I added some prints to see any reaction, but nope.
Post automatically merged:

NVM, i`m stupid got it fixed already.
 
Last edited:
Back
Top