最近遇到一个问题 序列模式打怪的时候,打着打着游戏本体总是会无响应,然后必须停止脚本,游戏才能响应过来。←已找到原因是翻雾云海地图的原因 还有想到的一个问题 序列模式打怪,是否能设置打怪的数量,问一些人回答是似乎不行。那么能不能通过设置掉落素材达到一定数量时,就停止打怪呢。←其实就是想能不能写出每日狩猎的脚本。
E大你好 ClearLog(); Log("当前地图ZoneId: {0} ,我的名字: {1} ,我的坐标 {2}",WorldManager.ZoneId,Core.Me.Name,Core.Me.Location); int i=1; foreach(var TeleportLocation in WorldManager.AvailableLocations) { Log("第{0}个传送, 名字: {1} ,ZoneId: {2} ,AetheryteId: {3}",i,TeleportLocation.Name,TeleportLocation.ZoneId,TeleportLocation.AetheryteId); i++; } 按照你的输入后 得到的是 2) The name 'WorldManager' does not exist in the current context 2) The name 'Core' does not exist in the current context 2) The name 'Core' does not exist in the current context 4) The name 'WorldManager' does not exist in the current context
E大你好 我想查询现在日常任务特殊技能的技能id(就是技能键1) 但在执行 --------------- ClearLog(); Log(((BattleCharacter)Core.Player.CurrentTarget).SpellCastInfo.ActionId);//目标正在施放法术ID Log(((BattleCharacter)Core.Player.CurrentTarget).SpellCastInfo.Name);//目标正在施放法术英文名 Log(((BattleCharacter)Core.Player.CurrentTarget).SpellCastInfo.SpellData.LocalizedName);//目标正在施放法术中文名 Log(((BattleCharacter)Core.Player.CurrentTarget).HasAura("Medica II"));//目标是否有Medica II这个Buff,Buff名字需要是英文名字 Log(((BattleCharacter)Core.Player.CurrentTarget).HasAura(150));//目标是否有150这个ID的Buff int i = 1; foreach (var Arua in ((BattleCharacter)Core.Player.CurrentTarget).Auras.AuraList) { Log("目标第{0}个Buff, 名字: {1} ,ID: {2}", i, Arua.Name, Arua.Id); i++; } ------------ 出现 ------------- System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.InvalidCastException: 无法将类型为“ff14bot.Objects.Character”的对象强制转换为类型“ff14bot.Objects.BattleCharacter”。 在 Driver.Run() 位置 g:\temp\RebornbuddyCN+1.0.281.0\Plugins\RebornConsole\Temp\1pv4ogb4.0.cs:行号 37 --- 内部异常堆栈跟踪的结尾 --- 在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 在 System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) 在 System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) 在 HighVoltz.CodeDriver.CompileAndRun(String input) 位置 xxx:\temp\RebornbuddyCN+1.0.281.0\Plugins\RebornConsole\RebornConsole.cs:行号 511 ---------------- 请问是什么原因呢,或者有没有执行让程序按下按键1的语法呢 谢谢!
############################################################################# ################################INSTRUCTIONS################################# ############################################################################# 1. CREATE A NEW SNIPPET. 2. USE THE NAME BELOW AND CLICK THE "RENAME" BUTTON. 3. COPY THE CODE BETWEEN THE "-----" LINES INTO THE C# TAB OF THE RB CONSOLE. 4. CLICK SAVE. 5. CLICK RUN WHEN READY. ############################################################################# Name: Current Zone, XYZ & Weather -------------------------------------------------- ClearLog(); Log("Zone Id: {0} | Raw Zone Id: {1} | Subzone Id: {2}",WorldManager.ZoneId,WorldManager.RawZoneId,WorldManager.SubZoneId); Log("Current XYZ: {0}",Core.Player.Location); Log("Current Weather: {0} | Current Weather Id: {1}",WorldManager.CurrentWeather,WorldManager.CurrentWeatherId); Log("=================================================="); foreach(var Aetheryte in WorldManager.AetheryteIdsForZone(WorldManager.ZoneId)) { Log("Current Zone Aetheryte ID: {0}",Aetheryte.Item1); } -------------------------------------------------- Name: Nearby Objects (Closest at the Top) -------------------------------------------------- ClearLog(); var units = GameObjectManager.GameObjects; foreach(var unit in units.OrderBy(r=>r.Distance())) { Log("Name:{0}, Type:{3}, ID:{1}, Obj:{2}",unit,unit.NpcId,unit.ObjectId,unit.GetType()); } Log("=================================================="); foreach (var x in GameObjectManager.GetObjectsOfType<BattleCharacter>(true).OrderBy(r=>r.Distance())) { Log("Name: " + x.EnglishName + ", Level: " + x.ClassLevel); } -------------------------------------------------- Name: Aetheryte ID List -------------------------------------------------- ClearLog(); foreach(var item in DataManager.AetheryteCache) { Log("ID: {0} | Location: {1}",item.Key,item.Value); } -------------------------------------------------- Name: Current Quests -------------------------------------------------- ClearLog(); foreach(var quest in QuestLogManager.Quests()) { Log(quest); } -------------------------------------------------- Name: FishSpot Generator -------------------------------------------------- ClearLog(); string location = Core.Player.Location.ToString().Remove(0, 1); location = location.Remove(location.Length - 1, 1); Log("<FishSpot XYZ=\"" + location + "\" Heading=\"" + Core.Me.Heading + "\" />"); -------------------------------------------------- Name: Inventory Items -------------------------------------------------- ClearLog(); Log("=================================================="); Log("======================GEAR========================"); Log("=================================================="); Log(" "); foreach(var item in InventoryManager.GetBagByInventoryBagId(ff14bot.Enums.InventoryBagId.EquippedItems).FilledSlots) { Log("Name: " + item.Item.EnglishName + "\tItemCategory: " + item.Item.EquipmentCatagory + "\tId: " + item.Item.Id); } Log(" "); Log("=================================================="); Log("====================INVENTORY====================="); Log("=================================================="); Log(" "); foreach(var item in ff14bot.Managers.InventoryManager.FilledSlots.Where(x => x.BagId == InventoryBagId.Bag1 || x.BagId == InventoryBagId.Bag2 || x.BagId == InventoryBagId.Bag3 || x.BagId == InventoryBagId.Bag4)) { Log("Name: " + item.Item.EnglishName + "\tItemCategory: " + item.Item.EquipmentCatagory + "\tId: " + item.Item.Id); } Log(" "); Log("=================================================="); Log("====================KEY ITEMS====================="); Log("=================================================="); Log(" "); foreach(var bagslot in InventoryManager.GetBagByInventoryBagId(ff14bot.Enums.InventoryBagId.KeyItems).FilledSlots) { Log(bagslot); } -------------------------------------------------- Name: Detailed Target Information (Target Something!) -------------------------------------------------- ClearLog(); GameObject s = GameObjectManager.GetObjectByNPCId(Core.Target.NpcId); Log("Can Attack - " + s.CanAttack.ToString()); Log("Combat Reach - " + s.CombatReach.ToString()); Log("Current Health Percent - " + s.CurrentHealthPercent.ToString()); Log("English Name - " + s.EnglishName.ToString()); Log("Fate ID - " + s.FateId.ToString()); Log("Heading - " + s.Heading.ToString()); Log("Id Location - " + s.IdLocation.ToString()); Log("Is Behind - " + s.IsBehind.ToString()); Log("Is Fate Gone - " + s.IsFateGone.ToString()); Log("Is Flanking - " + s.IsFlanking.ToString()); Log("Is Me - " + s.IsMe.ToString()); Log("Is Targetable - " + s.IsTargetable.ToString()); Log("Is Valid - " + s.IsValid.ToString()); Log("Is Visble - " + s.IsVisible.ToString()); Log("Location - " + s.Location.ToString()); Log("LUA String - " + s.LuaString.ToString()); Log("Max Health - " + s.MaxHealth.ToString()); Log("Name - " + s.Name.ToString()); Log("NPC ID - " + s.NpcId.ToString()); Log("Object Id - " + s.ObjectId.ToString()); Log("Type - " + s.Type.ToString()); -------------------------------------------------- Name: Remote Window Open Check -------------------------------------------------- ClearLog(); Log("ColosseumRecord Open? {0}",ff14bot.RemoteWindows.ColosseumRecord.IsOpen); Log("ContentsFinder Open? {0}",ff14bot.RemoteWindows.ContentsFinder.IsOpen); Log("ContentsFinderConfirm Open? {0}",ff14bot.RemoteWindows.ContentsFinderConfirm.IsOpen); Log("ContentsFinderReady Open? {0}",ff14bot.RemoteWindows.ContentsFinderReady.IsOpen); Log("CraftingLog Open? {0}",ff14bot.RemoteWindows.CraftingLog.IsOpen); Log("HousingGardening Open? {0}",ff14bot.RemoteWindows.HousingGardening.IsOpen); Log("JournalAccept Open? {0}",ff14bot.RemoteWindows.JournalAccept.IsOpen); Log("JournalResult Open? {0}",ff14bot.RemoteWindows.JournalResult.IsOpen); Log("MaterializeDialog Open? {0}",ff14bot.RemoteWindows.MaterializeDialog.IsOpen); Log("Repair Open? {0}",ff14bot.RemoteWindows.Repair.IsOpen); Log("Request Open? {0}",ff14bot.RemoteWindows.Request.IsOpen); Log("SelectIconString Open? {0}",ff14bot.RemoteWindows.SelectIconString.IsOpen); Log("SelectString Open? {0}",ff14bot.RemoteWindows.SelectString.IsOpen); Log("SelectYesno Open? {0}",ff14bot.RemoteWindows.SelectYesno.IsOpen); Log("Synthesis Open? {0}",ff14bot.RemoteWindows.Synthesis.IsOpen); Log("Talk Open? {0}",ff14bot.RemoteWindows.Talk.DialogOpen); -------------------------------------------------- Name: Weather List -------------------------------------------------- ClearLog(); foreach(var item in WorldManager.WeatherDictionary) { Log("ID: {0} | Type: {1}",item.Key,item.Value); } -------------------------------------------------- Name: Get Todo Arguments (XXXXX = Quest ID) -------------------------------------------------- ClearLog(); Log(QuestLogManager.GetQuestById(XXXXX).GetTodoArgs(0)); Log(QuestLogManager.GetQuestById(XXXXX).GetTodoArgs(1)); -------------------------------------------------- Name: Quest Arguments (XXXXX = Quest ID) -------------------------------------------------- ClearLog(); Log(ff14bot.NeoProfiles.ConditionParser.IsQuestAcceptQualified(XXXXX)); Log(ff14bot.NeoProfiles.ConditionParser.IsQuestCompleted(XXXXX)); Log(ff14bot.NeoProfiles.ConditionParser.HasQuest(XXXXX)); Log(ff14bot.NeoProfiles.ConditionParser.GetQuestStep(XXXXX)); Log(ff14bot.NeoProfiles.ConditionParser.GetQuestById(XXXXX).QuestI8AH); -------------------------------------------------- Name: Active FATE Properties -------------------------------------------------- ClearLog(); foreach (var fate in FateManager.ActiveFates) { Log("IsValid: " + fate.IsValid + " | Level: " + fate.Level + " | Status: " + fate.Status + " | " + fate.Name); } -------------------------------------------------- Name: Distance Check -------------------------------------------------- ClearLog(); Log(Core.Me.Location.Distance3D(new Vector3(0.0f, 0.0f, 0.0f))); -------------------------------------------------- Name: Current Actions -------------------------------------------------- ClearLog(); foreach(var action in Actionmanager.CurrentActions) { Log(action); } -------------------------------------------------- Name: Open Windows -------------------------------------------------- ClearLog(); foreach (var window in RaptureAtkUnitManager.Controls) { Log(window); } --------------------------------------------------
谢谢 这里借楼请教下 这是原作者的某任务脚本,现在的问题是程序根本没法识别 我个人初步判断应该是没有条件触发的判断语句 不过我自己加上后还是不能用 大佬能否指教? ----------------这是原始的--------------------------------------- <!-- <!{1}** A Romp Around the Foothills **{1}> <SoMoveTo XYZ="-265.3845, -30.1, 103.5592" QuestId="67814" StepId="1" MapId="398" /> <SoTalkTo NpcId="1016875" XYZ="-274.0978, -22.97101, 22.81219" QuestId="67814" StepId="1" NoFlight="True" MapId="398" /> <SoMoveTo XYZ="-265.3845, -30.1, 103.5592" QuestId="67814" StepId="2" NoFlight="True" MapId="398" /> <SoTalkTo NpcId="1016876" XYZ="148.4855, 65.56322, -644.0986" QuestId="67814" StepId="2" MapId="398" /> <SoTalkTo NpcId="1016877" XYZ="212.2377, 52.20549, -777.676" QuestId="67814" StepId="3" MapId="398" /> <SoMoveTo XYZ="220.566, 49.51518, -818.9502" QuestId="67814" StepId="4" NoFlight="True" MapId="398" /> <SoTalkTo NpcId="1016878" XYZ="210.3151, 59.65556, -919.0662" QuestId="67814" StepId="4" MapId="398" /> <SoMoveTo XYZ="220.566, 49.51518, -818.9502" QuestId="67814" StepId="5" MapId="398" /> <SoMoveTo XYZ="148.4855, 65.56322, -644.0986" QuestId="67814" StepId="5" NoFlight="True" MapId="398" /> <SoMoveTo XYZ="-265.3845, -30.1, 103.5592" QuestId="67814" StepId="5" MapId="398" /> <SoTalkTo NpcId="1016875" XYZ="-274.0978, -22.97101, 22.81219" QuestId="67814" StepId="5" NoFlight="True" MapId="398" /> <SoTurnIn QuestId="67814" NpcId="1016803" XYZ="58.45544, -48, -170.6133" NoFlight="True" MapId="398" /> --> ----------------这是原始的--------------------------------------- 我加上 <If Condition="HasQuest(67814) and GetQuestStep(67814) == 1">之类的判断同样也是无法识别 如果步骤加多了还会语法错误