admin
发表于 2021-7-22 22:05:13
判断副本是否有人
函数原型:
def ManualCloseFuben(args): #判断副本是否有人
map = args
sender=args
参数:
map = args #地图
sender=args #玩家
功能:
判断副本是否有人
示例:
def ManualCloseFuben(args): #判断关闭副本
map=args
count = args
if(map is None):
return
if(map.PlayerCount == 0):
count+=1
else:
count = 0
if(count >= 6):
CloseFuben((map,))
return
Server.Envir.SEnvir.DelayCall("Map.Battle.ManualCloseFuben",5,(map,count)) #重复判断
admin
发表于 2021-7-22 22:05:31
关闭副本
函数原型:
def CloseFuben(args): #关闭副本
map = args
sender=args
参数:
map = args #地图
sender=args #玩家
功能:
关闭副本
示例:
def CloseFuben(args): #关闭副本
map=args
if(map is None):
return
Server.Envir.SEnvir.CloseMap(map.Info)
admin
发表于 2021-7-22 22:05:53
NPC对话框自定义指南
NPC对话框支持
背景自定制
坐标自定制
内容自定制
在对话框富文本前边加上定制信息即可实现,具体如下
本文档配合着富文本编辑指南操作,可以实现较复杂和华丽的界面。可以隐藏掉关闭按钮,自行在富文本中添加按钮关闭
1.背景自定制
bg['file']=3
bg['idx']=663
file:图库ID,参考富文本图库ID
1 Interface1c, (登陆界面素材)
2 Interface, (自定义界面素材)
3 GameInter, (游戏UI素材)
4 GameInter2, (游戏UI素材2)
idx:图片编号
2.背景坐标以及是否可以移动修改
bg['center']=0 是否居中显示:0为左上角显示,1为居中显示
bg['drag']=1 是否能拖动(0不能,1能)
位置参数:可以修改左右偏移
bg['offset_x']=10:坐标左偏移10
bg['offset_y']=10:坐标下偏移10
3.关闭按钮坐标以及是否隐藏
bg['close'] = 1 是否显示关闭按钮(0不显示,1右上角,2右下角,3左下角,4左上角,默认为1)
bg['close_offset_x']=-10 关闭按钮偏移位置(相对于close来说)
bg['close_offset_y']=10 关闭按钮偏移位置(相对于close来说)
4.富文本位置以及大小
font['color'] = '0xff00ff00' 前俩位代表透明度后6位分别为RBG(设置该字段 会默认把富文本中没有设置<font color>的字体替换颜色)
font['size'] = 12 字体大小(默认8pt)会默认把富文本中没有设置<font size>的字体替换大小
font['offset_x']=10 左偏移10
font['offset_y']=10 下偏移10
admin
发表于 2021-7-22 22:06:07
NPC对话框实现拖放物品功能
玩家可以从包裹拖物品到对话框上,也可以拖下来。
简易规则如下:
仅支持富文本中的img
允许拖物品的img,data参数必须为"drag"=1
item['pos_x'] = 100 #需求物品框位置1,相对于bg左上角来说
item['pos_y'] = 30
item['file']=3
item['idx']=1226
needitems = item
item = {}
item['pos_x'] = 80 #需求物品框位置2,相对于bg左上角来说
item['pos_y'] = 20
needitems = item
item = {}
item['pos_x'] = 150 #需求物品框位置3,相对于bg左上角来说
item['pos_y'] = 20
needitems = item
admin
发表于 2021-7-22 22:06:35
富文本编辑指南
富文本支持以下条目:
文字
图片
链接
按钮
换行</br>
颜色定义:
游戏内颜色使用时16进制ARGB颜色。例如0xff00ff00
前边4位0xff不需要动,后边还有6位'00ff00'分别表示的是红色:00,绿色:ff,蓝色:00。对应脚本文字颜色里的16进制颜色表
图片、链接、按钮中data字段的定义
|开头的表示客户端处理,不会给脚本返回消息,支持如下
data=|pos:1:200:200------点击后寻路到1号地图的200,200坐标 (功能需等自动寻路优化对应才能使用)
data=|pos:1:200:200:老兵-----寻路到目的坐标后点开--NPC老兵 (功能需等自动寻路优化对应才能使用)
data=|pos1:1:200,200;300,300----寻路1号地图两个坐标点,选择较近的寻路过去 (功能需等自动寻路优化对应才能使用)
data=|url:www.lomcn.cn----打开网站
data=|pay1.wofupay.net/app/acquire/req?gid=7585----充值链接,会自动把区服,账号等信息格式化进去
data=|item:回城卷+道具使用失败-----使用道具回城卷。成功使用一个即停止。如果道具都没有或者使用失败 会显示‘文字提示 道具使用失败’
data=0---关闭窗口
1.文字编写指南
写法: "<fontsize=字体大小color=文字颜色x=坐标xy=坐标y >文字内容</font>"
<font ...></font>不支持嵌套,中间不允许换行</br>。
2.图片编辑指南
写法:"<img file=图库id idx=图片位置 count=数量 delay=序列帧间隔item=物品名data=扩展数据x=坐标x y= 坐标y />"
file:图库ID,参考富文本图库ID
1 Interface1c, (登陆界面素材)
2 Interface, (自定义界面素材)
3 GameInter, (游戏UI素材)
4 GameInter2, (游戏UI素材2)
idx:对应的图片序号
count,delay:图片数量以及每一帧间隔。用于显示动态图---暂不支持网络动态图
x,y:调整图片坐标,调整后图片绘制在最底层
data:内容会在鼠标点击之后返回给脚本。
item:填写物品名字后,鼠标移动上去会显示tips
3.链接编辑指南
写法:"<linkcolor=颜色hcolor=移动上去颜色dcolor=点击颜色text=文字x= 坐标x y=坐标ydata=扩展数据item=物品名 />"
参数使用同img
4.按钮编辑指南
写法:"<btnfile=图库id idx=图片位置data=扩展数据x=坐标xy=坐标y mirbtntype= 按钮读取顺序 />"
按钮读取顺序一共4种,默认0
0 默认格式
1 鼠标向上向下
2 鼠标悬停向上离开索引 正向序号
3 鼠标悬停向上离开索引 反向序号
4 鼠标进入离开
admin
发表于 2021-7-22 22:07:01
富文本图库ID详细说明
序号 对应的素材库文件名
1 Interface1c, //登录界面
2 Interface, //自定义界面
3 GameInter, //游戏界面
4 GameInter2, //游戏界面2
5 Equip, //道具装备栏图标
6 EquipEffect_UI, //人物界面特效
7 EquipEffect_Part, //盾牌特效
8 ProgUse, //程序使用素材
9 StoreItems, //道具商店图标
10 Inventory, //道具包裹图标
11 Ground, //道具地面图标
12 NPC, //NPC图库
13 MiniMap, //小地图图库
14 MagicIcon, //技能图标
15 CBIcon, //BUFF图标
16 PEquipB1, //宠物装备外观图库
17 PEquipH1,
18 M_Hum, //人物外观图库
19 M_HumEx1,
20 M_HumEx2,
21 M_HumEx3,
22 M_HumEx4,
23 M_HumEx10,
24 M_HumEx11,
25 M_HumEx12,
26 M_HumEx13,
28 WM_Hum,
29 WM_HumEx1,
30 WM_HumEx2,
31 WM_HumEx3,
32 WM_HumEx4,
33 WM_HumEx10,
34 WM_HumEx11,
35 WM_HumEx12,
36 WM_HumEx13,
38 M_HumA,
39 M_HumAEx1,
40 M_HumAEx2,
41 M_HumAEx3,
43 WM_HumA,
44 WM_HumAEx1,
45 WM_HumAEx2,
46 WM_HumAEx3,
27 M_Hair, //发型外观图库
37 WM_Hair,
42 M_HairA,
47 WM_HairA,
48 Horse, //坐骑图库
49 HorseIron,
50 HorseSilver,
51 HorseGold,
52 HorseBlue,
53 HorseDark,
54 HorseDarkEffect,
55 M_Weapon1, //武器外观图库
56 M_Weapon2,
57 M_Weapon3,
58 M_Weapon4,
59 M_Weapon5,
60 M_Weapon6,
61 M_Weapon7,
62 M_Weapon10,
63 M_Weapon11,
64 M_Weapon12,
65 M_Weapon13,
66 M_Weapon14,
67 M_Weapon15,
68 M_Weapon16,
69 WM_Weapon1,
70 WM_Weapon2,
71 WM_Weapon3,
72 WM_Weapon4,
73 WM_Weapon5,
74 WM_Weapon6,
75 WM_Weapon7,
76 WM_Weapon10,
77 WM_Weapon11,
78 WM_Weapon12,
79 WM_Weapon13,
80 WM_Weapon14,
81 WM_Weapon15,
82 WM_Weapon16,
83 M_WeaponADL1,
84 M_WeaponADL2,
85 M_WeaponADL6,
86 M_WeaponADR1,
87 M_WeaponADR2,
88 M_WeaponADR6,
89 M_WeaponAOH1,
90 M_WeaponAOH2,
91 M_WeaponAOH3,
92 M_WeaponAOH4,
93 M_WeaponAOH5,
94 M_WeaponAOH6,
95 WM_WeaponADL1,
96 WM_WeaponADL2,
97 WM_WeaponADL6,
98 WM_WeaponADR1,
99 WM_WeaponADR2,
100 WM_WeaponADR6,
101 WM_WeaponAOH1,
102 WM_WeaponAOH2,
103 WM_WeaponAOH3,
104 WM_WeaponAOH4,
105 WM_WeaponAOH5,
106 WM_WeaponAOH6,
107 M_Shield1, //盾牌外观图库
108 M_Shield2,
109 WM_Shield1,
110 WM_Shield2,
111 M_Helmet1, //头盔外观图库
112 M_Helmet2,
113 M_Helmet3,
114 M_Helmet4,
115 M_Helmet5,
116 M_Helmet11,
117 M_Helmet12,
118 M_Helmet13,
119 M_Helmet14,
120 WM_Helmet1,
121 WM_Helmet2,
122 WM_Helmet3,
123 WM_Helmet4,
124 WM_Helmet5,
125 WM_Helmet11,
126 WM_Helmet12,
127 WM_Helmet13,
128 WM_Helmet14,
129 M_HelmetA1,
130 M_HelmetA2,
131 M_HelmetA3,
132 M_HelmetA4,
133 WM_HelmetA1,
134 WM_HelmetA2,
135 WM_HelmetA3,
136 WM_HelmetA4,
137 MonMagic, //怪物技能特效
138 MonMagicEx,
139 MonMagicEx2,
140 MonMagicEx3,
141 MonMagicEx4,
142 MonMagicEx5,
143 MonMagicEx6,
144 MonMagicEx7,
145 MonMagicEx8,
146 MonMagicEx9,
147 MonMagicEx19,
148 MonMagicEx20,
149 MonMagicEx21,
150 MonMagicEx22,
151 MonMagicEx23,
152 Mon_1, //怪物图库
153 Mon_2,
154 Mon_3,
155 Mon_4,
156 Mon_5,
157 Mon_6,
158 Mon_7,
159 Mon_8,
160 Mon_9,
161 Mon_10,
162 Mon_11,
163 Mon_12,
164 Mon_13,
165 Mon_14,
166 Mon_15,
167 Mon_16,
168 Mon_17,
169 Mon_18,
170 Mon_19,
171 Mon_20,
172 Mon_21,
173 Mon_22,
174 Mon_23,
175 Mon_24,
176 Mon_25,
177 Mon_26,
178 Mon_27,
179 Mon_28,
180 Mon_29,
181 Mon_30,
182 Mon_31,
183 Mon_32,
184 Mon_33,
185 Mon_34,
186 Mon_35,
187 Mon_36,
188 Mon_37,
189 Mon_38,
190 Mon_39,
191 Mon_40,
192 Mon_41,
193 Mon_42,
194 Mon_43,
195 Mon_44,
196 Mon_45,
197 Mon_46,
198 Mon_47,
199 Mon_48,
200 Mon_49,
201 Mon_50,
202 Mon_51,
203 Mon_52,
204 Mon_53,
205 Mon_54,
206 Mon_55,
207 Mon_56,
208 Magic, //魔法技能特效
209 MagicEx,
210 MagicEx2,
211 MagicEx3,
212 MagicEx4,
213 MagicEx5,
214 MagicEx6,
215 MagicEx7,
216 MagicEx8,
217 MagicEx9,
280 MonMagicEx24, //怪物技能特效
281 MonMagicEx25,
282 MonMagicEx10,
283 MonMagicEx11,
284 MonMagicEx12,
285 MonMagicEx13,
286 MonMagicEx14,
287 MonMagicEx15,
288 MonMagicEx16,
289 MonMagicEx17,
290 MonMagicEx18,
291 Background, //地图背景图库
292 UI1, //1.45界面
293 UI2, //1.45界面
295 EquipEffect_Item, //道具特效
294 EquipEffect_Full, //翅膀特效
296 EquipEffect_FullEx1,
297 EquipEffect_FullEx2,
298 EquipEffect_FullEx3,
439 M_Costume, //时装
440 M_CostumeA,
441 WM_Costume,
442 WM_CostumeA,
443 GameInter1, //界面部分
444 ItemGlow, //装备栏特效
445 WorldMap, //大地图素材
笨笨
发表于 2021-10-16 09:33:50
好好学习,天天向上!