Missing starterclasses

Post Reply
unkn0wnus3r
Posts: 75
Joined: Wed Jan 18, 2017 12:27 pm
Has thanked: 10 times
Been thanked: 13 times

Missing starterclasses

Post by unkn0wnus3r » Wed Jul 12, 2017 9:55 pm

Hey,
I wrote some routines for Technist and Muse as they where missing in the version i downloaded.
Its nothing spezial but it does its job :)
Technist has a Potion function (wasnt that at some point integrated in the grinder framework?)

Technist:

Code: Select all

--[[

Script by unkn0wnus3r

]]--
--Self Potion function
function CheckPotion()
	        -- Retrieve the  potion item.
        local PotionLife = InventoryList:GetInventory( "Apprentice's Recovery Potion" );

		 -- Check if Currenthealth < 0.5 and uses a Life Potion.
        if Player:GetHealthCurrent() < Player:GetHealthMaximum() / 2 and PotionLife ~= nil and PotionLife:GetCooldown() == 0 then
           PlayerInput:Inventory( PotionLife:GetName());
           return false;
		end
end
-- Attack function
function Attack( Entity, Range, Stunned )
--Protect
	--Check Potion
	Self.CheckPostion();
	
	--use Shild if under 50%
	if Player:GetHealthCurrent() < Player:GetHealthMaximum() / 2 and Helper:CheckAvailable( "Materialised Wall Form" ) then
		Helper:CheckExecute( "Materialised Wall Form" );
		return false;
	end
--Chain
	if Helper:CheckAvailable( "Repeated Volley" ) then
		Helper:CheckExecute( "Repeated Volley" );
		return false;
	end
--Attacks
	--1. Spell
	if Helper:CheckAvailable( "Disrupter Shot" ) then
		Helper:CheckExecute( "Disrupter Shot" );
		return false;
	end
	--2. Start Chain
	if Helper:CheckAvailable( "Pistol Shot" ) then
		Helper:CheckExecute( "Pistol Shot" );
		return false;
	end
	--3. Spell
	if Helper:CheckAvailable( "Sighting Shot" ) then
		Helper:CheckExecute( "Sighting Shot" );
		return false;
	end
	-- Initial Attack : Automatic Attack
	if self.AttackStarted ~= Entity:GetID() then
		self.AttackStarted = Entity:GetID();
		Helper:CheckExecute( "Attack/Chat" );
		return false;
	end


end
Muse:

Code: Select all

--[[

Script by unkn0wnus3r

]]--


-- Attack function
function Attack( Entity, Range, Stunned )
	-- 1. Spell
	if Helper:CheckAvailable( "Sound of the Breeze" ) then
		Helper:CheckExecute( "Sound of the Breeze" );
		return false;
	-- 2. Spell
	elseif Helper:CheckAvailable( "Chilling Harmony" ) then
		Helper:CheckExecute( "Chilling Harmony" );
		return false;
	end
	-- 3. Spell
	if Helper:CheckAvailable( "Battle Variation" ) then
		Helper:CheckExecute( "Battle Variation" );
		return false;
	end
	-- Initial Attack : Automatic Attack
	if self.AttackStarted ~= Entity:GetID() then
		self.AttackStarted = Entity:GetID();
		Helper:CheckExecute( "Attack/Chat" );
		return false;
	end


end


-- Heal function
function Heal( BeforeForce )

	if BeforeForce then
	
		if Helper:CheckAvailable( "Gentle Echo" ) and Player:GetHealthCurrent() < Player:GetHealthMaximum() / 2  then
			Helper:CheckExecute( "Gentle Echo", Player );
			return false;
		end
		
	end
	
	-- Nothing was executed, continue with other functions.
	return true;
	
end
If you have improvements feel free to comment, i´ll have a lock at it and if i think it makes the bot run better i´ll implement it :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest