• 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!

Lua Mana runes dosent work..

TKO

Syphero Owner!
Joined
Mar 10, 2008
Messages
2,252
Reaction score
27
Location
Sweden
Well my custom mana runes couse debugg why?

local function notpossible(fromPosition)
doSendMagicEffect(fromPosition,CONST_ME_POFF)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
local mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(toPosition,CONST_ME_LOSEENERGY)
doCreatureSay(itemEx.uid,"Large ManaHeal!!",19)
doPlayerAddMana(itemEx.uid, 40000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
notpossible(fromPosition)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
else
notpossible(fromPosition)
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return true
end
 
Code:
local function notpossible(fromPosition)
doSendMagicEffect(fromPosition,CONST_ME_POFF)
end

function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
local mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(toPosition,CONST_ME_LOSEENERGY)
doCreatureSay(itemEx.uid,"Large ManaHeal!!",19)
doPlayerAddMana(itemEx.uid, 40000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
notpossible(fromPosition)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
else
notpossible(fromPosition)
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return true
end

Replace yours with this
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doPlayerAddMana(itemEx.uid, 40000) and doSendAnimatedText(getThingPos(cid), "Large ManaHeal!!!", TEXTCOLOR_WHITE)
end
 
well non of the runes i have dosent work... well help any one? rep+ amirosolo for smaller script! Possibel to change text color?:)
 
Replace yours with this
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doPlayerAddMana(itemEx.uid, 40000) and doSendAnimatedText(getThingPos(cid), "Large ManaHeal!!!", [COLOR="red"]TEXTCOLOR_WHITE[/COLOR])
end
:thumbup:
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	return doPlayerAddMana(itemEx.uid, 40000) and doSendAnimatedText(getThingPos(cid), "Large ManaHeal!!!", [COLOR="red"]TEXTCOLOR_WHITE[/COLOR])
end
[/QUOTE]
write ur color name
 
But now it just say x large man
how can i add more text so longer?
function onUse(cid, item, fromPosition, itemEx, toPosition)
return doPlayerAddMana(itemEx.uid, 40000) and doSendAnimatedText(getThingPos(cid), "Large ManaHeal!!!", COLOR_ORANGE)
end
 
Sources <_<.

You can change:
Lua:
doSendAnimatedText(getThingPos(cid), "Large ManaHeal!!!", COLOR_ORANGE)
to
Lua:
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Large Mana Heal!!!")
 
Back
Top