Calling EQ2Bot functions from another script

bob_the_builder

Well-Known Member
So I am trying to run another script outside of EQ2bot that would use the EQ2bot functions. Just not sure how.

This is what I am using right now and it is not working

Code:
#ifndef _Eq2Botlib_
	#include "${LavishScript.HomeDirectory}/Scripts/EQ2bot/Class Routines/EQ2BotLib.iss"
#endif

function main()
{
echo ** Begining Melee Attach sequence **
	if ${Target.Distance}>4
	{
		Target ${KillTarget}
		call CheckPosition 1 1
	}
}
Any help would be appreciated.
 

Valerian

ISX Specialist
KillTarget and CheckPosition are part of EQ2bot ... right?
... and your script is not part of EQ2bot. Where are they set in YOUR script?

(edit)

Figured I'd be a bit more helpful. You will not be able to call functions from another script within your own script, unless those functions are also defined in your script. Copy/paste? You CAN access another script's variables, but you must use the Script TLO and associated datatypes to get to those variables. Example:
Code:
target ${Script[EQ2bot].VariableScope.KillTarget}
 

Hendrix

Well-Known Member
from what it looked like, you were trying to run your script instead of eq2bot (by including its lib). If you are trying to access parts of eq2bot while eq2bot is running, that is a totally other beast.
 
Top Bottom