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

I need a lottery bird script.

zayat

New Member
Joined
May 12, 2009
Messages
347
Reaction score
2
Hello all . can anyone make for me a lottery bird item script? Like forgottenl.hopto.org. im giving rep++
 
its an item. Lottery Bird (5 points)
Buy this lottery bird for only 5 points and try your luck now, you can win any donation item from using this bird you can win a bad item or a good item like rich manarune, try your luck today, and get your name broadcasted on winning a good item!
 
try this
Code:
local noob_item = {2466,2467}  -- put here id of most items to be won
local semi_item = {2494,2495}  -- put here id of semi won items
local best_item = {2470,2471}   --put id of rare items
function onUse(cid, item, fromPosition, itemEx, toPosition)
   local r = math.random(100)
     local noob = noob_item[math.random(1, #noob_item)]
       local semi = semi_item[math.random(1, #semi_item)]
         local best =  best_item[math.random(1, #best_item)]
              if r >= 1 and r < 51 then
                   doPlayerAddItem(cid,noob,1)
                   doPlayerSendTextMessage(cid,25,"Lottery bird : you have won ["..getItemNameById(noob)..".")
                   doSendMagicEffect(getThingPos(cid),27)
              elseif r >= 51 and r < 85 then
                   doPlayerAddItem(cid,semi,1)
                   doPlayerSendTextMessage(cid,25,"Lottery bird : you have won ["..getItemNameById(semi)..".")
                   doSendMagicEffect(getThingPos(cid),27)
              elseif r >= 85 then
                   doPlayerAddItem(cid,best,1)
	               doSendMagicEffect(getThingPos(cid),27)
	               doPlayerSendTextMessage(cid,25,"Lottery bird : you have won ["..getItemNameById(best)..".")
	               doBroadcastMessage("Lottery bird : Congratulations! "..getCreatureName(cid).." have won a ["..getItemNameById(best).."].")
              end
   return doRemoveItem(item.uid)
end
Add the line in the action.xml
Code:
<action itemid="xxxxx" event="script" value="xxxxx.lua"/>
 
Last edited:
Back
Top