Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MIN = 2000
- local MAX = 3000
- local MIN1 = 2500
- local MAX1 = 3100
- local MIN2 = 2500
- local MAX2 = 3200
- local MIN3 = 2500
- local MAX3 = 3300
- local MIN4 = 2500
- local MAX4 = 3400
- local MIN5 = 2500
- local MAX5 = 3500
- local MIN6 = 2500
- local MAX6 = 3600
- local MIN7 = 2500
- local MAX7 = 3700
- local MIN8 = 2500
- local MAX8 = 3800
- local MIN9 = 2500
- local MAX9 = 3900
- local MIN10 = 2000
- local MAX10 = 3500
- local MIN11 = 2500
- local MAX11 = 4500
- local MIN12 = 2400
- local MAX12 = 4800
- local EMPTY_POTION = 7634
- 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((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 (getPlayerLevel(itemEx.uid) <= 100) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 200) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 300) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 400) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 500) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN, MAX))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 600) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN, MAX1))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 700) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN1, MAX1))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 800) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN2, MAX2))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 900) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN3, MAX3))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1000) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN4, MAX4))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1100) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN5, MAX5))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1200) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN6, MAX6))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1300) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN7, MAX7))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1400) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN8, MAX8))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1500) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN9, MAX9))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1600) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN10, MAX10))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1700) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN11, MAX11))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- if (getPlayerLevel(itemEx.uid) <= 1800) then --- level maximo
- doPlayerAddMana(itemEx.uid, math.random(MIN12, MAX12))
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return FALSE
- end
- doAddCondition(cid, exhaust)
- doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
- doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
- doRemoveItem(item.uid, 1)
- return TRUE
- end
Add Comment
Please, Sign In to add comment