working with multiple objects in multiple files

mmoaddict

Original Script Author: VGA
i have multiple objects in multiple files. This is a newbie sample if you need
Code:
FileMain--------------------------------------------------------------------
#include File1
#include File2
#include File3

function Main()
{
}

File1-------------------------------------------------------------------------
variable(global) Comstate Comstate
; objects used to declare Combat States of the char and the group
objectdef Comstate
{
	member:bool GroupCombat()
	{
		variable int icnt = 1
		variable bool gbool = FALSE
		do
		{
		if ${Group[${icnt}].ToPawn.CombatState} > 0
			gbool:Set[TRUE]
	
		} 
		while ${icnt:Inc} <= ${Group.Count}
		if ${gbool}
			return TRUE
		else
			return FALSE
		
	}
File2-------------------------------------------------------------------------
variable(global) Buffstate Buffstate

; objects used to declare Combat States of the char and the group
objectdef Buffstate
{
	member:bool groupresting()
	{
		If ${Comstate.GroupCombat} && !${iamsitting}
			return TRUE
		else
			return FALSE
		
	}
}
File3--------------------------------------------------------------------------
variable(global) bool iamsitting
 
Last edited:
Top Bottom