• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Energy Shot!

orzeleagle

Member
Joined
Dec 21, 2009
Messages
183
Reaction score
7
Location
Poland
Informations:
Script adds stamina when:
-you're not in the support teams
-we must not be hungry
-stamina can not be the maximum.

In data/actions/actions.xml
Code:
<action itemid="7632" event="script" value="stamina.lua"/>

In actions/scripts/stamina.lua
PHP:
function onUse(cid, item, frompos, item2, topos)
local config = {
staminafull = 42*60, effect = 53 }
player = getPlayerPosition(cid)
playerstamina = getPlayerStamina(cid)
playeracc = getPlayerAccess(cid)
playerfood = getPlayerFood(cid)
if playeracc <= 2 then
	if playerfood ~= 0 then
		if playerstamina ~= config.staminafull then
			setPlayerStamina(cid, config.staminafull)
			doRemoveItem(item.uid, 1)
			doPlayerSendTextMessage(cid,22,"Stamina added by Energy shot!")
			doSendMagicEffect(player, config.effect)
		else
			doPlayerSendTextMessage(cid,22,"You Dont need a Energy shot!")
		end
	else
		doPlayerSendTextMessage(cid,22,"You Can NOT be hungry!")
	end
else
doPlayerSendTextMessage(cid,22,"You are Member Of Suppot. You dont Need it!")
end
return true
end

SS:
dlatnpenergyshoot3.jpg

dlatnpenergyshoot2.jpg

dlatnpenergyshoot.jpg
YoS(Tibia.net.pl)
 
Last edited:
You give him rep, and it is not his script, he is from the forum by Yos Tibia.net.pl. A script is really good!
 
Back
Top