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

UE spells make dmg to players without pk on ;/

MalyFanek

New Member
Joined
Oct 10, 2019
Messages
37
Reaction score
2
As the title, player do dmg to other players by ue without pk turned on, but only with ue, to use normal spells/atk players he need to turn on pk so whats the reason that ue makes the dmg? Is it fault of spell?
Here's example of one ue spell:
Code:
local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -125.0, 0, -150.0, 0)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 5)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 5)


arr1 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 1, 2, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

arr2 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 2, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

arr3 = {
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0},
{0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
}

local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)

setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)

local function onCastSpell1(parameters)
    doCombat(parameters.cid, parameters.combat1, parameters.var)
end

local function onCastSpell2(parameters)
    doCombat(parameters.cid, parameters.combat2, parameters.var)
end

local function onCastSpell3(parameters)
    doCombat(parameters.cid, parameters.combat3, parameters.var)
end

function onCastSpell(cid, var)
local parameters = { cid = cid, var = var, combat1 = combat1, combat2 = combat2, combat3 = combat3 }
addEvent(onCastSpell1, 0, parameters) 
addEvent(onCastSpell2, 0, parameters)
addEvent(onCastSpell3, 150, parameters)
return true
end

But i dont see here nothing wrong?
Do i need to add any script that gonna want PK on to do dmg on players? Or maybe something at source?
oh i forgot : tibia 8,6 tfs 0.4 rev 3777

Looks like its fault of that combat area cuz even whis staff makes dmg to player so whats wrong here ;x
 
Last edited:
As long as I recall, any area spell that hits a player will generate a skull regardless of player's pvp options. So, for example, I might need to turn pk on if I want to target a single target spell against another player, but if I throw a gfb on the ground and it connects with it, I will receive a skull

Try with another area spells, such as energy beams/waves and see if it works the same way as ue
 
Same, kame/flash blabla also do dmg to player w/o pk turned on ;x dunno what is going on, and yea ofc it generate skull after that but why it does dmg w/o pk turned on thats the prob

Maybe is it fault that worldtype = "open" ? so like pvp enforced?

I found this at source:
Code:
    if(worldType == "open" || worldType == "2" || worldType == "openpvp")
    {
        g_game.setWorldType(WORLDTYPE_OPEN);
        std::clog << "Open PvP" << std::endl;
    }
    else if(worldType == "optional" || worldType == "1" || worldType == "optionalpvp")
    {
        g_game.setWorldType(WORLDTYPE_OPTIONAL);
        std::clog << "Optional PvP" << std::endl;
But then if i set to optional then even if i turn PK on on char, cant attack 2nd char :(
Post automatically merged:

Or maybe its fault of one of those errors from that topic:
?? Im already stupid ;x
 
Last edited:
As I told you, in version 8.6 (don't know if newer ones share this functionality) you have those 2 pvp options. Optional PvP means you can only damage other characters while in pvp tiles (Such as arenas I believe), open-pvp is just to say it's pvp.
Area spells worked like that in that version, if you shoot a gfb or throw any area spell and accidentally hit a target, damage will pop up and you will gain a skull. You had to be careful about it if you didn't want a skull.

There's no error or anything, it's just how tibia pvp works. If you set it to optional pvp of course area spells won't hit them as pvp is disabled everywhere except for the pvp zones you create.
 
So its impossible to fix it somehow by lua/source editing? only switching to lower/higher version of tibia? That was my point ;d
 
Back
Top