Ir para conteúdo

Exusted Em Potion


frankvp

Posts Recomendados

bem no config ta assim:

-- Item usage

timeBetweenActions = 100

timeBetweenExActions = 100

checkCorpseOwner = "yes"

hotkeyAimbotEnabled = "yes"

maximumDoorLevel = 500

 

Script da potion

 

local MIN = 200

local MAX = 300

local EMPTY_POTION = 7635

 

local exhaust = createConditionObject(CONDITION_EXHAUST)

setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 500000))

 

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((not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then

doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)

return TRUE

end

 

if doPlayerAddMana(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

 

 

ja coloquei ate ZERO

e nada

valeu

Link para o comentário
Compartilhar em outros sites

MALZ, bem quero colocar para beber mais lento o exausted ta zero nao sei como o char nao morre afogado .... hahaha

já coloquei esta linha * setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 500000))* assim e

*setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 0)) * assim :/

 

bem a versão é :

projeto XvX Server Config

sqlDatabase = theforgottenserver

sqlFile = forgottenserver.s3db

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...