trungkhuyen
09-06-18, 04:39 AM
Mình chơi off một mình nên viết vài script "Cờ bạc" cho thêm thú vị. Vừa rồi xong script Xổ số giờ mình share tiếp Script bầu cua... Do mình ko rành mấy cái hình ảnh, biểu tượng quay (lắc) này nọ nên chỉ có script Mô tả Bầu - Cua - Gà - Cá - Nai - Tôm thôi, chứ ko có hình nha! hii....
function main() dofile("script/truyen/xo_so/baucua.lua");
Say("<color=fire>Sßng B¹c<color>: Mét ¨n mét, ®Æt xong lÊy tay lªn!!! ",7,
"BÇu/b1",
"Cua/b2",
"C¸/b3",
"Gµ/b4",
"Nai/b5",
"T«m/b6",
"Ta kh«ng ch¬i/no" )
end
function b1()
AskClientForNumber("tien1",0,10000000,"NhËp tiÒn cîc")
end
function tien1(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,1)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>BÇu<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ.......................<enter>Khui!!!")
end
function b2()
AskClientForNumber("tien2",0,10000000,"NhËp tiÒn cîc")
end
function tien2(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,2)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>Cua<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ......................<enter>Khui!!!")
end
function b3()
AskClientForNumber("tien3",0,10000000,"NhËp tiÒn cîc")
end
function tien3(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,3)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>C¸<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ...............<enter>Khui!!!")
end
function b4()
AskClientForNumber("tien4",0,10000000,"NhËp tiÒn cîc")
end
function tien4(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,4)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>Gµ<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ.............<enter>Khui!!!")
end
function b5()
AskClientForNumber("tien5",0,10000000,"NhËp tiÒn cîc")
end
function tien5(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,5)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>Nai<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ...........<enter>Khui!!!")
end
function b6()
AskClientForNumber("tien6",0,10000000,"NhËp tiÒn cîc")
end
function tien6(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,6)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>T«m<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ.............<enter>Khui....!!!")
end
function ketqua()
SetTask(2050,random(1,6))
SetTask(2051,random(1,6))
SetTask(2052,random(1,6))
if GetTask(2053) ==1 then
tom = "BÇu"
elseif GetTask(2053) == 2 then
tom = "Cua"
elseif GetTask(2053) == 3 then
tom = "C¸"
elseif GetTask(2053) == 4 then
tom = "Gµ"
elseif GetTask(2053) == 5 then
tom = "Nai"
elseif GetTask(2053) == 6 then
tom = "T«m"
end
if GetTask(2050) ==1 then
bau = "BÇu"
elseif GetTask(2050) == 2 then
bau = "Cua"
elseif GetTask(2050) == 3 then
bau = "C¸"
elseif GetTask(2050) == 4 then
bau = "Gµ"
elseif GetTask(2050) == 5 then
bau = "Nai"
else
bau = "T«m"
end
if GetTask(2051) ==1 then
cua = "BÇu"
elseif GetTask(2051) == 2 then
cua = "Cua"
elseif GetTask(2051) == 3 then
cua = "C¸"
elseif GetTask(2051) == 4 then
cua = "Gµ"
elseif GetTask(2051) == 5 then
cua = "Nai"
else
cua = "T«m"
end
if GetTask(2052) ==1 then
ca = "BÇu"
elseif GetTask(2052) == 2 then
ca = "Cua"
elseif GetTask(2052) == 3 then
ca = "C¸"
elseif GetTask(2052) == 4 then
ca = "Gµ"
elseif GetTask(2052) == 5 then
ca = "Nai"
else
ca = "T«m"
end
Say("<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=cyan>"..tom.."<color>. KÕt qu¶ sau khi khui lÇn nµy lµ:<enter><enter> <color=green>"..bau.."<color> - <color=pink> "..cua.."<color> - <color=gold> "..ca.." ",3,
"Tróng råi/trung",
"Ch¬i tiÕp/main",
"NghØ ch¬i/ok" )
end
function trung()
if GetTask(2053) == GetTask(2050) and GetTask(2053) == GetTask(2051) and GetTask(2053) == GetTask(2052) then
Talk(15,"x3","<color=fire>Sßng B¹c<color>: Chóc mõng ng¬i tróng liªn tôc 3 con <color=green>"..tom.."<color> víi sè tiÒn thëng lµ "..GetTask(2054)/10000 .." + "..GetTask(2054)/10000 .." v¹n x3 = <color=yellow>"..GetTask(2054)/10000*4 .." v¹n lîng!")
elseif (GetTask(2053) == GetTask(2050) and GetTask(2053) == GetTask(2051)) or (GetTask(2053) == GetTask(2050) and GetTask(2053) == GetTask(2052)) or (GetTask(2053) == GetTask(2051) and GetTask(2053) == GetTask(2052)) then
Talk(15,"x2","<color=fire>Sßng B¹c<color>: Chóc mõng ng¬i tróng liªn tôc 2 con <color=green>"..tom.."<color> víi sè tiÒn thëng lµ "..GetTask(2054)/10000 .." + "..GetTask(2054)/10000 .." v¹n x2 = <color=yellow>"..GetTask(2054)/10000*3 .." v¹n lîng!")
elseif GetTask(2053) == GetTask(2050) or GetTask(2053) == GetTask(2051) or GetTask(2053) == GetTask(2052) then
Talk(15,"x1","<color=fire>Sßng B¹c<color>: Chóc mõng ng¬i tróng 1 con <color=green>"..tom.."<color> víi sè tiÒn thëng lµ "..GetTask(2054)/10000 .." + "..GetTask(2054)/10000 .." v¹n = <color=yellow>"..GetTask(2054)/10000*2 .." v¹n lîng!")
else
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i bÞ hoa m¾t µ? TrËt råi!!!")
end
end
function x3()
Earn (GetTask(2054)*4)
Msg2Player("Ng¬i ®· nhËn ®îc <color=yellow>"..GetTask(2054)/10000*4 .." v¹n lîng.")
end
function x2()
Earn (GetTask(2054)*3)
Msg2Player("Ng¬i ®· nhËn ®îc <color=yellow>"..GetTask(2054)/10000*3 .." v¹n lîng.")
end
function x1()
Earn (GetTask(2054)*2)
Msg2Player("Ng¬i ®· nhËn ®îc <color=yellow>"..GetTask(2054)/10000*2 .." v¹n lîng.")
end
function main() dofile("script/truyen/xo_so/baucua.lua");
Say("<color=fire>Sßng B¹c<color>: Mét ¨n mét, ®Æt xong lÊy tay lªn!!! ",7,
"BÇu/b1",
"Cua/b2",
"C¸/b3",
"Gµ/b4",
"Nai/b5",
"T«m/b6",
"Ta kh«ng ch¬i/no" )
end
function b1()
AskClientForNumber("tien1",0,10000000,"NhËp tiÒn cîc")
end
function tien1(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,1)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>BÇu<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ.......................<enter>Khui!!!")
end
function b2()
AskClientForNumber("tien2",0,10000000,"NhËp tiÒn cîc")
end
function tien2(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,2)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>Cua<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ......................<enter>Khui!!!")
end
function b3()
AskClientForNumber("tien3",0,10000000,"NhËp tiÒn cîc")
end
function tien3(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,3)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>C¸<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ...............<enter>Khui!!!")
end
function b4()
AskClientForNumber("tien4",0,10000000,"NhËp tiÒn cîc")
end
function tien4(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,4)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>Gµ<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ.............<enter>Khui!!!")
end
function b5()
AskClientForNumber("tien5",0,10000000,"NhËp tiÒn cîc")
end
function tien5(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,5)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>Nai<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ...........<enter>Khui!!!")
end
function b6()
AskClientForNumber("tien6",0,10000000,"NhËp tiÒn cîc")
end
function tien6(nNum)
if GetCash() < nNum then
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i kh«ng cã tiÒn th× biÕn ®i chæ kh¸c!!!")
return
end
Pay(nNum)
SetTask(2053,6)
SetTask(2054,nNum)
Talk(15,"ketqua","<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=green>T«m<color> víi sè tiÒn cîc lµ <color=yellow>"..nNum/10000 .." v¹n lîng<color> <enter>§Æt xong rót tay ra!!! <enter>ChuÈn bÞ.............<enter>Khui....!!!")
end
function ketqua()
SetTask(2050,random(1,6))
SetTask(2051,random(1,6))
SetTask(2052,random(1,6))
if GetTask(2053) ==1 then
tom = "BÇu"
elseif GetTask(2053) == 2 then
tom = "Cua"
elseif GetTask(2053) == 3 then
tom = "C¸"
elseif GetTask(2053) == 4 then
tom = "Gµ"
elseif GetTask(2053) == 5 then
tom = "Nai"
elseif GetTask(2053) == 6 then
tom = "T«m"
end
if GetTask(2050) ==1 then
bau = "BÇu"
elseif GetTask(2050) == 2 then
bau = "Cua"
elseif GetTask(2050) == 3 then
bau = "C¸"
elseif GetTask(2050) == 4 then
bau = "Gµ"
elseif GetTask(2050) == 5 then
bau = "Nai"
else
bau = "T«m"
end
if GetTask(2051) ==1 then
cua = "BÇu"
elseif GetTask(2051) == 2 then
cua = "Cua"
elseif GetTask(2051) == 3 then
cua = "C¸"
elseif GetTask(2051) == 4 then
cua = "Gµ"
elseif GetTask(2051) == 5 then
cua = "Nai"
else
cua = "T«m"
end
if GetTask(2052) ==1 then
ca = "BÇu"
elseif GetTask(2052) == 2 then
ca = "Cua"
elseif GetTask(2052) == 3 then
ca = "C¸"
elseif GetTask(2052) == 4 then
ca = "Gµ"
elseif GetTask(2052) == 5 then
ca = "Nai"
else
ca = "T«m"
end
Say("<color=fire>Sßng B¹c<color>: Ng¬i ®· ®Æt <color=cyan>"..tom.."<color>. KÕt qu¶ sau khi khui lÇn nµy lµ:<enter><enter> <color=green>"..bau.."<color> - <color=pink> "..cua.."<color> - <color=gold> "..ca.." ",3,
"Tróng råi/trung",
"Ch¬i tiÕp/main",
"NghØ ch¬i/ok" )
end
function trung()
if GetTask(2053) == GetTask(2050) and GetTask(2053) == GetTask(2051) and GetTask(2053) == GetTask(2052) then
Talk(15,"x3","<color=fire>Sßng B¹c<color>: Chóc mõng ng¬i tróng liªn tôc 3 con <color=green>"..tom.."<color> víi sè tiÒn thëng lµ "..GetTask(2054)/10000 .." + "..GetTask(2054)/10000 .." v¹n x3 = <color=yellow>"..GetTask(2054)/10000*4 .." v¹n lîng!")
elseif (GetTask(2053) == GetTask(2050) and GetTask(2053) == GetTask(2051)) or (GetTask(2053) == GetTask(2050) and GetTask(2053) == GetTask(2052)) or (GetTask(2053) == GetTask(2051) and GetTask(2053) == GetTask(2052)) then
Talk(15,"x2","<color=fire>Sßng B¹c<color>: Chóc mõng ng¬i tróng liªn tôc 2 con <color=green>"..tom.."<color> víi sè tiÒn thëng lµ "..GetTask(2054)/10000 .." + "..GetTask(2054)/10000 .." v¹n x2 = <color=yellow>"..GetTask(2054)/10000*3 .." v¹n lîng!")
elseif GetTask(2053) == GetTask(2050) or GetTask(2053) == GetTask(2051) or GetTask(2053) == GetTask(2052) then
Talk(15,"x1","<color=fire>Sßng B¹c<color>: Chóc mõng ng¬i tróng 1 con <color=green>"..tom.."<color> víi sè tiÒn thëng lµ "..GetTask(2054)/10000 .." + "..GetTask(2054)/10000 .." v¹n = <color=yellow>"..GetTask(2054)/10000*2 .." v¹n lîng!")
else
Talk(15,"","<color=fire>Sßng B¹c<color>: Ng¬i bÞ hoa m¾t µ? TrËt råi!!!")
end
end
function x3()
Earn (GetTask(2054)*4)
Msg2Player("Ng¬i ®· nhËn ®îc <color=yellow>"..GetTask(2054)/10000*4 .." v¹n lîng.")
end
function x2()
Earn (GetTask(2054)*3)
Msg2Player("Ng¬i ®· nhËn ®îc <color=yellow>"..GetTask(2054)/10000*3 .." v¹n lîng.")
end
function x1()
Earn (GetTask(2054)*2)
Msg2Player("Ng¬i ®· nhËn ®îc <color=yellow>"..GetTask(2054)/10000*2 .." v¹n lîng.")
end