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

Solved Addon doll onUse

Maten

New Member
Joined
Mar 16, 2009
Messages
219
Reaction score
2
Hey..

I would like a script so when a player use his addon doll he gets all addons and then the doll gets removed. I tryed to change a talkaction script to a action script but that didnt go so well hehe :$

Anyone that can help me fix this?
 
Well, I searched for the talkaction script and converted it to an action script.

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local femaleOutfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324} 
    local maleOutfits = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325} 

    if(getPlayerItemCount(cid, 9693) > 0) then 
		doPlayerRemoveItem(cid, 9693, 1) 
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now have all addons!") 
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) 
		if (getPlayerSex(cid) == 0) then
			for _,n in ipairs(femaleOutfits) do
				doPlayerAddOutfit(cid, n, 3)
			end
		else 
			for _,n in ipairs(maleOutfits) do
				doPlayerAddOutfit(cid, n, 3)
			end
		end 
    else 
		return false
    end
	return true
end

Tested in 0.3 and worked.
 
Well, I searched for the talkaction script and converted it to an action script.

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local femaleOutfits = {136, 137, 138, 139, 140, 141, 142, 147, 148, 149, 150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324} 
    local maleOutfits = {128, 129, 130, 131, 132, 133, 134, 143, 144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325} 

    if(getPlayerItemCount(cid, 9693) > 0) then 
		doPlayerRemoveItem(cid, 9693, 1) 
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now have all addons!") 
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) 
		if (getPlayerSex(cid) == 0) then
			for _,n in ipairs(femaleOutfits) do
				doPlayerAddOutfit(cid, n, 3)
			end
		else 
			for _,n in ipairs(maleOutfits) do
				doPlayerAddOutfit(cid, n, 3)
			end
		end 
    else 
		return false
    end
	return true
end

Tested in 0.3 and worked.

Thanks! Worked gr8 :)
 
Back
Top