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

Lua Looking for any trap script

Tbol

Well-Known Member
Joined
Apr 7, 2019
Messages
592
Reaction score
64
Hello does anyone would like to share any simple trap skills that kills instantly if they step on it, for example i got in mind something like this
1737892711660.webp
Basically a effect or missle or any object that goes up and down if you touch it you die, so basically you have to cross it without touching it
 
Give more details about what you need. Also do it in Mapeditor and bring an image so we can work from there.
exactly what you shared in image of original tibia would work perfectly fine. Aswell though about idea of missle that loops up and down but probably not doable that easily
 
Is this script you edit this lines:
LUA:
    {fromPosition = Position(32526, 32536, 12), toPosition = Position(32526, 32539, 12), effect = CONST_ME_HOLYDAMAGE},

fromPosition = Position(32526, 32536, 12) = the start position.
toPosition = Position(32526, 32539, 12) = the end position.
effect = CONST_ME_HOLYDAMAGE = = effect that you want

1737922088619.webp

Code:
spawnDamage:interval(xxxx)
change xxxx to delay in mileseconds you want.
Code:
local effects = {
    {fromPosition = Position(32526, 32536, 12), toPosition = Position(32526, 32539, 12), effect = CONST_ME_HOLYDAMAGE},
    {fromPosition = Position(33369, 31334, 5), toPosition = Position(33371, 31334, 5), effect = CONST_ME_FIREAREA}
}
You can add as many as you want. Just include it in this table by placing the information you want.

Ps: as you said you wanted to "kill" the player, the damage is 99999, if you want to modify it, edit this line:

Code:
doTargetCombatHealth(0, jolf, COMBAT_PHYSICALDAMAGE, -99999, -99999, settings.effect)
 

Attachments

Is this script you edit this lines:
LUA:
    {fromPosition = Position(32526, 32536, 12), toPosition = Position(32526, 32539, 12), effect = CONST_ME_HOLYDAMAGE},

fromPosition = Position(32526, 32536, 12) = the start position.
toPosition = Position(32526, 32539, 12) = the end position.
effect = CONST_ME_HOLYDAMAGE = = effect that you want

View attachment 89807

Code:
spawnDamage:interval(xxxx)
change xxxx to delay in mileseconds you want.
Code:
local effects = {
    {fromPosition = Position(32526, 32536, 12), toPosition = Position(32526, 32539, 12), effect = CONST_ME_HOLYDAMAGE},
    {fromPosition = Position(33369, 31334, 5), toPosition = Position(33371, 31334, 5), effect = CONST_ME_FIREAREA}
}
You can add as many as you want. Just include it in this table by placing the information you want.

Ps: as you said you wanted to "kill" the player, the damage is 99999, if you want to modify it, edit this line:

Code:
doTargetCombatHealth(0, jolf, COMBAT_PHYSICALDAMAGE, -99999, -99999, settings.effect)
Lua Script Error: [Event Interface]
data/events/scripts/creature.lua:Creature@onTargetCombat
data/events/scripts/creature.lua:32: attempt to index local 'self' (a nil value)
stack traceback:
[C]: in function '__index'
data/events/scripts/creature.lua:32: in function <data/events/scripts/creature.lua:15>
[C]: in function 'doTargetCombatHealth'
data/globalevents/scripts/castle_damage.lua:21: in function <data/globalevents/scripts/castle_damage.lua:6>
 
try change:
LUA:
doTargetCombatHealth(0, jolf, COMBAT_PHYSICALDAMAGE, -99999, -99999, settings.effect)
to:
LUA:
doTargetCombat(0, jolf, COMBAT_PHYSICALDAMAGE, -99999, -99999, settings.effect)
 
im sorry, but i dont understand these things about TFS...
if you can show me any script in your server that cause damages i will do help you based in this script.
this is the way that i learn a little about scripts
 
Back
Top