用于战神引擎的在线奖励Npc脚本,主要的功能是根据玩家持续在线的时间,可以领取对应的奖品,脚本是明文版,默认奖励的是金币和元宝,这个可以根据GM的要求,任意修改奖品内容和时间判断。
部分脚本
Program Mir2; {$I common.pas} procedure _zxjiangli; var zxtime : integer; begin zxtime:=This_Player.GetV(377,3); if (zxtime >= 10) and (This_Player.GetV(377,11) = 0) then begin This_Player.AddGold(30000); This_Player.setV(377,11,1); end else This_Npc.NpcDialog(This_Player, '当前已无奖励领取!请再接再厉!'); if (zxtime >= 30) and (This_Player.GetV(377,12) = 0) then begin This_Player.AddGold(50000); This_Player.setV(377,12,1); end else This_Npc.NpcDialog(This_Player, '当前已无奖励领取!请再接再厉!'); if (zxtime >= 60) and (This_Player.GetV(377,13) = 0) then begin This_Player.AddGold(100000); This_Player.setV(377,13,1); end else This_Npc.NpcDialog(This_Player, '当前已无奖励领取!请再接再厉!'); if (zxtime >= 120) and (This_Player.GetV(377,14) = 0) then begin This_Player.AddGold(200000); This_Player.setV(377,14,1); end else This_Npc.NpcDialog(This_Player, '当前已无奖励领取!请再接再厉!'); if (zxtime >= 180) and (This_Player.GetV(377,15) = 0) then begin This_Player.AddGold(300000); This_Player.setV(377,15,1); end else This_Npc.NpcDialog(This_Player, '当前已无奖励领取!请再接再厉!'); if (zxtime >= 360) and (This_Player.GetV(377,16) = 0) then begin This_Player.ScriptRequestAddYBNum(50); This_Player.setV(377,16,1); end else This_Npc.NpcDialog(This_Player, '当前已无奖励领取!请再接再厉!'); if (zxtime >= 720) and (This_Player.GetV(377,17) = 0) then begin This_Player.ScriptRequestAddYBNum(100); This_Player.setV(377,17,1); end else This_Npc.NpcDialog(This_Player, '当前已无奖励领取!请再接再厉!'); if This_Player.GetV(377,17) = 1 then begin This_Npc.NpcDialog(This_Player, '你已领取所有奖励,感谢你的坚持!'); end end; var str1,str2,str3,str4,str5 ,str6 ,str7 :String; temptime, ShowTime,today :integer; begin ShowTime := minusDataTime(GetNow,ConvertDBToDateTime(This_Player.GetV(377,2))) div 60;//0 today := GetDateNum(GetNow); if This_Player.GetV(377,11)= 1 then begin str1 := '<已领取/c=249>'; end else str1 := '<未领取/c=250>'; if This_Player.GetV(377,12)= 1 then begin str2 := '<已领取/c=249>'; end else str2 := '<未领取/c=250>'; if This_Player.GetV(377,13)= 1 then begin str3 := '<已领取/c=249>'; end else str3 := '<未领取/c=250>'; if This_Player.GetV(377,14)= 1 then begin str4 := '<已领取/c=249>'; end else str4 := '<未领取/c=250>'; if This_Player.GetV(377,15)= 1 then begin str5 := '<已领取/c=249>'; end else str5 := '<未领取/c=250>'; if This_Player.GetV(377,16)= 1 then begin str6 := '<已领取/c=249>'; end else str6 := '<未领取/c=250>'; if This_Player.GetV(377,17)= 1 then begin str7 := '<已领取/c=249>'; end else str7 := '<未领取/c=250>'; if This_Player.GetV(377,4) <> today then begin ShowTime := 0; temptime := ConvertDateTimeToDB(GetNow); end else begin temptime := ConvertDateTimeToDB(GetNow); This_Player.setV(377,2,temptime); This_Player.SetV(377,3,This_Player.GetV(377,3) + ShowTime); ShowTime := minusDataTime(GetNow,ConvertDBToDateTime(This_Player.GetV(377,2))) div 60;//0 end This_Npc.NpcDialog(This_Player, '下线不清零,每天24点归零,当前累计<' + inttostr(This_Player.GetV(377,3)) + '分钟/c=253>\|'+ '累计时长满10分钟可领取金币3万 '+ str1 +'\|'+ '累计时长满30分钟可领取金币5万 '+ str2 +'\ \|'+ '累计时长满60分钟可领取金币10万 '+ str3 +'\|'+ '累计时长满120分钟可领取金币20万 '+ str4 +'\|'+ '累计时长满180分钟可领取金币30万 '+ str5 +'\|'+ '累计时长满360分钟可领取<50元宝/c=red> '+ str6 +'\|'+ '累计时长满720分钟可领取<100元宝/c=red> '+ str7 +'\|'+ '{cmd}<领取累计奖励/@zxjiangli>'); end.