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

Help changing time healing my manarune script! (tfs 1.2)

Edroniasty

New Member
Joined
Oct 2, 2015
Messages
84
Reaction score
1
Hello! I need to change my paladin manarune & uh time healing ( rune should be 1s - 1000ms but I need keep timeBetweenExActions = 500 in my config.lua and can't change it.. This is action script - timeBetweenActions') - 2000 don't working the spell is still 500ms

Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenActions') - 2000))

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local mlevel = player:getMagicLevel()
    local hpandma_minimum = (level * 7.8) + (SKILL_MAGLEVEL * 0)
    local hpandma_maximum = (level * 9) + (SKILL_MAGLEVEL * 0)
    if player:getVocation():getId() == 3 or 7 then
        player:addMana(math.random(hpandma_minimum, hpandma_maximum))
        player:addHealth(math.random(hpandma_minimum, hpandma_maximum))
        player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
    else
        return FALSE
    end
return TRUE
end

Help!
 
so... I change to 5000,9000 and 90000
Code:
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 90000)
still 0.5 s

timeBetweenActions = 200
timeBetweenExActions = 10000

(now I can use rune between 10 seconds not 90s like in param ticks.. serv was reloaded, properly saved..

I have other script for manarune and this script works fine with 1s exhaust
Code:
function onUse(cid, item, frompos, itemEx, topos)
local playerinfo = -- Please don't touch
{
level = getPlayerLevel(cid),
mlevel = getPlayerMagLevel(cid),
voc = getPlayerVocation(cid)
}
local config =
{
strenght = "template", ---Values: template (strenght dependent on level and magic level), constant (on all level adding same mana)
template = {min = (((playerinfo.level * 12.5) + (playerinfo.mlevel * 1)) + 0.0) , max =(((playerinfo.level * 14) + (playerinfo.mlevel * 1)) + 0.0)}, -- liczymy - lvl * 4 /1.5 = x m lvl * 2 /1.5 = x lvl + m lvl = Minimum, lvl * 6 /1.5 = x m lvl * 4 /1.5 = x lvl + m lvl = Maximum
constant = {min = 400, max = 800},--only if strenght is constant
exhaustion = 1,--exhaustion in secs
exhaustion_value = 56789, --exhaustion storage value
minimum_level = 1,--minimum level to use manarune
minimum_mlevel = 0,--minimum magic level to use manarune
cannot_use_voc = {3,4,7,8,11,12} --id vocation which cannot use
}
local rand = 0
if(isPlayer(itemEx.uid) == false) then
return true
end
if(playerinfo.level < config.minimum_level) then
return true
end
if(playerinfo.mlevel < config.minimum_mlevel) then
return true
end
if(isInArray(config.cannot_use_voc, playerinfo.voc)) then
return true
end
if(config.strenght ~= "template" and config.strenght ~= "constant") then
config.strenght = "constant"
end
if(getPlayerStorageValue(cid, config.exhaustion_value) > os.time()) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are exhausted.")
return true
end
if(config.strenght == "template") then
rand = math.random(config.template.min, config.template.max)
elseif (config.strenght == "constant") then
rand = math.random(config.constant.min, config.constant.max)
end
doPlayerAddMana(cid, rand)
setPlayerStorageValue(cid, config.exhaustion_value, (os.time() + config.exhaustion))
doCreatureSay(cid, "+"..math.floor(rand).." mana", TALKTYPE_ORANGE_1)
return true
end

If u can change it and make it heal HP & MP I will solve my problem ;)

bump
 
Last edited by a moderator:
so... I change to 5000,9000 and 90000
Code:
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 90000)
still 0.5 s

timeBetweenActions = 200
timeBetweenExActions = 10000

(now I can use rune between 10 seconds not 90s like in param ticks.. serv was reloaded, properly saved..

I have other script for manarune and this script works fine with 1s exhaust
Code:
function onUse(cid, item, frompos, itemEx, topos)
local playerinfo = -- Please don't touch
{
level = getPlayerLevel(cid),
mlevel = getPlayerMagLevel(cid),
voc = getPlayerVocation(cid)
}
local config =
{
strenght = "template", ---Values: template (strenght dependent on level and magic level), constant (on all level adding same mana)
template = {min = (((playerinfo.level * 12.5) + (playerinfo.mlevel * 1)) + 0.0) , max =(((playerinfo.level * 14) + (playerinfo.mlevel * 1)) + 0.0)}, -- liczymy - lvl * 4 /1.5 = x m lvl * 2 /1.5 = x lvl + m lvl = Minimum, lvl * 6 /1.5 = x m lvl * 4 /1.5 = x lvl + m lvl = Maximum
constant = {min = 400, max = 800},--only if strenght is constant
exhaustion = 1,--exhaustion in secs
exhaustion_value = 56789, --exhaustion storage value
minimum_level = 1,--minimum level to use manarune
minimum_mlevel = 0,--minimum magic level to use manarune
cannot_use_voc = {3,4,7,8,11,12} --id vocation which cannot use
}
local rand = 0
if(isPlayer(itemEx.uid) == false) then
return true
end
if(playerinfo.level < config.minimum_level) then
return true
end
if(playerinfo.mlevel < config.minimum_mlevel) then
return true
end
if(isInArray(config.cannot_use_voc, playerinfo.voc)) then
return true
end
if(config.strenght ~= "template" and config.strenght ~= "constant") then
config.strenght = "constant"
end
if(getPlayerStorageValue(cid, config.exhaustion_value) > os.time()) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "You are exhausted.")
return true
end
if(config.strenght == "template") then
rand = math.random(config.template.min, config.template.max)
elseif (config.strenght == "constant") then
rand = math.random(config.constant.min, config.constant.max)
end
doPlayerAddMana(cid, rand)
setPlayerStorageValue(cid, config.exhaustion_value, (os.time() + config.exhaustion))
doCreatureSay(cid, "+"..math.floor(rand).." mana", TALKTYPE_ORANGE_1)
return true
end

If u can change it and make it heal HP & MP I will solve my problem ;)

bump

Rules for the Support board
#2

Restart the server if it still does not work check the path to the script and make sure you edited the correct script.
 
Lua:
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1500))
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1500))
unexpected symbol near ')'
I deleted 1 ")" and its working but for 500 ms not 1500 - 1.5 second.. don't know what I need to do.. ;s can u change my other script and make it add hp to? - this will help me because that other script working.
 
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1500))
unexpected symbol near ')'
I deleted 1 ")" and its working but for 500 ms not 1500 - 1.5 second.. don't know what I need to do.. ;s can u change my other script and make it add hp to? - this will help me because that other script working.

Yeah must have forgotten to remove that extra )
The script is working, so double check your XML file to make sure you are editing the correct script, you must have another one that the rune is loaded from but you are editing a copy or something.
 
Yeah must have forgotten to remove that extra )
The script is working, so double check your XML file to make sure you are editing the correct script, you must have another one that the rune is loaded from but you are editing a copy or something.
I change name of script, rune ID and now I have 100% sure that script don't use
Code:
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1500))
but uses
Code:
timeBetweenExActions = 500
I can change exActions to 1000/5000 anyway rune will be 1s or 5s exhaust.. so maybee u can edit my other script that I posted up? (just need to add HP & MANA heal together.
 
I change name of script, rune ID and now I have 100% sure that script don't use
Code:
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1500))
but uses
Code:
timeBetweenExActions = 500
I can change exActions to 1000/5000 anyway rune will be 1s or 5s exhaust.. so maybee u can edit my other script that I posted up? (just need to add HP & MANA heal together.

That can't be posible since that variable is never called.
Can you upload your actions.xml and the itemid aswell as the script you are using now and ill test it myself.
I highly doubt it unless you have some modified source code or modify the function via Lua.
 
That can't be posible since that variable is never called.
Can you upload your actions.xml and the itemid aswell as the script you are using now and ill test it myself.
I highly doubt it unless you have some modified source code or modify the function via Lua.
full action.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<actions>
    <!-- Quests -->
    <action uniqueid="9600" script="quests/anichest.lua"/>
    <action uniqueid="9601" script="quests/anichest.lua"/>
    <action uniqueid="9602" script="quests/anichest.lua"/>
    <action uniqueid="9603" script="quests/anichest.lua"/>
    <action uniqueid="9604" script="quests/orshachest.lua"/>
    <action uniqueid="9605" script="quests/orshachest.lua"/>
    <action uniqueid="9606" script="quests/orshachest.lua"/>
    <action uniqueid="9607" script="quests/orshachest.lua"/>
    <action uniqueid="9608" script="quests/orshachest.lua"/>
    <action actionid="1234" script="quests/anniLever.lua"/>
    <action actionid="1235" script="quests/orshalever.lua"/>
    <action itemid="1740" script="quests/quests.lua" />
    <action fromid="1747" toid="1749" script="quests/quests.lua" />
    <action uniqueid="30015" script="quests/annihilator.lua" />
   
    <!-- Demon Oak -->
    <action itemid="8293" script="quests/demon oak/demonOak.lua" />
    <action fromuid="9008" touid="9011" script="quests/demon oak/demonOakChest.lua" />
    <action uniqueid="9007" script="quests/demon oak/demonOakGravestone.lua" />
   
    <!-- Tools -->
    <action itemid="10515" script="tools/squeeze.lua"/>
    <action itemid="10512" script="tools/squeeze.lua"/>
    <action itemid="10514" script="tools/squeeze.lua"/>
    <action itemid="2322" script="tools/King.lua"/>
    <action itemid="3955" script="tools/voodoo.lua"/>
    <action itemid="2420" script="tools/machete.lua" />
    <action itemid="2550" script="tools/scythe.lua" />
    <action itemid="2580" script="tools/fishing.lua" allowfaruse="1" />
    <action itemid="2554" script="tools/shovel.lua" />
    <action itemid="2120" script="tools/rope.lua" />
    <action itemid="2553" script="tools/pick.lua" />
    <action actionid="1001" script="vdk.lua"/>
    <action actionid="1002" script="vdd.lua"/>
    <action actionid="1003" script="vds.lua"/>
    <action actionid="1004" script="vdp.lua"/>
    <action actionid="2000" script="quests/a.lua"/> <!--box quests -->
    <action actionid="2001" script="quests/a.lua"/> <!--corpse quests -->
    <action actionid="3013" script="cart.lua"/>
    <action actionid="3014" script="cart.lua"/>
    <action actionid="3015" script="cart.lua"/>
    <action actionid="3016" script="cart.lua"/>
   
    <!-- runes -->
    <action itemid="2280" script="runes/manarune.lua"/>
    <action itemid="2298" script="runes/p.lua"/>
    <action itemid="2273" script="runes/knight uh.lua"/>
    <action itemid="2276" script="runes/knight manarune.lua"/>
    <action itemid="2283" script="runes/tp rune.lua"/>

    <!-- Increase/Decrease ItemId -->
    <action itemid="1873" function="increaseItemId" />
    <action itemid="1874" function="decreaseItemId" />
    <action itemid="1875" function="increaseItemId" />
    <action itemid="1876" function="decreaseItemId" />
    <action itemid="2162" function="increaseItemId" />
    <action itemid="2163" function="decreaseItemId" />
    <action itemid="3947" function="increaseItemId" />
    <action itemid="3948" function="decreaseItemId" />
    <action itemid="1479" function="increaseItemId" />
    <action itemid="1480" function="decreaseItemId" />
    <action itemid="1945" function="increaseItemId" />
    <action itemid="1946" function="decreaseItemId" />
    <action itemid="2037" function="increaseItemId" />
    <action itemid="2038" function="decreaseItemId" />
    <action itemid="2039" function="increaseItemId" />
    <action itemid="2040" function="decreaseItemId" />
    <action itemid="2058" function="increaseItemId" />
    <action itemid="2059" function="decreaseItemId" />
    <action itemid="2060" function="increaseItemId" />
    <action itemid="2061" function="decreaseItemId" />
    <action itemid="2066" function="increaseItemId" />
    <action itemid="2067" function="decreaseItemId" />
    <action itemid="2068" function="increaseItemId" />
    <action itemid="2069" function="decreaseItemId" />
    <action itemid="2064" function="increaseItemId" />
    <action itemid="2065" function="decreaseItemId" />
    <action itemid="2578" function="increaseItemId" />
    <action itemid="2096" function="increaseItemId" />
    <action itemid="2097" function="decreaseItemId" />
    <action itemid="1786" function="increaseItemId" />
    <action itemid="1787" function="decreaseItemId" />
    <action itemid="1788" function="increaseItemId" />
    <action itemid="1789" function="decreaseItemId" />
    <action itemid="1790" function="increaseItemId" />
    <action itemid="1791" function="decreaseItemId" />
    <action itemid="1792" function="increaseItemId" />
    <action itemid="1793" function="decreaseItemId" />
    <action itemid="1634" function="increaseItemId" />
    <action itemid="1635" function="decreaseItemId" />
    <action itemid="1636" function="increaseItemId" />
    <action itemid="1637" function="decreaseItemId" />
    <action itemid="1638" function="increaseItemId" />
    <action itemid="1639" function="decreaseItemId" />
    <action itemid="1640" function="increaseItemId" />
    <action itemid="1641" function="decreaseItemId" />
    <action itemid="5812" function="increaseItemId" />
    <action itemid="5813" function="decreaseItemId" />
    <action itemid="6489" function="increaseItemId" />
    <action itemid="6490" function="decreaseItemId" />
    <action itemid="7058" function="increaseItemId" />
    <action itemid="7059" function="decreaseItemId" />
    <action itemid="8684" function="increaseItemId" />
    <action itemid="8685" function="decreaseItemId" />
    <action itemid="8686" function="increaseItemId" />
    <action itemid="8687" function="decreaseItemId" />
    <action itemid="8688" function="increaseItemId" />
    <action itemid="8689" function="decreaseItemId" />
    <action itemid="8690" function="increaseItemId" />
    <action itemid="8691" function="decreaseItemId" />
    <action itemid="9575" function="increaseItemId" />
    <action itemid="9576" function="decreaseItemId" />
    <action itemid="9577" function="increaseItemId" />
    <action itemid="9578" function="decreaseItemId" />
    <action itemid="9579" function="increaseItemId" />
    <action itemid="9580" function="decreaseItemId" />
    <action itemid="9581" function="increaseItemId" />
    <action itemid="9582" function="decreaseItemId" />
    <action itemid="9747" function="increaseItemId" />
    <action itemid="9748" function="decreaseItemId" />
    <action itemid="9749" function="increaseItemId" />
    <action itemid="9750" function="decreaseItemId" />

    <!-- Food -->
    <action itemid="2362" script="other/food.lua" />
    <action fromid="2666" toid="2691" script="other/food.lua" />
    <action fromid="2695" toid="2696" script="other/food.lua" />
    <action fromid="2787" toid="2796" script="other/food.lua" />
    <action itemid="5097" script="other/food.lua" />
    <action itemid="6125" script="other/food.lua" />
    <action fromid="6278" toid="6279" script="other/food.lua" />
    <action fromid="6393" toid="6394" script="other/food.lua" />
    <action itemid="6501" script="other/food.lua" />
    <action fromid="6541" toid="6545" script="other/food.lua" />
    <action itemid="6569" script="other/food.lua" />
    <action itemid="6574" script="other/food.lua" />
    <action fromid="7158" toid="7159" script="other/food.lua" />
    <action fromid="7372" toid="7377" script="other/food.lua" />
    <action fromid="7909" toid="7910" script="other/food.lua" />
    <action itemid="7963" script="other/food.lua" />
    <action itemid="8112" script="other/food.lua" />
    <action fromid="8838" toid="8845" script="other/food.lua" />
    <action itemid="8847" script="other/food.lua" />
    <action itemid="9005" script="other/food.lua" />
    <action itemid="9114" script="other/food.lua" />
    <action itemid="9996" script="other/food.lua" />
    <action itemid="10454" script="other/food.lua" />
    <action itemid="11246" script="other/food.lua" />
    <action itemid="11370" script="other/food.lua" />
    <action itemid="11429" script="other/food.lua" />
    <action fromid="12415" toid="12418" script="other/food.lua" />
    <action fromid="12637" toid="12639" script="other/food.lua" />

    <!-- Spellbooks -->
    <action itemid="2175" script="other/spellbook.lua" />
    <action itemid="6120" script="other/spellbook.lua" />
    <action fromid="8900" toid="8904" script="other/spellbook.lua" />
    <action itemid="8918" script="other/spellbook.lua" />

    <!-- Other -->
    <action itemid="12328" script="other/full potion.lua"/>
    <action itemid="5785" script="other/VIP Item.lua" />
    <action actionid="5788" script="other/VIP Door.lua" />
    <action actionid="5789" script="other/VIP Door2.lua" />
    <action itemid="9933" script="other/double.lua"/>
    <action itemid="9932" script="other/double.lua"/>
    <action itemid="9969" script="other/b skull.lua"/>
    <action itemid="10309" script="other/r skull.lua"/>
    <action itemid="12544" script="other/stamina.lua"/>
    <action itemid="12466" script="other/dbrain.lua"/>
    <action itemid="5808" script="other/obrain.lua"/>
    <action itemid="2153" script="other/upgrader wand.lua"/>
    <action itemid="2154" script="other/upgrader crossbow.lua"/>
    <action itemid="2155" script="other/upgrader club.lua"/>
    <action itemid="2156" script="other/upgrader axe.lua"/>
    <action itemid="2158" script="other/upgrader sword.lua"/>
    <action itemid="2148" script="other/changegold.lua"/>
    <action itemid="2152" script="other/changegold.lua"/>
    <action itemid="2160" script="other/changegold.lua"/>
    <action itemid="9955" script="other/changegold.lua"/> <!-- 1 VAMPIRE -->
    <action itemid="2157" script="other/changegold.lua"/> <!-- 1 bar of gold -->
    <action itemid="9971" script="other/changegold.lua"/> <!-- 1 Gold Ingot -->
    <action itemid="6578" script="other/partyhat.lua" />
    <action itemid="2114" script="other/piggybank.lua" />
    <action fromid="6570" toid="6571" script="other/surprisebag.lua" />
    <action itemid="6576" script="other/fireworksrocket.lua" />
    <action itemid="2036" script="other/watch.lua" />
    <action fromid="1728" toid="1731" script="other/watch.lua" />
    <action itemid="6572" script="other/partytrumpet.lua" />
    <action itemid="2785" script="other/blueberrybush.lua" />
    <action itemid="2579" script="other/trap.lua" />
    <action fromid="3901" toid="3938" script="other/constructionkits.lua" />
    <action fromid="5086" toid="5088" script="other/constructionkits.lua" />
    <action itemid="6114" script="other/constructionkits.lua" />
    <action itemid="6115" script="other/constructionkits.lua" />
    <action itemid="6372" script="other/constructionkits.lua" />
    <action itemid="6373" script="other/constructionkits.lua" />
    <action itemid="8692" script="other/constructionkits.lua" />
    <action itemid="9974" script="other/constructionkits.lua" />
    <action itemid="11124" script="other/constructionkits.lua" />
    <action itemid="11126" script="other/constructionkits.lua" />
    <action itemid="11133" script="other/constructionkits.lua" />
    <action itemid="11205" script="other/constructionkits.lua" />
    <action fromid="7904" toid="7907" script="other/bed_modification_kits.lua" />
    <action fromid="2070" toid="2078" script="other/music.lua" />
    <action fromid="2080" toid="2085" script="other/music.lua" />
    <action itemid="2332" script="other/music.lua" />
    <action itemid="2364" script="other/music.lua" />
    <action fromid="2367" toid="2368" script="other/music.lua" />
    <action fromid="2370" toid="2373" script="other/music.lua" />
    <action fromid="2041" toid="2042" script="other/decayto.lua" />
    <action fromid="2044" toid="2045" script="other/decayto.lua" />
    <action fromid="2047" toid="2048" script="other/decayto.lua" />
    <action fromid="2050" toid="2055" script="other/decayto.lua" />
    <action itemid="430" script="other/teleport.lua" />
    <action itemid="1369" script="other/teleport.lua" />
    <action itemid="1386" script="other/teleport.lua" />
    <action itemid="3678" script="other/teleport.lua" />
    <action itemid="5543" script="other/teleport.lua" />
    <action fromid="2376" toid="2404" script="other/destroy.lua" />
    <action fromid="2406" toid="2419" script="other/destroy.lua" />
    <action fromid="2421" toid="2453" script="other/destroy.lua" />
    <action fromid="2005" toid="2009" script="other/fluids.lua" />
    <action fromid="2011" toid="2015" script="other/fluids.lua" />
    <action itemid="2023" script="other/fluids.lua" />
    <action itemid="1775" script="other/fluids.lua" />
    <action fromid="2031" toid="2034" script="other/fluids.lua" />
    <action fromid="2574" toid="2577" script="other/fluids.lua" />
    <action fromid="5792" toid="5797" script="other/die.lua" />
    <action itemid="7588" script="other/potions.lua" />
    <action itemid="7589" script="other/potions.lua" />
    <action itemid="7590" script="other/potions.lua" />
    <action itemid="7591" script="other/potions.lua" />
    <action itemid="7618" script="other/potions.lua" />
    <action itemid="7620" script="other/potions.lua" />
    <action itemid="8472" script="other/potions.lua" />
    <action itemid="8473" script="other/potions.lua" />
    <action itemid="8474" script="other/potions.lua" />
    <action itemid="8704" script="other/potions.lua" />
    <action itemid="2692" script="other/createbread.lua" />
    <action itemid="2694" script="other/createbread.lua" />
    <action fromid="6436" toid="6447" script="other/windows.lua" />
    <action fromid="6450" toid="6473" script="other/windows.lua" />
    <action fromid="6788" toid="6791" script="other/windows.lua" />
    <action fromid="7025" toid="7032" script="other/windows.lua" />
    <action fromid="10264" toid="10267" script="other/windows.lua" />
    <action fromid="10488" toid="10491" script="other/windows.lua" />
    <action fromid="5303" toid="5304" script="other/windows.lua" />
    <action fromid="6448" toid="6449" script="other/windows.lua" />
    <action fromid="1209" toid="1214" script="other/doors.lua" />
    <action fromid="1219" toid="1262" script="other/doors.lua" />
    <action fromid="1539" toid="1542" script="other/doors.lua" />
    <action fromid="2086" toid="2092" script="other/doors.lua" />
    <action fromid="3535" toid="3552" script="other/doors.lua" />
    <action fromid="4913" toid="4918" script="other/doors.lua" />
    <action fromid="5082" toid="5085" script="other/doors.lua" />
    <action fromid="5098" toid="5145" script="other/doors.lua" />
    <action fromid="5278" toid="5295" script="other/doors.lua" />
    <action fromid="5515" toid="5518" script="other/doors.lua" />
    <action fromid="5732" toid="5737" script="other/doors.lua" />
    <action fromid="5745" toid="5749" script="other/doors.lua" />
    <action fromid="6192" toid="6209" script="other/doors.lua" />
    <action fromid="6249" toid="6266" script="other/doors.lua" />
    <action fromid="6795" toid="6802" script="other/doors.lua" />
    <action fromid="6891" toid="6908" script="other/doors.lua" />
    <action fromid="7033" toid="7050" script="other/doors.lua" />
    <action fromid="7054" toid="7057" script="other/doors.lua" />
    <action fromid="8541" toid="8558" script="other/doors.lua" />
    <action fromid="9165" toid="9184" script="other/doors.lua" />
    <action fromid="9267" toid="9284" script="other/doors.lua" />
    <action itemid="10032" script="other/doors.lua" />
    <action fromid="10268" toid="10285" script="other/doors.lua" />
    <action fromid="10468" toid="10486" script="other/doors.lua" />
    <action fromid="10775" toid="10777" script="other/doors.lua" />
    <action fromid="10780" toid="10786" script="other/doors.lua" />
    <action fromid="10789" toid="10792" script="other/doors.lua" />
    <action fromid="12092" toid="12105" script="other/doors.lua" />
    <action fromid="12188" toid="12190" script="other/doors.lua" />
    <action fromid="12193" toid="12199" script="other/doors.lua" />
    <action fromid="12202" toid="12205" script="other/doors.lua" />
    <action itemid="3743" script="other/transforms.lua" />
    <action itemid="4404" script="other/transforms.lua" />
    <action fromaid="18488" toaid="18492" script="other/skilltrainer.lua" />
</actions>
id rune 2298

script p.lua
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 3000)

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local mlevel = player:getMagicLevel()
    local hpandma_minimum = (level * 7.8) + (SKILL_MAGLEVEL * 0)
    local hpandma_maximum = (level * 9) + (SKILL_MAGLEVEL * 0)
    if player:getVocation():getId() == 3 or 7 then
        player:addMana(math.random(hpandma_minimum, hpandma_maximum))
        player:addHealth(math.random(hpandma_minimum, hpandma_maximum))
        player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
    else
        return FALSE
    end
return TRUE
end

config.lua
-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 500
 
full action.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<actions>
    <!-- Quests -->
    <action uniqueid="9600" script="quests/anichest.lua"/>
    <action uniqueid="9601" script="quests/anichest.lua"/>
    <action uniqueid="9602" script="quests/anichest.lua"/>
    <action uniqueid="9603" script="quests/anichest.lua"/>
    <action uniqueid="9604" script="quests/orshachest.lua"/>
    <action uniqueid="9605" script="quests/orshachest.lua"/>
    <action uniqueid="9606" script="quests/orshachest.lua"/>
    <action uniqueid="9607" script="quests/orshachest.lua"/>
    <action uniqueid="9608" script="quests/orshachest.lua"/>
    <action actionid="1234" script="quests/anniLever.lua"/>
    <action actionid="1235" script="quests/orshalever.lua"/>
    <action itemid="1740" script="quests/quests.lua" />
    <action fromid="1747" toid="1749" script="quests/quests.lua" />
    <action uniqueid="30015" script="quests/annihilator.lua" />
  
    <!-- Demon Oak -->
    <action itemid="8293" script="quests/demon oak/demonOak.lua" />
    <action fromuid="9008" touid="9011" script="quests/demon oak/demonOakChest.lua" />
    <action uniqueid="9007" script="quests/demon oak/demonOakGravestone.lua" />
  
    <!-- Tools -->
    <action itemid="10515" script="tools/squeeze.lua"/>
    <action itemid="10512" script="tools/squeeze.lua"/>
    <action itemid="10514" script="tools/squeeze.lua"/>
    <action itemid="2322" script="tools/King.lua"/>
    <action itemid="3955" script="tools/voodoo.lua"/>
    <action itemid="2420" script="tools/machete.lua" />
    <action itemid="2550" script="tools/scythe.lua" />
    <action itemid="2580" script="tools/fishing.lua" allowfaruse="1" />
    <action itemid="2554" script="tools/shovel.lua" />
    <action itemid="2120" script="tools/rope.lua" />
    <action itemid="2553" script="tools/pick.lua" />
    <action actionid="1001" script="vdk.lua"/>
    <action actionid="1002" script="vdd.lua"/>
    <action actionid="1003" script="vds.lua"/>
    <action actionid="1004" script="vdp.lua"/>
    <action actionid="2000" script="quests/a.lua"/> <!--box quests -->
    <action actionid="2001" script="quests/a.lua"/> <!--corpse quests -->
    <action actionid="3013" script="cart.lua"/>
    <action actionid="3014" script="cart.lua"/>
    <action actionid="3015" script="cart.lua"/>
    <action actionid="3016" script="cart.lua"/>
  
    <!-- runes -->
    <action itemid="2280" script="runes/manarune.lua"/>
    <action itemid="2298" script="runes/p.lua"/>
    <action itemid="2273" script="runes/knight uh.lua"/>
    <action itemid="2276" script="runes/knight manarune.lua"/>
    <action itemid="2283" script="runes/tp rune.lua"/>

    <!-- Increase/Decrease ItemId -->
    <action itemid="1873" function="increaseItemId" />
    <action itemid="1874" function="decreaseItemId" />
    <action itemid="1875" function="increaseItemId" />
    <action itemid="1876" function="decreaseItemId" />
    <action itemid="2162" function="increaseItemId" />
    <action itemid="2163" function="decreaseItemId" />
    <action itemid="3947" function="increaseItemId" />
    <action itemid="3948" function="decreaseItemId" />
    <action itemid="1479" function="increaseItemId" />
    <action itemid="1480" function="decreaseItemId" />
    <action itemid="1945" function="increaseItemId" />
    <action itemid="1946" function="decreaseItemId" />
    <action itemid="2037" function="increaseItemId" />
    <action itemid="2038" function="decreaseItemId" />
    <action itemid="2039" function="increaseItemId" />
    <action itemid="2040" function="decreaseItemId" />
    <action itemid="2058" function="increaseItemId" />
    <action itemid="2059" function="decreaseItemId" />
    <action itemid="2060" function="increaseItemId" />
    <action itemid="2061" function="decreaseItemId" />
    <action itemid="2066" function="increaseItemId" />
    <action itemid="2067" function="decreaseItemId" />
    <action itemid="2068" function="increaseItemId" />
    <action itemid="2069" function="decreaseItemId" />
    <action itemid="2064" function="increaseItemId" />
    <action itemid="2065" function="decreaseItemId" />
    <action itemid="2578" function="increaseItemId" />
    <action itemid="2096" function="increaseItemId" />
    <action itemid="2097" function="decreaseItemId" />
    <action itemid="1786" function="increaseItemId" />
    <action itemid="1787" function="decreaseItemId" />
    <action itemid="1788" function="increaseItemId" />
    <action itemid="1789" function="decreaseItemId" />
    <action itemid="1790" function="increaseItemId" />
    <action itemid="1791" function="decreaseItemId" />
    <action itemid="1792" function="increaseItemId" />
    <action itemid="1793" function="decreaseItemId" />
    <action itemid="1634" function="increaseItemId" />
    <action itemid="1635" function="decreaseItemId" />
    <action itemid="1636" function="increaseItemId" />
    <action itemid="1637" function="decreaseItemId" />
    <action itemid="1638" function="increaseItemId" />
    <action itemid="1639" function="decreaseItemId" />
    <action itemid="1640" function="increaseItemId" />
    <action itemid="1641" function="decreaseItemId" />
    <action itemid="5812" function="increaseItemId" />
    <action itemid="5813" function="decreaseItemId" />
    <action itemid="6489" function="increaseItemId" />
    <action itemid="6490" function="decreaseItemId" />
    <action itemid="7058" function="increaseItemId" />
    <action itemid="7059" function="decreaseItemId" />
    <action itemid="8684" function="increaseItemId" />
    <action itemid="8685" function="decreaseItemId" />
    <action itemid="8686" function="increaseItemId" />
    <action itemid="8687" function="decreaseItemId" />
    <action itemid="8688" function="increaseItemId" />
    <action itemid="8689" function="decreaseItemId" />
    <action itemid="8690" function="increaseItemId" />
    <action itemid="8691" function="decreaseItemId" />
    <action itemid="9575" function="increaseItemId" />
    <action itemid="9576" function="decreaseItemId" />
    <action itemid="9577" function="increaseItemId" />
    <action itemid="9578" function="decreaseItemId" />
    <action itemid="9579" function="increaseItemId" />
    <action itemid="9580" function="decreaseItemId" />
    <action itemid="9581" function="increaseItemId" />
    <action itemid="9582" function="decreaseItemId" />
    <action itemid="9747" function="increaseItemId" />
    <action itemid="9748" function="decreaseItemId" />
    <action itemid="9749" function="increaseItemId" />
    <action itemid="9750" function="decreaseItemId" />

    <!-- Food -->
    <action itemid="2362" script="other/food.lua" />
    <action fromid="2666" toid="2691" script="other/food.lua" />
    <action fromid="2695" toid="2696" script="other/food.lua" />
    <action fromid="2787" toid="2796" script="other/food.lua" />
    <action itemid="5097" script="other/food.lua" />
    <action itemid="6125" script="other/food.lua" />
    <action fromid="6278" toid="6279" script="other/food.lua" />
    <action fromid="6393" toid="6394" script="other/food.lua" />
    <action itemid="6501" script="other/food.lua" />
    <action fromid="6541" toid="6545" script="other/food.lua" />
    <action itemid="6569" script="other/food.lua" />
    <action itemid="6574" script="other/food.lua" />
    <action fromid="7158" toid="7159" script="other/food.lua" />
    <action fromid="7372" toid="7377" script="other/food.lua" />
    <action fromid="7909" toid="7910" script="other/food.lua" />
    <action itemid="7963" script="other/food.lua" />
    <action itemid="8112" script="other/food.lua" />
    <action fromid="8838" toid="8845" script="other/food.lua" />
    <action itemid="8847" script="other/food.lua" />
    <action itemid="9005" script="other/food.lua" />
    <action itemid="9114" script="other/food.lua" />
    <action itemid="9996" script="other/food.lua" />
    <action itemid="10454" script="other/food.lua" />
    <action itemid="11246" script="other/food.lua" />
    <action itemid="11370" script="other/food.lua" />
    <action itemid="11429" script="other/food.lua" />
    <action fromid="12415" toid="12418" script="other/food.lua" />
    <action fromid="12637" toid="12639" script="other/food.lua" />

    <!-- Spellbooks -->
    <action itemid="2175" script="other/spellbook.lua" />
    <action itemid="6120" script="other/spellbook.lua" />
    <action fromid="8900" toid="8904" script="other/spellbook.lua" />
    <action itemid="8918" script="other/spellbook.lua" />

    <!-- Other -->
    <action itemid="12328" script="other/full potion.lua"/>
    <action itemid="5785" script="other/VIP Item.lua" />
    <action actionid="5788" script="other/VIP Door.lua" />
    <action actionid="5789" script="other/VIP Door2.lua" />
    <action itemid="9933" script="other/double.lua"/>
    <action itemid="9932" script="other/double.lua"/>
    <action itemid="9969" script="other/b skull.lua"/>
    <action itemid="10309" script="other/r skull.lua"/>
    <action itemid="12544" script="other/stamina.lua"/>
    <action itemid="12466" script="other/dbrain.lua"/>
    <action itemid="5808" script="other/obrain.lua"/>
    <action itemid="2153" script="other/upgrader wand.lua"/>
    <action itemid="2154" script="other/upgrader crossbow.lua"/>
    <action itemid="2155" script="other/upgrader club.lua"/>
    <action itemid="2156" script="other/upgrader axe.lua"/>
    <action itemid="2158" script="other/upgrader sword.lua"/>
    <action itemid="2148" script="other/changegold.lua"/>
    <action itemid="2152" script="other/changegold.lua"/>
    <action itemid="2160" script="other/changegold.lua"/>
    <action itemid="9955" script="other/changegold.lua"/> <!-- 1 VAMPIRE -->
    <action itemid="2157" script="other/changegold.lua"/> <!-- 1 bar of gold -->
    <action itemid="9971" script="other/changegold.lua"/> <!-- 1 Gold Ingot -->
    <action itemid="6578" script="other/partyhat.lua" />
    <action itemid="2114" script="other/piggybank.lua" />
    <action fromid="6570" toid="6571" script="other/surprisebag.lua" />
    <action itemid="6576" script="other/fireworksrocket.lua" />
    <action itemid="2036" script="other/watch.lua" />
    <action fromid="1728" toid="1731" script="other/watch.lua" />
    <action itemid="6572" script="other/partytrumpet.lua" />
    <action itemid="2785" script="other/blueberrybush.lua" />
    <action itemid="2579" script="other/trap.lua" />
    <action fromid="3901" toid="3938" script="other/constructionkits.lua" />
    <action fromid="5086" toid="5088" script="other/constructionkits.lua" />
    <action itemid="6114" script="other/constructionkits.lua" />
    <action itemid="6115" script="other/constructionkits.lua" />
    <action itemid="6372" script="other/constructionkits.lua" />
    <action itemid="6373" script="other/constructionkits.lua" />
    <action itemid="8692" script="other/constructionkits.lua" />
    <action itemid="9974" script="other/constructionkits.lua" />
    <action itemid="11124" script="other/constructionkits.lua" />
    <action itemid="11126" script="other/constructionkits.lua" />
    <action itemid="11133" script="other/constructionkits.lua" />
    <action itemid="11205" script="other/constructionkits.lua" />
    <action fromid="7904" toid="7907" script="other/bed_modification_kits.lua" />
    <action fromid="2070" toid="2078" script="other/music.lua" />
    <action fromid="2080" toid="2085" script="other/music.lua" />
    <action itemid="2332" script="other/music.lua" />
    <action itemid="2364" script="other/music.lua" />
    <action fromid="2367" toid="2368" script="other/music.lua" />
    <action fromid="2370" toid="2373" script="other/music.lua" />
    <action fromid="2041" toid="2042" script="other/decayto.lua" />
    <action fromid="2044" toid="2045" script="other/decayto.lua" />
    <action fromid="2047" toid="2048" script="other/decayto.lua" />
    <action fromid="2050" toid="2055" script="other/decayto.lua" />
    <action itemid="430" script="other/teleport.lua" />
    <action itemid="1369" script="other/teleport.lua" />
    <action itemid="1386" script="other/teleport.lua" />
    <action itemid="3678" script="other/teleport.lua" />
    <action itemid="5543" script="other/teleport.lua" />
    <action fromid="2376" toid="2404" script="other/destroy.lua" />
    <action fromid="2406" toid="2419" script="other/destroy.lua" />
    <action fromid="2421" toid="2453" script="other/destroy.lua" />
    <action fromid="2005" toid="2009" script="other/fluids.lua" />
    <action fromid="2011" toid="2015" script="other/fluids.lua" />
    <action itemid="2023" script="other/fluids.lua" />
    <action itemid="1775" script="other/fluids.lua" />
    <action fromid="2031" toid="2034" script="other/fluids.lua" />
    <action fromid="2574" toid="2577" script="other/fluids.lua" />
    <action fromid="5792" toid="5797" script="other/die.lua" />
    <action itemid="7588" script="other/potions.lua" />
    <action itemid="7589" script="other/potions.lua" />
    <action itemid="7590" script="other/potions.lua" />
    <action itemid="7591" script="other/potions.lua" />
    <action itemid="7618" script="other/potions.lua" />
    <action itemid="7620" script="other/potions.lua" />
    <action itemid="8472" script="other/potions.lua" />
    <action itemid="8473" script="other/potions.lua" />
    <action itemid="8474" script="other/potions.lua" />
    <action itemid="8704" script="other/potions.lua" />
    <action itemid="2692" script="other/createbread.lua" />
    <action itemid="2694" script="other/createbread.lua" />
    <action fromid="6436" toid="6447" script="other/windows.lua" />
    <action fromid="6450" toid="6473" script="other/windows.lua" />
    <action fromid="6788" toid="6791" script="other/windows.lua" />
    <action fromid="7025" toid="7032" script="other/windows.lua" />
    <action fromid="10264" toid="10267" script="other/windows.lua" />
    <action fromid="10488" toid="10491" script="other/windows.lua" />
    <action fromid="5303" toid="5304" script="other/windows.lua" />
    <action fromid="6448" toid="6449" script="other/windows.lua" />
    <action fromid="1209" toid="1214" script="other/doors.lua" />
    <action fromid="1219" toid="1262" script="other/doors.lua" />
    <action fromid="1539" toid="1542" script="other/doors.lua" />
    <action fromid="2086" toid="2092" script="other/doors.lua" />
    <action fromid="3535" toid="3552" script="other/doors.lua" />
    <action fromid="4913" toid="4918" script="other/doors.lua" />
    <action fromid="5082" toid="5085" script="other/doors.lua" />
    <action fromid="5098" toid="5145" script="other/doors.lua" />
    <action fromid="5278" toid="5295" script="other/doors.lua" />
    <action fromid="5515" toid="5518" script="other/doors.lua" />
    <action fromid="5732" toid="5737" script="other/doors.lua" />
    <action fromid="5745" toid="5749" script="other/doors.lua" />
    <action fromid="6192" toid="6209" script="other/doors.lua" />
    <action fromid="6249" toid="6266" script="other/doors.lua" />
    <action fromid="6795" toid="6802" script="other/doors.lua" />
    <action fromid="6891" toid="6908" script="other/doors.lua" />
    <action fromid="7033" toid="7050" script="other/doors.lua" />
    <action fromid="7054" toid="7057" script="other/doors.lua" />
    <action fromid="8541" toid="8558" script="other/doors.lua" />
    <action fromid="9165" toid="9184" script="other/doors.lua" />
    <action fromid="9267" toid="9284" script="other/doors.lua" />
    <action itemid="10032" script="other/doors.lua" />
    <action fromid="10268" toid="10285" script="other/doors.lua" />
    <action fromid="10468" toid="10486" script="other/doors.lua" />
    <action fromid="10775" toid="10777" script="other/doors.lua" />
    <action fromid="10780" toid="10786" script="other/doors.lua" />
    <action fromid="10789" toid="10792" script="other/doors.lua" />
    <action fromid="12092" toid="12105" script="other/doors.lua" />
    <action fromid="12188" toid="12190" script="other/doors.lua" />
    <action fromid="12193" toid="12199" script="other/doors.lua" />
    <action fromid="12202" toid="12205" script="other/doors.lua" />
    <action itemid="3743" script="other/transforms.lua" />
    <action itemid="4404" script="other/transforms.lua" />
    <action fromaid="18488" toaid="18492" script="other/skilltrainer.lua" />
</actions>
id rune 2298

script p.lua
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 3000)

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local mlevel = player:getMagicLevel()
    local hpandma_minimum = (level * 7.8) + (SKILL_MAGLEVEL * 0)
    local hpandma_maximum = (level * 9) + (SKILL_MAGLEVEL * 0)
    if player:getVocation():getId() == 3 or 7 then
        player:addMana(math.random(hpandma_minimum, hpandma_maximum))
        player:addHealth(math.random(hpandma_minimum, hpandma_maximum))
        player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
    else
        return FALSE
    end
return TRUE
end

config.lua
-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 500

Do a serach for CONDITION_EXHAUST and see if there is some overwrite function for the conditions, never had this problem myself.
Also try to restart the computer if something went really wrong with the cache or something

Also use the new functions if you have something in your compat.lua that could be broke;
Lua:
local exhaust = Condition(CONDITION_EXHAUST)
exhaust:setParameter(CONDITION_PARAM_TICKS, 3000)
 
Do a serach for CONDITION_EXHAUST and see if there is some overwrite function for the conditions, never had this problem myself.
Also try to restart the computer if something went really wrong with the cache or something

Also use the new functions if you have something in your compat.lua that could be broke;
Lua:
local exhaust = Condition(CONDITION_EXHAUST)
exhaust:setParameter(CONDITION_PARAM_TICKS, 3000)
I changed script to
Code:
local exhaust = Condition(CONDITION_EXHAUST)
exhaust:setParameter(CONDITION_PARAM_TICKS, 3000)

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local mlevel = player:getMagicLevel()
    local hpandma_minimum = (level * 7.8) + (SKILL_MAGLEVEL * 0)
    local hpandma_maximum = (level * 9) + (SKILL_MAGLEVEL * 0)
    if player:getVocation():getId() == 3 or 7 then
        player:addMana(math.random(hpandma_minimum, hpandma_maximum))
        player:addHealth(math.random(hpandma_minimum, hpandma_maximum))
        player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
    else
        return FALSE
    end
return TRUE
end

/ still the same - what u mean search for CONDITION_EXHAUST? where should I search? in .cpp files?
my compat.lua
Untitled Post
 
I changed script to
Code:
local exhaust = Condition(CONDITION_EXHAUST)
exhaust:setParameter(CONDITION_PARAM_TICKS, 3000)

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local level = player:getLevel()
    local mlevel = player:getMagicLevel()
    local hpandma_minimum = (level * 7.8) + (SKILL_MAGLEVEL * 0)
    local hpandma_maximum = (level * 9) + (SKILL_MAGLEVEL * 0)
    if player:getVocation():getId() == 3 or 7 then
        player:addMana(math.random(hpandma_minimum, hpandma_maximum))
        player:addHealth(math.random(hpandma_minimum, hpandma_maximum))
        player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
    else
        return FALSE
    end
return TRUE
end

/ still the same - what u mean search for CONDITION_EXHAUST? where should I search? in .cpp files?
my compat.lua
Untitled Post

Use ex notepad++ and do a folder serach for CONDITION_EXHAUST
No in your data folder.
 
Use ex notepad++ and do a folder serach for CONDITION_EXHAUST
No in your data folder.
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
if player:getCondition(CONDITION_EXHAUST_HEAL) then
CONDITION_EXHAUST = CONDITION_EXHAUST_WEAPON
CONDITION_EXHAUST = CONDITION_EXHAUST_WEAPON
local exhaust = createConditionObject(CONDITION_EXHAUST)
local exhaust = createConditionObject(CONDITION_EXHAUST)

9 results in 7 files/ condition_exhaust 2 results in compat.lua

in my compat.lua I have this
Code:
CONDITION_EXHAUST = CONDITION_EXHAUST_WEAPON
 
Last edited:
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
local exhaust = Condition(CONDITION_EXHAUST_HEAL)
if player:getCondition(CONDITION_EXHAUST_HEAL) then
CONDITION_EXHAUST = CONDITION_EXHAUST_WEAPON
CONDITION_EXHAUST = CONDITION_EXHAUST_WEAPON
local exhaust = createConditionObject(CONDITION_EXHAUST)
local exhaust = createConditionObject(CONDITION_EXHAUST)

9 results in 7 files/ condition_exhaust 2 results in compat.lua

in my compat.lua I have this
Code:
CONDITION_EXHAUST = CONDITION_EXHAUST_WEAPON

Do you have any problems with any other scripts that uses that condition?
 
no, I don't anyway I solve it myself just editing my other manarune script which I posted up and add healing HP together with mana / anyway thanks for u help and time good man.
 
you're not even adding it to the player, all you have is the condition variable and params set, but you're not checking for it nor setting the condition to the player
 
The problem consist on function, you are using action and not Spell, your maná rune works like shovel, machete, potions, and not like Runes, try to use it on spells.XML and not un actions.XML this may work for yoy
 
Back
Top