unit QQZZ;
interface
uses Classes, SysUtils,DateUtils, FastIniFile, StrUtils;
procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
procedure hadmin(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
procedure DBOC(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
procedure DBDBQK(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
procedure ksqz1(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
implementation
function GETtxt(const S:String):string;
var
SS:string;
begin
SS:=S;
while Length(SS) < 7 do //10字符串长度
begin
SS:= SS + ' '; //填充#
end;
Result := SS;
end;
procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
const
s1=
[[
欢迎光临,这里是大玩家娱乐城,你目前有[$GAMEGOLD$]个娱乐币\
大玩家姓名:[{s=$zjxm$;c=249}]大玩家本钱数:[{s=$zjbq$;c=249}]当前状态:[{s=$qzZT$;c=249}]\
\ \
{s=╔┈┈┈┈╗;c=243} 押大总金额:【<$ydzje$>】 $kydsl$ \
{s=┊;c=243}<查看说明/@Help>{s=┊;c=243} 押小总金额:【<$yxzje$>】 $kyxsl$\
{s=╚┈┈┈┈╝;c=243} 你下注情况:你押【<$xzyb$>】个娱乐币押【<$ydx$>】 \
\
开奖记录:{s=$kjjl$;c=251} \
$xzwj$
]];
s2=
[[
欢迎光临,这里是大玩家娱乐城,你目前有[$GAMEGOLD$]个娱乐币\
大玩家姓名:[{s=$zjxm$;c=249}]大玩家本钱数:[{s=$zjbq$;c=249}]当前状态:[{s=$qzZT$;c=249}]\
\ \
{s=╔┈┈┈┈╗;c=243} 押大总金额:【<$ydzje$>】 $kydsl$ \
{s=┊;c=243}<后台管理/@hadmin>{s=┊;c=243} 押小总金额:【<$yxzje$>】 $kyxsl$\
{s=╚┈┈┈┈╝;c=243} 你下注情况:你押【<$xzyb$>】个娱乐币押【<$ydx$>】 \
\
开奖记录:{s=$kjjl$;c=251} \
$xzwj$
]];
var
D,X:INTEGER;
AMessage : string;
begin
if gamelib.VarInteger('赌博开关').AsInteger = 0 then
begin
if Player.ISAdmin then
begin
Npc.Say(Player,'\ \ \ 大玩家娱乐已经关闭!!!\ \ \ <后台管理/@hadmin>');
end else
begin
Npc.Say(Player,'\ \ \ 大玩家娱乐已经关闭!!!');
end;
end else
begin
if gamelib.VarInteger('下注开始').AsInteger = 50 then
begin
gamelib.VarString('庄家姓名').AsString:='无';
player.VarString('押大小').AsString :='无';
end;
if Player.ISAdmin then
begin
Player.CloseWindow('赌博后台');
AMessage := Replacestr(s2,'$GAMEGOLD$',player.GameGold);
end else
begin
AMessage := Replacestr(s1,'$GAMEGOLD$',player.GameGold);
end;
AMessage := Replacestr(AMessage,'$xzwj$',gamelib.A[14]);
AMessage := Replacestr(AMessage,'$kjjl$',gamelib.A[13].tostring);
AMessage := Replacestr(AMessage,'$qzZT$',gamelib.VarString('抢庄状态').AsString);
AMessage := Replacestr(AMessage,'$zjxm$',gettxt(gamelib.VarString('庄家姓名').AsString));
AMessage := Replacestr(AMessage,'$zjbq$',gettxt(gamelib.VarInteger('庄家本钱').AsString));
AMessage := Replacestr(AMessage,'$ydzje$',gettxt(gamelib.VarInteger('押大总金额').AsString));
AMessage := Replacestr(AMessage,'$yxzje$',gettxt(gamelib.VarInteger('押小总金额').AsString));
D:= gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押小总金额').AsInteger - gamelib.VarInteger('押大总金额').AsInteger ;
X:= gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押大总金额').AsInteger - gamelib.VarInteger('押小总金额').AsInteger ;
AMessage := Replacestr(AMessage,'$kydsl$',gettxt(D.ToString));
AMessage := Replacestr(AMessage,'$kyxsl$',gettxt(X.ToString));
if player.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
AMessage := Replacestr(AMessage,'$xzyb$',player.VarInteger('下注').AsString);
AMessage := Replacestr(AMessage,'$ydx$',player.VarString('押大小').AsString );
Npc.SayEx(Player, '娱乐窗口', AMessage);
end else
begin
player.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger;
player.VarInteger('庄期').save;
player.VarString('押大小').AsString := '无';
player.VarString('押大小').Save;
player.VarInteger('下注').AsInteger := 0 ;
player.VarInteger('下注').Save;
player.VarInteger('下注状态').AsInteger := 0;
player.VarInteger('下注状态').Save;
AMessage := Replacestr(AMessage,'$xzyb$','0');
AMessage := Replacestr(AMessage,'$ydx$','无');
Npc.SayEx(Player, '娱乐窗口', AMessage);
end;
end;
end;
procedure srsz(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
Player.p[5] :=0;
Player.p[6] :=0;
if Player.p[4] > 0 then
begin
Player.p[4] :=Player.p[4]*10 + args.Int[0];
end else
begin
if args.Int[0] > 0 then
begin
Player.p[4] :=Player.p[4] + args.Int[0];
end else
begin
player.Messagebox('你第一数字必须是大于0')
end;
end;
ksqqq(npc,player,args);
end;
procedure SRXD(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
Player.p[4] :=0;
Player.p[6] :=0;
if Player.p[5] > 0 then
begin
Player.p[5] :=Player.p[5]*10 + args.Int[0];
end else
begin
if args.Int[0] > 0 then
begin
Player.p[5] :=Player.p[5] + args.Int[0];
end else
begin
player.Messagebox('你第一数字必须是大于0')
end;
end;
ksxzd(npc,player,args);
end;
procedure SRXX(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
Player.p[4] :=0;
Player.p[5] :=0;
if Player.p[6] > 0 then
begin
Player.p[6] :=Player.p[6]*10 + args.Int[0];
end else
begin
if args.Int[0] > 0 then
begin
Player.p[6] :=Player.p[6] + args.Int[0];
end else
begin
player.Messagebox('你第一数字必须是大于0')
end;
end;
ksxzx(npc,player,args);
end;
procedure ksqqq(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
const
s=
[[
$srs$
]];
var
AMessage : string;
begin
if gamelib.VarInteger('赌博开关').AsInteger = 0 then
begin
player.Messagebox('大玩家娱乐系统已经关闭!等待系统提示开启') ;
exit;
end else
begin
Player.CloseWindow('下小输入框');
Player.CloseWindow('下大输入框');
Player.p[5] :=0;
Player.p[6] :=0;
AMessage := Replacestr(s,'$srs$',Player.p[4]);
Npc.SayEx(Player, '输入框', AMessage);
end;
end;
procedure ksxzd(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
const
s=
[[
$srss$
]];
var
AMessage : string;
begin
if gamelib.VarInteger('赌博开关').AsInteger = 0 then
begin
player.Messagebox('大玩家娱乐系统已经关闭!等待系统提示开启') ;
exit;
end else
begin
Player.CloseWindow('输入框');
Player.CloseWindow('下小输入框');
Player.p[4] :=0;
Player.p[6] :=0;
AMessage := Replacestr(s,'$srss$',Player.p[5]);
Npc.SayEx(Player, '下大输入框', AMessage);
end;
end;
procedure ksxzx(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
const
s=
[[
$srsss$
]];
var
AMessage : string;
begin
if gamelib.VarInteger('赌博开关').AsInteger = 0 then
begin
player.Messagebox('大玩家娱乐系统已经关闭!等待系统提示开启') ;
exit;
end else
begin
Player.p[5] :=0;
Player.p[4] :=0;
Player.CloseWindow('输入框');
Player.CloseWindow('下大输入框');
AMessage := Replacestr(s,'$srsss$',Player.p[6]);
Npc.SayEx(Player, '下小输入框', AMessage);
end;
end;
procedure ksqq1111(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
var
IniFile: TFastIniFile;
I: Integer;
APlayer : TPlayObject;
begin
if gamelib.VarInteger('抢庄参数').AsInteger = 1 then
begin
if (Player.p[4] < 1000)or(Player.p[4]>50000) then
begin
Player.p[4] := 0;
ksqqq(npc,player,args);
player.MessageBox('请输入大于1000元宝小于5W元宝的数值')
end else
begin
if gamelib.VarString('庄家姓名').AsString = player.Name then
begin
Player.p[4] := 0;
Player.CloseWindow('输入框');
player.MessageBox('你已经是大玩家了,无法再次抢庄')
end else
begin
if player.GameGold < Player.p[4] then
begin
Player.p[4] := 0;
Player.CloseWindow('输入框');
player.Messagebox('你的娱乐币不够,确认你输入的娱乐币数量')
end else
begin
if Player.p[4] < gamelib.VarInteger('庄家本钱').AsInteger+1 then
begin
Player.p[4] := 0;
Player.CloseWindow('输入框');
player.Messagebox('你必须出多于【'+gamelib.VarInteger('庄家本钱').AsString+'】个娱乐币才能抢庄')
end else
begin
if Gamelib.VarInteger('抢庄时间').AsInteger = 20 then
begin
APlayer := gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString); // 设置 APLAYER 为老庄稼名字
APlayer.GameGold:=APlayer.GameGold+gamelib.VarInteger('庄家本钱').AsInteger; // 还给被抢庄玩家娱乐币
gamelib.VarString('庄家姓名').AsString:=player.Name ;
gamelib.VarInteger('庄家本钱').AsInteger := Player.p[4] ;
player.GameGold := player.GameGold - Player.p[4] ;
player.GoldChanged;
player.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger ;
player.VarInteger('庄期').Save;
Gamelib.Broadcastsay('[美女服务员]:玩家【'+player.name+'】使用【 '+inttostr(Player.p[4])+'】个娱乐坐大玩家。', 249, 250);
player.SendMessage('<{s=[美女服务员]:恭喜你抢庄成功!!!;c=243}>');
Gamelib.VarInteger('抢庄时间').AsInteger := 0;
Gamelib.VarInteger('抢庄参数').AsInteger := 0;
Player.p[4] := 0;
Player.CloseWindow('输入框');
end
else
begin
APlayer := gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString); // 设置 APLAYER 为被抢庄家名字
APlayer.GameGold:=APlayer.GameGold+gamelib.VarInteger('庄家本钱').AsInteger; // 还给被抢庄玩家娱乐币
gamelib.VarString('庄家姓名').AsString:= player.Name ;
gamelib.VarInteger('庄家本钱').AsInteger:= Player.p[4];
player.GameGold := player.GameGold - Player.p[4];
player.GoldChanged;
player.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger ;
player.VarInteger('庄期').Save;
Gamelib.Broadcastsay('[美女服务员]:['+player.name+']使用['+inttostr(Player.p[4])+']个娱乐币坐大玩家。', 249, 250);
player.SendMessage('<{s=[美女服务员]:恭喜你抢庄成功!!!;c=243}>');
Player.p[4] := 0;
Player.CloseWindow('输入框');
end;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
Main(npc,Aplayer,args);
end;
end;
end;
end;
end;
end;
end;
end else
BEGIN
Player.p[4] := 0;
Player.CloseWindow('输入框');
player.MessageBox('大玩家娱乐提示:\当前是下注状态不允许抢庄,请注意抢庄开启提示');
end;
end;
procedure yjqz(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
var
IniFile: TFastIniFile;
I: Integer;
APlayer : TPlayObject;
begin
if gamelib.VarInteger('抢庄参数').AsInteger = 1 then
begin
if gamelib.VarString('庄家姓名').AsString = player.Name then
begin
Player.p[4] := 0;
Player.CloseWindow('输入框');
player.MessageBox('你已经是大玩家了,无法再次抢庄')
end else
begin
if player.GameGold < 50000 then
begin
Player.CloseWindow('输入框');
player.Messagebox('对不起!抢庄失败!\ \你的娱乐币不够,一键抢庄需要娱乐币50000个')
end else
begin
APlayer := gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString); // 设置 APLAYER 为被抢庄家名字
APlayer.GameGold:=APlayer.GameGold+gamelib.VarInteger('庄家本钱').AsInteger; // 还给被抢庄玩家娱乐币
gamelib.VarString('庄家姓名').AsString:=player.Name ;
gamelib.VarInteger('庄家本钱').AsInteger := 50000 ;
player.GameGold := player.GameGold - 50000 ;
player.GoldChanged;
player.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger ;
player.VarInteger('庄期').Save;
Gamelib.Broadcastsay('[美女服务员]:玩家【'+player.name+'】使用【50000】个娱乐坐大玩家。', 249, 250);
player.SendMessage('<{s=[美女服务员]:恭喜你抢庄成功!!!;c=243}>');
Gamelib.VarInteger('抢庄时间').AsInteger := 0;
Gamelib.VarInteger('抢庄参数').AsInteger := 0;
Player.CloseWindow('输入框');
Gamelib.VarInteger('抢庄时间').AsInteger := 22;
Gamelib.VarInteger('抢庄参数').AsInteger := 2;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
Aplayer.DeleteCountDownMessage(100);
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
Main(npc,Aplayer,args);
end;
end;
end;
end;
end;
end else
begin
Player.CloseWindow('输入框');
player.MessageBox('大玩家娱乐提示:\当前是下注状态不允许抢庄,请注意抢庄开启提示');
end;
end;
procedure ksqq2222(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); //下注大
var
IniFile: TFastIniFile;
I,I1 : Integer;
APlayer :TPlayObject;
begin
if Player.p[5] < 10 then
begin
player.MessageBox('[提示]:请输入下注数量。最低下注10元宝');
exit;
end;
if gamelib.VarInteger('抢庄参数').AsInteger = 3 then
begin
if gamelib.VarString('庄家姓名').AsString = player.Name then
begin
Player.p[5] := 0;
Player.CloseWindow('下大输入框');
player.MessageBox('[提示]:你目前已经是大玩家,无法下注。')
end else
begin
if player.VarString('押大小').AsString = '小' then
begin
Player.p[5] := 0;
Player.CloseWindow('下大输入框');
player.MessageBox('[提示]:你已经下注押了小,无法重复下注押大!')
end else
begin
I1:= gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押小总金额').AsInteger - gamelib.VarInteger('押大总金额').AsInteger ;
if gamelib.VarInteger('押大总金额').AsInteger + Player.p[5] > gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押小总金额').AsInteger then
begin
Player.p[5] := 0;
ksxzd(npc,player,args);
player.MessageBox('\[提示]:对不起,庄家的本钱已达到上线不够赔了。\ \您仅能下注'+inttostr(I1)+'以下的娱乐币!')
end else
begin
if player.GameGold < Player.p[5] then
begin
Player.p[5] := 0;
ksxzd(npc,player,args);
player.Messagebox('你的娱乐币不够,确认你输入的娱乐币数量')
end else
begin
gamelib.VarInteger('押大总金额').AsInteger :=gamelib.VarInteger('押大总金额').AsInteger+ Player.p[5];
player.VarInteger('下注').AsInteger := player.VarInteger('下注').AsInteger + Player.p[5] ;
player.VarInteger('下注').Save;
player.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger ;
player.VarInteger('庄期').Save;
player.VarString('押大小').AsString := '大';
player.VarString('押大小').save;
player.GameGold := player.GameGold - Player.p[5];
player.GoldChanged;
Player.CloseWindow('下大输入框');
if player.VarInteger('下注状态').AsInteger > 0 then
begin
gamelib.A[14] := gamelib.A[14] + player.name.tostring +':追加下注---大---'+inttostr(Player.p[5])+'游戏币 共下注娱乐币'+ player.VarInteger('下注').AsString+'个\' ;
Gamelib.BroadcastSay('[美女服务员]:['+player.name+']使用['+inttostr(Player.p[5])+']个娱乐币追加下注<大>,累积下注娱乐币'+ player.VarInteger('下注').AsString+'个,你也想耍一下的话,来洗浴中心玩一玩吧!',249,255);
end else
begin
player.VarInteger('下注状态').AsInteger := player.VarInteger('下注状态').AsInteger + 1;
player.VarInteger('下注状态').Save;
gamelib.A[14] := gamelib.A[14] + player.name.tostring +':下注---大---游戏币:'+ player.VarInteger('下注').AsString+'个\' ;
Gamelib.BroadcastSay('[美女服务员]:['+player.name+']使用['+inttostr(Player.p[5])+']个娱乐币下注<大>,你也想耍一下的话,来洗浴中心玩一玩吧!',249,255);
end;
Player.p[5] := 0;
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '押注记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
IniFile.WriteInteger(player.name, '下注大', player.VarInteger('下注').AsInteger); //写值
IniFile.UpdateFile; //更新INI文件
finally
IniFile.Free;
end;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
Main(npc,Aplayer,args);
end;
end;
end;
end;
end;
end;
end;
end else
begin
Player.p[5] := 0;
Player.CloseWindow('下大输入框');
player.MessageBox('[提示]:现在是抢庄状态!不允许下注!注意下注开启提示');
end;
end;
procedure ksyd(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); //快速下注大
var
IniFile: TFastIniFile;
I,I1 : Integer;
APlayer :TPlayObject;
begin
if gamelib.VarInteger('抢庄参数').AsInteger = 3 then
begin
if gamelib.VarString('庄家姓名').AsString = player.Name then
begin
Player.p[5] := 0;
Player.CloseWindow('下大输入框');
player.MessageBox('[提示]:你目前已经是大玩家,无法下注。')
end else
begin
if player.VarString('押大小').AsString = '小' then
begin
Player.CloseWindow('下大输入框');
player.MessageBox('[提示]:你已经下注押了小,无法重复下注押大!')
end else
begin
I1:= gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押小总金额').AsInteger - gamelib.VarInteger('押大总金额').AsInteger ;
begin
if player.GameGold < I1 then
begin
Player.p[5] := 0;
ksxzd(npc,player,args);
player.Messagebox('大玩家娱乐提示:\你的娱乐币不够,确认你您的娱乐币数量\当前您仅能下注'+inttostr(I1)+'以下的娱乐币!')
end else
begin
gamelib.VarInteger('押大总金额').AsInteger :=gamelib.VarInteger('押大总金额').AsInteger + I1;
player.VarInteger('下注').AsInteger := player.VarInteger('下注').AsInteger + I1 ;
player.VarInteger('下注').Save;
player.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger ;
player.VarInteger('庄期').Save;
player.VarString('押大小').AsString := '大';
player.VarString('押大小').save;
player.GameGold := player.GameGold - I1;
player.GoldChanged;
Player.CloseWindow('下大输入框');
if player.VarInteger('下注状态').AsInteger > 0 then
begin
gamelib.A[14] := gamelib.A[14] + player.name.tostring +':追加下注---大---'+inttostr(I1)+'娱乐币 共下注娱乐币'+ player.VarInteger('下注').AsString+'个\' ;
Gamelib.BroadcastSay('[美女服务员]:['+player.name+']使用['+inttostr(I1)+']个娱乐币追加下注<大>,累积下注娱乐币'+ player.VarInteger('下注').AsString+'个,你也想耍一下的话,来洗浴中心玩一玩吧!',249,255);
end else
begin
player.VarInteger('下注状态').AsInteger := player.VarInteger('下注状态').AsInteger + 1;
player.VarInteger('下注状态').Save;
gamelib.A[14] := gamelib.A[14] + player.name.tostring +':下注---大---娱乐币'+ player.VarInteger('下注').AsString+'个\' ;
Gamelib.BroadcastSay('[美女服务员]:['+player.name+']使用['+inttostr(I1)+']个娱乐币下注<大>,你也想耍一下的话,来洗浴中心玩一玩吧!',249,255);
end;
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '押注记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
IniFile.WriteInteger(player.name, '下注大', player.VarInteger('下注').AsInteger); //写值
IniFile.UpdateFile; //更新INI文件
finally
IniFile.Free;
end;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
Main(npc,Aplayer,args);
end;
end;
end;
end;
end;
end;
end;
end ;
end;
procedure ksqq3333(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); //下注小
var
IniFile: TFastIniFile;
I,I1: Integer;
APlayer :TPlayObject;
begin
if Player.p[6] < 10 then
begin
player.MessageBox('[提示]:请输入下注数量。最低下注10元宝');
exit;
end;
if gamelib.VarInteger('抢庄参数').AsInteger = 3 then
begin
if gamelib.VarString('庄家姓名').AsString = player.Name then
begin
Player.p[6] := 0;
Player.CloseWindow('下小输入框');
player.MessageBox('[提示]:你目前已经是大玩家,无法下注。')
end else
begin
if player.VarString('押大小').AsString = '大' then
begin
Player.p[6] := 0;
Player.CloseWindow('下小输入框');
player.MessageBox('[提示]:你已经下注押了大,无法重复下注押小!')
end else
begin
I1:= gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押大总金额').AsInteger - gamelib.VarInteger('押小总金额').AsInteger ;
if gamelib.VarInteger('押小总金额').AsInteger + Player.p[6] > gamelib.VarInteger('押大总金额').AsInteger + gamelib.VarInteger('庄家本钱').AsInteger then
begin
Player.p[6] := 0;
ksxzx(npc,player,args);
player.MessageBox('\[提示]:对不起,庄家的本钱已达到上线不够赔了。\ \您仅能下注'+inttostr(I1)+'以下的娱乐币!')
end else
begin
if player.GameGold < Player.p[6] then
begin
Player.p[6] := 0;
ksxzx(npc,player,args);
player.Messagebox('你的娱乐币不够,确认你输入的娱乐币数量')
end else
begin
gamelib.VarInteger('押小总金额').AsInteger :=gamelib.VarInteger('押小总金额').AsInteger+ Player.p[6];
player.VarInteger('下注').AsInteger := player.VarInteger('下注').AsInteger + Player.p[6] ;
player.VarInteger('下注').Save;
player.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger ;
player.VarInteger('庄期').Save;
player.VarString('押大小').AsString := '小';
player.VarString('押大小').save;
player.GameGold := player.GameGold -Player.p[6];
player.GoldChanged;
Player.CloseWindow('下小输入框');
if player.VarInteger('下注状态').AsInteger > 0 then
begin
gamelib.A[14] := gamelib.A[14] + player.name.tostring +':追加下注---小---'+inttostr(Player.p[6])+'游戏币 共下注娱乐币'+ player.VarInteger('下注').AsString+'个\' ;
Gamelib.BroadcastSay('[美女服务员]:['+player.name+']使用['+inttostr(Player.p[6])+']个娱乐币追加下注<小>,累积下注娱乐币'+ player.VarInteger('下注').AsString+'个,你也想耍一下的话,来洗浴中心玩一玩吧!',249,255);
end else
begin
player.VarInteger('下注状态').AsInteger := player.VarInteger('下注状态').AsInteger + 1;
player.VarInteger('下注状态').Save;
gamelib.A[14] := gamelib.A[14] + player.name.tostring +':下注---小---游戏币:'+ player.VarInteger('下注').AsString+'个\' ;
Gamelib.BroadcastSay('[美女服务员]:['+player.name+']使用['+inttostr(Player.p[6])+']个娱乐币下注<小>,你也想耍一下的话,来洗浴中心玩一玩吧!',249,255);
end;
Player.p[6] := 0;
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '押注记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
IniFile.WriteInteger(player.name, '下注小', player.VarInteger('下注').AsInteger); //写值
IniFile.UpdateFile; //更新INI文件
finally
IniFile.Free;
end;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
Main(npc,Aplayer,args);
end;
end;
end;
end;
end;
end;
end;
end else
begin
Player.p[6] := 0;
Player.CloseWindow('下小输入框');
player.MessageBox('[提示]:现在是抢庄状态!不允许下注!注意下注开启提示');
end;
end;
procedure ksyx(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); //快速下注大
var
IniFile: TFastIniFile;
I,I1 : Integer;
APlayer :TPlayObject;
begin
if gamelib.VarInteger('抢庄参数').AsInteger = 3 then
begin
if gamelib.VarString('庄家姓名').AsString = player.Name then
begin
Player.p[6] := 0;
Player.CloseWindow('下小输入框');
player.MessageBox('[提示]:你目前已经是大玩家,无法下注。')
end else
begin
if player.VarString('押大小').AsString = '大' then
begin
Player.CloseWindow('下小输入框');
player.MessageBox('[提示]:你已经下注押了大,无法重复下注押小!')
end else
begin
I1:= gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押大总金额').AsInteger - gamelib.VarInteger('押小总金额').AsInteger ;
begin
if player.GameGold < I1 then
begin
Player.p[6] := 0;
ksxzd(npc,player,args);
player.Messagebox('大玩家娱乐提示:\你的娱乐币不够,确认你您的娱乐币数量\当前您仅能下注'+inttostr(I1)+'以下的娱乐币!')
end else
begin
gamelib.VarInteger('押小总金额').AsInteger :=gamelib.VarInteger('押小总金额').AsInteger + I1;
player.VarInteger('下注').AsInteger := player.VarInteger('下注').AsInteger + I1 ;
player.VarInteger('下注').Save;
player.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger ;
player.VarInteger('庄期').Save;
player.VarString('押大小').AsString := '小';
player.VarString('押大小').save;
player.GameGold := player.GameGold - I1;
player.GoldChanged;
Player.CloseWindow('下小输入框');
if player.VarInteger('下注状态').AsInteger > 0 then
begin
gamelib.A[14] := gamelib.A[14] + player.name.tostring +':追加下注---小---'+inttostr(I1)+'娱乐币 共下注娱乐币'+ player.VarInteger('下注').AsString+'个\' ;
Gamelib.BroadcastSay('[美女服务员]:['+player.name+']使用['+inttostr(I1)+']个娱乐币追加下注<小>,累积下注娱乐币'+ player.VarInteger('下注').AsString+'个,你也想耍一下的话,来洗浴中心玩一玩吧!',249,255);
end else
begin
player.VarInteger('下注状态').AsInteger := player.VarInteger('下注状态').AsInteger + 1;
player.VarInteger('下注状态').Save;
gamelib.A[14] := gamelib.A[14] + player.name.tostring +':下注---小---娱乐币'+ player.VarInteger('下注').AsString+'个\' ;
Gamelib.BroadcastSay('[美女服务员]:['+player.name+']使用['+inttostr(I1)+']个娱乐币下注<小>,你也想耍一下的话,来洗浴中心玩一玩吧!',249,255);
end;
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '押注记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
IniFile.WriteInteger(player.name, '下注小', player.VarInteger('下注').AsInteger); //写值
IniFile.UpdateFile; //更新INI文件
finally
IniFile.Free;
end;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
Main(npc,Aplayer,args);
end;
end;
end;
end;
end;
end;
end;
end ;
end;
procedure help(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
const
s1=
[[
猜点游戏规则:\
(1):大玩家坐庄后,其他玩家可下注,两分钟后三个骰子由大玩家掷出\
骰子点数随机出现。点数总和:小于11代表小,点数总和:大于10\
代表大,三个点数相同代表[豹子]。\
(2):押大赢大,押小赢小,豹子通吃!本游戏只收取5%税金。\
(3):本服可以放心娱乐.只要你下注了,不管是山洪暴发还是地震掉线\
只要玩家再次上线都会获得当期开奖结果,如果当期赢得游戏币,\
那么系统会自动返还当期赢得的游戏币数量\
(4):不要沉迷娱乐,累了可以下水去嬉戏一番。 <返回/@MAIN> <离开/@EXIT>\
]];
begin
npc.say(player,s1);
end;
procedure kscd(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
var
IniFile: TFastIniFile;
I,I1,I4,I5:integer;
APlayer: TPlayObject;
begin
randomize;
if gamelib.VarInteger('赌博骰子1').AsInteger > 0 then
begin
gamelib.G[51]:=gamelib.VarInteger('赌博骰子1').AsInteger;
end else
begin
gamelib.G[51]:=random(6)+1;
end;
if gamelib.VarInteger('赌博骰子2').AsInteger > 0 then
begin
gamelib.G[52]:=gamelib.VarInteger('赌博骰子2').AsInteger;
end else
begin
gamelib.G[52]:=random(6)+1;
end;
if gamelib.VarInteger('赌博骰子3').AsInteger > 0 then
begin
gamelib.G[53]:=gamelib.VarInteger('赌博骰子3').AsInteger;
end else
begin
gamelib.G[53]:=random(6)+1;
end;
IF (gamelib.G[51]=gamelib.G[52]) and (gamelib.G[52]=gamelib.G[53]) then
begin
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '开奖记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
IniFile.WriteInteger(gamelib.VarString('庄期').AsString, '豹子',1); //写值
IniFile.UpdateFile; //更新INI文件
finally
IniFile.Free;
end;
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '押注记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
begin
IniFile.WriteInteger(gamelib.VarString('庄家姓名').AsString, '坐庄', gamelib.VarInteger('庄家本钱').AsInteger+trunc((gamelib.VarInteger('押大总金额').AsInteger+gamelib.VarInteger('押小总金额').AsInteger)*0.95)); //写值
IniFile.UpdateFile;
end;
for I := 0 to Gamelib.PlayCount - 1 do //循环全部在线玩家
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
APlayer.PlayDice(100{骰子标志}, gamelib.G[51], gamelib.G[52], gamelib.G[53], 5000);
Npc.CloseDialog(APlayer); //关闭对话框
//APlayer.CloseWindow('娱乐窗口');
if (gamelib.VarInteger('押大总金额').AsInteger = 0) and (gamelib.VarInteger('押小总金额').AsInteger = 0) then
begin
APlayer:=gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString);
if APlayer <> nil then
begin
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + gamelib.VarInteger('庄家本钱').AsInteger ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
IniFile.EraseSection(gamelib.VarString('庄家姓名').AsString);
IniFile.UpdateFile;
end ;
gamelib.VarString('大小记录').AsString:= '豹' ;
exit;
end;
if Aplayer.name = gamelib.VarString('庄家姓名').AsString then
begin
APlayer:=gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString);
I5:=gamelib.VarInteger('押大总金额').AsInteger + gamelib.VarInteger('押小总金额').AsInteger;
APlayer.GameGold:=APlayer.GameGold + gamelib.VarInteger('庄家本钱').AsInteger + trunc(I5*0.95);
APlayer.GoldChanged;
end;
IniFile.EraseSection(aplayer.name);
IniFile.UpdateFile; //更新INI文件
end;
end;
end;
finally
IniFile.Free;
end;
gamelib.VarString('大小记录').AsString:= '豹' ;
I1:=gamelib.VarInteger('押大总金额').AsInteger + gamelib.VarInteger('押小总金额').AsInteger;
Gamelib.VarInteger('娱乐收入').AsInteger := Gamelib.VarInteger('娱乐收入').AsInteger + (I1-trunc(I1*0.95));
Gamelib.VarInteger('娱乐收入').Save;
end else
begin
if gamelib.G[51] + gamelib.G[52] + gamelib.G[53] > 10 then
begin
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '开奖记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
IniFile.WriteInteger(gamelib.VarString('庄期').AsString, '大',11); //写值
IniFile.UpdateFile; //更新INI文件
finally
IniFile.Free;
end;
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '押注记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
if gamelib.VarInteger('押大总金额').AsInteger < gamelib.VarInteger('庄家本钱').AsInteger + trunc((gamelib.VarInteger('押小总金额').AsInteger)*0.95) then
begin
if gamelib.VarInteger('押大总金额').AsInteger < gamelib.VarInteger('押小总金额').AsInteger then
begin
IniFile.WriteInteger(gamelib.VarString('庄家姓名').AsString, '坐庄', + gamelib.VarInteger('庄家本钱').AsInteger+ trunc((gamelib.VarInteger('押小总金额').AsInteger-gamelib.VarInteger('押大总金额').AsInteger)*0.95)); //写值
IniFile.UpdateFile;
end;
if gamelib.VarInteger('押大总金额').AsInteger >= gamelib.VarInteger('押小总金额').AsInteger then
begin
IniFile.WriteInteger(gamelib.VarString('庄家姓名').AsString, '坐庄', + gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押小总金额').AsInteger-gamelib.VarInteger('押大总金额').AsInteger); //写值
IniFile.UpdateFile;
end;
end else
begin
IniFile.WriteInteger(gamelib.VarString('庄家姓名').AsString, '坐庄', -1); //写值
IniFile.UpdateFile;
end;
for I := 0 to Gamelib.PlayCount - 1 do //循环全部在线玩家
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
APlayer.PlayDice(100{骰子标志}, gamelib.G[51], gamelib.G[52], gamelib.G[53],5000);
//APlayer.CloseWindow('娱乐窗口');
Npc.CloseDialog(APlayer); //关闭对话框
if (gamelib.VarInteger('押大总金额').AsInteger = 0) and (gamelib.VarInteger('押小总金额').AsInteger = 0) then
begin
APlayer:=gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString);
if APlayer <> nil then
begin
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + gamelib.VarInteger('庄家本钱').AsInteger ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
IniFile.EraseSection(gamelib.VarString('庄家姓名').AsString);
IniFile.UpdateFile;
end ;
gamelib.VarString('大小记录').AsString:= '大' ;
exit;
end;
if Aplayer.VarString('押大小').AsString = '大' then
begin
Aplayer.GameGold:= aplayer.GameGold + aplayer.VarInteger('下注').AsInteger+ trunc(aplayer.VarInteger('下注').AsInteger*0.95);
Aplayer.GoldChanged;
Gamelib.VarInteger('娱乐收入').AsInteger := Gamelib.VarInteger('娱乐收入').AsInteger + trunc(aplayer.VarInteger('下注').AsInteger*0.05);
Gamelib.VarInteger('娱乐收入').Save;
end;
if gamelib.VarInteger('押大总金额').AsInteger < gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押小总金额').AsInteger then
begin
if Aplayer.name = gamelib.VarString('庄家姓名').AsString then
begin
if gamelib.VarInteger('押大总金额').AsInteger < gamelib.VarInteger('押小总金额').AsInteger then
begin
I4:= gamelib.VarInteger('庄家本钱').AsInteger + trunc((gamelib.VarInteger('押小总金额').AsInteger-gamelib.VarInteger('押大总金额').AsInteger)*0.95);
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + I4 ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
I1:=gamelib.VarInteger('押小总金额').AsInteger-gamelib.VarInteger('押大总金额').AsInteger ;
Gamelib.VarInteger('娱乐收入').AsInteger := Gamelib.VarInteger('娱乐收入').AsInteger + trunc(I1*0.05);
Gamelib.VarInteger('娱乐收入').Save;
end;
if gamelib.VarInteger('押大总金额').AsInteger = gamelib.VarInteger('押小总金额').AsInteger then
begin
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + gamelib.VarInteger('庄家本钱').AsInteger ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
end;
if gamelib.VarInteger('押大总金额').AsInteger > gamelib.VarInteger('押小总金额').AsInteger then
begin
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押小总金额').AsInteger-gamelib.VarInteger('押大总金额').AsInteger ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
end;
end;
end;
IniFile.EraseSection(aplayer.name);
IniFile.UpdateFile; //更新INI文件
end;
end;
end;
finally
IniFile.Free;
end;
gamelib.VarString('大小记录').AsString:= '大' ;
end;
if gamelib.G[51] + gamelib.G[52] + gamelib.G[53] < 11 then
begin
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '开奖记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
IniFile.WriteInteger(gamelib.VarString('庄期').AsString, '小',10); //写值
IniFile.UpdateFile; //更新INI文件
finally
IniFile.Free;
end;
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '押注记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
if gamelib.VarInteger('押小总金额').AsInteger < gamelib.VarInteger('庄家本钱').AsInteger + trunc((gamelib.VarInteger('押大总金额').AsInteger)*0.95) then
begin
if gamelib.VarInteger('押小总金额').AsInteger < gamelib.VarInteger('押大总金额').AsInteger then
begin
IniFile.WriteInteger(gamelib.VarString('庄家姓名').AsString, '坐庄', + gamelib.VarInteger('庄家本钱').AsInteger + trunc((gamelib.VarInteger('押大总金额').AsInteger-gamelib.VarInteger('押小总金额').AsInteger)*0.95)); //写值
IniFile.UpdateFile;
end;
if gamelib.VarInteger('押小总金额').AsInteger >= gamelib.VarInteger('押大总金额').AsInteger then
begin
IniFile.WriteInteger(gamelib.VarString('庄家姓名').AsString, '坐庄', + gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押大总金额').AsInteger-gamelib.VarInteger('押小总金额').AsInteger); //写值
IniFile.UpdateFile;
end;
end else
begin
IniFile.WriteInteger(gamelib.VarString('庄家姓名').AsString, '坐庄',-1); //写值
IniFile.UpdateFile;
end;
for I := 0 to Gamelib.PlayCount - 1 do //循环全部在线玩家
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
APlayer.PlayDice(100{骰子标志}, gamelib.G[51], gamelib.G[52], gamelib.G[53], 5000);
//APlayer.CloseWindow('娱乐窗口');
Npc.CloseDialog(APlayer); //关闭对话框
if (gamelib.VarInteger('押大总金额').AsInteger = 0) and (gamelib.VarInteger('押小总金额').AsInteger = 0) then
begin
APlayer:=gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString);
if APlayer <> nil then
begin
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + gamelib.VarInteger('庄家本钱').AsInteger ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
IniFile.EraseSection(gamelib.VarString('庄家姓名').AsString);
IniFile.UpdateFile;
end ;
gamelib.VarString('大小记录').AsString:= '小' ;
exit;
end;
if Aplayer.VarString('押大小').AsString = '小' then
begin
Aplayer.GameGold:=aplayer.GameGold+ aplayer.VarInteger('下注').AsInteger + trunc(aplayer.VarInteger('下注').AsInteger*0.95);
Aplayer.GoldChanged;
Gamelib.VarInteger('娱乐收入').AsInteger := Gamelib.VarInteger('娱乐收入').AsInteger + trunc(aplayer.VarInteger('下注').AsInteger*0.05);
Gamelib.VarInteger('娱乐收入').Save;
end;
if gamelib.VarInteger('押小总金额').AsInteger < gamelib.VarInteger('庄家本钱').AsInteger + trunc((gamelib.VarInteger('押大总金额').AsInteger)*0.95) then
begin
if Aplayer.name = gamelib.VarString('庄家姓名').AsString then
begin
if gamelib.VarInteger('押小总金额').AsInteger < gamelib.VarInteger('押大总金额').AsInteger then
begin
I4:= gamelib.VarInteger('庄家本钱').AsInteger + trunc((gamelib.VarInteger('押大总金额').AsInteger-gamelib.VarInteger('押小总金额').AsInteger)*0.95);
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + I4 ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
I1:=gamelib.VarInteger('押大总金额').AsInteger-gamelib.VarInteger('押小总金额').AsInteger ;
Gamelib.VarInteger('娱乐收入').AsInteger := Gamelib.VarInteger('娱乐收入').AsInteger + trunc(I1*0.05);
Gamelib.VarInteger('娱乐收入').Save;
end;
if gamelib.VarInteger('押小总金额').AsInteger = gamelib.VarInteger('押大总金额').AsInteger then
begin
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + gamelib.VarInteger('庄家本钱').AsInteger ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
end;
if gamelib.VarInteger('押小总金额').AsInteger > gamelib.VarInteger('押大总金额').AsInteger then
begin
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold := Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GameGold + gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押大总金额').AsInteger-gamelib.VarInteger('押小总金额').AsInteger ;
Gamelib.FindPlayer(gamelib.VarString('庄家姓名').AsString).GoldChanged;
end;
end;
end;
IniFile.EraseSection(aplayer.name);
IniFile.UpdateFile; //更新INI文件
end;
end;
end;
finally
IniFile.Free;
end;
gamelib.VarString('大小记录').AsString:= '小' ;
end;
end;
end;
procedure hadmin(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
const
s1=
[[
\
赌博状态:【$DBZT$】 <赌博开关/@DBOC> \
大玩家姓名:【$zjxm$】 大玩家本钱数:【$zjbq$】\
押大金额 :【$ydzje$】 \
押小金额 :【$yxzje$】\
<赌博初始化/@DBDBQK> \
<一键开大/@da> <一键开小/@xiao> <一键豹子/@bao> \
【骰子1点数】【骰子2点数】【骰子3点数】\
<$zb1$> <$zb2$> <$zb3$> <返回/@MAIN> <离开/@EXIT>\
]];
var
AMessage : string;
begin
Player.CloseWindow('娱乐窗口');
if Player.ISAdmin then
begin
case gamelib.VarInteger('赌博开关').AsInteger of
0:AMessage := Replacestr(s1,'$DBZT$','关闭');
1:AMessage := Replacestr(s1,'$DBZT$','开启');
end;
AMessage := Replacestr(AMessage,'$zjxm$',gamelib.VarString('庄家姓名').AsString);
AMessage := Replacestr(AMessage,'$zjbq$',gamelib.VarInteger('庄家本钱').AsString);
AMessage := Replacestr(AMessage,'$ydzje$',gamelib.VarInteger('押大总金额').AsString);
AMessage := Replacestr(AMessage,'$yxzje$',gamelib.VarInteger('押小总金额').AsString);
AMessage := Replacestr(AMessage,'$zb1$',gamelib.VarInteger('赌博骰子1').AsString);
AMessage := Replacestr(AMessage,'$zb2$',gamelib.VarInteger('赌博骰子2').AsString);
AMessage := Replacestr(AMessage,'$zb3$',gamelib.VarInteger('赌博骰子3').AsString);
Npc.Say(Player,AMessage);
end;
end;
procedure DBDBQK(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
gamelib.A[13] := '';
gamelib.VarString('庄家姓名').AsString := '无';
gamelib.VarString('抢庄状态').AsString := '抢庄中';
gamelib.VarInteger('庄家本钱').AsInteger :=0;
gamelib.VarInteger('押大总金额').AsInteger:=0;
gamelib.VarInteger('押小总金额').AsInteger:=0;
gamelib.VarInteger('抢庄时间').AsInteger := 0 ;
gamelib.VarInteger('押注时间').AsInteger := 0 ;
gamelib.VarInteger('赌博开关').AsInteger := 1;
gamelib.VarInteger('赌博骰子1').AsInteger := 0;
gamelib.VarInteger('赌博骰子2').AsInteger := 0;
gamelib.VarInteger('赌博骰子3').AsInteger := 0;
gamelib.VarInteger('开奖').AsInteger := 0;
gamelib.VarInteger('抢庄参数').AsInteger := 0 ;
hadmin(npc,player,args);
Player.SendMessage('赌博数据初始化成功!', 1);
end;
procedure da(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
gamelib.VarInteger('赌博骰子1').AsInteger := random(2)+3;
gamelib.VarInteger('赌博骰子2').AsInteger := random(4)+3;
gamelib.VarInteger('赌博骰子3').AsInteger := random(2)+5;
hadmin(npc,player,args);
end;
procedure xiao(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
gamelib.VarInteger('赌博骰子1').AsInteger := random(2)+1;
gamelib.VarInteger('赌博骰子2').AsInteger := gamelib.VarInteger('赌博骰子1').AsInteger+2;
gamelib.VarInteger('赌博骰子3').AsInteger := random(4)+1;
hadmin(npc,player,args);
end;
procedure bao(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
gamelib.VarInteger('赌博骰子1').AsInteger := random(6)+1;
gamelib.VarInteger('赌博骰子2').AsInteger := gamelib.VarInteger('赌博骰子1').AsInteger ;
gamelib.VarInteger('赌博骰子3').AsInteger := gamelib.VarInteger('赌博骰子2').AsInteger;
hadmin(npc,player,args);
end;
procedure DBOC(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
if gamelib.VarInteger('赌博开关').AsInteger = 0 then
begin
gamelib.VarInteger('赌博开关').AsInteger := 1;
end else
begin
gamelib.VarInteger('赌博开关').AsInteger := 0;
end;
hadmin(npc,player,args);
end;
procedure ksqz1(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
var
IniFile: TFastIniFile;
I : Integer;
APlayer :TPlayObject;
begin
if Gamelib.VarInteger('抢庄参数').AsInteger = 0 then
begin
Gamelib.VarInteger('抢庄参数').AsInteger := 1;
//Gamelib.BroadcastCountDownMessage('赌场服务员:离抢庄结束时间还有<$Time:20$>!!!');
Gamelib.Broadcastsay('[美女服务员]:现在开始抢庄了,大玩家本钱必须超过1000娱乐币。', 249, 255);
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.MAP.NAME = '鸳鸯浴场' then
begin
if gamelib.I[2] = 0 THEN
BEGIN
gamelib.I[2] := 1;
APlayer.SendCountDownMessage('赌场服务员:离抢庄结束时间还有<$Time:20$>!!!', 1,100);
END;
Main(npc,Aplayer,args);
end;
end;
end;
end;
if gamelib.VarInteger('抢庄参数').AsInteger = 1 then
begin
if gamelib.VarInteger('抢庄时间').AsInteger < 20 then
begin
gamelib.VarInteger('抢庄时间').AsInteger := gamelib.VarInteger('抢庄时间').AsInteger + 1 ;
end;
end;
if Gamelib.VarInteger('抢庄时间').AsInteger = 20 then
begin
gamelib.I[2] := 0;
if Gamelib.VarInteger('庄家本钱').AsInteger > 0 then
begin
Gamelib.VarInteger('抢庄参数').AsInteger := 2 ;
end;
end;
if (Gamelib.VarInteger('抢庄时间').AsInteger < 22) and (Gamelib.VarInteger('抢庄参数').AsInteger = 2) then
begin
gamelib.VarInteger('抢庄时间').AsInteger := gamelib.VarInteger('抢庄时间').AsInteger + 1 ;
end;
if (Gamelib.VarInteger('抢庄时间').AsInteger = 22) and (Gamelib.VarInteger('抢庄参数').AsInteger = 2) then
begin
// Gamelib.BroadcastCountDownMessage('美女服务员:离下注结束时间还有<$Time:50$>');
Gamelib.VarInteger('抢庄参数').AsInteger := 3 ;
gamelib.VarString('抢庄状态').AsString := '下注中' ;
Gamelib.Broadcastsay(' ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈', 249, 255);
Gamelib.Broadcastsay(' [美女服务员]:抢庄已结束。现在是下注时间,押定离手了。', 249, 255);
Gamelib.Broadcastsay(' ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈', 249, 255);
Gamelib.Broadcastsay(' 大玩家姓名:【<'+Gamelib.VarString('庄家姓名').AsString+'>】 大玩家本钱数:【<'+Gamelib.VarInteger('庄家本钱').AsString+'>】', 249, 255);
Gamelib.Broadcastsay(' ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈', 249, 255);
Gamelib.Broadcastsay('[美女服务员]:开始下注啦!赌一赌,农民变地主.搏一搏,自行车变摩托.', 249, 255);
begin
IniFile := TFastIniFile.Create(Gamelib.EnvirPath + '押注记录.ini'); //创建ini对象,参数指定INI文件名称(文件只能从M2 Envir文件夹中读取)
try
IniFile.WriteInteger(Gamelib.VarString('庄家姓名').AsString, '坐庄', gamelib.VarInteger('庄家本钱').AsInteger); //写值
IniFile.UpdateFile; //更新INI文件
finally
IniFile.Free;
end;
end;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
if gamelib.I[1] = 0 THEN
BEGIN
APlayer.SendCountDownMessage('赌场服务员:离下注结束时间还有<$Time:50$>!!!', 1,101);
gamelib.I[1] := 1 ;
end;
Main(npc,Aplayer,args);
end;
end;
end;
end;
if Gamelib.VarInteger('抢庄参数').AsInteger = 3 then
begin
gamelib.I[1] := 0;
if Gamelib.VarInteger('押注时间').AsInteger < 51 then
begin
Gamelib.VarInteger('押注时间').AsInteger := gamelib.VarInteger('押注时间').AsInteger + 1 ;
end;
if Gamelib.VarInteger('押注时间').AsInteger = 51 then
begin
kscd(npc,player,args);
Gamelib.VarInteger('押注时间').AsInteger := gamelib.VarInteger('押注时间').AsInteger + 1 ;
end;
if Gamelib.VarInteger('押注时间').AsInteger = 52 then
begin
if Gamelib.VarInteger('开奖').AsInteger < 3 then
begin
Gamelib.VarInteger('开奖').AsInteger := gamelib.VarInteger('开奖').AsInteger + 1 ;
end;
if Gamelib.VarInteger('开奖').AsInteger = 3 then
begin
CallMethod(npc,player,args);
end;
end;
end;
end;
procedure CallMethod(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
var
A: string;
I,I1,I2,I4,I5:integer;
APlayer :TPlayObject;
begin
if (gamelib.VarInteger('押大总金额').AsInteger = 0) and (gamelib.VarInteger('押小总金额').AsInteger = 0) then
begin
Gamelib.Broadcastsay('[美女服务员]:本局无人下注!大玩家收回了本钱。', 255, 245);
end else
begin
IF (gamelib.G[51]=gamelib.G[52]) and (gamelib.G[52]=gamelib.G[53]) then
begin
Gamelib.Broadcastsay('[美女服务员]:骰子掷出了【<'+inttostr(gamelib.G[51])+'>】【<'+inttostr(gamelib.G[52])+'>】【<'+inttostr(gamelib.G[53])+'>】点【豹子】', 255, 245);
I5:=trunc((gamelib.VarInteger('押大总金额').AsInteger +gamelib.VarInteger('押小总金额').AsInteger)*0.95);
Gamelib.Broadcastsay('[美女服务员]:大玩家【<'+gamelib.VarString('庄家姓名').AsString+'>】开出了豹子,大杀四方,赢了【<'+inttostr(I5)+'>】个娱乐币。', 255, 245);
end else
begin
if gamelib.G[51] + gamelib.G[52] + gamelib.G[53] > 10 then
begin
Gamelib.Broadcastsay('[美女服务员]:骰子掷出了【<'+inttostr(gamelib.G[51])+'>】【<'+inttostr(gamelib.G[52])+'>】【<'+inttostr(gamelib.G[53])+'>】点【大】', 255, 245);
if gamelib.VarInteger('押大总金额').AsInteger < gamelib.VarInteger('庄家本钱').AsInteger + trunc((gamelib.VarInteger('押小总金额').AsInteger)*0.95) then
begin
if gamelib.VarInteger('押大总金额').AsInteger < gamelib.VarInteger('押小总金额').AsInteger then
begin
I4:=trunc((gamelib.VarInteger('押小总金额').AsInteger-gamelib.VarInteger('押大总金额').AsInteger)*0.95);
Gamelib.Broadcastsay('[美女服务员]:大玩家【<'+gamelib.VarString('庄家姓名').AsString+'>】赢得了【<'+inttostr(I4)+'>】个娱乐币。',255, 244);
end;
if gamelib.VarInteger('押大总金额').AsInteger >= gamelib.VarInteger('押小总金额').AsInteger then
begin
I4:=gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押小总金额').AsInteger-gamelib.VarInteger('押大总金额').AsInteger ;
Gamelib.Broadcastsay('[美女服务员]:大玩家【<'+gamelib.VarString('庄家姓名').AsString+'>】收回了【<'+inttostr(I4)+'>】个娱乐币。',255, 244);
end;
end
else
begin
Gamelib.Broadcastsay('[美女服务员]:大玩家【<'+gamelib.VarString('庄家姓名').AsString+'>】在各位赌神高超的神技下,被爆菊花啦.',255, 244);
end;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
if Aplayer.VarString('押大小').AsString = '大' then
begin
I1 := aplayer.VarInteger('下注').AsInteger+trunc(aplayer.VarInteger('下注').AsInteger*0.95);
Gamelib.BroadcastSay('[美女服务员]:恭喜['+Aplayer.Name+']在本次娱乐赌博中,押中『大』,扣除税金连本带利共赢得【<'+inttostr(I1)+'>】娱乐币',255, 244)
end;
if Aplayer.VarString('押大小').AsString = '小' then
begin
APlayer.SendMessage('[美女服务员]:{s=亲爱的玩家['+Aplayer.Name+']本次开奖『大』,手气差了一点!先休息一会在耍耍',2);
APlayer.SendMessage('[美女服务员]:{s=亲爱的玩家['+Aplayer.Name+']本次开奖『大』,手气差了一点!先休息一会在耍耍',2);
end;
end;
end;
end;
end;
if gamelib.G[51] + gamelib.G[52] + gamelib.G[53] < 11 then
begin
Gamelib.Broadcastsay('[美女服务员]:骰子掷出了【<'+inttostr(gamelib.G[51])+'>】【<'+inttostr(gamelib.G[52])+'>】【<'+inttostr(gamelib.G[53])+'>】点【小】', 255, 245);
if gamelib.VarInteger('押小总金额').AsInteger < gamelib.VarInteger('庄家本钱').AsInteger + trunc((gamelib.VarInteger('押大总金额').AsInteger)*0.95) then
begin
if gamelib.VarInteger('押小总金额').AsInteger < gamelib.VarInteger('押大总金额').AsInteger then
begin
I4:=trunc((gamelib.VarInteger('押大总金额').AsInteger-gamelib.VarInteger('押小总金额').AsInteger)*0.95);
Gamelib.Broadcastsay('[美女服务员]:大玩家【<'+gamelib.VarString('庄家姓名').AsString+'>】赢得了【<'+inttostr(I4)+'>】个娱乐币。',255, 244);
end;
if gamelib.VarInteger('押小总金额').AsInteger >= gamelib.VarInteger('押大总金额').AsInteger then
begin
I4:=gamelib.VarInteger('庄家本钱').AsInteger + gamelib.VarInteger('押大总金额').AsInteger-gamelib.VarInteger('押小总金额').AsInteger ;
Gamelib.Broadcastsay('[美女服务员]:大玩家【<'+gamelib.VarString('庄家姓名').AsString+'>】收回了【<'+inttostr(I4)+'>】个娱乐币。',255, 244);
end;
end
else
begin
Gamelib.Broadcastsay('[美女服务员]:大玩家【<'+gamelib.VarString('庄家姓名').AsString+'>】在各位赌神高超的神技下,被爆菊花啦.', 255, 244);
end;
for I := 0 to Gamelib.PlayCount - 1 do
begin
APlayer := Gamelib.Player[I];
if APlayer <> nil then
begin
if Aplayer.VarInteger('庄期').AsInteger = Gamelib.VarInteger('庄期').AsInteger then
begin
if Aplayer.VarString('押大小').AsString = '小' then
begin
I2 :=aplayer.VarInteger('下注').AsInteger + trunc(aplayer.VarInteger('下注').AsInteger*0.95);
Gamelib.BroadcastSay('[美女服务员]:恭喜['+Aplayer.Name+']在本次娱乐赌博中,押中『小』,扣除税金连本带利共赢得【'+inttostr(I2)+'】娱乐币', 255, 244)
end;
if Aplayer.VarString('押大小').AsString = '大' then
begin
APlayer.SendMessage('[美女服务员]:{s=亲爱的玩家['+Aplayer.Name+']本次开奖『小』,手气差了一点!先休息一会在耍耍',2);
APlayer.SendMessage('[美女服务员]:{s=亲爱的玩家['+Aplayer.Name+']本次开奖『小』,手气差了一点!先休息一会在耍耍',2);
end;
end;
end;
end;
end;
end;
end;
Gamelib.Broadcastsay('[美女服务员]:本次猜点已经结束,欢迎大家下次继续参与', 255, 245);
gamelib.A[13] :=gamelib.A[13] + Gamelib.VarInteger('庄期').AsString+'期:'+ gamelib.VarString('大小记录').AsString+' ';
gamelib.A[13] :=RightStr(gamelib.A[13].tostring,58) ;
gamelib.A[14] := ' ';
Gamelib.VarInteger('庄期').AsInteger := Gamelib.VarInteger('庄期').AsInteger +1 ;
Gamelib.VarInteger('庄期').Save;
gamelib.VarString('庄家姓名').AsString := '无';
gamelib.VarString('抢庄状态').AsString := '抢庄中';
gamelib.VarInteger('庄家本钱').AsInteger :=0;
gamelib.VarInteger('押大总金额').AsInteger:=0;
gamelib.VarInteger('押小总金额').AsInteger:=0;
gamelib.VarInteger('抢庄时间').AsInteger := 0 ;
gamelib.VarInteger('押注时间').AsInteger := 0 ;
gamelib.VarInteger('赌博骰子1').AsInteger := 0;
gamelib.VarInteger('赌博骰子2').AsInteger := 0;
gamelib.VarInteger('赌博骰子3').AsInteger := 0;
gamelib.VarInteger('开奖').AsInteger := 0;
gamelib.VarInteger('抢庄参数').AsInteger := 0 ;
end;
end.
(责任编辑:找搜服传奇发布网) |