Kanqwerty
New Member
- Joined
- Jan 2, 2017
- Messages
- 5
- Reaction score
- 0
Hello! I just added manarune and hprune for my ots and it works, but if you set these runes on hotkey and use it there will be always text "Using one of 0 spell runes" even when there are many more of them in backpack.
I would love to let it show how many runes are still in backpack after using one.
Here's script for manarune:
I would love to let it show how many runes are still in backpack after using one.
Here's script for manarune:
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local mlevel = getPlayerMagLevel(cid)
local mana_minimum = (level * 1) + (mlevel * 4) + 75
local mana_maximum = (level * 1) + (mlevel * 4) + 80
local mana_add = math.random(mana_minimum, mana_maximum)
if(getPlayerItemCount(cid, 2275) >= 1) then
doPlayerRemoveItem(cid,2275,1)
doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Mana UP!", TALKTYPE_ORANGE_1)
return TRUE
end
end