So im working with my GSP to heal even more for higher levels, when u reach for example 400+
I have this script for UHP
And this script for GMP
Now here comes the problem, ive made the script for gsp heal both HP/MP but it only shows how much mana it heals. How can i make it with this script to still show both hp/mp that the original GSP has?
GSP script
Thanks in advance!
Sami
I have this script for UHP
Code:
local runes = {
[8473] = {
voc = {4, 8},
min = 'level * 4 + maglv * 6 - 5',
max = 'level * 4 + maglv * 7'
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local i = runes[item.itemid]
if isInArray(i.voc, getPlayerVocation(cid)) then
if isPlayer(itemEx.uid) then
level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
doCreatureAddHealth(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 0)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
end
else
doPlayerSendCancel(cid, 'Your vocation cannot use this rune.')
end
return true
end
And this script for GMP
Code:
local runes = {
[7590] = {
voc = {1, 2, 5, 6},
min = 'level * 2 + maglv * 3 - 3.5',
max = 'level * 2 + maglv * 4'
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local i = runes[item.itemid]
if isInArray(i.voc, getPlayerVocation(cid)) then
if isPlayer(itemEx.uid) then
level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
doCreatureAddMana(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 0)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
end
else
doPlayerSendCancel(cid, 'Your vocation cannot use this rune.')
end
return true
end
Now here comes the problem, ive made the script for gsp heal both HP/MP but it only shows how much mana it heals. How can i make it with this script to still show both hp/mp that the original GSP has?
GSP script
Code:
local runes = {
[8472] = {
voc = {3, 7},
min = 'level * 2 + maglv * 3 - 3.5',
max = 'level * 2 + maglv * 4'
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local i = runes[item.itemid]
if isInArray(i.voc, getPlayerVocation(cid)) then
if isPlayer(itemEx.uid) then
level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
doCreatureAddMana(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureAddHealth(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_GREEN)
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 0)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
end
else
doPlayerSendCancel(cid, 'Your vocation cannot use this rune.')
end
return true
end
Thanks in advance!
Sami