function onUse(cid, item, frompos, item2, topos)
local pPos = getPlayerPosition(cid)
doPlayerAddLevel(cid, 10)
doCreatureSay(cid, "You Gained 10 levels!", TALKTYPE_ORANGE_1)
doRemoveItem(cid, item.uid, 1)
return TRUE
end
local effects = {1, 5, 10, 20, 6, 8, 7}
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, #effects do
doSendMagicEffect(getCreaturePosition(cid), effects[i])
end
doCreatureChangeOutfit(cid, {lookType = math.random(2, 134), lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0})
doSendAnimatedText(getPlayerPosition(cid),"Changed!", math.random(01,255))
return TRUE
end
local add_skill,amount = SKILL_SWORD,1 --Edit skill name Ex: SKILL_CLUB,1 = that means amount so, it add now 1 sword fighting.
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddSkill(cid, add_skill, amount)
doSendMagicEffect(getThingPos(cid),math.random(CONST_ME_FIREWORK_YELLOW, CONST_ME_FIREWORK_BLUE))
doCreatureSay(cid, "SKILL UP!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
end
egg that changes outfit :-
actions/scripts
Code:function onUse(cid, item, fromPosition, itemEx, toPosition) for i = 1, #[B][COLOR="#FF0000"]effects[/COLOR][/B] do doSendMagicEffect(getCreaturePosition(cid), [COLOR="#FF0000"][B]effects[/B][/COLOR][i]) end doCreatureChangeOutfit(cid, {lookType = math.random(2, 134), lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}) doSendAnimatedText(getPlayerPosition(cid),"Changed!", math.random(01,255)) return TRUE end
oh i forgot to do it, editedthanks North
function onUse(cid, item, frompos, item2, topos)
local pPos = getPlayerPosition(cid)
doPlayerAddLevel(cid, 10)
doCreatureSay(cid, "You Gained 10 levels!", TALKTYPE_ORANGE_1)
doRemoveItem(cid, item.uid, 1)
else
if getPlayerLevel(cid) >= 101 then
doRemoveItem(cid, item.uid, 2)
end
end
return TRUE
end
You can try this, still getting used to scripting again after quiting for awhile, but if it doesn't work just pm me and i'll try to fix it
LUA:function onUse(cid, item, frompos, item2, topos) local pPos = getPlayerPosition(cid) doPlayerAddLevel(cid, 10) doCreatureSay(cid, "You Gained 10 levels!", TALKTYPE_ORANGE_1) doRemoveItem(cid, item.uid, 1) else if getPlayerLevel(cid) >= 101 then doRemoveItem(cid, item.uid, 2) end return TRUE end
function onUse(cid, item, frompos, item2, topos)
local pPos = getPlayerPosition(cid)
doPlayerAddLevel(cid, 10)
doCreatureSay(cid, "You Gained 10 levels!", TALKTYPE_ORANGE_1)
if getPlayerLevel(cid) <= 490 then
doRemoveItem(cid, item.uid, 1)
else
if getPlayerLevel(cid) >= 500 then
doRemoveItem(cid, item.uid, 2)
return TRUE
end
end
end