找回密码
 立即注册
查看: 45|回复: 0

[技术资源] 77M2引擎判断角色金币、元宝及礼金等数量的脚本分享

[复制链接]

0

威望

8500

元宝

1万

金币

VIP会员

积分
12647
逍遥MIR 发表于 2024-7-18 00:25:15 | 显示全部楼层 |阅读模式
procedure Main(Npc: TNormNpc; Player: TPlayObject; Args: TArgs);
begin
    if Player.GameGold < 100 then
        Npc.MessageBox(Player, '你的元宝数量不足100');
    if Player.Gold < 10000 then
    begin
        Player.Gold := Player.Gold + 50000; //金币数量直接+5W
        Player.GoldChanged; //所有的金币、元宝及礼金数量发生变化后都调用此函数让客户端刷新
        Npc.MessageBox(Player, '你太穷了,我送了5W金币');
    end;
本楼点评(0) 收起
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|小黑屋|逍遥版本库

GMT+8, 2024-9-17 04:11 , Processed in 0.048594 second(s), 30 queries .

Powered by XyBbk! X3.5

Copyright © 2001-2023, XyBbk Cloud.

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