Page 1 of 1

API question regarding public encounters

Posted: Sun Nov 27, 2011 6:08 am
by radulfizz
Hey all,

just wondering if there's a way to figure out the state of one of those public events (like dalanis pearl events etc)
or the time left on the timer.

Been browsing through the list of API functions and the code of the old Tonk manager, but to no real avail.

There is a function

Code: Select all

PublicEncounterFrame_RetainTime()
in the API, that sounds like having something to do with it,
but i couldnt get it to cooperate.


Any input appreciated.

Re: API question regarding public encounters

Posted: Sun Nov 27, 2011 8:13 am
by rock5
That function doesn't seem to do much. Here it is.

Code: Select all

function PublicEncounterFrame_RetainTime(this)
	this.state = 1;	
	this.RetainTime = 15;
end
Not sure what 'this' is.

The only place I see it used is in the PEF onevent function

Code: Select all

	if( event == "PE_SUCCESS" or event == "PE_FAILED") then  --������Ȧ��\�Υ��ѵ���
		local Index = arg1;
		if( Index >=1 and Index <= 10) then
			local obj = getglobal("PEFs_Item"..Index);
			PublicEncounterFrame_RetainTime(obj);
		end
	end
I still don't know what to make of it.