{rosi?bym o pomoc z skryptem na pota tak by dawal 50% hp/mp i okre?lona ilo?? hp/mp.
mam tu script dzia?aj?cy na pota daje full mp/hp. Pr?bowa?em ro?nych sposob?w szuka?em na forum i nic dzia?aj?cego nie znalaz?em
function onUse(cid, item, fromPosition, itemEx, toPosition)
ITEM = 2673
local storage = 50000
local wait = 0.7
if fromPosition.x ~= CONTAINER_POSITION and exhaustion.get(cid, storage) == FALSE then
REG_HEALTH = getCreatureMaxHealth(cid)
REG_MANA = getPlayerMaxMana(cid)
doPlayerAddMana(cid, REG_MANA)
doCreatureAddHealth(cid, REG_HEALTH)
doCreatureSay(cid, 'heah !', TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
exhaustion.set(cid, storage, wait)
elseif item.itemid == ITEM and exhaustion.get(cid, storage) == FALSE then
REG_HEALTH = getCreatureMaxHealth(cid)
REG_MANA = getPlayerMaxMana(cid)
doPlayerAddMana(cid, REG_MANA)
doCreatureAddHealth(cid, REG_HEALTH)
doCreatureSay(cid, 'heah !', TALKTYPE_ORANGE_1)
doRemoveItem(item.uid,1)
exhaustion.set(cid, storage, wait)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
return TRUE
end
Dzi?ki. Pozdrawiam
mam tu script dzia?aj?cy na pota daje full mp/hp. Pr?bowa?em ro?nych sposob?w szuka?em na forum i nic dzia?aj?cego nie znalaz?em
function onUse(cid, item, fromPosition, itemEx, toPosition)
ITEM = 2673
local storage = 50000
local wait = 0.7
if fromPosition.x ~= CONTAINER_POSITION and exhaustion.get(cid, storage) == FALSE then
REG_HEALTH = getCreatureMaxHealth(cid)
REG_MANA = getPlayerMaxMana(cid)
doPlayerAddMana(cid, REG_MANA)
doCreatureAddHealth(cid, REG_HEALTH)
doCreatureSay(cid, 'heah !', TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
exhaustion.set(cid, storage, wait)
elseif item.itemid == ITEM and exhaustion.get(cid, storage) == FALSE then
REG_HEALTH = getCreatureMaxHealth(cid)
REG_MANA = getPlayerMaxMana(cid)
doPlayerAddMana(cid, REG_MANA)
doCreatureAddHealth(cid, REG_HEALTH)
doCreatureSay(cid, 'heah !', TALKTYPE_ORANGE_1)
doRemoveItem(item.uid,1)
exhaustion.set(cid, storage, wait)
else
doPlayerSendCancel(cid, "You are exhausted.")
end
return TRUE
end
Dzi?ki. Pozdrawiam