What's new

Potrzebuje skrypt na potiona, kt?ry si? nie ko?czy.

Status
Not open for further replies.

kaacpi

Senior User
Joined
Jun 27, 2009
Messages
510
Reaction score
21
Age
27
tak jak w temacie potrzebuje potiona co si? nie ko?czy.za pomoc dam reputa.
Jak ju? by? taki temat to sry.
@edit Mo?ecie poziedziec jak zrobic zeby sie nie ko?czy? great mana potion
 

kaacpi

Senior User
Joined
Jun 27, 2009
Messages
510
Reaction score
21
Age
27
Odp: Potrzebuje skrypt na potiona, kt?ry si? nie ko?czy.

Od?wie?am<znaczki>.
 
Joined
Dec 11, 2009
Messages
16
Reaction score
0
Odp: Potrzebuje skrypt na potiona, kt?ry si? nie ko?czy.

Code:
local MIN = 50
local MAX = 100
local EMPTY_POTION = 7636

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end

if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end

if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
return FALSE
end

doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, EMPTY_POTION)
return TRUE
end
doTransformItem(item.uid, EMPTY_POTION) - Wywal t? linijk?. W ka?dym pocie.
Pozdrawiam
 
Status
Not open for further replies.
Top