Page 1 of 6

Andor Trainig Range

Posted: Tue Nov 06, 2012 8:59 am
by dejfit
Hi guys!
today's maintenance gave us 2 new minigames in Andor Trainig Range. There is a chance to win 500 guild rubies. Can someone with experiance look at this and chceck if those minigames can be scripted?

To enter Andor You must go to Varanas Central Plaza and speak to Kate Wesker near Malatina.

EDIT:

This is really worth a try. Today with my 3 accounts i got 10k guild rubies!!

EDIT2:

IDs i found:

Code: Select all

Kate Wesker ID 121035

Andor Training Range ZoneID: 360

Magelly Basac ID 120687

tortoise ID          106881
newt ID              106882
armored bug ID    106883
rabbit ID             106884
ammunition turtle 106885
EDIT3:

Ok, so I need now code for starting minigame then repeat someting like this

Code: Select all

obj=player:findNearestNameOrId({106881, 106882, 106883, 106884, 106885})					
player:target(obj)
RoMScript("UseExtraAction(1)")
until minigame ends. Can someone help me with this?

Re: Andor Trainig Range

Posted: Tue Nov 06, 2012 8:09 pm
by lisa

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>

	while(true) do
		obj=player:findNearestNameOrId({106881, 106882, 106883, 106884, 106885})               
		player:target(obj)
		RoMScript("UseExtraAction(1)")
		yrest(100)
	end

	</onLoad>
</waypoints>
That will just keep repeating that code over and over until you stop it.

You will need to be more specific if you want it to do more than that.

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 1:35 am
by nightclaw
the quest is hard do to it would be super hard to target them before crossing the line but i love to have this also it would be sweet

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 7:13 am
by dejfit
Thx lisa, it works... kinda. Any ideas how to make it target animals by the columns from right side to the left? And second problem is when animal is hit by the spel it vanishes slowly and script still targeting it but sholud take a new target...

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 9:54 am
by CrazyGuy
What is the target score / level / whatever to get the rubies? Ive been trying to figure it out and having no luck.

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 10:07 am
by dejfit
For what i know it is totally random. I got rubbies fo 600 and for 2800 points.
But the other thing is very interesting. Sometimes i get 1 package of prize (cerificate + raw materials), sometimes 2 packages and sometimes 3!! And i don't know why but score has nothing to do with this.

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 11:07 am
by Jandrana
And second problem is when animal is hit by the spel it vanishes slowly and script still targeting it but sholud take a new target
Add already targeted objects to a table. Use eval function of #findNearestNameOrId(_objtable, ignore, evalFunc) and check, if the object being searched has already been added to the table.

This should prevent the above problem.

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 1:05 pm
by CrazyGuy
Jandrana wrote: Add already targeted objects to a table. Use eval function of #findNearestNameOrId(_objtable, ignore, evalFunc) and check, if the object being searched has already been added to the table.

This should prevent the above problem.
Do you have an example of how do this or can point me in the direction of a script that does this?

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 1:47 pm
by dx876234
I've made a basic waypoint, seems to work but chrashes RoM Client, so I need input on what this can be.

Basically I read all mobs into a table, then run through it and kill.

I suspect that when I get some inconsistency between objects in bot and objects in client when I kill the newt which expodes and kills all 9 tortoises around it.

Any ideas Lisa/Rock?

-dx

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 2:40 pm
by rock5
You might need to check if the obj still exists. I think you should be able to do it by updating the obj. If the object doesn't exists anymore then the id should get reset to 0 if you do an update so it wont match the ids and wont try to target it.

Code: Select all

					for k,obj in pairs(killTable) do
						obj:update()
						if( obj.Id ==  objid) then
							player:target(obj)
							RoMScript("UseExtraAction(1)")
							yrest(1000)
							objectList:update()
						end
					end

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 3:20 pm
by dx876234
That solved the chrashing :) now to complete waypoint

-dx

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 4:23 pm
by dr-nuker
dx876234 wrote:That solved the chrashing :) now to complete waypoint

-dx
Looking extremly nice right now! Can't wait to get my hands on the finished script :)

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 11:06 pm
by lisa
I actually updated RoM to play with this, looked interesting.

No idea why but doing this

Code: Select all

                     player:target(obj)
                     RoMScript("UseExtraAction(1)")
                     yrest(1000)
wasn't actually making any of them dissappear.
Skill was being activated as I could see the mouse icon change but no "mobs" were being hit by the skill.

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 11:21 pm
by rock5
Assuming 'obj' was still valid, maybe you need a pause between the targeting and using the skill. Or maybe you forgot to do a player:update() after teleporting into the game.

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 11:26 pm
by lisa
I set it up as just a userfunction I call from commandline, I do prints of the object name and the address of player.TargetPtr after doing the player:target()

So the code itself was doing what it should be doing but the "mobs" just weren't dissappearing.
Manually I was easily getting scores of 1600-1900.

I put in yrests and also double up on the targeting, still nothing.

Re: Andor Trainig Range

Posted: Wed Nov 07, 2012 11:38 pm
by lisa
This was my last effort.

Code: Select all

function tort()
	local objectList = CObjectList();
	objectList:update();
	local objSize = objectList:size()
	for i = 0,objSize do 
		obj = objectList:getObject(i)
		if obj.Id == 106881 then
			print(obj.Name)
			player:target(obj)
			yrest(100)	
			player:update()
			print(player.TargetPtr)
			RoMScript("UseExtraAction(1)")
			yrest(100)
			RoMScript("UseExtraAction(1)")
			yrest(100)
			player:target(obj)
			yrest(100)		
			
		end
	end

	objectList:update();
	local objSize = objectList:size()
	for i = 0,objSize do 
		obj = objectList:getObject(i)
		if obj.Id == 106882 or obj.Id == 106883 or obj.Id == 106884 then
			print(obj.Name)
			RoMScript("UseExtraAction(1)")
			yrest(100)
			player:target(obj)
			yrest(100)
			RoMScript("UseExtraAction(1)")
			yrest(100)
			player:target(obj)
			yrest(100)			
		end
	end	
	
end
added rests and skill uses and also targeting, still not one of them vanished.

Names and addresses printed fine.

Re: Andor Trainig Range

Posted: Thu Nov 08, 2012 12:13 am
by Hidden
dx876234 wrote:I've made a basic waypoint, seems to work but chrashes RoM Client, so I need input on what this can be.

Basically I read all mobs into a table, then run through it and kill.

I suspect that when I get some inconsistency between objects in bot and objects in client when I kill the newt which expodes and kills all 9 tortoises around it.

Any ideas Lisa/Rock?

-dx
Tried this one... 53pts, game looks interesting though just no idea what Im actually supposed to do. As for coding its way beyond my skill level but it was killing mobs to begin with then seemed to slow down and the turtles crossed the line.

Re: Andor Trainig Range

Posted: Thu Nov 08, 2012 12:44 am
by lisa
yeah I tried the WP posted and it did click the first 2, so I changed my code to remove the rests between targeting and clicking, it does a few now.

Also need to have a good 3-4 seconds wait after they start moving.

Re: Andor Trainig Range

Posted: Thu Nov 08, 2012 2:54 am
by lisa
Ok this function just scored 1900 and got to round 13, I just call it when it says go.

Code: Select all

function tort()
	
	local function one(ID)
		local objectList = CObjectList();
		objectList:update();
		local objSize = objectList:size()
		for i = 0,objSize do 
			obj = objectList:getObject(i)
			if obj.Id == ID or ID == 106885 then
				print(obj.Name)
				player:target(obj)
				RoMScript("UseExtraAction(1)")
				yrest(10)
				player:target(obj)
				RoMScript("UseExtraAction(1)")
				if ID == 106883 then
					yrest(10)
					player:target(obj)
					RoMScript("UseExtraAction(1)")	
				end
				yrest(20)
			end
		end
	end
	one(106882)
	one(106882)	
	one(106881)
	one(106883)
	one(106884)	
end

It does do some "casts" to turtles that have already dissappeared but it is fast enough to just keep up. There is probably an indicator that the "mob" has already been cast on and is in the process of dissappearing.

Re: Andor Trainig Range

Posted: Thu Nov 08, 2012 6:30 am
by Ballerlocke
can you make a file with a complete script for download