作为传奇手游的技术型网站,本站自然要给大家分享一些比较好的游戏版本及脚本或者资源!但因为传奇手游服务端比较大的缘故,后期会建立一个独立的手游论坛分享服务端。本站就偶尔给大家分享一些战神引擎的NPC脚本!希望大家能够喜欢及支持。今天带给大家的是“每日签到”NPC的脚本,作为一个范本,大家可以根据该脚本举一反三!
以上就是该NPC脚本,希望大家仔细研究下!program mir2;
procedure _LINGQU;
var today , num: integer;
begin
today := GetDateNum(GetNow);// 获取当前日期
if This_Player.GetV(14,1) <> today then
begin
This_Player.SetV(14,1,today);
This_Player.SetV(14,2,0);
end;
//初始化变量值,每天首次触发,将领取变量设置为0
num := This_Player.GetV(14,2); //获取已领取次数,**取值时切记写在初始化之后
if num <1 then
begin
This_Player.Give('经验',1000000);
This_Player.Give('金刚石',50);
This_Player.AddLF(0,100); //100灵符
This_Player.ScriptRequestAddYBNum(100); //100元宝
This_Player.Give('金条',1);
This_Player.Give('万年雪霜包',5);
This_Player.SetV(14,2, num + 1); //领取变量每领取一次加一
This_Player.PlayerDialog(
'<恭喜你获得:100元宝,100灵符100W经验值,金刚石50个,金条一根,万年雪霜5包/c=red>'
);
end else
This_Player.PlayerDialog(
'<你今天已领取了每日签到奖励/c=red>'
);
end;
begin
This_Npc.NpcDialog(This_Player,
'<每日签到可以领取100元宝和100灵符,100万经验/c=red>\'+
'|{cmd}<每日签到/@LINGQU>\'
);
end.
- 相关文章
- 战神引擎手游传奇私服的架设步骤 (832人浏览)