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

Lava walking with ring and boots

eardrums

Member
Joined
May 27, 2010
Messages
101
Solutions
1
Reaction score
11
Hey :D
So I made this script
Code:
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -99999)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 20000)

local condition2 = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -450)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 20000)


function onStepIn(cid, item, pos)
    if isPlayer(cid) then
    if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9933 then
        doSendMagicEffect(getPlayerPosition(cid), 29)
        elseif getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == 17470 then
        doAddCondition(cid, condition2)
        doSendMagicEffect(getPlayerPosition(cid), 6)
        else
        doCreatureSay(cid, "IT BURNS!", TALKTYPE_ORANGE_1)
        doSendMagicEffect(getPlayerPosition(cid), 15)
        doAddCondition(cid, condition)
        end
end
return TRUE
end

What I basically want is simple. When I step on lava while having a certain ring on I get hit 450 damage.
When I step on it while having firewalker boots on I dont get hit at all! When I step on the lava without the ring or the boots I die.

The script isnt giving me errors but it isnt doing what I want.

This is what happens

1. When I step on the lava without the ring or boots I get hit 450 which is what im supposed to get hit if I had the ring on.

2. When I step on the lava with the ring I dont get hit at all! I do although get the magic effect 6 when I step on the lava with the ring.

3. When I step on the lava with the boots I also dont get hit at all which isnt a problem because thats the only part of the script thats executed correctly.

So I want to know what im doing wrong and how I can fix it!

Thanks :)

dont really understand doaddcondition :(
 
Code:
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -99999)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 1000)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)

local condition2 = createConditionObject(CONDITION_FIRE)
setConditionParam(condition2, CONDITION_PARAM_PERIODICDAMAGE, -450)
setConditionParam(condition2, CONDITION_PARAM_TICKINTERVAL, 1000)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 20000)

function onStepIn(cid, item, pos)
     if isPlayer(cid) then
         if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9933 then
             doSendMagicEffect(getPlayerPosition(cid), 29)
         elseif getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == 17470 then
             doAddCondition(cid, condition2)
             doSendMagicEffect(getPlayerPosition(cid), 6)
         else
             doCreatureSay(cid, "IT BURNS!", TALKTYPE_ORANGE_1)
             doSendMagicEffect(getPlayerPosition(cid), 15)
             doAddCondition(cid, condition)
         end
     end
     return TRUE
end
 
Last edited:
Hey Limos! I just tried the script but theres still an issue.
This is what happens V
1.Without Ring or Boots= I get damaged -450 for 20 seconds ticking each second. Now it actually ticks with ur script but I dont understand why I get damaged 450. It should be 99999
2.With Ring= With the ring the magic effect 6 is executed but I dont get damaged at all
3.With Boots= With boots the magic effect is executed and I dont get damaged.

What should happen V
1.Without Ring or Boots= Instant Death
2.With Ring= Get hit 450 and ill set the ticks myself
3. With Boots= Take no damage (success)

I really dont know why the script isnt working the way it should -.- my tfs is 0.2.13
 
Hey bro. Look at your script:
Code:
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -99999)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 1000)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)

local condition2 = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -450)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 1000)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
Should be like:
Code:
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -99999)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 1000)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)

local condition2 = createConditionObject(CONDITION_FIRE)
setConditionParam(condition2, CONDITION_PARAM_PERIODICDAMAGE, -450)
setConditionParam(condition2, CONDITION_PARAM_TICKINTERVAL, 1000)
setConditionParam(condition2, CONDITION_PARAM_TICKS, 20000)

This what u need:
Code:
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -450)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 1000)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000) -- 20000 means 20 x 1000, so every second player will get dmg

function onStepIn(cid, item, pos)
     if isPlayer(cid) then
         if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9933 then -- player is save
             doSendMagicEffect(getPlayerPosition(cid), 29)
         elseif getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == 17470 then -- ring, player currently getting 450 dmg every second for 20 times
             doAddCondition(cid, condition)
             doSendMagicEffect(getPlayerPosition(cid), 6)
         else
             doCreatureSay(cid, "IT BURNS!", TALKTYPE_ORANGE_1) -- player is dead without boots or ring
             doSendMagicEffect(getPlayerPosition(cid), 15)
             doCreatureAddHealth(cid, -getCreatureMaxHealth(cid), MAGIC_EFFECT_UNKNOWN, COLOR_UNKNOWN, true)
         end
     end
     return TRUE
end
 
Last edited:
Thanks Limos! It finally works but I had to edit a small part

Code:
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_PERIODICDAMAGE, -450)
setConditionParam(condition, CONDITION_PARAM_TICKINTERVAL, 3000)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2000) -- 20000 means 20 x 1000, so every second player will get dmg

function onStepIn(cid, item, pos)
     if isPlayer(cid) then
         if getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9933 then -- player is save
             doSendMagicEffect(getPlayerPosition(cid), 29)
         elseif getPlayerSlotItem(cid, CONST_SLOT_RING).itemid == 17470 then -- ring, player currently getting 450 dmg every second for 20 times
             doAddCondition(cid, condition)
             doSendMagicEffect(getPlayerPosition(cid), 6)
         else
             doCreatureSay(cid, "IT BURNS!", TALKTYPE_ORANGE_1) -- player is dead without boots or ring
             doSendMagicEffect(getPlayerPosition(cid), 15)
             doCreatureAddHealth(cid, -getCreatureMaxHealth(cid))
         end
     end
     return TRUE
end

I removed the effect you put after -getCreatureMaxHealth(cid) and it worked. It wasnt working with the effect.

Thank You Limos!
One last question. How do I make the status of my thread solved?
 
DxI5kIqk_.png
 
Back
Top