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

Change food tick and rune healing and/or damage

Zatyrax

Photoshop-er!
Joined
May 14, 2010
Messages
54
Reaction score
0
Hello!

I have been trying to find where to, adn how to change how much and how fast you get food from eating. But i can´t find :( Same thing with change how much UH (ultimate healing rune) heals. So if someone could link a tutorial to that, or explain, i would be a happy man :peace:

i´ll +rep you :ninja:
 
healing
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function getCombatFormulas(cid, lv, maglv)
	local formula_min = ((lv*0.25 + maglv*3) * 1.8) -- how much
	local formula_max = ((lv*0.25 + maglv*3) * 1.2) -- how much

	if(formula_max < formula_min) then
		local tmp = formula_max
		formula_max = formula_min
		formula_min = tmp
	end
	return formula_min, formula_max
end


setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")


function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
healing
Lua:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)

function getCombatFormulas(cid, lv, maglv)
	local formula_min = ((lv*0.25 + maglv*3) * 1.8) -- how much
	local formula_max = ((lv*0.25 + maglv*3) * 1.2) -- how much

	if(formula_max < formula_min) then
		local tmp = formula_max
		formula_max = formula_min
		formula_min = tmp
	end
	return formula_min, formula_max
end


setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "getCombatFormulas")


function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

Thanks! But i cant +rep you, have to spread some rep before i can rep+ you again :p
 
Found it, it was in vocations.xml :) Now i got another problem, so i post it here insted of making a new thread (started som many threads i am starting to feel like a spammer...).

My trainers doesent heal themself for some reason i cant figure. Here is my trainer.xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Skill trainer" nameDescription="a skill trainer" race="blood" experience="0" speed="210" manacost="0">
	<health now="1000000" max="1000000"/>
	<look type="266" corpse="3128"/>
	<targetchange interval="60000" chance="0"/>
	<strategy attack="1" defense="0"/>
	<flags>
		<flag summonable="0"/>
		<flag attackable="1"/>
		<flag hostile="1"/>
		<flag illusionable="0"/>
		<flag convinceable="0"/>
		<flag pushable="0"/>
		<flag canpushitems="1"/>
		<flag staticattack="50"/>
		<flag lightlevel="0"/>
		<flag lightcolor="0"/>
		<flag targetdistance="1"/>
		<flag runonhealth="0"/>
	</flags>
	<attacks>
		<attack name="melee" interval="5000" min="0" max="-1"/>
	</attacks>
	<defenses armor="0" defense="0">
		<defense name="healing" interval="3000" chance="100" min="100000" max="100000"/>
	</defenses>
	<immunities>
		<immunity physical="0"/>
		<immunity energy="0"/>
		<immunity fire="0"/>
		<immunity poison="0"/>
		<immunity lifedrain="0"/>
		<immunity paralyze="0"/>
		<immunity outfit="0"/>
		<immunity drunk="0"/>
		<immunity invisible="1"/>
	</immunities>
	<loot>
		<item id="2148" countmax="20" chance="100000"/><!-- gold coin -->
		<item id="1949" chance="10000"/><!-- scroll -->
		<item id="2467" chance="10000"/><!-- leather armor -->
		<item id="2642" chance="6666"/><!-- sandals -->
		<item id="1987" chance="100000"><!-- bag -->
			<inside>
				<item id="2044" chance="6666"/><!-- lamp -->
				<item id="2689" countmax="3" chance="20000"/><!-- bread -->
				<item id="2401" chance="3333"/><!-- staff -->
				<item id="2166" chance="1428"/><!-- power ring -->
			</inside>
		</item>
	</loot>
</monster>
 
Lua:
<?xml version="1.0" encoding="UTF-8"?>
  <monster name="Skill trainer" nameDescription="a skill reainer" race="blood" experience="0" speed="210" manacost="0">
    <health now="1000000" max="1000000"/>
    <look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>
    <targetchange interval="60000" chance="0"/>
    <strategy attack="100" defense="0"/>
    <flags>
      <flag summonable="0"/>
      <flag attackable="1"/>
      <flag hostile="1"/>
      <flag illusionable="0"/>
      <flag convinceable="0"/>
      <flag pushable="0"/>
      <flag canpushitems="1"/>
      <flag staticattack="50"/>
      <flag lightlevel="0"/>
      <flag lightcolor="0"/>
      <flag targetdistance="1"/>
      <flag runonhealth="0"/>
    </flags>
    <attacks>
      <attack name="melee" interval="2000" min="0" max="-1"/>
    </attacks>
    <defenses armor="1" defense="1">
      <defense name="healing" interval="10000" chance="100" min="999924000" max="999924000"/>
    </defenses>
    <immunities>
      <immunity physical="0"/>
      <immunity energy="0"/>
      <immunity fire="0"/>
      <immunity poison="0"/>
      <immunity lifedrain="0"/>
      <immunity paralyze="0"/>
      <immunity outfit="0"/>
      <immunity drunk="0"/>
      <immunity invisible="1"/>
    </immunities>
    <elements>
    <element icePercent="10"/>
    <element deathPercent="10"/>
    <element energyPercent="20"/>
    <element holyPercent="25"/>
    <element earthPercent="10"/>
</elements><voices interval="2000" chance="5">
    </voices>
    <loot>
      <item id="2148" countmax="20" chance1="100000" chancemax="0"/>
      <item id="1949" chance="10000"/>
      <item id="2467" chance="10000"/>
      <item id="2642" chance="6666"/>
      <item id="1987" chance="100000">
        <inside>
          <item id="2044" chance="6666"/>
          <item id="2689" countmax="3" chance1="20000" chancemax="0"/>
          <item id="2401" chance="3333"/>
          <item id="2166" chance="1428"/>
        </inside>
      </item>
    </loot>
  </monster>
 
Lua:
<?xml version="1.0" encoding="UTF-8"?>
  <monster name="Skill trainer" nameDescription="a skill reainer" race="blood" experience="0" speed="210" manacost="0">
    <health now="1000000" max="1000000"/>
    <look type="57" head="20" body="30" legs="40" feet="50" corpse="3128"/>
    <targetchange interval="60000" chance="0"/>
    <strategy attack="100" defense="0"/>
    <flags>
      <flag summonable="0"/>
      <flag attackable="1"/>
      <flag hostile="1"/>
      <flag illusionable="0"/>
      <flag convinceable="0"/>
      <flag pushable="0"/>
      <flag canpushitems="1"/>
      <flag staticattack="50"/>
      <flag lightlevel="0"/>
      <flag lightcolor="0"/>
      <flag targetdistance="1"/>
      <flag runonhealth="0"/>
    </flags>
    <attacks>
      <attack name="melee" interval="2000" min="0" max="-1"/>
    </attacks>
    <defenses armor="1" defense="1">
      <defense name="healing" interval="10000" chance="100" min="999924000" max="999924000"/>
    </defenses>
    <immunities>
      <immunity physical="0"/>
      <immunity energy="0"/>
      <immunity fire="0"/>
      <immunity poison="0"/>
      <immunity lifedrain="0"/>
      <immunity paralyze="0"/>
      <immunity outfit="0"/>
      <immunity drunk="0"/>
      <immunity invisible="1"/>
    </immunities>
    <elements>
    <element icePercent="10"/>
    <element deathPercent="10"/>
    <element energyPercent="20"/>
    <element holyPercent="25"/>
    <element earthPercent="10"/>
</elements><voices interval="2000" chance="5">
    </voices>
    <loot>
      <item id="2148" countmax="20" chance1="100000" chancemax="0"/>
      <item id="1949" chance="10000"/>
      <item id="2467" chance="10000"/>
      <item id="2642" chance="6666"/>
      <item id="1987" chance="100000">
        <inside>
          <item id="2044" chance="6666"/>
          <item id="2689" countmax="3" chance1="20000" chancemax="0"/>
          <item id="2401" chance="3333"/>
          <item id="2166" chance="1428"/>
        </inside>
      </item>
    </loot>
  </monster>

Tried it but got this error when trying to load the trainer:

Code:
[18/05/2010 21:44:35] > Loading custommonsters.xml...[Warning - Monsters::loadMonster] Cannot load monster (Training Monk) file (mods/monster/Custom/training monk.xml).
[18/05/2010 21:44:35] Line: 1, Info: XML declaration allowed only at the start of the document

:(
 
Tried it but got this error when trying to load the trainer:

Code:
[18/05/2010 21:44:35] > Loading custommonsters.xml...[Warning - Monsters::loadMonster] Cannot load monster (Training Monk) file (mods/monster/Custom/training monk.xml).
[18/05/2010 21:44:35] Line: 1, Info: XML declaration allowed only at the start of the document

:(

If you are on with your GM, they wont heal. They only heal when a player is on screen. :D
 
Back
Top