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

Action Lotery ticket Script!

@Up: I think he means 'It is a losing ticket' instead of 'It is an losing ticket'. Because the first letter of losing is a constant not a vowel.
 
@Up: I think he means 'It is a losing ticket' instead of 'It is an losing ticket'. Because the first letter of losing is a constant not a vowel.

Oh, thought karel meant there was something wrong about the script and how it works. Not that the english is messed up.
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

local rand = math.random(0, 10)
local lotteryid = 5957

  if item.itemid == lotteryid then
    if rand < 1 then
  		doCreatureSay(cid, "You have a winning lottery ticket!", TALKTYPE_ORANGE_1)
      doTransformItem(item.uid, item.itemid + 1)
    elseif rand > 2 then
      doCreatureSay(cid, "Sorry, This is not a winning lottery ticket.", TALKTYPE_ORANGE_1)
      doTransformItem(item.uid, item.itemid - 1)
    end
  end
return TRUE
end

This is what I personally created. I also changed the items.xml to reflect this.

Code:
	<item id="5956" article="a" name="losing lottery ticket">
		<attribute key="weight" value="200"/>
	</item>
	<item id="5957" article="a" name="lottery ticket">
		<attribute key="weight" value="120"/>
	</item>
	<item id="5958" article="a" name="winning lottery ticket">
		<attribute key="weight" value="200"/>
	</item>
 
Back
Top