• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action [8.11+] infinite potions

Trepido

Kreyzol
Joined
Aug 11, 2008
Messages
114
Reaction score
0
Location
Poland
Ok Lets Do It =]ITs Me Script I Make It To My Ots
kk Make Potions.lua and to potions adds
Code:
local ultimateHealthPot = 8473
local greatHealthPot = 7591
local greatManaPot = 7590
local greatSpiritPot = 8472
local strongHealthPot = 7588
local strongManaPot = 7589
local healthPot = 7618
local manaPot = 7620

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if itemEx.uid ~= cid or itemEx.itemid ~= 1 then
		return TRUE
	end

	if(item.itemid == healthPot) then
		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 100, 200, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)

	elseif(item.itemid == manaPot) then
		if(doTargetCombatMana(0, cid, 70, 130, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)

	elseif(item.itemid == strongHealthPot) then
		if (not(isKnight(cid) or isPaladin(cid)) or (getPlayerLevel(cid) < 50)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by paladins and knights of level 50 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)


	elseif(item.itemid == strongManaPot) then
		if (not(isSorcerer(cid) or isDruid(cid) or isPaladin(cid)) or (getPlayerLevel(cid) < 50)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by sorcerers, druids and paladins of level 50 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatMana(0, cid, 110, 190, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)

	elseif(item.itemid == greatSpiritPot) then
		if (not(isPaladin(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by paladins of level 80 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE) == LUA_ERROR or doTargetCombatMana(0, cid, 110, 190, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)

	elseif(item.itemid == greatHealthPot) then
		if (not(isKnight(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by knights of level 80 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 500, 700, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)

	elseif(item.itemid == greatManaPot) then
		if (not(isSorcerer(cid) or isDruid(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by sorcerers and druids of level 80 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatMana(0, cid, 200, 300, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)

	elseif(item.itemid == ultimateHealthPot) then
		if (not(isKnight(cid)) or (getPlayerLevel(cid) < 130)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by knights of level 130 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 800, 1000, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
and now to actions.xml add
Code:
	<action itemid="7588" script="potions.lua" />
	<action itemid="7589" script="potions.lua" />
	<action itemid="7590" script="potions.lua" />
	<action itemid="7591" script="potions.lua" />
	<action itemid="7618" script="potions.lua" />
	<action itemid="7620" script="potions.lua" />
	<action itemid="7618" script="potions.lua" />
	<action itemid="7620" script="potions.lua" />
	<action itemid="8472" script="potions.lua" />
	<action itemid="8473" script="potions.lua" />
and its done =] u have a inf pots ;D
Yours Trepido.
 
not such a hard thing to do all u did was remove the change vial to empty vial from what it looks like lol
 
Sux=Kaorus
Kaorus=Spammer.

@Threath.
Easy. You didnt do anything, just a little change.

PD: Srry fr my bad english. i'm spanish.
 
Sux=Kaorus
Kaorus=Spammer.

@Threath.
Easy. You didnt do anything, just a little change.

PD: Srry fr my bad english. i'm spanish.

You are the spammer and flooder :s

PD:
Tu eres teletubi por lo fleto?
 
Back
Top