Frosbite
Active User
- Joined
- Dec 20, 2014
- Messages
- 99
- Reaction score
- 8
Witam serdecznie, przedstawiam <?atwy> skrypt na przedmiot daj?cy okre?lon? ilo?? hp i mp w %
PercentOfMana - ile ma dawa? MP w %
PercentOfHealth - ile ma dawa? HP w%
[LUA]local c = {
percentOfMana = 90,
percentOfHealth = 90,
effect = CONST_ME_MAGIC_RED,
sayText = 'Power Is back.',
talkType = TALKTYPE_MONSTER,
exhNumber = 7821,
exhSeconds = 1,
removeSenzu = false
}
function onUse(cid, item, frompos, item2, topos)
local position = getPlayerPosition(cid)
if os.time() > getPlayerStorageValue(cid, c.exhNumber) then
if c.removeSenzu then
doRemoveItem(item.uid, 1)
end
doSendMagicEffect(getThingPos(cid), c.effect)
local mana, health = (getCreatureMaxMana(cid) * c.percentOfMana) / 100, (getCreatureMaxHealth(cid) * c.percentOfHealth) / 100
doPlayerAddMana(cid, mana)
doCreatureAddHealth(cid, health)
doCreatureSay(cid, c.sayText, c.talkType)
doSendAnimatedText(getThingPos(cid), mana, TEXTCOLOR_GREEN)
return setPlayerStorageValue(cid, c.exhNumber, os.time() + c.exhSeconds)
else
return doPlayerSendCancel(cid, 'You are exhausted.') and doSendMagicEffect(position, CONST_ME_POFF)
end
return false
end [/LUA]
Skrypt sam w sobie przydatny do Mod Server?w - Tak wiem jest tego od groma, powiedzmy ?e to od?wie?enie skryptu tak aby nikt du?o nie musia? szuka?!
Pozdrawiam
PercentOfMana - ile ma dawa? MP w %
PercentOfHealth - ile ma dawa? HP w%
[LUA]local c = {
percentOfMana = 90,
percentOfHealth = 90,
effect = CONST_ME_MAGIC_RED,
sayText = 'Power Is back.',
talkType = TALKTYPE_MONSTER,
exhNumber = 7821,
exhSeconds = 1,
removeSenzu = false
}
function onUse(cid, item, frompos, item2, topos)
local position = getPlayerPosition(cid)
if os.time() > getPlayerStorageValue(cid, c.exhNumber) then
if c.removeSenzu then
doRemoveItem(item.uid, 1)
end
doSendMagicEffect(getThingPos(cid), c.effect)
local mana, health = (getCreatureMaxMana(cid) * c.percentOfMana) / 100, (getCreatureMaxHealth(cid) * c.percentOfHealth) / 100
doPlayerAddMana(cid, mana)
doCreatureAddHealth(cid, health)
doCreatureSay(cid, c.sayText, c.talkType)
doSendAnimatedText(getThingPos(cid), mana, TEXTCOLOR_GREEN)
return setPlayerStorageValue(cid, c.exhNumber, os.time() + c.exhSeconds)
else
return doPlayerSendCancel(cid, 'You are exhausted.') and doSendMagicEffect(position, CONST_ME_POFF)
end
return false
end [/LUA]
Skrypt sam w sobie przydatny do Mod Server?w - Tak wiem jest tego od groma, powiedzmy ?e to od?wie?enie skryptu tak aby nikt du?o nie musia? szuka?!
Pozdrawiam
Dragon Ball Related v2.0 Coming Soon