战神引擎玩家全服发红包Npc脚本带素材,脚本最早是帮主在测试1.76精品赤月里面发现的,经过测试可以用,版本使用的是裤衩插件,提取素材的时候,跟完全不一样,费了一点时间,找到对应的素材,提取出来了,这个功能挺不错的,NPC对话框上的显示2022,自己PS一下就行。


部分脚本
program mir2; // NPC脚本 需以此行开头
var
geshu,zongjine,dengji : Integer;
yb2,lf2,jgs2,hbms,ffms,hblx,ffms2,hblx2,ffms3,hblx3,ffms4,hblx4 : String;
procedure _exit; // 调用此方法对话框会被关闭
begin
This_Npc.CloseDialog(This_Player); // 执行此代码对话框会被关闭
end;
procedure _doexit; // 调用此方法对话框会被关闭
begin
This_Npc.CloseDialog(This_Player); // 执行此代码对话框会被关闭
end;
procedure sendClientMSG(msg : string);
begin
if msg <> '' then
This_Player.playerNotice(msg , 3);
end;
procedure doMain;
begin
if This_Player.GetV(400,16) > 0 then
begin
This_Npc.NpcDialog(This_Player,
'Bg:zydhb:4|'+
'Exit:zydhb:33:700:370|' +
'1:Img:zydhb:28:285:220:|'+ // 小框
'1:Text:150:220:20:<时 间 剩 余:(color251)>|'+
'1:Text:295:224:18:<'+inttostr(This_Player.GetV(400,16))+'(color250)>|'+
'1:Text:150:170:20:<60 秒后才能继续发送红包!(color250)>|'+
'1:Btn:zydhb:38:160:80:|'+
'1:Btn:zydhb:37:400:80:|'+
'1:Btn:zydhb:34:380:220:|'+
'|{cmd}</@lqye> </@hbchakan~11> </@main> </@GM> </@exit> \'
);
end else
begin
This_Npc.NpcDialog(This_Player,
'Bg:zydhb:4|'+
'Exit:zydhb:33:700:370|' +
'1:Img:zydhb:30:270:290:|'+ // 小框
'1:Text:150:290:20:<货 币 模 式:(color251)>|'+
'1:Text:300:290:20:<'+ReadIniSectionStr('全服红包.txt',This_Player.Name,'2')+'(color250)>|'+
'1:Img:zydhb:30:270:250:|'+ // 小框
'1:Text:150:250:20:<发 放 模 式:(color251)>|'+
'1:Text:290:250:20:<'+ReadIniSectionStr('全服红包.txt',This_Player.Name,'3')+'(color250)>|'+
'1:Img:zydhb:30:270:210:|'+ // 小框
'1:Text:150:210:20:<红 包 类 型:(color251)>|'+
'1:Text:290:210:20:<'+ReadIniSectionStr('全服红包.txt',This_Player.Name,'4')+'(color250)>|'+
'1:Img:zydhb:30:270:170:|'+ // 小框
'1:Text:150:170:20:<红 包 个 数:(color251)>|'+
'1:Text:290:170:20:<'+inttostr(This_Player.GetV(400,11))+'(color250)>|'+
'1:Img:zydhb:30:270:130:|'+ // 小框
'1:Text:150:130:20:<红 包 金 额:(color251)>|'+
'1:Text:290:130:20:<'+inttostr(This_Player.GetV(400,12))+'(color250)>|'+
'1:Img:zydhb:30:270:90:|'+ // 小框
'1:Text:150:90:20:<等 级 限 制:(color251)>|'+
'1:Text:290:90:20:<'+ReadIniSectionStr('全服红包.txt',This_Player.Name,'8')+'(color250)>|'+
'1:Text:470:95:16:<该等级以下不能领取红包(color254)>|'+
'1:Btn:zydhb:27:410:288:|'+
'1:Btn:zydhb:27:410:248:|'+
'1:Btn:zydhb:27:410:208:|'+
'1:Btn:zydhb:27:410:168:|'+
'1:Btn:zydhb:27:410:128:|'+
'1:Btn:zydhb:27:410:88:|'+
'1:Btn:zydhb:35:160:30:|'+
'1:Btn:zydhb:38:400:30:|'+
'|{cmd}</@hbms> </@ffms> </@hblx> </@hbsl> </@hbed> </@djxz> </@fshb> </@domain> </@GM> </@hbchakan~11> </@doexit> \'
);
end;
end;
procedure _hbchakan(yeshu:integer);
var
xianshi1,xianshi2,xianshi3,xianshi4,xianshi5,xianshi6,xianshi7,xianshi8,xianshi9,xianshi10: string;
begin
if This_Player.GetV(400,15) > 0 then
begin
if ReadIniSectionStr('全服红包.txt',This_Player.Name,inttostr(yeshu)) = '' then
begin
xianshi1:= '1:Text:200:185:18:<暂无数据(color249)>|'
xianshi2:= '1:Text:350:185:18:<暂无数据(color158)>|'
end else
begin
xianshi1:= '1:Text:200:185:18:<'+ReadIniSectionStr('全服红包.txt',This_Player.Name,inttostr(yeshu))+'(color250)>|'
xianshi2:= '1:Text:350:185:18:<'+ReadIniSectionStr('全服红包.txt',This_Player.Name,ReadIniSectionStr('全服红包.txt',This_Player.Name,inttostr(yeshu)))+'(color250)>|'
end
if ReadIniSectionStr('全服红包.txt',This_Player.Name,inttostr(yeshu+1)) = '' then
begin
xianshi3:= '1:Text:200:145:18:<暂无数据(color249)>|'
xianshi4:= '1:Text:350:145:18:<暂无数据(color158)>|'
end else
begin
xianshi3:= '1:Text:200:145:18:<'+ReadIniSectionStr('全服红包.txt',This_Player.Name,inttostr(yeshu+1))+'(color250)>|'
xianshi4:= '1:Text:350:145:18:<'+ReadIniSectionStr('全服红包.txt',This_Player.Name,ReadIniSectionStr('全服红包.txt',This_Player.Name,inttostr(yeshu+1)))+'(color250)>|'
end








