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

My own rune fields deal damage to myself and my party members

Picos789

New Member
Joined
Oct 12, 2016
Messages
8
Reaction score
0
Hey i have a problem

I am not sure if this is common to happen, but any rune that makes a field deals damage to me and my party members,
as i remember, those fields should not damage myself, is there something wrong on any of my lua files or anything?

Hope you can help me.

Thanks in advise.
 
Solution
That's intended, yes. If you're looking to change it you need to set an attribute to the field to hold the owner's id, and in an onHealthChange/onManaChange script compare the damage source and check the tile below to check for a field, if that field has an id attached to it and the person taking damage is in party with a player with that same id (or the person taking damage is the field owner) then return 0 for damage.
5. Incomplete Problem Description:
- Post as much useful information as possible. If the problem is about something on your server, post the server version and client version. Also always post the errors you get and the scripts with the problems.
 
TFS 1.2, Tibia client 10.98, i am getting not error on my console, the only thing is that i do not know why my own field runes( energy field rune, fire field runes, etc) are dealing damage to myself, like if i step on my own created fields i receive damage, so far i know this fields should only deal damage to monsters, or a pk player, but not me and my party members, is this supposed to happen?
 

Attachments

Here is an example of my fire field lua script:


local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
combat:setParameter(COMBAT_PARAM_CREATEITEM, ITEM_FIREFIELD_PVP_FULL)

function onCastSpell(creature, variant, isHotkey)
if getPlayerStorageValue(creature, 357812) == 1 or getPlayerStorageValue(creature, 357819) == 1 then
return false
end
return combat:execute(creature, variant)
end
 
As i said, everything is working just fine, no errors, but i am pretty sure that your own fields should not damage yourself or any party member.
 
That's intended, yes. If you're looking to change it you need to set an attribute to the field to hold the owner's id, and in an onHealthChange/onManaChange script compare the damage source and check the tile below to check for a field, if that field has an id attached to it and the person taking damage is in party with a player with that same id (or the person taking damage is the field owner) then return 0 for damage.
 
Solution
Well i have a barely idea on how to do that, but did you mind if you tell me which are the lua/s( an their locations) to modify these or if you can give me an script?, and where to place it, 'cause i do not know which is/are the scipt/s that i need to change, i just know to change some settings and stuff, but don´t know how to do this by scratch. I'll appreciate that, ´cause i am not an expert making scripts or modify them.
 
Back
Top