function onUse(cid, item, fromPosition, itemEx, toPosition)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid) - getCreatureHealth(cid) ) -- health
doSendMagicEffect(fromPosition,12)
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddMana(cid,getPlayerMaxMana(cid) - getPlayerMana(cid) ) -- mana
doSendMagicEffect(fromPosition,12)
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddMana(cid,getPlayerMaxMana(cid) - getPlayerMana(cid) )
doSendAnimatedText(fromPosition,+..."getPlayerMana(cid)..",TEXCOLOR_ORANGE)
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local xd = getPlayerMaxMana(cid) - getPlayerMana(cid)
doPlayerAddMana(cid, xd)
doSendAnimatedText(getThingPos(cid), '+' .. xd, 143)
return true
end
local config = {
removeOnUse = "yes",
newEffect = "no",
text = "Health",
color = 180
}
config.removeOnUse = getBooleanFromString(config.removeOnUse)
config.newEffect = getBooleanFromString(config.newEffect)
function onUse(cid, item, fromPosition, itemEx, toPosition)
local health = getCreatureMaxHealth(cid) - getCreatureHealth(cid)
doCreatureAddHealth(cid, health)
if(not config.newEffect) then
doSendAnimatedText(getThingPos(cid), "+" .. health, color)
else
doSendAnimatedText(getThingPos(cid), text, color)
return true
end
if(config.removeOnUse) then
doRemoveItem(item.uid)
return true
end
return true
end
local config = {
removeOnUse = "yes",
newEffect = "no",
text = "Mana",
color = 5
}
config.removeOnUse = getBooleanFromString(config.removeOnUse)
config.newEffect = getBooleanFromString(config.newEffect)
function onUse(cid, item, fromPosition, itemEx, toPosition)
local mana = getCreatureMaxMana(cid) - getCreatureMana(cid)
doCreatureAddMana(cid, mana)
if(not config.newEffect) then
doSendAnimatedText(getThingPos(cid), "+" .. mana, color)
else
doSendAnimatedText(getThingPos(cid), text, color)
return true
end
if(config.removeOnUse) then
doRemoveItem(item.uid)
return true
end
return true
end
Alternative >...
health.lua:
LUA:local config = { removeOnUse = "yes", newEffect = "no", text = "Health" color = 180 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.newEffect = getBooleanFromString(config.newEffect) function onUse(cid, item, fromPosition, itemEx, toPosition) local health = getCreatureMaxHealth(cid) - getCreatureHealth(cid) doCreatureAddHealth(cid, health) if(not config.newEffect) then doSendAnimatedText(getThingPos(cid), "+" .. health, color) else doSendAnimatedText(getThingPos(cid), text, color) return true end if(config.removeOnUse) then doRemoveItem(item.uid) return true end return true end
mana.lua:
LUA:local config = { removeOnUse = "yes", newEffect = "no", text = "Mana" color = 5 } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.newEffect = getBooleanFromString(config.newEffect) function onUse(cid, item, fromPosition, itemEx, toPosition) local mana = getCreatureMaxMana(cid) - getCreatureMana(cid) doCreatureAddMana(cid, mana) if(not config.newEffect) then doSendAnimatedText(getThingPos(cid), "+" .. mana, color) else doSendAnimatedText(getThingPos(cid), text, color) return true end if(config.removeOnUse) then doRemoveItem(item.uid) return true end return true end
LUA:function onUse(cid, item, fromPosition, itemEx, toPosition) local xd = getPlayerMaxMana(cid) - getPlayerMana(cid) doPlayerAddMana(cid, xd) doSendAnimatedText(getThingPos(cid), '+' .. xd, 143) return true end
local config = {
removeOnUse = "yes",
newEffect = "no",
text = "Mana"
color = 5
}
[18/12/2010 15:57:21] data/creaturescripts/scripts/skullcheck.luanThink
Code:local config = { removeOnUse = "yes", newEffect = "no", text = "Mana" color = 5 }
Missing ',' after 'text = "Mana" '.
Code:[18/12/2010 15:57:21] data/creaturescripts/scripts/skullcheck.luanThink
You add it to skullcheck? Omgflol... You're newbie or stiupid...
So...![]()