sm

立即登录 | 账号注册

积分: 0 |用户组: 游客

搜索

战神引擎版本库,战神引擎官网,2024版战神引擎教程

已有 648 次阅读2023-6-4 05:33 |个人分类:战神引擎| 战神引擎, 战神引擎官网

封装好的称号与封号函数代码

封装好的称号与封号管理函数,建议存为一个独立 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;

 

先为用户变量赋值,再调用给予封号函数。此时客户端就能改变玩家的称号样式了。

同理,改变时装也是这个道理


路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

手机版|美林GM论坛 ( 蜀ICP备2020030293号-2 )|网站地图

禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.如遇版权问题,请及时QQ联系

GMT+8, 2024-4-26 01:43 , Processed in 0.170502 second(s), 19 queries .

Powered by Discuz! X3.5

Copyright © 2001-2024, Tencent Cloud.

返回顶部