eardrums
Member
- Joined
- May 27, 2010
- Messages
- 101
- Solutions
- 1
- Reaction score
- 11
Hey
So I made this script
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
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