Zarabustor
Human Being
Code:
local ITEMS = {7417, 7423, 8924, 7865, 7880, 11296, 11295, 6433,2316, 11298, 11297,5809, 9653, 8907, 8866, 7730, 7892, 9662, 2196, 8304,2275,2300,11257,5785,2663,8854,7365}
local GOOD_ITEMS = {2663,8866,8907,7730,7892,2196,2275,9653,2316,2300,8303,5809}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local rand = math.random(1, #ITEMS)
if isInArray(GOOD_ITEMS, ITEMS[rand]) then
doBroadcastMessage(getCreatureName(cid) .. " is very lucky to win " .. getItemInfo(ITEMS[rand]).article .. " " .. getItemInfo(ITEMS[rand]).name .. " from lottery bird.", MESSAGE_EVENT_ADVANCE)
end
doPlayerAddItem(cid, ITEMS[rand], rand == 1 and 10 or rand == 2 and 3 or 1)
doSendMagicEffect(fromPosition, CONST_ME_GIFT_WRAPS)
doRemoveItem(item.uid)
return true
end
Hello! Greetings .. hi i need help with this script... i want that the GOOD ITEM have less chance than the others, so i mean that the good items will be hard to get.