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

Firewalker boots!

KnightmareZ

New Member
Joined
Feb 3, 2008
Messages
607
Reaction score
4
Location
Sweden/Ljungby
<item id="9932" article="a" name="firewalker boots">
<attribute key="description" value="Wearing these boots reduces the damage gotten from fiery ground." />
<attribute key="weight" value="950" />
<attribute key="armor" value="2" />
<attribute key="slotType" value="feet" />
<attribute key="absorbPercentFire" value="90" />
<attribute key="decayTo" value="10022" />
<attribute key="transformDeEquipTo" value="9933" />
<attribute key="duration" value="3600" />
<attribute key="showduration" value="1" />

This is my firewalker boots from items.xml - As you can see it absorb 90% of ALL fire dmg. But I want it like real Tibia so it only absorb fire fields..

Possible? help please.. rep++!
 
try this!
replace it!
<item id="9932" article="a" name="firewalker boots">
<attribute key="description" value="Wearing these boots reduces the damage gotten from fiery ground." />
<attribute key="weight" value="950" />
<attribute key="armor" value="2" />
<attribute key="slotType" value="feet" />
<attribute key="absorbPercentFire" value="100" />
<attribute key="decayTo" value="10022" />
<attribute key="transformDeEquipTo" value="9933" />
<attribute key="duration" value="3600" />
<attribute key="showduration" value="1" />
 
movements/scripts/firewalkerboots.lua and paste this

local condition = {}
for i = 1, 4 do
table.insert(condition, createConditionObject(CONDITION_FIRE))
addDamageCondition(condition, 1, 0, -(i == 1 and 20 or i==2 and 2 or i == 3 and 10 or i == 4 and 1))
addDamageCondition(condition, isInArray({1,3},i)==TRUE and 7 or 2, 9000, -(isInArray({1,3},i)==TRUE and 10 or 1))
end

function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE and getPlayerFlagValue(cid, PlayerFlag_CannotBeAttacked) == FALSE then
return doRemoveCondition(cid, CONDITION_FIRE), doAddCondition(cid, isInArray({1487,1492},item.itemid) == TRUE and condition[getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 and 2 or 1] or condition[getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 and 4 or 3])
elseif isMonster(cid) then
return doRemoveCondition(cid, CONDITION_FIRE), doAddCondition(cid, isInArray({1487,1492},item.itemid) == TRUE and condition[1 or 3])
else
doSendMagicEffect(position, CONST_ME_POFF)
end
end


movements.xml


in movements.xml delete all StepIn lines for ids:
1487
1488
1492
1493

<movevent type="StepIn" fromid="1487" toid="1488" event="script" value="firewalker.lua"/>
<movevent type="StepIn" fromid="1492" toid="1493" event="script" value="firewalker.lua"/>


Credits Zakius! and Cykotitan!
 
Based on script written by Cykotitan (I guess...)
No link cause some days ago was small rollback or sth on otland and that script(and some my posts that I didnt removed) disappeared)


So lets start:
Code:
local condition = {}
for i = 1, 4 do
        table.insert(condition, createConditionObject(CONDITION_FIRE))
        addDamageCondition(condition[i], 1, 0, -(i == 1 and 20 or i==2 and 2 or i == 3 and 10 or i == 4 and 1))
        addDamageCondition(condition[i], isInArray({1,3},i)==TRUE and 7 or 2, 9000, -(isInArray({1,3},i)==TRUE and 10 or 1))
end

function onStepIn(cid, item, position, fromPosition)
        if isPlayer(cid) == TRUE and getPlayerFlagValue(cid, PlayerFlag_CannotBeAttacked) == FALSE then
                return doRemoveCondition(cid, CONDITION_FIRE), doAddCondition(cid, isInArray({1487,1492},item.itemid) == TRUE and condition[getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 and 2 or 1] or condition[getPlayerSlotItem(cid, CONST_SLOT_FEET).itemid == 9932 and 4 or 3])
        elseif isMonster(cid) then
                return doRemoveCondition(cid, CONDITION_FIRE), doAddCondition(cid, isInArray({1487,1492},item.itemid) == TRUE and condition[1 or 3])
        else   
        doSendMagicEffect(position, CONST_ME_POFF)
        end
end
Save it as firewalker.lua in your movements/scripts dir

in movements.xml delete all StepIn lines for ids:
Code:
1487
1488
1492
1493

and paste
Code:
<movevent type="StepIn" fromid="1487" toid="1488" event="script" value="firewalker.lua"/>
<movevent type="StepIn" fromid="1492" toid="1493" event="script" value="firewalker.lua"/>

in this file.



___________________________________________
Credits to Cykotitan & Zakius

I know @up posted it, but I thought this looked a bit better than a double post and aload of writing everywhere.

:)
 
Back
Top Bottom