战神引擎强身健体脚本(玩家通过元宝增加血量)
procedure _lianti1;
var today , num,AddHP,AddHP1,AddHP2: integer;
begin
num := This_Player.GetV(299,2);
AddHP :=10;
AddHP1 :=3;
AddHP2 :=5;
if num > 2 then
begin
case This_Player.Job of
0 : //战士
begin
This_Player.AddPlayerAbil(4, AddHP, 6553500);
This_Npc.NpcDialog(This_Player,
'恭喜你开启成功\'
);
end;
1 : //法师
begin
This_Player.AddPlayerAbil(4, AddHP1, 6553500);
This_Npc.NpcDialog(This_Player,
'恭喜你开启成功\'
);
end;
2 : //道士
begin
This_Player.AddPlayerAbil(4, AddHP2, 6553500);
This_Npc.NpcDialog(This_Player,
'恭喜你开启成功\'
);
end;
end;
end else
This_Npc.NpcDialog(This_Player,
'你没有炼体,无法开启属性\'
);
end;
procedure _lianti;
var today , num,AddHP,AddHP1,AddHP2: integer;
begin
if This_Player.GetV(299,1) <> today then
begin
This_Player.SetV(299,1,today);
This_Player.SetV(299,2,0);
end;
//初始化变量值,每天首次触发,将领取变量设置为0
num := This_Player.GetV(299,2);
AddHP := 10*num;
AddHP1 := 3*num;
AddHP2 := 5*num;
if num < 100 then
begin
if This_Player.YBNum >= 1000 then
begin
This_Player.ScriptRequestSubYBNum(1000);
case This_Player.Job of
0 : //0是战士
begin
This_Player.AddPlayerAbil(4, AddHP, 6553500);
This_Player.SetV(299,2, num + 1); //领取变量每领取一次加一
This_Npc.NpcDialog(This_Player,
'恭喜你炼体成功,当前炼体层数<'+inttostr(num)+' c="red">层!\'
);
end;
1 : //法师
begin
This_Player.AddPlayerAbil(4, AddHP1, 6553500);
This_Player.SetV(299,2, num + 1); //领取变量每领取一次加一
This_Npc.NpcDialog(This_Player,
'恭喜你炼体成功,当前炼体层数<'+inttostr(num)+' c="red">层!\'
);
end;
2 : //道士
begin
This_Player.AddPlayerAbil(4, AddHP2, 6553500);
This_Player.SetV(299,2, num + 1); //领取变量每领取一次加一
This_Npc.NpcDialog(This_Player,
'恭喜你炼体成功,当前炼体层数<'+inttostr(num)+' c="red">层!\'
);
end;
end;
end else
This_Npc.NpcDialog(This_Player,
'元宝不足2000,无法炼体\'
);
end else
This_Player.PlayerDialog(
'<你的炼体层数已经达到顶级,无法继续 c="red">'
);
end;
var num: integer;
begin
This_Npc.NpcDialog(This_Player,
+'|<千古人参,万年龟,成败在此一击。 c="70">\'
+'|炼体强化:\'
+'|<战士增加10点hp c="251">\'
+'|<道士增加5点hp c="180">\'
+'|<法师增加3点hp c="245">\'
+'|<每次炼体1000元宝 c="185">\'
+'|<最高99层,超过会失效,不予补偿 c="red">\'
+'|{cmd}<开始炼体 lianti=""> ^<开启属性 lianti1=""> '
);
end.