Software Documentation MQ2EmuDB » Retired
Reply
MQ2EmuDB » Retired

This plugin was retired. The size of the database, it's performance, and the headache of keeping it up to date far outweighed the usefulness of it.



This plugin was thought up by Lord Spaztic. Thanks for the idea, its brilliant.

This comes with the file MQ2EmuDB.mdb. This is a MS Access database file. It SHOULD run without having the have access installed, but further testing is required. I picked MSAccess for this reason. It was a stand alone file, didn't require you to install database software, and source in data. It was an ease of use thing, not a performance decision.

This file contains information about all of the mobs in PEQ and serves it up as a TLO to be used in your hotkeys, macros, and HUDS.

Important: This is connecting to a database everytime you use a variable somewhere. Overuse of it can cause performance issues. If you are noticing your frame rate going down then this is the culprit. During trials there was very little, mostly no system lag noticed when used in macro's. When used in a HUD to display 3 or 4 things I noticed very little to no effect on the game. However loading 10-20 items to display in a HUD the game began to be effected. HUD's access the variable many many times a second to update them, multiply that by 10-20 items being displayed and sometimes 2 database queries per variable and you have alot of queries.

When loading, this will first validate you have a gold user acct.
After that it will attempt to connect to the database.

This means if you do not have auto-login enabled for MQ2VMQNet then it will bail out of the process before the database is connected. After succesfully loging in to your gold member acct (see mq2vmqnet documentation for info on that) you can use the command below to connect to the database. If you do have auto login enabled, you probably wont ever need to use this.

/connectdb This will attempt to connect you to the database. In the instance you are NOT connected an error message will be posted to the MQ window when trying to access variables.






Examples:

Combine it with mq2map by making a hotkey of "/mapfilter castradius ${EmuMob[${Target}].First.AggroRadius}" this will set a ring around your character equal to the aggro line of the mobs you want to avoid. Say you have to navigate through a giant area full of lightcrawlers and don't want to aggro them. Target one of them, hit your hotkey and a circle will appear around your character on the map. You can now run through the light crawlers and as long as you don't let one of them in your "personal space" you won't aggro them.


In your shamans macro have it check ${EmuMob[${Target}].First.Slowable} to see if they should bother trying to slow the mob.

To get better performance in portions of your macro consider loading the values once, and then using them over and over since none of the values in the database will be changing. Example below.

:Loop
/if (!${slowset}) {
/varset canslow ${EmuMob[${Target}].First.Slowable}
/varset slowset 1
}
if (${canslow}) {
/cast ${myslowspell}
}
/goto :Loop





The Variable:

${EmuMob[]} This will give you access to a mob in the database by putting the mobs name in the []. EQ spawn ID's are dissimilar to a mobs database ID and can't be used to look up a unique version of the mob. The name must be used. This has the problem of returning multiple mobs with the same name. This is typically used to have mobs of the same name with different levels, but will become less common in EQEmu's future with the addition of a level range field to the database.




Type EmuMob:

bool ToString TRUE/FALSE if the mob has at least 1 entry in the DB
int Count Returns how many mobs in the database have that name
dbmob ByIndex[] Returns the mob handle for the N-th mob in the DB with the searched name
dbmob First Returns the mob handle for the first mob in the DB with the searched name
dbmob Last Returns the last mob



Type dbmob:

int ToString returns the ID of the mob
int ID returns mobs ID
string Name returns the mobs first name
string LastName returns the mobs last name
int Level returns the mobs level
string Race returns the mobs race as a string
string Class returns the mobs class as a string
int HP returns the mobs HP
string Gender returns the mobs gender
int Size returns the mobs size
int HPRegen returns the mobs HP regen rate
int ManaRegen returns the mobs Mana regen rate
int LootID Returns the mobs LootID (for a future plugin)
int MerchantID returns the mobs Merchant ID (for a future plugin)
int SpellsID returns a mobs SpellID (for a future plugin)
int FactionID returns the mobs faction id (for a future plugin)
int MinDmg returns the minimum dmg for a succesfull hit
int MaxDmg returns the max dmg for a succesfull hit
int AggroRadius the mobs aggro radius
int RunSpeed the runspeed of the mob
int MR magic resist of the mob
int CR cold resist of the mob
int DR disease resist of the mob
int FR fire resist of the mob
int PR poison resist of the mob
int NumAttacks how many attacks per round the mob gets 1-4
bool ImmuneToMeele if the mob is immune to meele dmg
bool ImmuneToMagic if the mob is immune to magic
bool Charmable if the mob can be charmed
bool Fearable if the mob can be feared
bool Enrage if the mob will enrage
bool Flurry if the mob can flurry
bool Flee if the mob will flee
bool Snareable if the mob can be snared
bool Mezzable if the mob can be mezzed
bool Stunable if the mob can be stunned
bool RequiresBane if the mob requires a bane weapon to hit it
bool Rampage if the mob rampages
bool Summon if the mob can summon
bool Slowable if the mob can be slowed
bool RequiresMagicWeapon if the mob requires a "MAGIC" tagged weapon to hit
bool SeeInvis if the mob can see invis
bool SeeInvisUndead if the mob can see invis vs. undead
int AC the mobs armor class
int NPCAggro if the mob will attack other NPC's (like guards)
int AttackSpeedMod the mobs attack speed modifier
bool Findable if the mob is findable
int Strength the mobs strength
int Stamina the mobs stamina
int Dexterity the mobs dexterity
int Agility the mobs agility
int Intelligence the mobs intelligence
int Wisdom the mobs wisdom
int Charisma the mobs charisma
bool SeeHide if the mob can see through hide
bool SeeImprovedHide if the mob can see through improved hide
bool Trackable if the mob can be tracked
bool Excluded if the mob is excluded
Last edited by Maudigan on Sun Aug 20, 2017 2:30 pm; edited 3 times in total
Sun Oct 11, 2009 9:28 am
Project Lead
Wow man...just wow.

/clap

This is just fucking awesome.
I'm glad to see one of my ideas come to life.

Thank you for the credits, but I believe they should go to you.
Your the one that figured this out.

Keep up the good work!
Fri Nov 13, 2009 12:57 pm
Project Member (Retired)
So i guess its working then? =P I was afraid the speed issues with it wouldn't be managable.
Fri Nov 13, 2009 1:26 pm
Project Lead
Software Documentation MQ2EmuDB » Retired
Reply