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

Casino.

Status
Not open for further replies.

Sherlok

Active Member
Joined
Aug 29, 2008
Messages
2,116
Reaction score
44
Location
Poland, Wrocław.
Hiho.
I need casino system, becouse all old systems are not working on 0.3.6pl1 :(
I care about this, to write it by a good scripter.

Thanks, rep++ for helping :wub: :thumbup:

xlxe5kn6dcb3y8bdl0gc.png



  • Put your money on the "money stack" (max. 1cc - 30cc)
  • Use switch
  • 25% to win, if you win your reward is 2x more than you put on "money stack"
  • If you win, take your reward from "reward stack"

:confused:
 
Last edited:
you could maybe make it with an dice..
1= you loose your money
2= you loose your money
3= you get same amount back
4= you get 2x money
5= you get 3x money
6= you get 4x money

if you bid 100 and get 3, you will get 100 back
if you bid 100 and get 4, you wil get 200 back
if you bid 100 and get 6, you will get 400 back
is that "casino" system any good?
 
you could maybe make it with an dice..
1= you loose your money
2= you loose your money
3= you get same amount back
4= you get 2x money
5= you get 3x money
6= you get 4x money

if you bid 100 and get 3, you will get 100 back
if you bid 100 and get 4, you wil get 200 back
if you bid 100 and get 6, you will get 400 back
is that "casino" system any good?

Hmm, I mean:

1. Put your money on the "money stack" (max. 1cc - 30cc),
2. Use switch,
3. 25% to win, if you win your reward is 2x more than you put on "money stack"
4. If you win, take your reward from "reward stack"

:confused:
 
try this;
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local positions = {
	first = {x = 100, y = 200, z = 7},
	second = {x = 100, y = 200, z = 7}
}
local tmp, tmp1 = getThingFromPos(positions.first).uid, getThingFromPos(positions.second).uid
	if item.itemid == 1945 or item.itemid == 1946 then
		if tmp > 1 and tmp.itemid == 2160 and tmp1 > 1 and tmp1.itemid == 2160 then
			if math.random(1, 3) < 3 then return doRemoveItem(tmp) and doTileAddItemEx(tmp, doCreateItemEx(2160, tmp * 2)) and doRemoveItem(tmp1) or doRemoveItem(tmp1) and doTileAddItemEx(tmp1, doCreateItemEx(2160, tmp * 2)) end
		end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1946)
end

Sorry, forgot something. edited 3 times
 
Last edited:
try this;
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local positions = {
	first = {x = 100, y = 200, z = 7},
	second = {x = 100, y = 200, z = 7}
}
local tmp, tmp1 = getThingFromPos(positions.first).uid, getThingFromPos(positions.second).uid
	if item.itemid == 1945 or item.itemid == 1946 then
		if tmp > 1 and tmp.itemid == 2160 and tmp1 > 1 and tmp1.itemid == 2160 then
			if math.random(1, 3) < 3 then return doRemoveItem(tmp) and doTileAddItemEx(tmp, doCreateItemEx(2160, tmp * 2)) and doRemoveItem(tmp1) else doRemoveItem(tmp1) and doTileAddItemEx(tmp1, doCreateItemEx(2160, tmp * 2)) end
		end
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1946)
end

Sorry, forgot something. edited

Widescreen scriptng?
 
Code:
local positions = {
	[1] = {x = 100, y = 100, z = 7},
	[2] = {x = 100, y = 102, z = 7}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.itemid == 1945) then
		local money = getTileItemById(positions[1], 2160)
		if(money.uid) then
			if(money.type <= 30) then
				if(math.random(1, 4) == 1) then
					doCreateItem(2160, money.type * 2, positions[2])
					doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations!")
				else
					doRemoveItem(money.uid, money.type)
				end
				doTransformItem(item.uid, item.itemid + 1)
			else
				doPlayerSendCancel(cid, "You can put max. 30cc on stack.")
			end
		else
			doPlayerSendcancel(cid, "Money not found.")
		end
	elseif(item.itemid == 1946) then
		doTransformItem(item.uid, item.itemid - 1)
	end
	return true
end

@Sherlok:
I didn't test it :*
 
Status
Not open for further replies.
Back
Top