📄 赌博1.lua
字号:
if NPCcon==0 then
CmdNPC:Face(20);
CmdNPC:Say("欢迎来赌博,赌博规则是这样的1-2是<小>,3-4是<中>,5-6是大");
CmdNPC:Say("下面有大中小3个选项请选择你要押的项目,比例 1赔3");
CmdNPC:Link("大",1);
CmdNPC:Link("中",2);
CmdNPC:Link("小",3);
CmdNPC:Link("我不押",255);
CmdNPC:Finish();
end;
if NPCcon==1 then
CmdNPC:Face(20);
CmdNPC:Say("你选择你压的TS数量:");
CmdNPC:Link("10",11);
CmdNPC:Link("100",12);
CmdNPC:Link("500",13);
CmdNPC:Link("1000",14);
CmdNPC:Link("5000",15);
CmdNPC:Link("10000",16);
CmdNPC:Finish();
end;
if NPCcon==2 then
CmdNPC:Face(20);
CmdNPC:Say("你选择你压的TS数量:");
CmdNPC:Link("10",21);
CmdNPC:Link("100",22);
CmdNPC:Link("500",23);
CmdNPC:Link("1000",24);
CmdNPC:Link("5000",25);
CmdNPC:Link("10000",26);
CmdNPC:Finish();
end;
if NPCcon==3 then
CmdNPC:Face(20);
CmdNPC:Say("你选择你压的TS数量:");
CmdNPC:Link("10",31);
CmdNPC:Link("100",32);
CmdNPC:Link("500",33);
CmdNPC:Link("1000",34);
CmdNPC:Link("5000",35);
CmdNPC:Link("10000",36);
CmdNPC:Finish();
end;
if NPCcon==11 then
if Char.Cp>9 then
Char.Cp=Char.Cp-10;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==5 or cout == 6 then
cout=API:RND(1,cout);
end;
if cout == 5 or cout == 6 then
Char.Cp=Char.Cp+30;
CmdNPC:Face(20);
API:WrlLog(client:ToString().."赌博得到20天石");
CmdNPC:Say(cout.." 点,恭喜你你押中了得到20天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
else
CmdNPC:Face(20);
CmdNPC:Say(cout.." 点,不好意识,你没押中");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
API:UpdateCp(client);
else
CmdNPC:Face(20);
CmdNPC:Say("你没有足够的天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
end;
if NPCcon==12 then
if Char.Cp>99 then
Char.Cp=Char.Cp-100;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==5 or cout == 6 then
cout=API:RND(1,cout);
end;
if cout == 5 or cout == 6 then
Char.Cp=Char.Cp+300;
CmdNPC:Face(20);
API:WrlLog(client:ToString().."赌博得到200天石");
CmdNPC:Say(cout.." 点,恭喜你你押中了得到200天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
else
CmdNPC:Face(20);
CmdNPC:Say(cout.." 点,不好意识,你没押中");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
API:UpdateCp(client);
else
CmdNPC:Face(20);
CmdNPC:Say("你没有足够的天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
end;
if NPCcon==13 then
if Char.Cp>499 then
Char.Cp=Char.Cp-500;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==5 or cout == 6 then
cout=API:RND(1,cout);
end;
if cout == 5 or cout == 6 then
Char.Cp=Char.Cp+1500;
CmdNPC:Face(20);
API:WrlLog(client:ToString().."赌博得到1000天石");
CmdNPC:Say(cout.." 点,恭喜你你押中了得到1000天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
else
CmdNPC:Face(20);
CmdNPC:Say(cout.." 点,不好意识,你没押中");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
API:UpdateCp(client);
else
CmdNPC:Face(20);
CmdNPC:Say("你没有足够的天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
end;
if NPCcon==14 then
if Char.Cp>999 then
Char.Cp=Char.Cp-1000;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==5 or cout == 6 then
cout=API:RND(1,cout);
end;
if cout == 5 or cout == 6 then
Char.Cp=Char.Cp+3000;
CmdNPC:Face(20);
API:WrlLog(client:ToString().."赌博得到2000天石");
CmdNPC:Say(cout.." 点,恭喜你你押中了得到2000天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
else
CmdNPC:Face(20);
CmdNPC:Say(cout.." 点,不好意识,你没押中");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
API:UpdateCp(client);
else
CmdNPC:Face(20);
CmdNPC:Say("你没有足够的天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
end;
if NPCcon==15 then
if Char.Cp>4999 then
Char.Cp=Char.Cp-5000;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==5 or cout == 6 then
cout=API:RND(1,cout);
end;
if cout == 5 or cout == 6 then
Char.Cp=Char.Cp+15000;
CmdNPC:Face(20);
API:WrlLog(client:ToString().."赌博得到10000天石");
CmdNPC:Say(cout.." 点,恭喜你你押中了得到10000天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
else
CmdNPC:Face(20);
CmdNPC:Say(cout.." 点,不好意识,你没押中");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
API:UpdateCp(client);
else
CmdNPC:Face(20);
CmdNPC:Say("你没有足够的天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
end;
if NPCcon==16 then
if Char.Cp>9999 then
Char.Cp=Char.Cp-10000;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==5 or cout == 6 then
cout=API:RND(1,cout);
end;
if cout == 5 or cout == 6 then
Char.Cp=Char.Cp+30000;
CmdNPC:Face(20);
API:WrlLog(client:ToString().."赌博得到20000天石");
CmdNPC:Say(cout.." 点,恭喜你你押中了得到20000天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
else
CmdNPC:Face(20);
CmdNPC:Say(cout.." 点,不好意识,你没押中");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
API:UpdateCp(client);
else
CmdNPC:Face(20);
CmdNPC:Say("你没有足够的天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
end;
if NPCcon==21 then
if Char.Cp>9 then
Char.Cp=Char.Cp-10;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==3 then
cout=API:RND(1,3);
end;
if cout==4 then
cout=API:RND(4,6);
end;
if cout == 3 or cout == 4 then
Char.Cp=Char.Cp+30;
CmdNPC:Face(20);
API:WrlLog(client:ToString().."赌博得到20天石");
CmdNPC:Say(cout.." 点,恭喜你你押中了得到20天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
else
CmdNPC:Face(20);
CmdNPC:Say(cout.." 点,不好意识,你没押中");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
API:UpdateCp(client);
else
CmdNPC:Face(20);
CmdNPC:Say("你没有足够的天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
end;
if NPCcon==22 then
if Char.Cp>99 then
Char.Cp=Char.Cp-100;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==3 then
cout=API:RND(1,3);
end;
if cout==4 then
cout=API:RND(4,6);
end;
if cout == 3 or cout == 4 then
Char.Cp=Char.Cp+300;
CmdNPC:Face(20);
API:WrlLog(client:ToString().."赌博得到200天石");
CmdNPC:Say(cout.." 点,恭喜你你押中了得到200天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
else
CmdNPC:Face(20);
CmdNPC:Say(cout.." 点,不好意识,你没押中");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
API:UpdateCp(client);
else
CmdNPC:Face(20);
CmdNPC:Say("你没有足够的天石");
CmdNPC:Link("知道了",255);
CmdNPC:Finish();
end;
end;
if NPCcon==23 then
if Char.Cp>499 then
Char.Cp=Char.Cp-500;
cout=API:RND(1,6);
cout2=API:RND(1,6);
cout3=API:RND(1,6);
cout=(cout+cout2+cout3)/3;
if cout>1 and cout <2 then
cout=1;
elseif cout>2 and cout <3 then
cout=2;
elseif cout>3 and cout <4 then
cout=3;
elseif cout>4 and cout <5 then
cout=4;
elseif cout>5 and cout <6 then
cout=5;
elseif cout>6 and cout <7 then
cout=6;
end;
if cout==3 then
cout=API:RND(1,3);
end;
if cout==4 then
cout=API:RND(4,6);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -