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

Get outfit when you use an item.

Cornwallis

Member
Joined
Jan 3, 2010
Messages
480
Reaction score
16
Ok, well this is the first script ive tried from nothing after watching a very helpful tutorial but just a bit outdated which is what may be my problem. and btw, the mummy outfit is 65 if you need it.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.id == 11201 then
	doSetCreatureOutfit(cid, Mummy, 120)
	doRemoveMoney(cid, 5000)
	doCreatureSay(cid, "Mummy!", 3)
	doSendMagicEffect(getThingPos(itemEx.uid), 12)
	return TRUE
end
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	doSetCreatureOutfit(cid, 120)
	doRemoveMoney(cid, 5000)
	doCreatureSay(cid, "Mummy!", 3)
	doSendMagicEffect(getThingPos(itemEx.uid), 12)
	return TRUE
end
 
my turn
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if not doPlayerRemoveMoney(cid, 5000) then
        doPlayerSendCancel(cid, 'You don\' have enough money to get the outfit!'
        return false
    end
    doPlayerRemoveMoney(cid, 5000)
    doCreatureChangeOutfit(cid, 65)
    doCreatureSay(cid, 'Mummy!', TALKTYPE_MONSTER)
    doSendMagicEffect(getThingPos(cid), 12)
	return true
end
 
LUA:
function onUse(cid,item,fromPosition,itemEx,toPosition)
local tmp = getCreatureOutfit(cid)
	tmp.lookType = 65
	if(doPlayerRemoveMoney(cid,5000))then
		doCreatureSay(cid,'MUMMY!',3)
		doSendMagicEffect(getThingPos(cid),12)
		doCreatureChangeOutfit(cid,tmp)
	end
	return true
end

but this one does
 
Back
Top