||
封装好的称号与封号管理函数,建议存为一个独立 pas 文件,放到 commonscript 目录下,可以供其他 脚本调用。
函数代码如下:
procedure givefenghao;
var fh0,fh1, fh2, fh3,
fh4, fh5, exfh1 : integer;
begin
fh0 :=
This_Player.GetV(69,1); //首位封号
fh1 :=
This_Player.GetV(69,2); //一体时装
fh2 :=
This_Player.GetV(69,3); //衣服
fh3 := This_Player.GetV(69,4); //武器
fh4
:= This_Player.GetV(69,5); //翅膀
fh5 :=
This_Player.GetV(69,6); //斗笠
exfh1 :=
This_Player.GetV(69,7); //扩展封号1
if fh0 < 0 then fh0 := 0;
if fh1
< 0 then fh1 := 0;
if fh2 < 0 then fh2 := 0;
if fh3 < 0 then
fh3 := 0;
if fh4 < 0 then fh4 := 0;
if fh5 < 0 then fh5 :=
0;
if exfh1 < 0 then exfh1 := 0;
// 封号给予编号 =
素材ID号/2+1
This_Player.QuestInfo(inttostr(fh0)+':'+inttostr(fh1)+':'+inttostr(fh2)+':'+inttostr(fh3)+':'+inttostr(fh4)+':'+inttostr(fh5)+':'+inttostr(exfh1));
end;
将以上代码拷贝下来,存为独立文件,即可在其他脚本中引用。
假设:我要为 一个玩家角色 改变一个称号。比如要改变首位封号,则需要在相应代码中写入如下代码:
This_Player.SetV(69, 1, 1);
givefenghao;
先为用户变量赋值,再调用给予封号函数。此时客户端就能改变玩家的称号样式了。
同理,改变时装也是这个道理
© 2001-2025 Discuz! Team. Powered by Discuz! X3.5
GMT+8, 2025-5-1 13:11 , Processed in 0.067223 second(s), 20 queries 手机版|美林GM论坛 ( 蜀ICP备2023014904号-4 )|网站地图
禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.如遇版权问题,请及时QQ联系