Archived

This topic is now archived and is closed to further replies.

stevin50

Dice script casino problem

2 posts in this topic

Hello got some problem with my dice casino..

1. He reopen all bp all the time

2. He doesent pick up money and roll

 

Really would need some help

 

]]--

 

--Variables--

local rolled = false --bool

local checked = false

local tmp = 0

local moneyC = 0

local moneyP = 0

local moneyIn = 0

local moneyCwon = 0

local moneyPwon = 0

local moneyWon = 0

local typ = "nothing"

local finalTyp = "nothing"

setsettings('Settings\\Actions\\List\\lowhigh2\\Sc ript', "nothing")

-------------

 

if windowcount("Browse Field") < 1 then

wait(1500)

openbrowsefield(posx,position,posz)

else

 

if (itemcount("crystal coin")*10000) > maxMoneyToLog or (itemcount("crystal coin")*10000) < minMoneyToLog then --0

if windowcount() < 7 then

wait(500)

setsettings('Settings\\Actions\\List\\GameStart\\E nabled', "yes")

setsettings('Settings\\Actions\\List\\Move Platinums\\Enabled', "yes")

setsettings('Settings\\Actions\\List\\Intro\\Enabl ed', "yes")

else

wait(1000)

moveitems(toptileitem(posx,position,posz), ground(posx,position,posz), MainBp, 100)

wait(500)

moveitems(toptileitem(posx,position,posz), ground(posx,position,posz), MainBp, 100)

say("no more money bye")

setsettings('Settings\\Actions\\List\\GameStart\\E nabled', "no")

setsettings('Settings\\Actions\\List\\Move Platinums\\Enabled', "no")

setsettings('Settings\\Actions\\List\\Intro\\Enabl ed', "yes")

setsettings('Settings\\Actions\\Enabled', "no")

logout()

wait(1000)

end

else

if toptileitem(posx-1,position,posz) == 3043 or --1 jesli hajs lezy na dp

toptileitem(posx-1,position,posz) == 3035 then

 

while(typ == "nothing") do

typ = getsettings('Settings\\Actions\\List\\lowhigh2\\Sc ript')

end

setsettings('Settings\\Actions\\List\\turnToPlayer \\Enabled', "no")

setsettings('Settings\\Actions\\List\\Move Platinums\\Enabled', "no")

 

while gettile(posx-1,position,posz).count > 2 do

moveitems("crystal coin", ground(posx-1,position,posz), TradeBp, 100)

wait(300)

moveitems("platinum coin", ground(posx-1,position,posz), TradeBp, 100)

wait(300)

end

moneyP = itemcount("platinum coin", TradeBp)

moneyC = itemcount("crystal coin", TradeBp)

moneyIn = (moneyC * 10000) + (moneyP * 100)

if moneyIn >= MinBet and moneyIn <= MaxBet then --2 jesli wplaciles

wait(500)

while rolled == false do --while

if toptileitem(posx,position,posz) >= 5792 and --3 jesli lezy kostka (do poprawy waiting)

toptileitem(posx,position,posz) <= 5797 then

 

 

if toptileitem(posx,position,posz) >= 5792 and --3 jesli lezy kostka (do poprawy waiting)

toptileitem(posx,position,posz) <= 5797 and

gettile(posx,position,posz).count == underDiceNumber

then

local a = {5792, 5793, 5794, 5795, 5796, 5797}

for i,a in pairs(a)

do useitem(a, "Browse Field") end

rolled = true

end

 

end

end

while checked == false do

if toptileitem(posx,position,posz) >= 5792 and --3 jesli lezy kostka (do poprawy waiting)

toptileitem(posx,position,posz) <= 5797 then

wait(100)

 

if toptileitem(posx,position,posz) >= 5792 and

toptileitem(posx,position,posz) <= 5794 and

gettile(posx,position,posz).count == underDiceNumber

then

finalTyp = "low"

checked = true

end

wait(600)

if toptileitem(posx,position,posz) >= 5795 and

toptileitem(posx,position,posz) <= 5797 and

gettile(posx,position,posz).count == underDiceNumber

then

finalTyp = "high"

checked = true

end

 

end --3

end --end while

 

if finalTyp == typ then --4 jesli wygrales (bez rolled)

setsettings('Settings\\Actions\\List\\trashOnDepo\ \Enabled', "no")

setsettings('Settings\\Actions\\List\\trashOnWood\ \Enabled', "no")

useitem(instrumentW, MainBp)

moneyWon = winRatio * moneyIn

moneyCwon = (moneyWon-(moneyWon%10000))/10000

tmp = (moneyWon - (moneyCwon*10000))

moneyPwon = (tmp-(tmp%100))/100

--say("calculating...")

 

if moneyPwon > 0 then

while itemcount("platinum coin",PayBp) ~= moneyPwon do

if moneyPwon == 1 then

moveitems("platinum coin", PayBp, PlatBp, 100)

wait(100)

moveitems("platinum coin", PayBp, PlatBp, 100)

wait(500)

moveitems("platinum coin", PlatBp, PayBp, 1)

wait(500)

else

moveitems("platinum coin", PayBp, PlatBp, 100)

wait(100)

moveitems("platinum coin", PayBp, PlatBp, 100)

wait(200)

moveitems("platinum coin", PlatBp, PayBp, moneyPwon-1)

wait(700)

moveitems("platinum coin", PlatBp, PayBp, (moneyPwon -itemcount("platinum coin", PayBp)))

wait(700)

end

end

 

end

 

if moneyCwon > 0 then

if moneyCwon == 1 then

while itemcount("crystal coin",PayBp) ~= moneyCwon do

moveitems("crystal coin", PayBp, CrysBp, 100)

wait(100)

moveitems("crystal coin", PayBp, CrysBp, 100)

wait(400)

moveitems("crystal coin", CrysBp, PayBp, 1)

wait(500)

end

else

while itemcount("crystal coin",PayBp) ~= moneyCwon do

moveitems("crystal coin", PayBp, CrysBp, 100)

wait(100)

moveitems("crystal coin", PayBp, CrysBp, 100)

wait(400)

moveitems("crystal coin", CrysBp, PayBp, moneyCwon-1)

wait(700)

moveitems("crystal coin", CrysBp, PayBp, (moneyCwon -itemcount("crystal coin", PayBp)))

wait(700)

end

end

 

end

while itemcount("crystal coin",PayBp) >= 1 or itemcount("platinum coin",PayBp) >= 1 do

wait(100)

moveitems("platinum coin", PayBp, ground(posx-1, position,posz), 100)

wait(200)

moveitems("crystal coin", PayBp, ground(posx-1, position,posz), 100)

wait(300)

end

 

else

useitem(instrumentL, MusicBp)

end

--4 koniec wygranej

while getcontainer(TradeBp).usedslots >= 1 do

wait(200)

moveitems("platinum coin", TradeBp, PlatBp, 100)

moveitems("platinum coin", TradeBp, PlatBp, 100)

wait(200)

moveitems("crystal coin", TradeBp, CrysBp, 100)

moveitems("crystal coin", TradeBp, CrysBp, 100)

end

 

--Provide platinums

if itemcount("platinum coin", PlatBp) > 1600 then

moveitems("platinum coin", PlatBp, PlatBp2, 100)

end

 

if itemcount("platinum coin", PlatBp) < 300 then

moveitems("platinum coin", PlatBp2, PlatBp, 100)

end

 

--

 

else

while itemcount("crystal coin",TradeBp) >= 1 or itemcount("platinum coin",TradeBp) >= 1 do --2 else

wait(400)

moveitems("platinum coin", TradeBp, ground(posx-2, position,posz), 100)

wait(400)

moveitems("crystal coin", TradeBp, ground(posx-2, position,posz), 100)

wait(400)

say("*"..Tile.GetByPosition(posx-2, posy, posz):TopCreature():Name().."* min "..MinBet.." max "..MaxBet..".")

wait(300)

end

 

 

end --2

 

end --1

 

end

end

--0

 

setsettings('Settings\\Actions\\List\\trashOnDepo\ \Enabled', "yes")

setsettings('Settings\\Actions\\List\\trashOnWood\ \Enabled', "yes")

setsettings('Settings\\Actions\\List\\turnToPlayer \\Enabled', "yes")

setsettings('Settings\\Actions\\List\\Move Platinums\\Enabled', "yes")

Share this post


Link to post
Share on other sites