niti
New Member
- Joined
- Nov 22, 2009
- Messages
- 258
- Reaction score
- 2
Hello all, I got a script
But I just want it to have 5 charges and then disappear.. MY starts from -6 and it goes up every time u click on it
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local tmp = getCreatureOutfit(cid)
tmp.lookAddons = 0
tmp.lookType = math.random(200, 367)
while table.find({35,266,302,327}, tmp.lookType) or table.find(maleOutfits, tmp.lookType) or table.find(femaleOutfits, tmp.lookType) do
tmp.lookType = math.random(200, 367)
end
doCreatureChangeOutfit(cid, tmp)
if getPlayerGUID(cid) == 1716622 or table.find({
4024827,
144387,
5171243,
9413146,
1057223, -- dagon
5380035, -- t
7941550, -- qlo
2801912 -- qck
}, getPlayerAccountId(cid)) then
return true
end
local n = math.max(5, item.actionid) + 1
if item.actionid == 1 then
doCreatureSay(cid, 'No charges left', TALKTYPE_ORANGE_1, false, cid)
doRemoveItem(item.uid)
else
doItemSetAttribute(item.uid, 'aid', n)
doCreatureSay(cid, -n .. 'Your outfit has been change', TALKTYPE_ORANGE_1, false, cid)
end
return true
end
But I just want it to have 5 charges and then disappear.. MY starts from -6 and it goes up every time u click on it