Luna weekly Rank A - [Final Version] Updated: 04/12/2017

User avatar
smaion40
Posts: 83
Joined: Tue Apr 25, 2017 12:11 pm
Has thanked: 42 times
Been thanked: 16 times

Luna weekly Rank A - [Final Version] Updated: 04/12/2017

Post by smaion40 » Sun Oct 29, 2017 5:23 pm

Hey guys, this script does some basic combat to get rank A in luna weekly.

What this script does?:
1) Waits until boss room teleport spawns and uses it.
2) Attacks 1st and 2nd boss with the strongest skill and kills them.
3) Moves to experience beads and kills them.
4) Moves to Quest Box and loots it.
5) Uses teleport to leave the instance. (Optional)
6) Uses healing skill when Hp is lower than 65%
7) Gets A Rank 100% of times 8-)

What this script cant do?:
(To improve later / suggestions are appreciated)

* For now it has no support for quest deliver and 7 key-chest looting. So, if you want to loot the chest you need to do it manually, that's why the teleport is "Optional", you can commentate or delete that section of the script if needed.

* It cant get Rank S for now. A new version will be released for that.

There is a timer to loot the quest box after 19 minutes, so its really important to run the script right after you enter the instance for best results. (Hopefully I will remove it soon).

NA Version:

Code: Select all

--NA Entities and skills:
BossTeleport= "War Factory Rift"
Watcher= "Siege Factory Watcher"
Summons= "Siege Factory Protector"
Boss1= "Mechaturerk Machine Monster"
Boss2= "Mechaturerk"
ExpBeads= "Mechaturerk’s Core Fragment"
QuestBox="Mechaturerk’s Footlocker"
ExitTeleport="Corridor to Atreia"
Skill1= "Soul Scream"
Skill2= "Wave of Darkness"
Skill3= "Terror's Restraint"
Skill4= "Hellish Fissure"
Skill5= "Cloak of Darkness"

--[[EU Entities and skills:
BossTeleport= "Dimension Gate to the Weapons Factory"
Watcher= "Siege Factory Watcher"
Summons= "Factory Keeper"
Boss1= "Mechaturerk Machine Monster"
Boss2= "Mechaturerk"
ExpBeads= "Mechanerk's Core"
QuestBox= "Mechanerk's Chest"
ExitTeleport= "Atreia Corridor"
Skill1= "Darkness Cry"
Skill2= "Darkness Wave"
Skill3= "Horror Shackles"
Skill4= "Infernal Rift"
Skill5= "Mantle of Darkness"
--]]


function OnLoad()
	SoulScream      =  Time(); --0.5Sec
	WaveOfDarkness  =  Time(); --4  Sec
	TerrorsRestraint=  Time(); --8  Sec
	HellishFissure  =  Time(); --30 Sec + 1.5 Casting
	CloakOfDarkness =  Time(); --80 Sec
	Coordinate      =  Time(); --Coordinate Allocation
	LeaveInstance   =  Time(); --Timer after looting Quest Box
	Looting         =  Time();
	Write( "Script will start after minute 48:00, please, be patient.")
end

function OnFrame()

	--Boss Teleport Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == BossTeleport then
			PlayerInput:Console("/Select "..BossTeleport)
			PlayerInput:Console("/Attack")
			Write( "Teleport Spawned!")
			return true;
		end
	end

	--Watcher Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == Watcher then
				PlayerInput:Console("/Select "..Watcher)
				Player:SetMove(191.99, 258.84, 191.87);
				if  WaveOfDarkness <Time() then
					PlayerInput:Console("/skill "..Skill2);
					WaveOfDarkness = Time() + 5000;
					return false;					
				elseif  SoulScream <Time() then
					PlayerInput:Console("/skill "..Skill1);
					SoulScream = Time() + 2000;
					return false;
                end
				
			Write( "Siege Watcher Detected!")
			return true;
		end
	end
	
	--Watcher Summon Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == Summons then
			PlayerInput:Console("/Select "..Summons)
			Player:SetMove(191.99, 258.84, 191.87);
			if  TerrorsRestraint <Time() then
				PlayerInput:Console("/skill "..Skill3);
				TerrorsRestraint = Time() + 9000;
				return false;
			elseif  WaveOfDarkness <Time() then
				PlayerInput:Console("/skill "..Skill2);
				WaveOfDarkness = Time() + 5000;
				return false;
			elseif  SoulScream <Time() then
				PlayerInput:Console("/skill "..Skill1);
				SoulScream = Time() + 2000; 
				return false;		
			end
			Write( "Siege Watcher Summons Detected!")
			return true;
		end
	end
	
	--First Boss Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == Boss1 then
			PlayerInput:Console("/Select "..Boss1)
			if  TerrorsRestraint <Time() then
				PlayerInput:Console("/skill "..Skill3);
				TerrorsRestraint = Time() + 9000;
				return false;
			elseif  HellishFissure <Time() then
				PlayerInput:Console("/skill "..Skill4);
				HellishFissure = Time() + 17000;
				return false;
			end	
			Write( "First Boss Detected!")
			return true;
		end
	end
	
	--Second Boss Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == Boss2 then
			PlayerInput:Console("/Select "..Boss2)
			Player:SetMove(172.71, 258.92, 191.87);
			if  TerrorsRestraint <Time() then
				PlayerInput:Console("/skill "..Skill3);
				TerrorsRestraint = Time() + 9000;
				return false;
			elseif  HellishFissure <Time() then
				PlayerInput:Console("/skill "..Skill4);
				HellishFissure = Time() + 17000;
				return false;
			end	
			Write( "Second Boss Detected!")
			return true;
		end
	end
	
	--Instance finished, exp beads were spawned.
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
			if Entity:GetName() == ExpBeads then
				PlayerInput:Console("/Select "..ExpBeads)
				Player:SetMove(161.39, 261.83, 192.08);
				if  TerrorsRestraint <Time() then
					PlayerInput:Console("/skill "..Skill3);
					TerrorsRestraint = Time() + 9000;
					return false;
				elseif  WaveOfDarkness <Time() then
					PlayerInput:Console("/skill "..Skill2);
					WaveOfDarkness = Time() + 5000;
					return false;
				elseif  SoulScream <Time() then
					PlayerInput:Console("/skill "..Skill1);
					SoulScream = Time() + 20000; 
					return false;
				end
				Write( "Experience Beads Spawned!")
				return true;
			end
	end
	
		--Looting Quest Box
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == QuestBox then
			PlayerInput:Console("/Select "..QuestBox)
			PlayerInput:Console("/Skill Loot")
			PlayerInput:Console("/Attack")			
			Write( "Quest Item should have been looted, please verify.")
			return true;
		end
	end

		--Leaving the Instance. (Still Optional)
	if  Time() > (LeaveInstance + 1260000) then
			PlayerInput:Console("/Select "..ExitTeleport)
			PlayerInput:Console("/Attack")
			Write( "Script Completed: Leaving the instance.")
		
	end
end
	
function OnRun()
		--Healing Routine when Hp lower than 65%
	if Player:GetHealth() < 65 and CheckAvailable( Skill5 ) then
		CheckExecute( Skill5 );
		Write( "Healing up!")
		return true;
	end 
		--Forced Looting Routine.
	if Time() > ( Looting + 10000 ) then
		PlayerInput:Console("/Skill Loot")
		Looting = Time();
	end	
		
end

--Helper Functions:

function CheckAvailable( Name, SkipActivation )
	-- Retrieve the ability with the provided name.
	local Ability = AbilityList:GetAbility( Name );
	
	-- Check if the ability is valid and is not in cooldown.
	if Ability ~= nil and Ability:GetCooldown() == 0 and ( SkipActivation ~= nil or Ability:GetActivated()) then
		return true;
	end
	
	-- Either we do not have the ability or it is in cooldown.
	return false;
end

function CheckExecute( Name, Entity )

	-- Retrieve the ability with the provided name.
	local Ability = AbilityList:GetAbility( Name );
	
	-- Check if the provided ability is available and return when it is not.
	if Ability == nil or Ability:GetCooldown() ~= 0 then
		return false;
	end
	
	-- Check if I am currently resting and stop resting when I am!
	if Player:IsResting() then
		PlayerInput:Ability( "Toggle Rest" );
		return false;
	end
	
	-- Check if this is a friendly ability with my own character as the target.
	if Entity ~= nil and Player:GetID() == Entity:GetID() then
		
		-- Retrieve the skill based on the ability identifier.
		local Skill = SkillList:GetSkill( Ability:GetID());
	
		-- It is not possible to perform a hostile skill on my own character.
		if Skill == nil or Skill:IsAttack() then
			return false;
		end
		
		-- When no target has been selected we can execute the ability.
		if Player:GetTargetID() == 0 then
			return PlayerInput:Ability( Name );
		end
		
		-- Otherwise retrieve the entity we currently have selected.
		local EntityTarget = EntityList:GetEntity( Player:GetTargetID());
		
		-- When the target is valid and is not friendly we can use our ability.
		if EntityTarget ~= nil and not EntityTarget:IsFriendly() or not EntityTarget:IsObject() then
			return PlayerInput:Ability( Name );
		end
		
	end

	-- Check if the target entity has been selected and select it when it is needed.
	if Entity ~= nil and Player:GetTargetID() ~= Entity:GetID() then
		Player:SetTarget( Entity );
		return false;
	end
	
	-- Everything seems to be valid 
	return PlayerInput:Ability( Name );
	
end
EU Version:

Code: Select all

--[[--NA Entities and skills:
BossTeleport= "War Factory Rift"
Watcher= "Siege Factory Watcher"
Summons= "Siege Factory Protector"
Boss1= "Mechaturerk Machine Monster"
Boss2= "Mechaturerk"
ExpBeads= "Mechaturerk’s Core Fragment"
QuestBox="Mechaturerk’s Footlocker"
ExitTeleport="Corridor to Atreia"
Skill1= "Soul Scream"
Skill2= "Wave of Darkness"
Skill3= "Terror's Restraint"
Skill4= "Hellish Fissure"
Skill5= "Cloak of Darkness"--]]

--EU Entities and skills:
BossTeleport= "Dimension Gate to the Weapons Factory"
Watcher= "Factory Guardian"
Summons= "Factory Keeper"
Boss1= "Mechanerk's Creature"
Boss2= "Mechanerk"
ExpBeads= "Mechanerk's Core"
QuestBox= "Mechanerk's Chest"
ExitTeleport= "Atreia Corridor"
Skill1= "Darkness Cry"
Skill2= "Darkness Wave"
Skill3= "Horror Shackles"
Skill4= "Infernal Rift"
Skill5= "Mantle of Darkness"



function OnLoad()
	SoulScream      =  Time(); --0.5Sec
	WaveOfDarkness  =  Time(); --4  Sec
	TerrorsRestraint=  Time(); --8  Sec
	HellishFissure  =  Time(); --30 Sec + 1.5 Casting
	CloakOfDarkness =  Time(); --80 Sec
	Coordinate      =  Time(); --Coordinate Allocation
	LeaveInstance   =  Time(); --Timer after looting Quest Box
	Looting         =  Time();
	Write( "Script will start after minute 48:00, please, be patient.")
end

function OnFrame()

	--Boss Teleport Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == BossTeleport then
			PlayerInput:Console("/Select "..BossTeleport)
			PlayerInput:Console("/Attack")
			Write( "Teleport Spawned!")
			return true;
		end
	end

	--Watcher Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == Watcher then
				PlayerInput:Console("/Select "..Watcher)
				Player:SetMove(191.99, 258.84, 191.87);
				if  WaveOfDarkness <Time() then
					PlayerInput:Console("/skill "..Skill2);
					WaveOfDarkness = Time() + 5000;
					return false;					
				elseif  SoulScream <Time() then
					PlayerInput:Console("/skill "..Skill1);
					SoulScream = Time() + 2000;
					return false;
                end
				
			Write( "Siege Watcher Detected!")
			return true;
		end
	end
	
	--Watcher Summon Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == Summons then
			PlayerInput:Console("/Select "..Summons)
			Player:SetMove(191.99, 258.84, 191.87);
			if  TerrorsRestraint <Time() then
				PlayerInput:Console("/skill "..Skill3);
				TerrorsRestraint = Time() + 9000;
				return false;
			elseif  WaveOfDarkness <Time() then
				PlayerInput:Console("/skill "..Skill2);
				WaveOfDarkness = Time() + 5000;
				return false;
			elseif  SoulScream <Time() then
				PlayerInput:Console("/skill "..Skill1);
				SoulScream = Time() + 2000; 
				return false;		
			end
			Write( "Siege Watcher Summons Detected!")
			return true;
		end
	end
	
	--First Boss Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == Boss1 then
			PlayerInput:Console("/Select "..Boss1)
			if  TerrorsRestraint <Time() then
				PlayerInput:Console("/skill "..Skill3);
				TerrorsRestraint = Time() + 9000;
				return false;
			elseif  HellishFissure <Time() then
				PlayerInput:Console("/skill "..Skill4);
				HellishFissure = Time() + 17000;
				return false;
			end	
			Write( "First Boss Detected!")
			return true;
		end
	end
	
	--Second Boss Verification
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == Boss2 then
			PlayerInput:Console("/Select "..Boss2)
			Player:SetMove(172.71, 258.92, 191.87);
			if  TerrorsRestraint <Time() then
				PlayerInput:Console("/skill "..Skill3);
				TerrorsRestraint = Time() + 9000;
				return false;
			elseif  HellishFissure <Time() then
				PlayerInput:Console("/skill "..Skill4);
				HellishFissure = Time() + 17000;
				return false;
			end	
			Write( "Second Boss Detected!")
			return true;
		end
	end
	
	--Instance finished, exp beads were spawned.
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
			if Entity:GetName() == ExpBeads then
				PlayerInput:Console("/Select "..ExpBeads)
				Player:SetMove(161.39, 261.83, 192.08);
				if  TerrorsRestraint <Time() then
					PlayerInput:Console("/skill "..Skill3);
					TerrorsRestraint = Time() + 9000;
					return false;
				elseif  WaveOfDarkness <Time() then
					PlayerInput:Console("/skill "..Skill2);
					WaveOfDarkness = Time() + 5000;
					return false;
				elseif  SoulScream <Time() then
					PlayerInput:Console("/skill "..Skill1);
					SoulScream = Time() + 20000; 
					return false;
				end
				Write( "Experience Beads Spawned!")
				return true;
			end
	end
	
		--Looting Quest Box
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == QuestBox then
			PlayerInput:Console("/Select "..QuestBox)
			PlayerInput:Console("/Skill Loot")
			PlayerInput:Console("/Attack")			
			Write( "Quest Item should have been looted, please verify.")
			return true;
		end
	end

		--Leaving the Instance. (Still Optional)
	if  Time() > (LeaveInstance + 1260000) then
			PlayerInput:Console("/Select "..ExitTeleport)
			PlayerInput:Console("/Attack")
			Write( "Script Completed: Leaving the instance.")
		
	end
end
	
function OnRun()
		--Healing Routine when Hp lower than 65%
	if Player:GetHealth() < 65 and CheckAvailable( Skill5 ) then
		CheckExecute( Skill5 );
		Write( "Healing up!")
		return true;
	end 
		--Forced Looting Routine.
	if Time() > ( Looting + 10000 ) then
		PlayerInput:Console("/Skill Loot")
		Looting = Time();
	end	
		
end

--Helper Functions:

function CheckAvailable( Name, SkipActivation )
	-- Retrieve the ability with the provided name.
	local Ability = AbilityList:GetAbility( Name );
	
	-- Check if the ability is valid and is not in cooldown.
	if Ability ~= nil and Ability:GetCooldown() == 0 and ( SkipActivation ~= nil or Ability:GetActivated()) then
		return true;
	end
	
	-- Either we do not have the ability or it is in cooldown.
	return false;
end

function CheckExecute( Name, Entity )

	-- Retrieve the ability with the provided name.
	local Ability = AbilityList:GetAbility( Name );
	
	-- Check if the provided ability is available and return when it is not.
	if Ability == nil or Ability:GetCooldown() ~= 0 then
		return false;
	end
	
	-- Check if I am currently resting and stop resting when I am!
	if Player:IsResting() then
		PlayerInput:Ability( "Toggle Rest" );
		return false;
	end
	
	-- Check if this is a friendly ability with my own character as the target.
	if Entity ~= nil and Player:GetID() == Entity:GetID() then
		
		-- Retrieve the skill based on the ability identifier.
		local Skill = SkillList:GetSkill( Ability:GetID());
	
		-- It is not possible to perform a hostile skill on my own character.
		if Skill == nil or Skill:IsAttack() then
			return false;
		end
		
		-- When no target has been selected we can execute the ability.
		if Player:GetTargetID() == 0 then
			return PlayerInput:Ability( Name );
		end
		
		-- Otherwise retrieve the entity we currently have selected.
		local EntityTarget = EntityList:GetEntity( Player:GetTargetID());
		
		-- When the target is valid and is not friendly we can use our ability.
		if EntityTarget ~= nil and not EntityTarget:IsFriendly() or not EntityTarget:IsObject() then
			return PlayerInput:Ability( Name );
		end
		
	end

	-- Check if the target entity has been selected and select it when it is needed.
	if Entity ~= nil and Player:GetTargetID() ~= Entity:GetID() then
		Player:SetTarget( Entity );
		return false;
	end
	
	-- Everything seems to be valid 
	return PlayerInput:Ability( Name );
	
end
Known bugs:

* Looting the quest box is taking more than it should, but being looted before leaving the instance.
* It gets Rank B sometimes, it depends on how slow the NPC clear the instance. I'm working to fix it.

Note: "Disable click to move" is highly recommended for this script.
Last edited by smaion40 on Thu Dec 14, 2017 2:33 am, edited 16 times in total.

User avatar
smaion40
Posts: 83
Joined: Tue Apr 25, 2017 12:11 pm
Has thanked: 42 times
Been thanked: 16 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by smaion40 » Mon Oct 30, 2017 12:17 am

Update: I fixed all the bugs I found, right now its pretty stable but it mostly gets Rank B. I'll explain the reasons of this and how to fix it, maybe somebody could help me with the problems I encountered.

Basically the instance rank is decided after timer reaches minute 48, from all my runs I noticed NPCs finish clearing all the monsters and gate from 48:30:00 to 47:00:00, which leaves you with 5 minutes to make DPS to the 2 last bosses.

Since the teleport spawns at diferent times by the last reason given, I cant be sure when to start moving the character to first boss to make DPS, that's why I decided to use the worst scenario (it spawned at 47:00:00), so, during this process I'm loosing 1 minute and 30 seconds, which is the difference between Rank A and B because it always finishes the instance with 40:40:00 - 40:50:00, and it needs to be done in 41:00:00 or less.

So, what I need is a routine that after "Siege Factory Watcher" is targeted or killed it executes the next instructions, so I can move the character after that and start DPS as soon as possible. Of course, that's needed to make Rank A 100% stable with this script, but it can be changed in any way to follow the method I explained in this thread to get rank A.

User avatar
LordSnack
Posts: 96
Joined: Tue Jun 13, 2017 10:44 pm
Has thanked: 26 times
Been thanked: 10 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by LordSnack » Mon Oct 30, 2017 9:31 am

EU Version is buggy , and which Mob is this? Mechaturerk Machine? can you link it with this Page : http://aiondatabase.net/us/
then i can give you the English EU Name :3

my Char only stand at the start and wait wait wait ... not more :c
EU Thor - Gameforge | NA - Danaria

cooco
VIP
Posts: 218
Joined: Fri Feb 17, 2017 2:01 am
Has thanked: 58 times
Been thanked: 85 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by cooco » Mon Oct 30, 2017 1:10 pm

smaion40 wrote:
Mon Oct 30, 2017 12:17 am
Update: I fixed all the bugs I found, right now its pretty stable but it mostly gets Rank B. I'll explain the reasons of this and how to fix it, maybe somebody could help me with the problems I encountered.

Basically the instance rank is decided after timer reaches minute 48, from all my runs I noticed NPCs finish clearing all the monsters and gate from 48:30:00 to 47:00:00, which leaves you with 5 minutes to make DPS to the 2 last bosses.

Since the teleport spawns at diferent times by the last reason given, I cant be sure when to start moving the character to first boss to make DPS, that's why I decided to use the worst scenario (it spawned at 47:00:00), so, during this process I'm loosing 1 minute and 30 seconds, which is the difference between Rank A and B because it always finishes the instance with 40:40:00 - 40:50:00, and it needs to be done in 41:00:00 or less.

So, what I need is a routine that after "Siege Factory Watcher" is targeted or killed it executes the next instructions, so I can move the character after that and start DPS as soon as possible. Of course, that's needed to make Rank A 100% stable with this script, but it can be changed in any way to follow the method I explained in this thread to get rank A.
I don't sure if coulb be usefull but you can check entity with this

Code: Select all

for ID, Entity in DictionaryIterator(EntityList:GetList()) do
	if Entity :GetName() == "Siege Factory Watcher" then
		Entity:IsDead(); -- retrive if entiy is dead or not
		Player:GetTargetID() == Entity:GetID(); -- to know if you target the entity
	end
end

User avatar
smaion40
Posts: 83
Joined: Tue Apr 25, 2017 12:11 pm
Has thanked: 42 times
Been thanked: 16 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by smaion40 » Mon Oct 30, 2017 5:32 pm

LordSnack wrote:
Mon Oct 30, 2017 9:31 am
EU Version is buggy , and which Mob is this? Mechaturerk Machine? can you link it with this Page : http://aiondatabase.net/us/
then i can give you the English EU Name :3

my Char only stand at the start and wait wait wait ... not more :c
Maybe it stays still during the whole instance because the boss room teleport name is not correct.

The names that I need from EU are:

War Factory Rift (Teleport to enter boss room - Spawns after minute 48:00)
http://aiondatabase.net/us/npc/833989/
Siege Factory Watcher (Patrol after gate)
http://aiondatabase.net/us/npc/245759/
Mechaturerk Machine Monster (First boss)
http://aiondatabase.net/us/npc/243663/
Mechaturerk (Second boss)
http://aiondatabase.net/us/npc/243664/
Mechaturerk’s Footlocker (Weekly quest box)
http://aiondatabase.net/us/npc/245184/
Mechaturerk’s Core Fragment (Experience beads)
http://aiondatabase.net/us/npc/245990/
Corridor to atreia (Teleport to leave the instance)
http://aiondatabase.net/us/npc/833998/

In theory I could use the ID instead of the name to do the verification, but some of these monsters have diferent IDs with the same name, so I prefer to use the name.

It would be nice to verify the name with "/select Monster Name" inside the instance, to make sure the name is correct, if you can target the monster with that command then is alright.

There are cases with special characters such as:

Terror's Restraint -> it has ( ' )
Mechaturerk’s Footlocker -> ( ’ )

That small difference could make the script fail.

User avatar
smaion40
Posts: 83
Joined: Tue Apr 25, 2017 12:11 pm
Has thanked: 42 times
Been thanked: 16 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by smaion40 » Mon Oct 30, 2017 5:49 pm

cooco wrote:
Mon Oct 30, 2017 1:10 pm

I don't sure if coulb be usefull but you can check entity with this

Code: Select all

for ID, Entity in DictionaryIterator(EntityList:GetList()) do
	if Entity :GetName() == "Siege Factory Watcher" then
		Entity:IsDead(); -- retrive if entiy is dead or not
		Player:GetTargetID() == Entity:GetID(); -- to know if you target the entity
	end
end
Thank you cooco!, so, after that verification I can call Entity:IsDead() inside any function or loop?

In example:

Code: Select all

if Entity:IsDead() == true then		
	Player:SetMove(191.99, 258.84, 191.87); --Moves character to first boss range
end
Also, I'm a little confused with Player:GetTargetID() == Entity:GetID();
how could I use this to make a verification and call another line of code?

Anyway, I'll be testing that code and adding it to the script, ty :)

cooco
VIP
Posts: 218
Joined: Fri Feb 17, 2017 2:01 am
Has thanked: 58 times
Been thanked: 85 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by cooco » Mon Oct 30, 2017 10:35 pm

smaion40 wrote:
Mon Oct 30, 2017 5:32 pm
In theory I could use the ID instead of the name to do the verification, but some of these monsters have diferent IDs with the same name, so I prefer to use the name.
How do you get this ID?
smaion40 wrote:
Mon Oct 30, 2017 5:49 pm

Thank you cooco!, so, after that verification I can call Entity:IsDead() inside any function or loop?

In example:

Code: Select all

if Entity:IsDead() == true then		
	Player:SetMove(191.99, 258.84, 191.87); --Moves character to first boss range
end
I suggest you to create a function to check if a certain entity is alive.

This code work only if entity is dead and still in game, if entity disappear afted dead then this code is bad (i dont know how instance work)

Code: Select all

function CheckMobIsDead(mobName)
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == mobName and Entity:IsDead() then
			return true;
		end
	end
	return false;
end
smaion40 wrote:
Mon Oct 30, 2017 12:17 am


So, what I need is a routine that after "Siege Factory Watcher" is targeted or killed it executes the next instructions, so I can move the character after that and start DPS as soon as possible. Of course, that's needed to make Rank A 100% stable with this script, but it can be changed in any way to follow the method I explained in this thread to get rank A.

Code: Select all

if Player:GetTargetID() == SiegeFactoryWatcherEntity:GetID();
	-- true only if you are targeting Siege factory watcher
end

User avatar
smaion40
Posts: 83
Joined: Tue Apr 25, 2017 12:11 pm
Has thanked: 42 times
Been thanked: 16 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by smaion40 » Tue Oct 31, 2017 12:55 am

cooco wrote:
Mon Oct 30, 2017 10:35 pm
How do you get this ID?
I use another program called Vanilla tool to get IDs from items, skills and monsters, I believe there must be a way to get them using AS with the same routine you told me to make the target / death verification:

for ID, Entity in DictionaryIterator(EntityList:GetList()) do
end

and the Entity:GetID();.

You can place it in a variable and then use the command Write ("ID:"...VariableID) to show it on the interface (I'm sorry if I'm saying nonsenses, this is all I can think of :oops: )
cooco wrote:
Mon Oct 30, 2017 10:35 pm
I suggest you to create a function to check if a certain entity is alive.

This code work only if entity is dead and still in game, if entity disappear afted dead then this code is bad (i dont know how instance work)

Code: Select all

function CheckMobIsDead(mobName)
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		if Entity:GetName() == mobName and Entity:IsDead() then
			return true;
		end
	end
	return false;
end
The monster I need to target or verify if its dead will dissapear after 1 second because its not looteable, but I guess that as long as the condition is true it will help me to continue with the next lines of codes, so it should be alright.

Thank you for the recommendations cooco, I'll test them all in small scripts and I'll let you know how it goes :D

cooco
VIP
Posts: 218
Joined: Fri Feb 17, 2017 2:01 am
Has thanked: 58 times
Been thanked: 85 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by cooco » Tue Oct 31, 2017 1:19 am

smaion40 wrote:
Tue Oct 31, 2017 12:55 am

You can place it in a variable and then use the command Write ("ID:"...VariableID) to show it on the interface (I'm sorry if I'm saying nonsenses, this is all I can think of :oops: )
this show you ALL entity in 100meters range

Code: Select all

function OnFrame()
	for ID, Entity in DictionaryIterator(EntityList:GetList()) do
		Write("Entity name: "..Entity:GetName().." EntityID: "..Entity:GetID().." EntityTypeID() - http://aiondatabase.net/en/npc/"..Entity:GetTypeID());
	end
end

User avatar
LordSnack
Posts: 96
Joined: Tue Jun 13, 2017 10:44 pm
Has thanked: 26 times
Been thanked: 10 times

Re: Luna weekly Rank A - [BETA Version] Updated: 29/10/2017

Post by LordSnack » Sun Nov 19, 2017 1:30 pm

smaion40 wrote:
Mon Oct 30, 2017 5:32 pm
LordSnack wrote:
Mon Oct 30, 2017 9:31 am
EU Version is buggy , and which Mob is this? Mechaturerk Machine? can you link it with this Page : http://aiondatabase.net/us/
then i can give you the English EU Name :3

my Char only stand at the start and wait wait wait ... not more :c
Maybe it stays still during the whole instance because the boss room teleport name is not correct.

The names that I need from EU are:

War Factory Rift (Teleport to enter boss room - Spawns after minute 48:00)
http://aiondatabase.net/us/npc/833989/
Siege Factory Watcher (Patrol after gate)
http://aiondatabase.net/us/npc/245759/
Mechaturerk Machine Monster (First boss)
http://aiondatabase.net/us/npc/243663/
Mechaturerk (Second boss)
http://aiondatabase.net/us/npc/243664/
Mechaturerk’s Footlocker (Weekly quest box)
http://aiondatabase.net/us/npc/245184/
Mechaturerk’s Core Fragment (Experience beads)
http://aiondatabase.net/us/npc/245990/
Corridor to atreia (Teleport to leave the instance)
http://aiondatabase.net/us/npc/833998/

In theory I could use the ID instead of the name to do the verification, but some of these monsters have diferent IDs with the same name, so I prefer to use the name.

It would be nice to verify the name with "/select Monster Name" inside the instance, to make sure the name is correct, if you can target the monster with that command then is alright.

There are cases with special characters such as:

Terror's Restraint -> it has ( ' )
Mechaturerk’s Footlocker -> ( ’ )

That small difference could make the script fail.
And the Script is buggy :/ EU Version Char stay at the Dim. Gate and use skills but not more :c no port , nothing... :c

Here the Names:
>> http://aiondatabase.net/en/npc/833989/?sl=1 < Dimension Gate to the Weapons Factory
>> http://aiondatabase.net/en/npc/245759/?sl=1 < Factory Guardian
>> http://aiondatabase.net/en/npc/243663/?sl=1 < Mechanerk's Creature
>> http://aiondatabase.net/en/npc/243664/?sl=1 < Mechanerk
>> http://aiondatabase.net/en/npc/245184/?sl=1 < Mechanerk's Chest
>> http://aiondatabase.net/en/npc/245990/?sl=1 < Mechanerk's Core
>> http://aiondatabase.net/en/npc/833998/?sl=1 < Atreia Corridor
EU Thor - Gameforge | NA - Danaria

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest