/// <summary> /// Not in use anymore! /// </summary> /// <param name="message"></param> /// <returns></returns> public static Int32 EV_CreateInteractItem(String message) { Process Process = Process.ThisProcess(); try { int address = Convert.ToInt32(message); oCNpc npc = new oCNpc(Process, Process.ReadInt(address)); oCMsgManipulate oDD = new oCMsgManipulate(Process, Process.ReadInt(address + 4)); oCMobInter mobinter = npc.GetInteractMob(); MobInter mobInt = null; if (sWorld.SpawnedVobDict.ContainsKey(mobinter.Address)) { mobInt = (MobInter)sWorld.SpawnedVobDict[mobinter.Address]; oDD.InstanceName.Set("ITGUC_" + mobInt.UseWithItem.ID); zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "MobInter-Setted! " + mobInt.UseWithItem.ID, 0, "Program.cs", 0); } else { zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Not founded: MobInter! " + mobinter.Address, 0, "Program.cs", 0); } } catch (Exception ex) { zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Exception: " + ex.Message + " " + ex.StackTrace + " " + ex.Source, 0, "Program.cs", 0); } return(0); }
public static Int32 oCNpc_EV_UseItem(String message) { try { Process process = Process.ThisProcess(); int address = Convert.ToInt32(message); int ItemMessage = process.ReadInt(address + 4); oCItem item = new oCItem(process, process.ReadInt(ItemMessage + 0x6C)); oCMsgManipulate manipulation = new oCMsgManipulate(process, ItemMessage); zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Item UseItem: " + item.Name + " " + manipulation.InstanceName, 0, "ItemSynchro.cs", 0); if (item.Address != 0 && item.ObjectName.Address != 0 && item.ObjectName.Value.Trim().Length != 0) { //for (int i = 0; i < 200; i++) //{ // int id = process.ReadInt(ItemMessage + i);//0x6C // zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Use Item : " + i + " | :" + id, 0, "ItemSynchro.cs", 0); //} } } catch (Exception ex) { zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Use Item failure:" + ex.ToString(), 0, "ItemSynchro.cs", 0); } return(0); }
public static Int32 oCNpc_EV_UseItemToState(String message) { try { Process process = Process.ThisProcess(); int address = Convert.ToInt32(message); int ItemMessage = process.ReadInt(address + 4); oCNpc npc = new oCNpc(process, process.ReadInt(address)); oCItem item = new oCItem(process, process.ReadInt(ItemMessage + 0x6C)); oCMsgManipulate manipulation = new oCMsgManipulate(process, ItemMessage); UseItemNPC = npc; } catch (Exception ex) { zERROR.GetZErr(Process.ThisProcess()).Report(2, 'G', "Use Item failure:" + ex.ToString(), 0, "ItemSynchro.cs", 0); } return(0); }