MA
pedido

Strong mana infinita (apenas essa potion)

Por markim1986, 07 de jan. de 2013 em Scripts

strong mana infinita (apenas
script
5
1.4k
markim1986M
07 de janeiro de 2013 às 21:53

Nome do Script: Strong mana infinita (apenas essa potion)

Tipo do Script: Nao sei!

Versão Utilizada: 8.60

Servidor Utilizado: TheLostServer

Nível de Experiência: Complicado.

Informações Extras: --

 

Gostaria de colocar apenas essa potion infinita deixando o resto normal, tem como?

 

obrigado

 

 

Segue o script da strong.

 

local MIN = 110
local MAX = 190
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 isPaladin(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 50) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
 doCreatureSay(itemEx.uid, "Only sorcerers, druids and paladins of level 50 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)
	doRemoveItem(item.uid, 1)
	doPlayerAddItem(cid, EMPTY_POTION, 1)
	pot_count = getPlayerItemCount(cid, EMPTY_POTION)
	doPlayerRemoveItem(cid, EMPTY_POTION, pot_count)
	doPlayerAddItem(cid, EMPTY_POTION, pot_count)
	return TRUE
end

SmiXS
07 de janeiro de 2013 às 22:05
local MIN = 110
local MAX = 190
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 isPaladin(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 50) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
 doCreatureSay(itemEx.uid, "Only sorcerers, druids and paladins of level 50 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)
 return TRUE
end

15790911
07 de janeiro de 2013 às 22:09

Creio que mudando esta linha:

local EMPTY_POTION = 7634

 

 

Trocando o 7634 pelo Id da potion (cheia) traria o resultado que você deseja!

markim1986M
07 de janeiro de 2013 às 22:12

local MIN = 110
local MAX = 190
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 isPaladin(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 50) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
 doCreatureSay(itemEx.uid, "Only sorcerers, druids and paladins of level 50 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)
 return TRUE
end

 

 

100%, podem mover o topic

REP+

SlicerS
07 de janeiro de 2013 às 22:33

sanado, movido