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

Can someone help me? Trying to detect what vehicle I'm on. Clipper? Farm Cart?

DerpProgrammer

Community Developer
Joined
Mar 16, 2015
Messages
33
Reaction score
0
Dumpy Dump "Deep Dump" on my farm hauler reveals a node titled "slaveDb" that expands to a field called "name". I've tried accessing it via creature.slaveDb.name but it apparently doesn't work like that. And, creature.name only gives me the name that I've set my boat or farm cart to. I need to definitively know whether its a clipper, farm cart, farm hauler, merc ship... etc... (for my plugin to work correctly).

Here is the info in the API: slaveDb Property

Any help you can provide you be greatly appreciated. :)
 
For instance:

Creature vehicle = getSlave();
Log(vehicle.name); //This gives me the friendly name of my farm hauler (What if I've named it "Speedy"?)
Log(vehicle.slaveDb.name); //This is the actual name of the vehicle, however it gives the following compile error:

error CS1061: 'ArcheBuddy.Bot.Classes.Creature' does not contain a definition for 'slaveDb' and no extension method 'slaveDb' accepting a first argument of type 'ArcheBuddy.Bot.Classes.Creature' could be found (are you missing a using directive or an assembly reference?)
 
HA! I figured it out.
Creature VehicleCreature = getSlave();
Slave VehicleSlave = VehicleCreature as Slave;
Log(VehicleSlave.slaveDb.name);

Screw you guys.
just kidding... :)
 
Good on you posting your solution here =) I'm sure it'll help someone in the future
 
Back
Top