Page 1 of 2

Trying to create a specific behavior. Can someone help?

Posted: Wed Jul 26, 2017 3:47 am
by creatine
So Im trying to create this specific behavior in my grinder framework, something that makes my toon say something. For example, that macro you make when an entity is casting a skill, and you shout out the name of the person being targeted, like in Infinity Shard when fighting Hyperion.

I tried looking up old grinders to find something that has an enemy entity casting this specific skill so I can set what behavior my toon does afterwards, but theres no such things. but ive seen it being done by someone, so I know theres a way to do this.

Basically I wanna make a line in my grinder that will make my character shout something i write in "here" when my target is casting a specific skill to warn people in my party that hes doing that skill.

Can someone help, or this feature is a bit too advanced?

Re: Trying to create a specific behavior. Can someone help?

Posted: Wed Jul 26, 2017 6:31 pm
by agonic
basically. this is target' target. can add skill warning

Code: Select all

timer = 0
wait = 1000

function OnRun()

	local Entity = EntityList:GetEntity( Player:GetTargetID());
	if Entity ~= nil then
		local entity = EntityList:GetEntity( Entity:GetTargetID());
		
		if Time() > timer then
			if entity ~= nil then
				Write(entity:GetName())
				PlayerInput:Console(entity:GetName().." was Targeted !!" .. " by "..Entity:GetName())
			end
		timer = Time() + wait
		end
	end	
end

Re: Trying to create a specific behavior. Can someone help?

Posted: Thu Jul 27, 2017 5:24 am
by creatine
agonic wrote:
Wed Jul 26, 2017 6:31 pm
basically. this is target' target. can add skill warning

Code: Select all

timer = 0
wait = 1000

function OnRun()

	local Entity = EntityList:GetEntity( Player:GetTargetID());
	if Entity ~= nil then
		local entity = EntityList:GetEntity( Entity:GetTargetID());
		
		if Time() > timer then
			if entity ~= nil then
				Write(entity:GetName())
				PlayerInput:Console(entity:GetName().." was Targeted !!" .. " by "..Entity:GetName())
			end
		timer = Time() + wait
		end
	end	
end
I dont understand this code. I put it exactly as is in my grinder lua, but it doesnt do anything. Should I edit anything first before I can use it properly? I dont see my toon trying to say anything at all.

Re: Trying to create a specific behavior. Can someone help?

Posted: Thu Jul 27, 2017 5:39 am
by creatine
what if I wanna do something like this?

"if entity is casting [insert skill here], say in console "target of skill and say something here"

can we make a code for something like this?

Re: Trying to create a specific behavior. Can someone help?

Posted: Thu Jul 27, 2017 12:01 pm
by nucular
I know what you wanna do actually i hate cheating in pvp but still i tell you where you find the needed code.

This code could also allow to automate perfect rippling of aoe cc skills like Fear Shrek or Sleep Storm.
It could also allow to counter instant vision sleep from Sorcerer as a Bard for example.
You have to iterate over all enemy players and then use:

Code: Select all

if Entity:GetSkillID() ~= 0 then
	local Skill = SkillList:GetSkill( Entity:GetSkillID());
	if Skill ~= nil and string.find( Skill:GetName(), "Sleep Storm" ) ~= nil then
		....
	end
end

Re: Trying to create a specific behavior. Can someone help?

Posted: Thu Jul 27, 2017 12:26 pm
by creatine
nucular wrote:
Thu Jul 27, 2017 12:01 pm
I know what you wanna do actually i hate cheating in pvp but still i tell you where you find the needed code.

This code could also allow to automate perfect rippling of aoe cc skills like Fear Shrek or Sleep Storm.
It could also allow to counter instant vision sleep from Sorcerer as a Bard for example.
You have to iterate over all enemy players and then use:

Code: Select all

if Entity:GetSkillID() ~= 0 then
	local Skill = SkillList:GetSkill( Entity:GetSkillID());
	if Skill ~= nil and string.find( Skill:GetName(), "Sleep Storm" ) ~= nil then
		....
	end
end
no i dont pvp in aion. thats too risky lol. i only do pve cuz i use aion as side income. believe it or not, playing aion and just focusing for pve, it pays for all my utility bills every month and some snacks at the side. true story.

not kidding about the pvp part either. i relly dont pvp. too much risk of getting caught :p

so no worries there. even I hold onto some ethics in game as well :)

Re: Trying to create a specific behavior. Can someone help?

Posted: Thu Jul 27, 2017 12:29 pm
by creatine
nucular wrote:
Thu Jul 27, 2017 12:01 pm
I know what you wanna do actually i hate cheating in pvp but still i tell you where you find the needed code.

This code could also allow to automate perfect rippling of aoe cc skills like Fear Shrek or Sleep Storm.
It could also allow to counter instant vision sleep from Sorcerer as a Bard for example.
You have to iterate over all enemy players and then use:

Code: Select all

if Entity:GetSkillID() ~= 0 then
	local Skill = SkillList:GetSkill( Entity:GetSkillID());
	if Skill ~= nil and string.find( Skill:GetName(), "Sleep Storm" ) ~= nil then
		....
	end
end
so which part do I edit to shout in console, "PLAYER is being targeted by Hyperion, get away" ?

I assume, the sleep storm part, I can change it into any skill name that the mob will cast, for example reflect, then say "stop dps, mob will reflect" or something?

Re: Trying to create a specific behavior. Can someone help?

Posted: Thu Jul 27, 2017 2:09 pm
by nucular
creatine wrote:
Thu Jul 27, 2017 12:29 pm
nucular wrote:
Thu Jul 27, 2017 12:01 pm
I know what you wanna do actually i hate cheating in pvp but still i tell you where you find the needed code.

This code could also allow to automate perfect rippling of aoe cc skills like Fear Shrek or Sleep Storm.
It could also allow to counter instant vision sleep from Sorcerer as a Bard for example.
You have to iterate over all enemy players and then use:

Code: Select all

if Entity:GetSkillID() ~= 0 then
	local Skill = SkillList:GetSkill( Entity:GetSkillID());
	if Skill ~= nil and string.find( Skill:GetName(), "Sleep Storm" ) ~= nil then
		....
	end
end
so which part do I edit to shout in console, "PLAYER is being targeted by Hyperion, get away" ?

I assume, the sleep storm part, I can change it into any skill name that the mob will cast, for example reflect, then say "stop dps, mob will reflect" or something?
Yes, but it will permanently spam the console with your message.
You have to add an timer that it will tell you it only every 3 seconds or something like that.

You can replace for example the ... with your wanted Write() or PlayerInput:Console() Function.

Code: Select all

Write("Sleep Storm casted on target id " .. Entity:GetTargetId() )
To get the Entity Target by Id:

Code: Select all

local TargetEntity = EntityList:GetEntity( Entity:GetTargetId() );
if TargetEntity ~= nil then
	Write("Sleep Storm is casted on " .. TargetEntity:GetName() .. " by " .. Entity:GetName() );
end

Re: Trying to create a specific behavior. Can someone help?

Posted: Thu Jul 27, 2017 2:09 pm
by nucular
creatine wrote:
Thu Jul 27, 2017 12:29 pm
nucular wrote:
Thu Jul 27, 2017 12:01 pm
I know what you wanna do actually i hate cheating in pvp but still i tell you where you find the needed code.

This code could also allow to automate perfect rippling of aoe cc skills like Fear Shrek or Sleep Storm.
It could also allow to counter instant vision sleep from Sorcerer as a Bard for example.
You have to iterate over all enemy players and then use:

Code: Select all

if Entity:GetSkillID() ~= 0 then
	local Skill = SkillList:GetSkill( Entity:GetSkillID());
	if Skill ~= nil and string.find( Skill:GetName(), "Sleep Storm" ) ~= nil then
		....
	end
end
so which part do I edit to shout in console, "PLAYER is being targeted by Hyperion, get away" ?

I assume, the sleep storm part, I can change it into any skill name that the mob will cast, for example reflect, then say "stop dps, mob will reflect" or something?
Yes, but it will permanently spam the console with your message.
You have to add an timer that it will tell you it only every 3 seconds or something like that.

You can replace for example the ... with your wanted Write() or PlayerInput:Console() Function.

Code: Select all

Write("Sleep Storm casted on target id " .. Entity:GetTargetId() )
To get the Entity Target by Id:

Code: Select all

local TargetEntity = EntityList:GetEntity( Entity:GetTargetId() );
if TargetEntity ~= nil then
	Write("Sleep Storm is casted on " .. TargetEntity:GetName() .. " by " .. Entity:GetName() );
end

Re: Trying to create a specific behavior. Can someone help?

Posted: Fri Jul 28, 2017 1:34 am
by creatine
nucular wrote:
Thu Jul 27, 2017 2:09 pm
creatine wrote:
Thu Jul 27, 2017 12:29 pm
nucular wrote:
Thu Jul 27, 2017 12:01 pm
I know what you wanna do actually i hate cheating in pvp but still i tell you where you find the needed code.

This code could also allow to automate perfect rippling of aoe cc skills like Fear Shrek or Sleep Storm.
It could also allow to counter instant vision sleep from Sorcerer as a Bard for example.
You have to iterate over all enemy players and then use:

Code: Select all

if Entity:GetSkillID() ~= 0 then
	local Skill = SkillList:GetSkill( Entity:GetSkillID());
	if Skill ~= nil and string.find( Skill:GetName(), "Sleep Storm" ) ~= nil then
		....
	end
end
so which part do I edit to shout in console, "PLAYER is being targeted by Hyperion, get away" ?

I assume, the sleep storm part, I can change it into any skill name that the mob will cast, for example reflect, then say "stop dps, mob will reflect" or something?
Yes, but it will permanently spam the console with your message.
You have to add an timer that it will tell you it only every 3 seconds or something like that.

You can replace for example the ... with your wanted Write() or PlayerInput:Console() Function.

Code: Select all

Write("Sleep Storm casted on target id " .. Entity:GetTargetId() )
To get the Entity Target by Id:

Code: Select all

local TargetEntity = EntityList:GetEntity( Entity:GetTargetId() );
if TargetEntity ~= nil then
	Write("Sleep Storm is casted on " .. TargetEntity:GetName() .. " by " .. Entity:GetName() );
end
ok thanks. so after mixing ur code with a line of what agonic gave me up there, I manage to make my toon say something when enemy casting a specific skill on me, only problem is, instead of saying the targets name, it says:

"[SKILLNAME] casted on target id 3692...."

it literally put number in place of player name lol. how do I change the number, so my toon says player name instead?