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

[movements] Soul boots (Like soft but add soul poits)

Bilip

New Member
Joined
Apr 15, 2009
Messages
41
Reaction score
0
I Need help!
I use TFS 0.3.4
And I need boots (Firewalking boots) Which make my Soul poits Gain.

I try make it in Items.xml
and do that like soft boots
soft boots
Code:
<attribute key="healthGain" value="1"/>	
<attribute key="healthTicks" value="2000"/>
<attribute key="manaGain" value="2"/>
<attribute key="manaTicks" value="1000"/>
My idea
Code:
		<attribute key="soulGain" value="1"/>
		<attribute key="soulTicks" value="1000"/>
But This function dosen't work :/
So... I have too do this in Movements but, i could't find any similar script, so I can't do this :(
I Ask you for Help.
I Will be greatfull.
Bilip
 
This is what you need to add in movements.xml:

PHP:
<movevent type="Equip" itemid="9932" slot="feet" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="9932" slot="feet" event="function" value="onDeEquipItem"/>

And in your items.xml add those lines in the firewalker boots so it looks like this:

PHP:
	<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="9934"/>
		<attribute key="transformDeEquipTo" value="9933"/>
		<attribute key="duration" value="3600"/>
		<attribute key="showduration" value="1"/>

		<attribute key="soulGain" value="1"/>		-- 1 soul
		<attribute key="soulTicks" value="1000"/>	-- 1000 = 1 second
	</item>

Cheers.
 
Of course.... it's dosen't work :(
TFS has no function "SoulGain" and "soulTicks"
so i have errors i console:
Code:
[warning - items::loadfromxml] Unknow key value soulGain
[warning - items::loadfromxml] Unknow key value soulTicks

additionally

We can find
Code:
<movevent type="Equip" itemid="9932" slot="feet" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="9932" slot="feet" event="function" value="onDeEquipItem"/

In new TFS

So, I need a script in movements :(
Or I have to see a similar script and I will write me own
I need your help !
Bilip
 
Of course.... it's dosen't work :(
TFS has no function "SoulGain" and "soulTicks"
so i have errors i console:
Code:
[warning - items::loadfromxml] Unknow key value soulGain
[warning - items::loadfromxml] Unknow key value soulTicks

additionally

We can find
Code:
<movevent type="Equip" itemid="9932" slot="feet" event="function" value="onEquipItem"/>
    <movevent type="DeEquip" itemid="9932" slot="feet" event="function" value="onDeEquipItem"/

In new TFS

So, I need a script in movements :(
Or I have to see a similar script and I will write me own
I need your help !
Bilip

Ah you're right, I didnt check the atts for 0.3.4.. I checked them now and there's nothing "soul regeneration"-related :/

Well since they dont exist I guess you would need a script for it
but I have no idea how to help you to make that. Anyone else?
 
Realy impossible, but i made a soul potion, maybe help!
I put it in the id of antidote (for me it's a useless potion on OT)

Code:
local MIN = 50
local MAX = 50
local EMPTY_POTION = 7636

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) == FALSE then
		return FALSE
	end

	if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return TRUE
	end

	if doPlayerAddSoul(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
		return FALSE
	end

	doAddCondition(cid, exhaust)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	doTransformItem(item.uid, EMPTY_POTION)
	return TRUE
end

Use
local MIN = 50
local MAX = 50
to min and max of soul recovery! enjoy!
 
Realy impossible, but i made a soul potion, maybe help!
I put it in the id of antidote (for me it's a useless potion on OT)

Code:
local MIN = 50
local MAX = 50
local EMPTY_POTION = 7636

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) == FALSE then
		return FALSE
	end

	if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return TRUE
	end

	if doPlayerAddSoul(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
		return FALSE
	end

	doAddCondition(cid, exhaust)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	doTransformItem(item.uid, EMPTY_POTION)
	return TRUE
end

Use
local MIN = 50
local MAX = 50
to min and max of soul recovery! enjoy!

Thanks for that one, good idea and it works perfect :thumbup:

+Repped ya
 
Back
Top