搜索
查看: 786|回复: 0

[求助] lua物品掉落回调,客户端怎么设置啊?

[复制链接]
发表于 2021-7-13 12:44:21 | 显示全部楼层 |阅读模式
服务端回调代码:
  • --物品掉落地上时触发,返回Expand1值,用于自定义值传送给客户端
  • function on_ItemDropShowType(item)
  •   local itemName = item:getName()--名称
  •   --取物品极品属性总和
  •   local BestValue = item:getBestValue(0)+item:getBestValue(1)+item:getBestValue(2)+item:getBestValue(3)+item:getBestValue(4)+item:getBestValue(5)
  •   print("物品地上显示["..itemName.."]--[物品爆出显示类型触发]"..tostring(BestValue))
  •   return BestValue --返回Expand1
  • end

[color=rgb(51, 102, 153) !important]复制代码

客户端回调代码:
  • --物品掉落回调
  • function on_DropItem(x, y, looks, color, effectId, name, expand1)
  •         if expand1 > 0 then
  •                 return {showName = name.."【极品属性+"..expand1.."】", color = 250}
  •         end
  • end


[color=rgb(51, 102, 153) !important]复制代码



服务端会搞,客户端怎么搞啊?
哪位大佬教教我,给大红包!









您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|HGEM2论坛

GMT+8, 2024-9-21 18:51 , Processed in 0.475502 second(s), 13 queries .

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表