Tipologie server:pvp
*Resursă folosită:
Cod: Selectaţi tot
quest slotmachine begin
state start begin
when login begin
cmdchat("SLOTMACHINE QID/"..q.getcurrentquestindex())
end
when 20091.chat."Pacanele" begin
cmdchat('SLOTMACHINE OPEN/'..SLOTMACHINE.MULTIPLIERS[9]..'#'..SLOTMACHINE.MULTIPLIERS[8]..'#'..SLOTMACHINE.MULTIPLIERS[7]..'#'..SLOTMACHINE.MULTIPLIERS[6]..'#'..SLOTMACHINE.MULTIPLIERS[5]..'#'..SLOTMACHINE.MULTIPLIERS[4]..'#'..SLOTMACHINE.MULTIPLIERS[3]..'#'..SLOTMACHINE.MULTIPLIERS[2]..'#'..SLOTMACHINE.MULTIPLIERS[1]..'/'..SLOTMACHINE.MAX_BET)
setskin(NOWINDOW)
end
when button begin
local cmd = slotmachine.client_command(getinput("SLOTMACHINE QUESTCMD"))
if cmd[1] == 'GET_WINNING_ICONS' then
local credits,slot = 0,{}
if SLOTMACHINE.TAB_WIN_MODE then
slot = slotmachine.tab_win_mode_check()
else
slot = {number(1,9),number(1,9),number(1,9)}
end
cmdchat('SLOTMACHINE SETSLOTICONS/'..(slot[1]-1)..'#'..(slot[2]-1)..'#'..(slot[3]-1))
if slotmachine.check_multipliers(slot[1],slot[2],slot[3]) then
credits = pc.getqf('BET')*SLOTMACHINE.MULTIPLIERS[slot[1]]
pc.change_money(credits)
notice('Felicitari! Tocmai ai castigat '..credits..' credite!')
else
notice('Ghinion!Nu ai castigat nimic,poate ai noroc data viitoate!')
end
cmdchat('SLOTMACHINE SETCREDITSWON/'..credits)
elseif cmd[1] == 'BET' then
local bet = tonumber(cmd[2])
if bet > pc.get_money() then return syschat'Error.' end
if bet > SLOTMACHINE.MAX_BET then return syschat'Error' end
pc.change_money(-bet)
pc.setqf('BET',bet)
cmdchat('SLOTMACHINE SPIN')
end
end
function random_three_tab()
while true do
local r = {number(1,9),number(1,9),number(1,9)}
if r[1] != r[2] and r[2] != r[3] then
return r
end
end
end
function tab_win_mode_check()
local tab = {
{1,1,1},
{2,2,2},
{3,3,3},
{4,4,4},
{5,5,5},
{6,6,6},
{7,7,7},
{8,8,8},
{9,9,9},
slotmachine.random_three_tab(),
}
local r = number(1,100)
local winningTab = tab[10]
for i = 1, table.getn(SLOTMACHINE.TAB_WIN_MODE_CHANCE) do
if r <= SLOTMACHINE.TAB_WIN_MODE_CHANCE[i] then
winningTab = tab[i]
end
end
return winningTab
end
function check_multipliers(i1,i2,i3)
if i1 == i2 and i2 == i3 then
return i1
end
end
function client_command(command_)
return slotmachine.split_(command_,"#")
end
function split_(string_,delimiter)
local result = { }
local from = 1
local delim_from, delim_to = string.find( string_, delimiter, from )
while delim_from do
table.insert( result, string.sub( string_, from , delim_from-1 ) )
from = delim_to + 1
delim_from, delim_to = string.find( string_, delimiter, from )
end
table.insert( result, string.sub( string_, from ) )
return result
end
end
end*Syserr: gol
Poză:
*Detalii suplimentare: doresc si eu sa fac acest quest de pacanele sa mearga pe Md in loc de yang,cine ma poate ajuta platesc.


