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

Magic eggs

Gkatt

New Member
Joined
Mar 24, 2009
Messages
413
Reaction score
4
I want to make that the item id : 6544 gives 5k exp everytime someone click on it ty rep++:peace:
 
Lua:
-- Wibben 2010
function onUse(cid, item, fromPosition, itemEx, toPosition)
			doCreatureSay(cid, "You've been awarded 5000 exp :).", TALKTYPE_ORANGE_1)
			doPlayerAddExp(cid,5000)
			doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)

		end
	
end

then make the actions.xml
Code:
	<action itemid="6544" script="exp.lua"/>
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cfg = {
		max = 100, -- Max Level
		exp = 5000,
		remove = "yes" -- "yes" or "no"
	}
	cfg.remove = getBooleanFromString(cfg.remove)
	if getPlayerLevel(cid) < cfg.max then
		if cfg.remove then
			doRemoveItem(item.uid, 1)
			return true
		end
	else
		doPlayerSendCancel(cid, "Sorry, not possible.")
	end
	return doPlayerAddExperience(cid, cfg.exp) and doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
end
 
i hope its ok that im asking...
how do i make eggs tp u to somewhere when u click on it.. instead of giving exp the tp tp you if u know what i mean.?
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local cfg = {
		max = 100, -- Max Level
		exp = 5000,
		remove = "yes" -- "yes" or "no"
	}
	[B][COLOR="Red"]cfg.remove = getBooleanFromString(cfg.remove)[/COLOR][/B]
	if getPlayerLevel(cid) < cfg.max then
		if cfg.remove then
			doRemoveItem(item.uid, 1)
			return true
		end
	else
		doPlayerSendCancel(cid, "Sorry, not possible.")
	end
	return doPlayerAddExperience(cid, cfg.exp) and doSendMagicEffect(getThingPos(cid), CONST_ME_GIFT_WRAPS)
end
stop take my shit
 
Back
Top