• 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 .::1-Row Slot Machine::. TFS [0.3/0.4/1.0/1.2]

0.2.x does not have the functions my code needs
 
how can this work on my server 9.1?

must i change something to thix xml code?
<movevent type="AddItem" tileitem="1" actionid="6577" event="script" value="casino.lua"/>
 
maybe source edit and add the item attr functions and any other the 0.2 tfs misses
 
I just get the error:

[29/10/2011 11:47:47] [Error - Action Interface]
[29/10/2011 11:47:47] In a timer event called from:
[29/10/2011 11:47:47] data/actions/scripts/slot.lua:eek:nUse
[29/10/2011 11:47:47] Description:
[29/10/2011 11:47:47] (luaDoTransformItem) Item not found

What is the wrong?
 
sometimes the lever got break and dont work more saying "You dont have money to play" but trying on other machine work good, tested in TFS 0.4 rev3884
 
I did what I thought, but confused about
Lua Code:
Code:
--FRUITS ROWS
local p = { --[LEVER.UNIQUEID]
	[6297] = {},[6298] = {},[6299] = {},[6300] = {}, --[6301] = {},
} --JUST PUT THE INITIAL ROW POS FROM LEFT, SECOND & THIRD WILL BE AUTOM. GENERATED
for i = 1,3 do --p, UNIQUEID.LEVER, {POS FROM TILE OF LEFT}
	table.insert(p[6297],i,{x=91+(i-1),y=145,z=7,stackpos=1}) <!-- Each slot machine,  x,y,z =the left black tile posission -->
	table.insert(p[6298],i,{x=117+(i-1),y=630,z=7,stackpos=1}) <!-- 2nd slot machine,  x,y,z =the left black tile posission -->
	table.insert(p[6299],i,{x=99+(i-1),y=145,z=7,stackpos=1}) <!-- 3rd slot machine,  x,y,z =the left black tile posission -->
	table.insert(p[6300],i,{x=129+(i-1),y=621,z=7,stackpos=1}) <!-- 4th slot machine,  x,y,z =the left black tile posission -->
	-- table.insert(p[6301],i,{x=19+(i-1),y=145,z=7,stackpos=1}) <!-- Future machines -->
end

I got it figured out, Editing my post to reflect.
by the way this is awsome.
I have been looking for something like this forever.
 
Last edited:
Thanks, I've been using it on my server :)
2ryoffo.png
 
I dont want it to cost gp. How do i do so that an item id is required etc. a scarab coin?
 
I dont want it to cost gp. How do i do so that an item id is required etc. a scarab coin?

change
Lua:
local money = 1000
to
Lua:
local cost_item, cost_count = 2159, 1
change
Lua:
if not doPlayerRemoveMoney(cid, money) then    
    return doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You need '..money..' gps to play Slot Machine.')
end
to
Lua:
if not doPlayerRemoveItem(cid, cost_item, cost_count) then
    return doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You need '.. cost_count ..' '.. getItemNameById(cost_item) ..' to play Slot Machine.')
end
delete
Lua:
doSendAnimatedText(getThingPos(cid), '-$'..money,COLOR_RED)
 
Bump for unique scripts
 
u should make so that u put money on a tile instead and u win money depending on how much money u put on that tile. this way u can make so u can bet with only 1 gp for example or maybe even 100k.
 
Back
Top