• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Use X Item Get Max Mana&Health

tetra20

DD
Joined
Jan 17, 2009
Messages
1,315
Solutions
4
Reaction score
323
Location
Egypt
I Am New To Script and this Script i made.... simple but might be useful^_^

Code:
function onUse(cid, item, frompos, item2, topos)
	if doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) then
		doCreatureAddMana(cid, getCreatureMaxMana(cid))
		doSendMagicEffect(getPlayerPosition(cid), 22)
		end
		end
Code:
<action itemid="1355" script="full.lua"/>
 
Last edited:
nice :) can easily be implented into runes/pots for exapmple for those high exp servers with paladin runes :D
 
Ty Quashinio ^_^
yeah anyone can change it to runes and pots if he want :)
 
It can also be done like this:

Lua:
local tfs_version = 03 --write 02 if the tfs version is 0.2! else leave it 03!
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (tfs_version == 03) then
		return (doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) and doCreatureAddMana(cid, getCreatureMaxMana(cid)) and doSendMagicEffect(getCreaturePosition(cid),12))
    	elseif (tfs_version == 02) then
		return (doPlayerAddHealth(cid, getPlayerMaxHealth(cid)) and doPlayerAddMana(cid, getPlayerMaxMana(cid)) and doSendMagicEffect(getPlayerPosition(cid),12))
	else
	return (print("This tfs version "..tfs_version.." doesn't exsist!"))
    end   
end
 
Last edited:
printer that is abit complicated for me ^^ the one i made seems simple
 
printer that is abit complicated for me ^^ the one i made seems simple

nothing complicated about his script, for some reason it just checks the server version and also has visual effect on use.
 
/\

As he said and also asfar i know 0.2 cant use same function as 0.3 Ex: doCreatureAddHealth = 0.3 and doPlayerAddHealth = 0.2
 
TFS 0.2
Lua:
doCreatureAddHealth(cid, amount)
doPlayerAddMana(cid, amount)
doPlayerAddHealth and doCreatureAddMana are a nil value in 0.2.
 
Last edited:
Wavoz Making Magic Effect isn't hard
i can make one now

First Post Fixed

it make magic effect
 
Last edited:
Back
Top