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

New Summons Problem

digorrc

New Member
Joined
Jun 28, 2009
Messages
7
Reaction score
0
Hi dear OtLander's
On my server, if my summon (emberwing or "utevo res" summons) atacks in area, the close players gonna take damage (even when we are in a party), and i will not get pk, idk how to fix this, help plz :'(
 
Last edited:
Fastest way is to use event/script/creature.lua to fix your problem.

Code:
if self:isMonster() and target:isPlayer() then
        local master = self:getMaster()
        if master and master:isPlayer() then
            local party = target:getParty()
            local targetParty = master:getParty()
           
            if party and party == targetParty then
                return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
            end

            if ( master == target ) then
                return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
            end

        end
    end
 
Fastest way is to use event/script/creature.lua to fix your problem.

Code:
if self:isMonster() and target:isPlayer() then
        local master = self:getMaster()
        if master and master:isPlayer() then
            local party = target:getParty()
            local targetParty = master:getParty()
          
            if party and party == targetParty then
                return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
            end

            if ( master == target ) then
                return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
            end

        end
    end
make sure you check if targetParty exists otherwise you're comparing a userdata with a potential nil value
 
Fastest way is to use event/script/creature.lua to fix your problem.

Code:
if self:isMonster() and target:isPlayer() then
        local master = self:getMaster()
        if master and master:isPlayer() then
            local party = target:getParty()
            local targetParty = master:getParty()
        
            if party and party == targetParty then
                return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
            end

            if ( master == target ) then
                return RETURNVALUE_YOUMAYNOTATTACKTHISCREATURE
            end

        end
    end

Nice Man, thats worked, but just with party player(the summons of the party player still getting damage too), but if we aren't in a party the player still getting damage and the owner of the summon doesn't get PK
 
Last edited:
i can atack players summon with my hand open (secure mode on) and i get pk, and the summons can hit players with area spells even with secure mode on, and the summons of party/or not party players
 
Just work around that code and make it happen even if its not in party.

But normal tibia doesnt work like that, if you have secure pvp and you cast and AoE you will get skull anyway, even if you have secure hand.
 
yes but, when my summon hits the player, i didn't get pk and when i target a friend's summon, i get pk even in the party
 
Back
Top