Amiroslo
Excellent OT User
- Joined
- Jul 28, 2009
- Messages
- 6,812
- Solutions
- 6
- Reaction score
- 822
Well i got addon doll for 8.54 0.3.6pl1
I want that when someone press it, he gets warning saying, You can use it only 3 times, Do You Want to use it?
And then when press ok it goes and when he press the doll he gets outfit and it says, You got 2 more clickes!
And he get random outfit
And when he press Again It says, You Got Your Last Click!
And when he press it He get the outfit randomly and the doll disappears
Original Script
rep++
I want that when someone press it, he gets warning saying, You can use it only 3 times, Do You Want to use it?
And then when press ok it goes and when he press the doll he gets outfit and it says, You got 2 more clickes!
And he get random outfit
And when he press Again It says, You Got Your Last Click!
And when he press it He get the outfit randomly and the doll disappears
Original Script
LUA:
local config = {
itemid = 8982,
effect = 52,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (item.itemid == config.itemid) then
local i = math.random(1, 6)
local sets = {[1] = math.random(2, 74), [2] = math.random(76, 134), [3] = math.random(136, 160), [4] = math.random(192, 265), [5] = math.random(267, 301), [6] = math.random(303, 351)}
local tmp = getCreatureOutfit(cid)
tmp.lookType = sets[i]
doCreatureChangeOutfit(cid, tmp)
doSendMagicEffect(getCreaturePosition(cid), config.effect)
end
return true
end
rep++