What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Useful code snippets for developing quest profiles

mastahg

Administrator
Joined
Feb 27, 2011
Messages
5,355
Getting list of quests
Code:
ClearLog();
foreach(var quest in QuestLogManager.Quests())
{
Log(quest);
}
The bits you'll be intersted in is GlobalId and Step

Get all nearby units
Code:
ClearLog();
var units = GameObjectManager.GameObjects;
foreach(var unit in units.OrderBy(r=>r.Distance()))
{
Log("{0}-{2}-{1}",unit,unit.NpcId,unit.GetType());
}

Get all nearby eventobjects
Code:
ClearLog();
var units = GameObjectManager.GetObjectsOfType<EventObject>();
foreach(var unit in units.OrderBy(r=>r.Distance()))
{
Log("{0}-{1}",unit,unit.NpcId);
}

Get all KeyItems
Code:
ClearLog();
foreach(var bagslot in  InventoryManager.GetBagByInventoryBagId(ff14bot.Enums.InventoryBagId.KeyItems).Slots)
{
Log(bagslot);
}

Etc
Code:
Log("{0}-{1}",Core.Target,Core.Target.NpcId);
Log(Core.Player.Location);
 
Get all KeyItems
Code:
ClearLog();
foreach(var bagslot in  InventoryManager.GetBagByInventoryBagId(InventoryBagId.KeyItems).Slots)
{
Log(bagslot);
}

This error is thrown when im trying to execute the code above (reborn console):
Code:
2) The name 'InventoryBagId' does not exist in the current context
 
Updated the code in the OP, let me know if that works for you.
 
Get all KeyItems changed since update:

Code:
ClearLog();
foreach(var bagslot in  InventoryManager.GetBagByInventoryBagId(ff14bot.Enums.InventoryBagId.KeyItems).FilledSlots)
{
Log(bagslot);
}
 
Get all KeyItems changed since update:

Code:
ClearLog();
foreach(var bagslot in  InventoryManager.GetBagByInventoryBagId(ff14bot.Enums.InventoryBagId.KeyItems).FilledSlots)
{
Log(bagslot);
}

if FilledSlots returns a List to to go through, but FreeSlots is an uint .. whats an easy way to go through the freeslots?
 
TalkTo (XXXXX = QuestId)

Here is another useful snippet I use for making quest profiles.

TalkTo (XXXXX = QuestId)
Code:
ClearLog();
GameObject s = GameObjectManager.GetObjectByNPCId(Core.Target.NpcId);
QuestWork q = QuestLogManager.GetQuestById(67850);
string location = s.Location.ToString().Remove(0, 1);
location = location.Remove(location.Length - 1, 1);
Log("<TalkTo Name=\"" + s.EnglishName.ToString() + "\"" + " InteractDistance=\"" + 1.0 + "\"" + " QuestId=\"" + q.GlobalId.ToString() + "\"" + " StepId=\"" + q.Step.ToString() + "\"" + " NpcId=\"" + s.NpcId.ToString() + "\"" + " XYZ=\"" + location + "\"/>");
 
Back
Top