

战神引擎冲级奖励脚本-已修复BUG
- {冲级奖励
- 作者:开心就好
- 内容:升到一定级别领取一定的装备,个别装备全服领取数目有限
- 部分项目每天都可以领取,相当于签到功能
- }
- PROGRAM Mir2;
- var
- sum1:Integer;
- sum2:Integer;
- sum3:Integer;
- sum4:Integer;
- sum5:Integer;
- sum6:Integer;
- sum7:Integer;
- sum8:Integer;
- sum9:Integer;
- sumG7 :Integer;
- sumG8 :Integer;
- sumG9 :Integer;
- sumG70 :String;
- sumG80 :String;
- sumG90 :String;
- Procedure _doexit;
- begin
- This_Npc.CloseDialog(This_Player);
- end;
- procedure domain;
- begin
- sumG70 :=inttostr(5 - sumG7);
- sumG80 :=inttostr(5 - sumG8);
- sumG90 :=inttostr(3 - sumG9);
- { if GetG(51,7) < 0 then//删除其面大括号即可以用此初始化代码
- begin
- SetG(51,7,0) ;
- setG(51,8,0) ;
- SetG(51,9,0) ; //该代码为初始化全服剩余装备的代码,可放在此脚本里,GM只需运行一次就行,
- //运行之后需要再次注释,防止无限初始化无限领取装备}
-
-
- {//以下代码为玩家私有变量,可领装备初始化,可以把这段代码放在mud2.0\Mir200\Envir\PsMapQuest
- //LogonQuest.pas:登陆执行脚本里面,这样就可以不用在此脚本里面不用进行
- // if (This_Player.GetV() > 1) or (This_Player.GetV() < 0) then 的这样的判断语句
- if This_Player.GetV(50,2) < 0 then
- This_Player.setV(50,1,0) ;
- This_Player.setV(50,2,0) ;
- This_Player.setV(50,3,0) ;
- This_Player.setV(50,4,0) ;
- This_Player.setV(50,5,0) ;
- This_Player.setV(50,6,0) ;
- This_Player.setV(50,7,0) ;
- This_Player.setV(50,8,0) ;
- This_Player.setV(50,9,0) ;
- end;// 以上任务标号如果与其他脚本重复,则极易出错!!! 编辑最好记下自己所有已用任务代码 }
- This_NPC.NpcDialog(This_Player,
- '31级可以每日领取100灵符'+' '+'<不限名额/c=red>'+' '+'<领取/@lq1>\|'
- +'32级可以领取200灵符礼包'+' '+'<不限名额/c=red>'+' '+'<领取/@lq2>\|'
- +'33级可以领取本职业首饰'+' '+'<不限名额/c=red>'+' '+'<领取/@lq3>\|'
- +'34级可以领取本职业衣服'+' '+'<不限名额/c=red>'+' '+'<领取/@lq4>\|'
- +'35级可以在取高级技能书'+' '+'<不限名额/c=red>'+' '+'<领取/@lq5>\|'
- +'36级可以领取本职业武器'+' '+'<不限名额/c=red>'+' '+'<领取/@lq6>\|'
- +'37级可以领取隐身戒指一个'+' '+'<还剩/C=red>'+sumG70+'<个/C=red>'+' '+'<领取/@lq7>\|'
- +'38级可以领取传送戒指一个'+' '+'<还剩/C=red>'+sumG80+'<个/C=red>'+' '+'<领取/@lq8>\|'
- +'39级可以领取麻复护三选一'+' '+'<还剩/C=red>'+sumG90+'<个/C=red>'+' '+'<领取/@lq9>\|'
- );
- end;
- procedure _lq1;
- var
- today:Integer;
- begin
- today := GetDateNum(GetNow);
- if This_Player.GetV(52,1) <> today then //此段为每天都能领一次的设置
- begin
- This_Player.SetV(52,1,today);
- This_Player.setV(50,1,0) ;
- end;
- sum1 := This_Player.GetV(50,1) ;
- if sum1 < 1 then
- begin
- if This_Player.Level >= 31 then//这里设定每档的领取等级,为方便测试可以改1级
- begin
- if This_Player.FreeBagNum >= 2 then
- begin
- This_Player.Give('100灵符礼包' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,1,sum1 + 1) ;
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!\'
- );
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!\'
- );
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了,请明天再来!\'
- );
- end;
- procedure _lq2;
- begin
- if (This_Player.GetV(50,2) > 1) or (This_Player.GetV(50,2) < 0) then //此段中的 (This_Player.GetV(50,2) > 1)可以不用,一般默认都是-1,不会大于
- begin
- This_Player.setV(50,2,0) ;
- end;
- sum2 := This_Player.GetV(50,2) ;
- if sum2 < 1 then
- begin
- if This_Player.Level >= 32 then
- begin
- if This_Player.FreeBagNum >= 2 then
- begin
- This_Player.Give('200灵符礼包' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,2,sum2 + 1) ;
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了!');
- end;
- procedure _lq3;
- begin
- if (This_Player.GetV(50,3) > 1) or (This_Player.GetV(50,3) < 0) then
- begin
- This_Player.setV(50,3,0) ;
- end;
- sum3 := This_Player.GetV(50,3) ;
- if sum3 < 1 then
- begin
- if This_Player.Level >= 33 then
- begin
- if This_Player.FreeBagNum >= 7 then
- case This_Player.Job of //按职业给予装备 可以自行修改
- 0 : begin
- This_Player.Give('圣战手镯' , 2);
- This_Player.Give('圣战戒指' , 2);
- This_Player.Give('圣战头盔' , 1);
- This_Player.Give('圣战项链' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,3,sum3 + 1) ;
- end;
- 1 : begin
- This_Player.Give('法神手镯' , 2);
- This_Player.Give('法神戒指' , 2);
- This_Player.Give('法神头盔' , 1);
- This_Player.Give('法神项链' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,3,sum3 + 1) ;
- end;
- 2 : begin
- This_Player.Give('天尊手镯' , 2);
- This_Player.Give('天尊戒指' , 2);
- This_Player.Give('天尊头盔' , 1);
- This_Player.Give('天尊项链' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,3,sum3 + 1) ;
- end;
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了!');
- end;
- procedure _lq4;
- begin
- if (This_Player.GetV(50,4) > 1) or (This_Player.GetV(50,4) < 0) then
- begin
- This_Player.setV(50,4,0) ;
- end;
- sum4 := This_Player.GetV(50,4) ;
- if sum4 < 1 then
- begin
- if This_Player.Level >= 34 then
- begin
- if This_Player.FreeBagNum >= 2 then //按职业给装备
- case This_Player.Job of
- 0 : begin
- if This_Player.Gender = 0 then //按性别给装备
- This_Player.Give('天魔神甲',1)
- else
- This_Player.Give('圣战宝甲',1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,4,sum4 + 1) ;
- end;
- 1 : begin
- if This_Player.Gender = 0 then
- This_Player.Give('法神披风',1)
- else
- This_Player.Give('霓裳羽衣',1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,4,sum4 + 1) ;
- end;
- 2 :
- begin
- if This_Player.Gender = 0 then
- This_Player.Give('天尊道袍',1)
- else
- This_Player.Give('天师长袍',1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,4,sum4 + 1) ;
- end;
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了!');
- end;
- procedure _lq5;
- begin
- if (This_Player.GetV(50,5) > 1) or (This_Player.GetV(50,5) < 0) then
- begin
- This_Player.setV(50,5,0) ;
- end;
- sum5 := This_Player.GetV(50,5) ;
- if sum5 < 1 then
- begin
- if This_Player.Level >= 35 then
- begin
- if This_Player.FreeBagNum >= 2 then //按职业给技能
- case This_Player.Job of
- 0 : begin
- This_Player.Give('狮子吼',1);
- This_NPC.NpcDialog(This_Player,
- '技能书已经已放入您的包裹!');
- This_Player.setV(50,5,sum5 + 1) ;
- end;
- 1 : begin
- This_Player.Give('流星火雨',1);
- This_NPC.NpcDialog(This_Player,
- '技能书已放入您的包裹!');
- This_Player.setV(50,5,sum5 + 1) ;
- end;
- 2 :
- begin
- This_Player.Give('飓风破',1);
- This_NPC.NpcDialog(This_Player,
- '技能书已放入您的包裹!');
- This_Player.setV(50,5,sum5 + 1) ;
- end;
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了!');
- end;
- procedure _lq6;
- begin
- if (This_Player.GetV(50,6) > 1) or (This_Player.GetV(50,6) < 0) then
- begin
- This_Player.setV(50,6,0) ;
- end;
- sum6 := This_Player.GetV(50,6) ;
- if sum6 < 1 then
- begin
- if This_Player.Level >= 36 then
- begin
- if This_Player.FreeBagNum >= 2 then //按职业给装备
- case This_Player.Job of
- 0 : begin
- This_Player.Give('屠龙',1);
- This_NPC.NpcDialog(This_Player,
- '武器已经已放入您的包裹!');
- This_Player.setV(50,6,sum6 + 1) ;
- end;
- 1 : begin
- This_Player.Give('龙牙',1);
- This_NPC.NpcDialog(This_Player,
- '武器已放入您的包裹!');
- This_Player.setV(50,6,sum6 + 1) ;
- end;
- 2 :
- begin
- This_Player.Give('逍遥扇',1);
- This_NPC.NpcDialog(This_Player,
- '武器已放入您的包裹!');
- This_Player.setV(50,6,sum6 + 1) ;
- end;
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了!');
- end;
- procedure _lq7;
- begin
- if (This_Player.GetV(50,7) > 1) or (This_Player.GetV(50,7) < 0) then
- begin
- This_Player.setV(50,7,0);
- end;
- if (GetG(51,7) > 5) or (GetG(51,7) < 0) then // (GetG(51,7) > 5) 此判断可以不用 ,公有变量一般很少默认大于5,以防一万故加上
- begin
- SetG(51,7,0);
- end;
- sum7 := This_Player.GetV(50,7);
- sumG7 := GetG(51,7);
- if sumG7 < 5 then
- begin
- if sum7 < 1 then
- begin
- if This_Player.Level >= 1 then
- begin
- if This_Player.FreeBagNum >= 2 then
- begin
- This_Player.Give('隐身戒指' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,7,sum7 + 1) ;
- SetG(51,7,sumG7 + 1);
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了!');
- end else
- This_NPC.NpcDialog(This_Player,
- '服务器戒指已被领完!');
- end;
- procedure _lq8;
- begin
- if (This_Player.GetV(50,8) > 1) or (This_Player.GetV(50,8) < 0) then
- begin
- This_Player.setV(50,8,0) ;
- end;
- if (GetG(51,8) > 5) or (GetG(51,8) < 0) then //) or (GetG(51,8) <> 4) or (GetG(51,8) <> 3) or (GetG(51,8) <> 2) or (GetG(51,8) <> 1)
- begin
- SetG(51,8,0) ;
- end;
- sum8 := This_Player.GetV(50,8);
- sumG8 := GetG(51,8) ;
- if sumG8 < 5 then
- begin
- if sum8 < 1 then
- begin
- if This_Player.Level >= 1 then
- begin
- if This_Player.FreeBagNum >= 2 then
- begin
- This_Player.Give('传送戒指' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,8,sum8 + 1) ;
- SetG(51,8, sumG8 + 1);
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了!');
- end else
- This_NPC.NpcDialog(This_Player,
- '服务器戒指已被领完!');
- end;
- procedure _lq9; //三选1
- begin
- if (This_Player.GetV(50,9) > 1) or (This_Player.GetV(50,9) < 0) then
- begin
- This_Player.setV(50,9,0) ;
- end;
- if (GetG(51,9) > 5) or (GetG(51,9) < 0) then
- begin //) or (GetG(51,9) <> 2) or (GetG(51,9) <> 1)
- SetG(51,9,0) ;
- end;
- sum9 := This_Player.GetV(50,9);
- sumG9 := GetG(51,9) ;
- if sumG9 < 3 then
- begin
- if sum9 < 1 then
- begin
- if This_Player.Level >= 1 then
- begin
- if This_Player.FreeBagNum >= 2 then
- begin
- This_NPC.NpcDialog(This_Player, '你要选择的戒指是\'
- + '{cmd}<麻痹/@mb> ^<复活/@fh> ^ <护身/@hs> ^<返回/@main>');
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你的等级不够!');
- end else
- This_NPC.NpcDialog(This_Player,
- '你已经领过一次了!');
- end else
- This_NPC.NpcDialog(This_Player,
- '服务器戒指已被领完!');
- end;
- procedure _mb;
- begin
- if This_Player.FreeBagNum >= 2 then
- begin
- This_Player.Give('麻痹戒指' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,9,sum9 + 1) ;
- SetG(51,9, sumG9 + 1);
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end;
- procedure _fh;
- begin
- if This_Player.FreeBagNum >= 2 then
- begin
- This_Player.Give('复活戒指' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,9,sum9 + 1) ;
- SetG(51,9, sumG9 + 1);
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end;
- procedure _hs;
- begin
- if This_Player.FreeBagNum >= 2 then
- begin
- This_Player.Give('护身戒指' , 1);
- This_NPC.NpcDialog(This_Player,
- '装备已放入您的包裹!');
- This_Player.setV(50,9,sum9 + 1) ;
- SetG(51,9, sumG9 + 1);
- end else
- This_NPC.NpcDialog(This_Player,
- '没有足够的包裹空间!');
- end;
- Begin
- domain;
- end.
复制代码
|
|