Functional templar LUA

Post Reply
crazymonkey84
Posts: 37
Joined: Sun Jan 29, 2017 4:33 am
Has thanked: 6 times
Been thanked: 3 times

Functional templar LUA

Post by crazymonkey84 » Sun Jan 29, 2017 8:18 am

Hi there i just want to share my templar.lua

I finally made it work, it works well, not perfect but well xD
Templar.rar
i hope u find it useful (TEMPLAR LUA)
(3.63 KiB) Downloaded 68 times
hope u find it useful!!

Regards

ugel
Posts: 14
Joined: Thu Jan 19, 2017 9:42 am
Has thanked: 22 times
Been thanked: 4 times

Re: Functional templar LUA

Post by ugel » Sun Jan 29, 2017 12:28 pm

thx :)


Regrads
++TAG the scripts for NA or EU ,would be nice++
Very OLD V.I.P from aionscript.com orjange bowe :D

andres
Posts: 5
Joined: Thu Feb 02, 2017 6:45 am
Has thanked: 2 times

Re: Functional templar LUA

Post by andres » Thu Feb 02, 2017 8:52 am

Hello, just download the new AS, but I'm seeing that it does not sit down when the mana or p are low, also uses the potions very rarely, please help me to feel at least a while to recover the mana and hp.
Here I attached my Templar.lua, comment some lines because it was consuming the mana very fast and is not using well the potions, with the previous AS Kopie update np stopped killing and never died, but frozen many times, I threw send log many times.

Code: Select all

function Attack( Entity, Range, Stunned )

if self.AttackStarted ~= Entity:GetID() then
self.AttackStarted = Entity:GetID();
Helper:CheckExecute( "Attack/Chat " );

end 
Helper:CheckExecute( "Attack/Chat" );
if Helper:CheckAvailable( "Reroute Power" ) and Range <= 6 then
Helper:CheckExecute( "Reroute Power" );

end
if Helper:CheckAvailable( "Empyrean Fury" ) and Range <= 6 then
Helper:CheckExecute( "Empyrean Fury" );

end
if Helper:CheckAvailable( "Divine Fury" ) and Range <= 6 then
Helper:CheckExecute( "Divine Fury" );

end
if Helper:CheckAvailable( "Break Power" ) then
Helper:CheckExecute( "Break Power" );

end
if Helper:CheckAvailable( "Pitiless Blow" ) then
Helper:CheckExecute( "Pitiless Blow" );

end
if Helper:CheckAvailable( "Courageous Shield" ) then
Helper:CheckExecute( "Courageous Shield" );

end
if Helper:CheckAvailable( "Face Smash" ) then
Helper:CheckExecute( "Face Smash" );

end
if Helper:CheckAvailable( "Shield Counter" ) then
Helper:CheckExecute( "Shield Counter" );

end
if Helper:CheckAvailable( "Face Smash" ) then
Helper:CheckExecute( "Face Smash" );

end
if Helper:CheckAvailable( "Avenging Blow" ) then
Helper:CheckExecute( "Avenging Blow" );

end
if Helper:CheckAvailable( "Face Smash" ) then
Helper:CheckExecute( "Face Smash" );

end
if Helper:CheckAvailable( "Remove Shock" ) then
Helper:CheckExecute( "Remove Shock" );

end
if Helper:CheckAvailable( "Refresh Spirit" ) then
Helper:CheckExecute( "Refresh Spirit" );

end


-- ATAQUES CHAIN
--PRIMER ATAQUE
if Helper:CheckAvailable( "Dazing Severe Blow" ) then
self.FerociousTrigger = true;
Helper:CheckExecute( "Dazing Severe Blow" );

end
if Helper:CheckAvailable( "Divine Blow" ) then
Helper:CheckExecute( "Divine Blow" );

end
if Helper:CheckAvailable( "Judgement" ) then
Helper:CheckExecute( "Judgement" );

end



--SEGUNDO ATAQUE
if Helper:CheckAvailable( "Ferocious Strike" ) then
Helper:CheckExecute( "Ferocious Strike" );

end
if Helper:CheckAvailable( "Rage" ) then
Helper:CheckExecute( "Rage" );

elseif Helper:CheckAvailable( "Robust Blow" ) then
Helper:CheckExecute( "Robust Blow" );

end
if Helper:CheckAvailable( "Slash Artery" ) then
Helper:CheckExecute( "Slash Artery" );

end

if Helper:CheckAvailable( "Wrath Strike" ) then
Helper:CheckExecute( "Wrath Strike" );

end

--TERCER ATAQUE
if Helper:CheckAvailable( "Body Smash" ) then
Helper:CheckExecute( "Body Smash" );

end
if Helper:CheckAvailable( "Blood Pact" ) then
Helper:CheckExecute( "Blood Pact" );
end

--cuarto
if Helper:CheckAvailable( "Shield Bash" ) then
Helper:CheckExecute( "Shield Bash" );

end
if Helper:CheckAvailable( "Shield Shock" ) then
Helper:CheckExecute( "Shield Shock" );

end
if Helper:CheckAvailable( "Inquisitor's Blow" ) then
Helper:CheckExecute( "Inquisitor's Blow" );

end
if Helper:CheckAvailable( "Punishing Thrust" ) then
Helper:CheckExecute( "Punishing Thrust" );

end
if Helper:CheckAvailable( "Swinging Shield Counter" ) then
Helper:CheckExecute( "Swinging Shield Counter" );

end

if Helper:CheckAvailable( "Holy Punishment" ) then
Helper:CheckExecute( "Holy Punishment" );

end
if Helper:CheckAvailable( "Provoking Roar" ) then
Helper:CheckExecute( "Provoking Roar" );

end
if Helper:CheckAvailable( "Illusion Chain" ) then
Helper:CheckExecute( "Illusion Chain" );

end
if Helper:CheckAvailable( "Aether Leash" ) then
Helper:CheckExecute( "Aether Leash" );

end
if Helper:CheckAvailable( "Empyrean Chastisement" ) then
Helper:CheckExecute( "Empyrean Chastisement" );

end
if Helper:CheckAvailable( "Sword Storm" ) and Range <= 6 then
Helper:CheckExecute( "Sword Storm" );

end




end
function Heal( BeforeForce)

if Helper:CheckAvailable( "Empyrean Armor" ) and Player:GetHealth() <= 75 then
Helper:CheckExecute( "Empyrean Armor" );
return false;
end
if Helper:CheckAvailable( "Iron Skin" ) and Player:GetHealth() <= 50 then
Helper:CheckExecute( "Iron Skin" );

end


-- Health Recover: Prayer of Resilience
if Player:GetHealth() <= 70 and Helper:CheckAvailable( "Prayer of Resilience" ) then
Helper:CheckExecute( "Prayer of Resilience" );

end
if Helper:CheckAvailable( "Hand of Healing" ) and Player:GetHealth() <= 20 then
Helper:CheckExecute( "Hand of Healing" );
return false;
end



-- Nothing was executed, continue with other functions.
return true;

end



function Pause()


-- Nothing was executed, continue with other functions.
return true;

end

User avatar
Werasalma
Posts: 5
Joined: Mon Jan 16, 2017 9:12 pm
Has thanked: 2 times
Been thanked: 1 time

Re: Functional templar LUA

Post by Werasalma » Thu Feb 02, 2017 5:34 pm

Hello,
at first u you should check and modify following Settings in settings.lua [Scripting->Grinderframework->settings.lua].

Code: Select all

 		-- Indicates whether or not to allow resting (Requires AllowAttack).
		self.AllowRest = true;
		-- Indicates whether or not potions are allowed (does not use Serums, only Elixir and Potions).
		self.Potion = true;
		-- Contains the remaining amount of health required before potions are used (0 = disabled).
		self.PotionHealth = 70;
		-- Contains the remaining amount of mana required before potions are used (0 = disabled).
		self.PotionMana = 60;
		-- Contains the remaining amount of health and mana required before potions are used (0 = disabled).
		self.PotionRecovery = 70;
		-- Contains the remaining amount of health required before resting (Requires AllowRest).
		self.RestHealth = 40;
		-- Contains the remaining amount of mana required before resting (Requires AllowRest).
		self.RestMana = 30;
		

andres
Posts: 5
Joined: Thu Feb 02, 2017 6:45 am
Has thanked: 2 times

Re: Functional templar LUA

Post by andres » Thu Feb 02, 2017 11:19 pm

Werasalma wrote:
Thu Feb 02, 2017 5:34 pm
Hello,
at first u you should check and modify following Settings in settings.lua [Scripting->Grinderframework->settings.lua].

Code: Select all

 		-- Indicates whether or not to allow resting (Requires AllowAttack).
		self.AllowRest = true;
		-- Indicates whether or not potions are allowed (does not use Serums, only Elixir and Potions).
		self.Potion = true;
		-- Contains the remaining amount of health required before potions are used (0 = disabled).
		self.PotionHealth = 70;
		-- Contains the remaining amount of mana required before potions are used (0 = disabled).
		self.PotionMana = 60;
		-- Contains the remaining amount of health and mana required before potions are used (0 = disabled).
		self.PotionRecovery = 70;
		-- Contains the remaining amount of health required before resting (Requires AllowRest).
		self.RestHealth = 40;
		-- Contains the remaining amount of mana required before resting (Requires AllowRest).
		self.RestMana = 30;
		

Now it sit, but dont use potion =(

User avatar
Werasalma
Posts: 5
Joined: Mon Jan 16, 2017 9:12 pm
Has thanked: 2 times
Been thanked: 1 time

Re: Functional templar LUA

Post by Werasalma » Fri Feb 03, 2017 3:13 pm

Ok.... the easiest way is to check and edit ur helperfunction [Scripting->Grinderframework->HelperFunction.lua].
-------------------------------------------------------------
search for: function CheckPotionMana()

For example: If u want to use "Fortified Recovery Potions" (Gameforge English).

1. Change "Mana Elixir" to "Recovery Potion" in folowing line:

Code: Select all

if string.find( Inventory:GetName(), "Design" ) == nil and ( string.find( Inventory:GetName(), "Mana Elixir" ) ~= nil or string.find( Inventory:GetName(), "Mana Potion" ) ~= nil ) then 
2. Check and edit the Prefix: Change "Fine" to "Fortified" and the Numbers 1830->1960

Code: Select all

		......
if string.find( Inventory:GetName(), "Fine" ) ~= nil then
	if TotalRecharge >= 1830 and BestRecharge < 1830 then
		BestInventory = Inventory;
		BestRecharge = 1830; -- 1530;
		......
		......
		......
						
---------------------------------------------------------
Do the same for: function CheckPotionHeal()

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest