Page 1 of 1

help with siege gates

Posted: Sun Dec 01, 2013 6:34 pm
by runegod
hmm can anyone give me some tips or tid bits of codes of targeting my own gates in siege war

what i like to do is create a onload waypoint that will allow me to play manually in siege

but i would like to have the 3 gates on focus, and when ever a gate is being attacked the waypoint would print in guild chat which gate is being attacked and how many percent its being taken down,

something like "Front Gate is being Attacked, 90" and so on

would be useful for alts when farming merits or crystal farming on a tower, when im too busy doing other stuff during siege.

Re: help with siege gates

Posted: Sun Dec 01, 2013 9:38 pm
by Bill D Cat
My suggestion as a starting point it to look at Rock5's GotoGuild userfunction and see how he targets the gates.

http://www.solarstrike.net/phpBB3/viewt ... =27&t=5126

Re: help with siege gates

Posted: Sun Dec 01, 2013 10:10 pm
by rock5
I'm not sure the gates are the same in siege. I doubt they would have the same id but you will need the name or id of the siege gate. And what you are describing is not targeting the gate but collecting information.

Assuming you are in range, you would have to create a custom search function. Search functions usually starts like this

Code: Select all

	local objectList = CObjectList();
	objectList:update();
	for i = 0,objectList:size() do
		local obj = objectList:getObject(i);
Then you start testing the object. First you would check it's the right object by checking it's name or id. Then you would check if it's being attacked. I'm not sure how you want to do that. Maybe check if the hp is below a certain point or remember the last hp and report changes to it. Either way, to check it's hp you would have to create a pawn object

Code: Select all

local pawn = CPawn(obj.Address)
so you could then check the hp of the pawn. Then, if you want to include which gate it is, you would check the Z value. If it's above a certain value it will be the north gate. If it's below a certain value it will the the south gate. Otherwise it will be the middle gate. That should work for both castles assuming they line up.