how do check on/off skill in script ?

agonic
VIP
Posts: 159
Joined: Tue Jan 10, 2017 6:39 pm
Has thanked: 34 times
Been thanked: 112 times

Re: how do check on/off skill in script ?

Post by agonic » Thu Mar 16, 2017 12:24 am

I added into my script. Then tested it. But, the result is so sad that, this addition freezes the AS.
Update: It is working for Frenzy for assassins, but powershards.

sapibuntinx
VIP
Posts: 25
Joined: Fri Jan 20, 2017 1:58 pm
Has thanked: 8 times
Been thanked: 14 times

Re: how do check on/off skill in script ?

Post by sapibuntinx » Thu Mar 16, 2017 5:08 am

I used this to enable pet auto-loot, basically, if the value was 0, then I will tell AS to execute skill Auto-Loot.
I think if you want to turn it off, then tell AS to execute the related skill (for me, execute Auto-Loot skill) if the value is non 0.

agonic
VIP
Posts: 159
Joined: Tue Jan 10, 2017 6:39 pm
Has thanked: 34 times
Been thanked: 112 times

Re: how do check on/off skill in script ?

Post by agonic » Fri Mar 17, 2017 5:13 am

Powershard On

Code: Select all

local ShardAddress = DialogList:GetDialog( "basic_status_dialog/boost_marker" ):GetAddress();
local Shard = Memory:GetUnsignedInteger(ShardAddress +424) > 1060000000;
if Entity ~= nil and Entity:IsPlayer() and not Shard then
	if Helper:CheckAvailable( "Toggle Power Shard" ) then
		Helper:CheckExecute( "Toggle Power Shard" );
		return false;
	end	
end

sapibuntinx
VIP
Posts: 25
Joined: Fri Jan 20, 2017 1:58 pm
Has thanked: 8 times
Been thanked: 14 times

Re: how do check on/off skill in script ?

Post by sapibuntinx » Fri Mar 17, 2017 5:37 am

agonic wrote:
Fri Mar 17, 2017 5:13 am
Powershard On

Code: Select all

local ShardAddress = DialogList:GetDialog( "basic_status_dialog/boost_marker" ):GetAddress();
local Shard = Memory:GetUnsignedInteger(ShardAddress +424) > 1060000000;
if Entity ~= nil and Entity:IsPlayer() and not Shard then
	if Helper:CheckAvailable( "Toggle Power Shard" ) then
		Helper:CheckExecute( "Toggle Power Shard" );
		return false;
	end	
end
very nice, this is will be very useful to those creating pvp script. thanks for this.

agonic
VIP
Posts: 159
Joined: Tue Jan 10, 2017 6:39 pm
Has thanked: 34 times
Been thanked: 112 times

Re: how do check on/off skill in script ?

Post by agonic » Sat Mar 18, 2017 12:39 am

-- Using of the Loot pet;
--Put pet and AutoLoot skill on the skillbar. Btw, You can put them wherever you want. It is just an example.
Now example;

Code: Select all

local CTRL8 = DialogList:GetDialog( "quickbar_dialog_ctrl/0/shortcut8" ):GetAddress();--means Quickbar 2 1 8 = Ctrl+8
local IsAbilityActive = Memory:GetUnsignedInteger(CTRL8 + 992) > 0 ;
local CTRL9 = DialogList:GetDialog( "quickbar_dialog_ctrl/0/shortcut9" ):GetAddress();--means Quickbar 2 1 9=Ctrl+9
local IsLootingActive = Memory:GetUnsignedInteger(CTRL9 + 992) > 0 ;
if not IsAbilityActive then
	DialogList:GetDialog( "quickbar_dialog_ctrl/0/shortcut8" ):Click();
elseif IsAbilityActive and not IsLootingActive then
	DialogList:GetDialog( "quickbar_dialog_ctrl/0/shortcut9" ):Click();
end
Also you can improvise, like;

Code: Select all

if Entity:IsMonster() then --means PVE
this codes
end

if Entity:IsPlayer() then --means PVP
same way via buff pet
end

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest