注册脚本API出错—未将对象引用设置到对象的实例

啊才工作室 2019-06-14 03:11:16
以前找的人写的EXE程序·因不懂源码就不需要了·谁知道加了密的·昨天找人破解了··运行程序显示《注册脚本API出错—未将对象引用设置到对象的实例》 请问哪位知道什么问题 给出的源码如下请问是哪里出错:



// Token: 0x06000D74 RID: 3444 RVA: 0x00302180 File Offset: 0x00302180
public void method_38()
{
try
{
this.pLuaVM = new Lua();
this.pLuaVM.RegisterFunction("SendMissionMsg", this, base.GetType().GetMethod("任务提示数据发送"));
this.pLuaVM.RegisterFunction("SendSysMsg", this, base.GetType().GetMethod("系统提示"));
this.pLuaVM.RegisterFunction("SendKongfuMsg", this, base.GetType().GetMethod("学习技能提示"));
this.pLuaVM.RegisterFunction("SendNoticeMsg", this, base.GetType().GetMethod("发送公告"));
this.pLuaVM.RegisterFunction("AddQuest", this, base.GetType().GetMethod("设置任务数据"));
this.pLuaVM.RegisterFunction("AddStKongfu", this, base.GetType().GetMethod("学习升天武功书"));
this.pLuaVM.RegisterFunction("AddQigong", this, base.GetType().GetMethod("新学气功"));
this.pLuaVM.RegisterFunction("AddSkill", this, base.GetType().GetMethod("学习技能"));
this.pLuaVM.RegisterFunction("AddItme", this, base.GetType().GetMethod("增加物品Script"));
this.pLuaVM.RegisterFunction("AddItmeProp", this, base.GetType().GetMethod("增加物品带属性"));
this.pLuaVM.RegisterFunction("DelItme", this, base.GetType().GetMethod("删除物品"));
this.pLuaVM.RegisterFunction("AddQuestItme", this, base.GetType().GetMethod("增加任务物品"));
this.pLuaVM.RegisterFunction("GetWorldItme", this, base.GetType().GetMethod("GetWorldItme"));
this.pLuaVM.RegisterFunction("GetPlayer", this, base.GetType().GetMethod("GetPlayerThis"));
this.pLuaVM.RegisterFunction("GetQuestLevel", this, base.GetType().GetMethod("Get任务阶段"));
this.pLuaVM.RegisterFunction("GetPackage", this, base.GetType().GetMethod("得到包裹空位位置"));
this.pLuaVM.RegisterFunction("GetPackages", this, base.GetType().GetMethod("得到包裹空位位置组"));
this.pLuaVM.RegisterFunction("GetPakItme", this, base.GetType().GetMethod("得到包裹物品"));
this.pLuaVM.RegisterFunction("GetQuestItme", this, base.GetType().GetMethod("得到任务物品"));
this.pLuaVM.RegisterFunction("SetPlayerTransfer", this, base.GetType().GetMethod("人物转职业"));
this.pLuaVM.RegisterFunction("SetQigong", this, base.GetType().GetMethod("新学气功"));
this.pLuaVM.RegisterFunction("SetPlayerLevel", this, base.GetType().GetMethod("设置玩家等级"));
this.pLuaVM.RegisterFunction("SetPlayerVIP", this, base.GetType().GetMethod("设置人物会员"));
this.pLuaVM.RegisterFunction("SetPlayerRxpiont", this, base.GetType().GetMethod("设置人物元宝"));
this.pLuaVM.RegisterFunction("UpGongFu", this, base.GetType().GetMethod("更新武功和状态"));
this.pLuaVM.RegisterFunction("UpMoney", this, base.GetType().GetMethod("更新金钱和负重"));
this.pLuaVM.RegisterFunction("UpExp", this, base.GetType().GetMethod("更新经验和历练"));
this.pLuaVM.RegisterFunction("UpYzbItme", this, base.GetType().GetMethod("初始话已装备物品"));
this.pLuaVM.RegisterFunction("UpUseItme", this, base.GetType().GetMethod("物品使用"));
this.pLuaVM.RegisterFunction("TEstMsg", this, base.GetType().GetMethod("TEstMsg"));
this.pLuaVM.RegisterFunction("GetPakItemNum", this, base.GetType().GetMethod("得到包裹物品数量"));
this.pLuaVM.RegisterFunction("GetPakItembool", this, base.GetType().GetMethod("查询包裹物品数量"));
this.pLuaVM.RegisterFunction("DelPakItme", this, base.GetType().GetMethod("del包裹物品"));
this.pLuaVM.RegisterFunction("SetQingludu", this, base.GetType().GetMethod("设置情侣爱情度"));
this.pLuaVM.RegisterFunction("SetAddExp", this, base.GetType().GetMethod("增加人物经验值"));
this.pLuaVM.RegisterFunction("SetPlayerRxpiontx", this, base.GetType().GetMethod("设置人物百宝积分"));
this.pLuaVM.RegisterFunction("AddItemTs", this, base.GetType().GetMethod("增加物品提示"));
this.pLuaVM.RegisterFunction("UpQuestData", this, base.GetType().GetMethod("更新任务信息"));
this.pLuaVM.RegisterFunction("SetPetTransfer", this, base.GetType().GetMethod("灵兽申请转职"));
this.pLuaVM.RegisterFunction("GetPetLevel", this, base.GetType().GetMethod("查询灵兽等级"));
this.pLuaVM.RegisterFunction("GetQuestStatus", this, base.GetType().GetMethod("查询任务状态"));
this.pLuaVM.RegisterFunction("AddMission", this, base.GetType().GetMethod("设置任务数据N"));
}
catch (Exception ex)
{
Form1.smethod_2(2, "注册脚本API出错-" + ex.Message);
}
}

// Token: 0x06000D75 RID: 3445 RVA: 0x0027703E File Offset: 0x0027703E
public void method_39()
{
this.luaFunction_0 = this.pLuaVM.GetFunction("OpenItmeTrigGer");
this.luaFunction_1 = this.pLuaVM.GetFunction("DestroyMonster");
}

// Token: 0x06000D76 RID: 3446 RVA: 0x0027706C File Offset: 0x0027706C
public void Close()
{
this.dictionary_0.Clear();
this.luaFunction_1.Dispose();
this.luaFunction_0.Dispose();
this.pLuaVM.Close();
GClass63.scriptClass_0 = null;
}
...全文
280 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
橘子皮... 2019-06-19
  • 打赏
  • 举报
回复
这反编译的没什么用,根本没法修改的
jx315425246 2019-06-16
  • 打赏
  • 举报
回复
base.GetType().GetMethod("任务提示数据发送")这个函数返回 null ,有两种可能缺少一个信息记录的脚本(记录有"任务提示数据发送"相关信息)或者是,缺少动态库
李敢敢 2019-06-14
  • 打赏
  • 举报
回复
这是外挂把

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧