🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
| **TPlayObject** | | | --- | --- | | **属性名称** | **功能** | | property HomeMapName: String | 回城地图 | | property HomeX: Integer | 回城地图X坐标 | | property HomeY: Integer | 回城地图Y坐标 | | property Account: String | 账号 | | property NewHuman: Boolean | 是否属于新建角色 | | property LoginTime: TDateTime | 登陆时间 | | property SessionID: Integer | 22 | | property CreditPoint: Integer | 声望点 | | property DearName: String | 配偶名 | | property Married: Boolean | 是否已婚 | | property MasterName: String | 师傅名称 | | property ISMaster: Boolean | 是否是师傅 | | property MarryCount: Byte | 累计结婚次数 | | property ReNewLevel: Byte | 转生等级 | | property BonusPoint: Integer | 没使用的属性点 | | property MemberType: Integer | 会员类型 | | property MemberLevel: Integer | 会员等级 | | property GameGold: Integer | 元宝数 | | property GamePoint: Integer | 礼金数 | | property GameGlory: Byte | 荣誉点 | | property GameDiaMond: Integer | 金刚石数 | | property GameGird: Integer | 灵符数 | | property PaoDianPoint: Integer | 泡点值 | | property Exp: LongWord | 当前经验(只读) | | property MaxExp: LongWord | 最大经验(可读写) | | property CustomItemCount: Integer | 在自定义的UI中,如果该UI可以控制物品,则CustomItemCount表示UI上可放入的道具总数,CustomItem\[Index: Integer\]表示其中的一个道具。假设UI上一共可放入5个道具,而实际只在第1个位置上放入了道具,其他均没放入,则CustomItemCount=5,CustomItem\[0\]为第一个位置上的道具,CustomItem\[1\]-CustomItem\[4\]均为nil 查看范例 | | property CustomItem\[Index: Integer \]: TUserItem | 表示其中的一个道具 | | property LogonTick: LongWord | 在线时长 | | property IP: String | IP地址 | | property PayMent: Integer | 消费点 | | property GroupOwner: TPlayObject | 队伍的队长 | | property GroupCount: Integer | 队伍总人数 | | property Group\[Index: Integer \]: TPlayObject | 取其中的一个队员 | | property ISGroupMaster: Boolean | 当前角色是否为队长 | | property RankLevelName: String | 称号 | | property ShowRankLevelName: Boolean | 是否显示称号 | | property TitleName: String | 头顶花翎,增加xy偏移调整Player.TitleName={I=1;X=5;Y=10} | | property TitleEffect: Integer | 头顶特效 | | property Contribution: Word | 贡献度 | | property NotOnlineAddExp: Boolean | 是否是离线挂机状态 | | property StationTime: Longword | 站立不动的时间 | | property Feature: Integer | 角色外观(示例版本中在天下第一用到) | | property FeatureEx: Integer | 角色效果 | | property StoragePwd: String | 仓库密码 | | property AllowDeal: Boolean | 是否允许交易 | | property AllowGuild: Boolean | 是否允许加入行会 | | property AllowGroup: Boolean | 是否允许加入组队 | | property AllowGroupReCall: Boolean | 是否允许组队传送 | | property AllowGuildReCall: Boolean | 是否允许行会传送 | | property AllowReAlive: Boolean | 是否允许复活 | | property AddedAbility: TAddedAbility | 额外增加的角色属性 | | property AllowSendMessage: Boolean | 是否允许聊天 | | property MailCount: Integer | 邮件总数 | | property MailUnreadCount: Integer | 未读邮件总数 | | property Locked: Boolean | 无特殊意义,在脚本中用来做某个操作的锁定标记 | | property S\[index: Integer \]: String | 角色的临时字符串变量(index为1-300) | | property N\[index: Integer \]: Integer | 角色的整形变量,该变量会保存到数据库(index为1-300) | | property P\[index: Integer \]: Integer | 角色的临时整型变量(index为1-300) | | property StorageItemsCount: Integer | 仓库存放物品数量 | | property StorageItem\[index: Integer \]: TUserItem | 仓库存放的第index个物品,如果不存在返回为nil | | property BigStorageItemsCount: Integer | 无限仓库物品数量 | | property BigStorageItem\[index: Integer \]: TUserItem | 无限仓库存放的第index个物品,如果不存在返回为nil | | property Missions: Missions | 玩家的任务信息 | | property FunctionState\[f:TFunctionFlag\]:Boolean | 设置TFunctionFlag值状态 | | property TotalExpRate:Integer | 获取人物当前的经验加成 | | function TPlayObject.GetGameMoney(Type:Byte):Cardinal; | 获取对应货币的数量 | | function TPlayObject.CanAddGameMoney(Type:Byte;Value:Cardinal):Boolean; | 是否可以给玩家增加货币 Value 为需要增加的货币数量 | | function TPlayObject.AddGameMoney(Type:Byte;Value:Cardinal; const Log:String):Boolean; | 给玩家增加 对应数量的货币 Log 为日志描述 成功则为返回True 失败返回False; | | function TPlayObject.TakeGameMoney(Type:Byte;Value:Cardinal;const Log:String):Boolean; | 扣除玩家对应数量的货币 成功返回True 失败返回False; | | procedure TPlayObject.SetGameMoney(Type:Byte;Value:Cardinal;const Log:String); | 设置货币的数量。 Log 为日志描述 | | function TPlayObject.CanTakeGameMoney(Type:Byte;Value:Cardinal):Boolean; | 是否可以扣减玩家对应数量的货币 Value 为需要增加货币的数量 | | function VarString (const AVarName: String ): TVarValue; | 定义或读取一个字符串变量 | | function VarInteger (const AVarName: String ): TVarValue; | 定义或读取一个整型变量 | | function VarDateTime(const AVarName: String ): TVarValue; | 定义或读取一个日期变量 | | function VarFloat(const AVarName: String ): TVarValue; | 定义或读取一个浮点数变量 | | function VarBoolean (const AVarName: String ): TVarValue; | 定义或读取一个布尔变量 | | procedure SendMessage(const Msg: String ; const Kind: Integer =0); | 发送一个聊天框消息(Kind:0-红 1-绿 2-蓝 3-普通说话) | | procedure SendGuildMessage(const Msg: String ); | 发送行会消息 | | procedure SendTopMessage(const Message: String ; Mode: Byte ); | 发送顶部移动消息(Mode:0-自己 1-所有人 2-行会 3-当前地图) | | procedure SendCenterMessage(const Message: String ; Mode: Byte; DuraTick:Integer = 2000); | 发送屏幕中央消息 | | procedure SendCountDownMessage(const Message: String ; Mode: Byte ; Falg: Integer ; ChangMapDelete: Boolean ); | 发送底部消息(可做倒计时消息)。Flag为标识,供删除使用 | | procedure DeleteCountDownMessage(Falg: Integer ); | 删除一个底部消息 | | procedure Say(const Msg: String ); | 弹出一个NPC对话框 | | procedure SayEx(const UIName, Msg: String ); | 弹出一个自定义NPC对话框 | | procedure Messagebox(const Msg: String ); | 弹出对话框 | | procedure GoHome; | 回城 | | procedure CallMethod(Npc: TNormNpc; const Method: String ); | 函数调用(Method:单元名.函数名(参数)) | | procedure ChangeReNewLevel(const Value: Byte ; const NewLevel: Integer =0; const BounsuPoint: Integer =0); | 修改转生等级,Value为新的转生等级,NewLevel为转生后的人物等级,BounsuPoint为属性点 | | procedure ShowEffect(EffectID: Integer ); | 客户端显示特效(7-14为烟花效果,其他的值将调用UI特效设计指定的ID) | | procedure OpenMarket; | 打开市场 | | procedure OpenBag; | 打开背包 | | procedure OpenShop; | 打开商城 | | procedure OpenMailbox; | 打开邮箱 | | procedure ShowSighIcon(MethodID: Integer ; const Hint: String = ''); | 显示一个感叹号,玩家点击感叹号后触发QFunctionNpc的ClickSighIcon函数 | | procedure ShowSighIcon(const Method: String ; const Hint: String = ''); | 显示一个感叹号,玩家点击感叹号后执行Method | | procedure Give(const ItemName: String ; const Count: Integer =1; const Upgrade: Boolean =False); | 发放一个指定名称的物品,Count为数量,Upgrade指定是否刷新极品属性 | | function GiveItem(const ItemName: String ; const Upgrade: Boolean =False): TUserItem; | 发放一个指定名称的物品,并且返回该物品,如果刷新失败返回为nil | | function GiveItemByIndex(const ItemIndex: Integer ; const Upgrade: Boolean =False): TUserItem; | 根据物品ID刷新一个物品并返回该物品,如果刷新失败返回为nil | | procedure OpenBox(BoxID: Integer ); | 打开一个指定的宝箱 | | procedure OpenShuffle(BoxID: Integer ); | 翻牌。BoxId为一个宝箱的ID | | procedure UpdateName; | 向客户端发送显示名称更新信息 | | procedure OpenURL(const AUrl: String ; Width, Height: Integer ); | 打开一个指定的URL | | procedure RequestURL(const AUrl: String ); | 客户端请求URL(不弹出窗口) | | procedure StartAutoAddGameGold(const APoint, AInterval: Integer ); | 开始自增元宝,Apoint为增加数量,Ainterval为间隔时间(秒) | | procedure StopAutoAddGameGold; | 停止增加元宝 | | procedure StartAutoSubGameGold(const APoint, AInterval: Integer ); | 开始减少元宝,Apoint为减少数量,Ainterval为间隔时间(秒) | | procedure StopAutoSubGameGold; | 停止减少元宝 | | procedure Kick; | 踢出人物 | | procedure ReAlive; | 人物复活 | | procedure reloadbag; | 刷新背包/包裹 | | procedure UpdateItem(Item: TUserItem); | 向客户端发送物品更新消息 | | procedure DeleteItem(Item: TUserItem; Count: Integer =0); | 删除指定的物品(可叠加物品直接删除指定的数量,数量为0则删除物品本身) | | procedure UpdateMagic(Item: TUserMagic); | 向客户端发送魔法更新消息 | | procedure GetMonDropItems(const MonName: String ); | 将指定名称的爆率直接爆出给到玩家背包 | | procedure procedure AddExtendButton(const Name, Hint, Command: String; ImageIndex: Integer ; X:Integer = 0 ; Y : Integer = 0); | 增加一个扩展按钮到客户端,AddExtendButton函数增加的位于药品栏下方,AddTopExtendButton函数增加的位于小地图左侧(Name为按钮名称,不可重复;Hint为鼠标移到按钮的时候提示信息;Command为玩家点击按钮后要执行的函数;ImageIndex为按钮图片,按钮按下时图片为ImageIndex+1,鼠标经过的图片为ImageIndex+2,图片从Icons.data中加载)。Command指向的函数位于ManagerNpc单元中,声明格式为(同常见的入口函数): procedure FuncName(Npc: TNormNpc; Player: TPlayObject; Args: TArgs); | | procedure AddTopExtendButton(const Name, Hint, Command: String; ImageIndex: Integer ; X:Integer = 0 ; Y : Integer = 0); | | | procedure RemoveExtendButton(const Name: String ); | 在客户端中移除一个通过AddExtendButton增加的按钮 | | function CheckNameList(const ATextFile: String ): Boolean ; | 查看角色名字是否包含在指定的文件中 | | function CheckTextList(const ATextFile, AText: String ): Boolean ; | 查看文本是否包含在指定的文件中 | | function CheckAccountList(const ATextFile: String ): Boolean ; | 查看账号是否包含在指定的文件中 | | procedure ClearList(const ATextFile: String ); | 清除指定的文件内容 | | procedure AddTextList(const ATextFile, AText: String ); | 将文本增加到指定的文本中 | | procedure AddNameList(const ATextFile: String ); | 将角色名增加到指定的文本文件中 | | procedure AddAccountList(const ATextFile: String ); | 将账号增加到指定的文本文件中 | | procedure AddGuildList(const ATextFile: String ); | 将行会名增加到指定的文本文件中 | | procedure AddIPList(const ATextFile: String ); | 将IP增加到指定的文本文件中 | | procedure DelTextList(const ATextFile, AText: String ); | 将文本从指定的文件中删除(只删除最先匹配到的一条记录) | | procedure DelNameList(const ATextFile: String ); | 将角色名从指定的文本文件中删除 | | procedure DelGuildList(const ATextFile: String ); | 将行会名称从指定的文本文件中删除 | | procedure DelAccountList(const ATextFile: String ); | 将账号从指定的文本文件中删除 | | procedure DelIPList(const ATextFile: String ); | 将IP从指定的文本文件中删除 | | procedure RestBonusPoint; | 重置角色属性点 | | procedure TakeCastGold(const AGold: Integer ); | 从角色所在的城堡收取指定数量的金币(建议直接通过城堡对象操作) | | procedure AutoGetExp(const AMap: String ; const ATime, APoint: Integer ; IsSafeZone: Boolean =True); | 设置角色在指定的地图增加经验值(Amap:地图ID Atime:间隔时间,单位秒 Apoint:每次增加经验值 IsSafeZone:是否只在安全区有效) | | procedure OffLinePlay(const AIntervalTime, AExpPoint: Integer ); | 设置离线挂机(间隔时间以分钟为单位) | | procedure KickOffLine; | 开始离线挂机,人物离线 | | function DelayGoto(ID, AIntervalTime: Integer ; AChangeMapDelete: Boolean =True; Once: Boolean =False): Boolean ; | 设置个人时钟。ID:时钟标志 AIntervalTime:间隔时间(秒) ChangeMapDelete:是否离开定义时钟时所在的地图删除本时钟 Once:是否指执行一次。个人时钟执行时候调用TimeManageNpc单元的PrivyEventExecute函数,个人时钟移除时调用TimeManageNpc的PrivyEventRemove函数 | | procedure ClearDelayGoto(ID: Integer ); | 移除一个个人时钟,通过此函数移除的时钟不触发PrivyEventRemove函数 | | procedure PlaySound(const ASoundFile: String ); | 客户端播放一个声音文件 | | procedure RecallHuman(const AumName: String ); | 将指定名称的角色传送到自己身边 | | procedure Recallmob(const AMonName: String ; MonLvl: Integer =3; const RoyaltySec: Integer =86400; X: Integer =0; Y:Integer =0); | 召唤一个怪物作为宝宝,RoyaltySec为叛变时间(秒) | | procedure SetTimeRecall(const Value: Boolean ; const ATick: Integer ); | 指定的时间之后回到当前所在的位置(Value为False则取消此功能) | | procedure MapMove(const MapName: String ; const MapX, MapY: Integer ); | 传送 | | procedure MapMoveEx(Envir: TEnvirnoment; const MapX, MapY: Integer ); | 传送。以实际地图对象作为地图参数 | | procedure GroupMapMove(const MapName: String ; const MapX: Integer =0; const MapY: Integer =0); | 组队传送 | | procedure GroupMapMoveEx(Envir: TEnvirnoment; const MapX: Integer = 0; const MapY: Integer = 0 ;ForceMove:Boolean = false); | 是否强制组队传送 | | procedure GuildMapMove(const MapName: String ; const MapX: Integer =0; const MapY: Integer =0); | 行会传送 | | procedure GuildMapMoveEx(Envir: TEnvirnoment; const MapX: Integer =0; const MapY: Integer =0); | 行会传送 | | procedure RandomMove(const MapName=''); | 在指定的地图上随机传送,当MapName为空时则在当前地图上随机传送 | | procedure RandomMoveEx(AEnvir: TEnvirnoment=nil); | 在指定的地图对象上随机传送,当AEnvir为nil时则在当前地图上随机传送 | | procedure MoveTo(const DestX, DestY: Integer ); | 角色从当前位置自动移动到指定的位置 | | function ShowProgress(const Caption: String ; ATime, EventID: Integer ; ActCancel: Boolean = True): Boolean ; | 显示一个进度条,如果当前存在进度条则返回False。Caption:进度条上显示的信息;Atime:进度条显示的时间,单位秒;EventID:进度条标记;ActCancel:是否角色在移动、攻击或被被攻击的时候取消进度条事件。进度条计时结束后调用QFunctionNpc单元中的ProgressEvent函数,其中可根据EventID进行事件处理 | | function ShowProgressEx(const Caption: String ; ATime: Integer ; NPC: TNormNpc;const SucessFunction,FailFunction:String ; ActCancel: Boolean = True): Boolean ; | 显示一个进度条,如果当前存在进度条则返回False。Caption:进度条上显示的信息;Atime:进度条显示的时间,单位秒;Npc:Npc对象;SucessFunction:成功后执行函数名(可调用任意单元);FailFunction:失败后执行函数名(可调用任意单元);ActCancel:是否角色在移动、攻击或被被攻击的时候取消进度条事件。 | | procedure CloseProgress; | 关闭当前的进度条 | | procedure CheckItemSoulLevelUp(Item: TUserItem); | 尝试给物品升级魂炼(如果魂炼经验足够则升级,反之则不做任何处理) | | function AddItemToStorage(AItem: TUserItem): Boolean ; | 将一个指定的物品存到仓库。成功则返回True | | function DeleteStorageItem(Index: Integer ): Boolean ; | 删除仓库指定位置的物品。成功则返回True | | function DeleteStorageItemEx(AItem: TUserItem): Boolean ; | 删除仓库指定的物品。成功则返回True | | function TakebackStorageItem(Index: Integer ): Boolean ; | 取出仓库指定位置的物品。成功则返回True | | function AddItemToBigStorage(AItem: TUserItem): Boolean ; | 将一个指定的物品存到无限仓库。成功则返回True | | function DeleteBigStorageItem(Index: Integer ): Boolean ; | 删除无限仓库指定位置的物品。成功则返回True | | function DeleteBigStorageItemEx(AItem: TUserItem): Boolean ; | 删除无限仓库指定的物品。成功则返回True | | function TakebackBigStorageItem(Index: Integer ): Boolean ; | 取出无限仓库指定位置的物品。成功则返回True | | procedure SetState(AState: Integer; ATime: Integer; AValue:Integer); | Astate(设置人物状态如下:0: 中绿毒;1: 中红毒;2: 禁止释放魔法;3: 不能移动(蛛网);4: 不能移动;5: 麻痹;6: 陷阱(不能移动);7: 护体神盾;8: 隐身;9: 神圣战甲术;10: 幽灵盾;11: 魔法盾;)ATime: 时间;AValue:值。 | | function GetFunctionState(f:TFunctionFlag):Boolean ; | 取出TFunctionFlag值状态 | | procedure SetFunctionState(f:TFunctionFlag;boState:Boolean ); | 设置TFunctionFlag值状态 | | procedure AddSidebarButton(const ACaption, AName: String ); | 增加一个在线回收按钮在客户端界面左侧中间 | | procedure SendClientUIVisible(const UIName: String ; Visible : Boolean ; Auto : Boolean = false); | 设置客户端UI是否可视 | | procedure LockClient(const Caption,CallBackProc: String); | 锁定客户端 | | procedure UnLockClient(); | 解锁客户端 | | procedure SetClientUIProperty(Const UIName,UIProperty:String); | 可以一次性修改多个UI的多个属性。分隔符为@。 例子 :PLAYER.SetClientUIProperty('UINAME1@UINAME2@UINAME3','UIProperty1@UIProperty2@UIProperty3'); 注意:每个UIProperty都可以设置多个属性,每个属性设置用分号;分开,属性值用=赋值。 具体例子: Player.SetClientUIProperty('活动提示框@NPC大对话框','Visible=True;Caption.text=BOSS来袭@visible=False'); 客户端将会为相应的UI控件赋值。 | | Procedue MoveItemToUIContainer(UniTag:integer,Item:TuserItem,count:integer=1); | UniTag 在自定义UI可控道具元素内编辑 唯一值 不可冲突 用于脚本内放置物品到自定义物品框中 | | Procedue SetBuffIcon(BuffHandle:Integer; ImageLibFile:String; ImageIndex:Integer; HoverImageIndex; ShowMessage:String; DisappearMessage:String; HintMessage:String; FlashOnDisappear:Boolean; ShowTimeStr:Boolean); | 设置Buff客户端图标以及提示消息 | | Procedue RemoveItemFromUIContainer(UniTag:Integer); | 用于从UI物品框中移除物品 | | Procedue ForceMapMove(Envir: TEnvirnoment; const MapX, MapY: Integer) | 此函数可以使得离线挂机人物可以被执行地图传送。 |