Zarabustor
Human Being
Code:
local PRESENT_RED = {7417, 7423, 7388, 7865, 7880, 11296, 11295, 6433, 11298, 11297, 9653, 8907, 8878, 7730, 7892, 9662, 2196, 8300,2275,2300,11257,5785,2663,8854,7365}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local count = 1
if(item.itemid == 9003) then
local randomChance = math.random(1, #PRESENT_RED)
if(randomChance == 1) then
count = 10
elseif(randomChance == 2) then
count = 3
end
doBroadcastMessage("" .. getCreatureName(cid) .. " is very lucky he won a ", MESSAGE_EVENT_ADVANCE)
doPlayerAddItem(cid, PRESENT_RED[randomChance], count)
end
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doRemoveItem(item.uid, 1)
return true
end
Help me with this script please i want that when you use the item your name get broadcast like "Cykotitan is very lucky to win a "forever aol" from lottery bird.
if is a good item it will be boradcast,(will be about 8 good items) ONLY IF IS ONE OF THE 8 GOOD ITEMS IT WILL BE BROADCAST!
Ty I hope you help me
ILL REP++