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

Use item in mosnter and take a outfit.

dgprado

Member
Joined
Apr 5, 2009
Messages
792
Reaction score
23
Location
Patria Amada Brasil
Hello guys, i need a script that you use an item in x monster with a chance to brake the item, if you heave luck you take an outfit.
Can someone do this ?

thx.
 
Not mount, outfit, heave a lot of mount scripts, i need just an outfit. But not dead monster, an live creature, and if its possible make the creature desaper when u take the outfit will be great :D
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isMonster(itemEx.uid) and getCreatureName(itemEx.uid) == 'Creature Name' then
		if math.random(100) <= 50 then -- break chance
			doRemoveItem(item.uid, 1)
			doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
		else
			doRemoveCreature(itemEx.uid)
			doSendMagicEffect(toPosition, CONST_ME_POFF)
			doPlayerAddOutfit(cid, ID_OF_OUTFIT, 3)
		end
		return true
	end
end
 
Back
Top