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

Exp egg

oska2

New Member
Joined
Aug 18, 2013
Messages
36
Reaction score
0
Im making a 8.6 serv on 0.3.6 TFS. I need a exp egg that gives like 10 levels or so, i also need a egg thar gives like +2 on any skill. And the most important, i need a egg that gives you a random outfit. Please help fast!!!
 
egg that gives you exp :-

actions/scripts
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)
	return TRUE
end
-----------------------------------------------------------------------------------------
egg that changes outfit :-

actions/scripts
LUA:
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
---------------------------------------------------------------------------



THE SKILL SCROLL IS MADE BY PRINTER AND I HAVE NOT TOUCHED IT!
LUA:
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


THE REST IS MADE BY ME!
 
Last edited:
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

Where's the table?
 
i made it like that to see if that guy can remove the magic effects (i already did remove them in my test server but i wanna see if he knows what he is doing)
 
I sent you a pm after your first thread that got deleted with an explanation and links to the rules why I deleted your thread.
#1. Use a clear yet descriptive title with your problem and keep it objective!
http://otland.net/f16/need-help-ask-properly-correctly-18402/#post607284

I changed it for you this time because ghettobird already spent time making a script for you.
 
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
end
	return TRUE
end
 
Last edited:
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

Thanks for the reply but your script didn't work, it was missing an 'end' or something, i did some playing around and thanks to you i knew how to check for the levels and i remade it and it works perfectly for me now thanks alot :)

Here's my script for anyone interested

LUA:
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

edit: There's a bug with mine, if there's not enough items to be removed, say if you've got 1 egg and it wants to remove 2, it wont take any eggs and will still give the levels - How do i check for an amount before giving the levels?
 
Last edited:
Sorry limos and BTW do i need to change anything on those scripts? Thanks for helping everyone :)

- - - Updated - - -

Yeah sorry for double post but my outfit change eggs seem not to work? :/ do i have to change something in the script or ?

And I kinda suck at scripting so could anyone possibly finish me a outfit changer egg script whit item id of 6545?

Also tutorial would be appreciated :) Thx all :)
 
Back
Top