Alexcennah Default replied

573 weeks ago

Bastok main storyline, from 6-1 onward.

SeekerStar Admin replied

573 weeks ago

….I am still at about that point in my Basty quests, because for some reason I hate, hate, HATE doing stuff like that solo.
"Here's a random tip for you. Criticizing the whm is stupid and suicidal. Side effect may include lack of heals in your direction, dancing on your corpse, stubborn refusal to give you raises, laughing and pointing, sudden dirt nap taking due to lack of buffs… "

Eddea replied

572 weeks ago

random thought: PLEASE, USE GEAR COLLECTOR!!!!!!!!

SeekerStar Admin replied

572 weeks ago

Doing some reading and thinking of writing some stuff…

…is GS really this customizable? From what I read, I can actually have it set to switch based upon an arbitrarily large number of variables, providing I write them in.

For instance, if I am RUN/NIN and something interrupts my Utsusemi, I can automatically swap out of fast cast and back into PDT without doing a damn thing.

My reaction: O.O

The problem is, I'm gonna have to do a few hours of reading to figure out how to do this.
"Here's a random tip for you. Criticizing the whm is stupid and suicidal. Side effect may include lack of heals in your direction, dancing on your corpse, stubborn refusal to give you raises, laughing and pointing, sudden dirt nap taking due to lack of buffs… "

Alexcennah Default replied

572 weeks ago

That's the reason we use it.

GearSwap has a set number of events (things that we know that will happen, and we want to do something when they happen). On your Utsusemi example, we use 3 of these events: precast (which happens just before the spell is cast - we use our Fast Cast gear here), midcast (which happens just after the command is sent to the server, but before it is effectively finished - we use our potency enhancing and recast minus gear here) and aftercast (which happens when the action is finished or interrupted - we get back to our "normal" gear here).

It's not different from SpellCast, but it's much more flexible and somewhat harder to understand, since it's Lua programming.


last edited 572 weeks ago by Alexcennah

Alexcennah Default replied

572 weeks ago

Here comes a very basic GS .lua script for a THF (open Notepad, copy-paste this script on it and save as THF.lua on /Windower4/addons/GearSwap/data folder).

function get_sets()

	--Idle Set
	
	sets.Idle = {ammo="Raider's Bmrng.",
		head="Oce. Headpiece +1",neck="Wiglen Gorget",lear="Colossus's earring",rear="Ethereal earring",
		body="Iuitl Vest",hands="Plun. Armlets +1",lring="Dark ring",rring="Defending Ring",
		back="Repulse Mantle",waist="Windbuffet Belt",legs="Iuitl Tights +1",feet='Fajin boots'}

	--TP Sets

	sets.TP = {}
	sets.TP.index = {'Standard','TH','Evasion'}
	---- 1=Standard, 2=TH, 3=Evasion ----
	TP_ind = 1


	sets.TP.Standard = {ammo="Raider's Bmrng.",
		head="Iuitl Headgear +1",neck="Asperity necklace",lear="Dudgeon earring",rear="Heartseeker earring",
		body="Thaumas coat",hands="Plun. Armlets +1",lring="Epona's ring",rring="Rajas Ring",
		back="Atheling Mantle",waist="Windbuffet Belt",legs="Iuitl Tights +1",feet="Manibozho boots"}

	sets.TP.TH = set_combine(sets.TP.Standard,{feet="Raid. Poulaines +2"})
				  
	sets.TP.Evasion = set_combine(sets.TP.Standard,{body = 'Espial gambison',legs = 'Kaabnax Trousers',feet = 'Espial Socks'})
	

	--Weaponskill Sets--

	sets.WS = {}

	sets.WS.Standard = {}

	sets.WS.Exenterator = {ammo="Raider's Bmrng.",
		head="Whirlpool mask",neck="Asperity necklace",lear="Dudgeon earring",rear="Heartseeker earring",
		body="Espial Gambison",hands="Buremte gloves",lring="Epona's ring",rring="Rajas Ring",
		back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Espial Socks"}
	
	sets.WS.Evisceration = sets.WS.Exenterator
								  
								 
	--Job Ability Sets--
	
	sets.JA = {}
	
	sets.JA['Sneak Attack'] = {}

	sets.JA['Trick Attack'] = {}

	sets.JA['Perfect Dodge'] = {hands="Plun. Armlets +1"}


	--Utility Sets--

	sets.Utility = {}

	sets.Utility.GearCollector = {"Izhiikoh","Sandung","Sole sushi","Sole sushi +1",
		"Red Curry Bun","R. Curry Bun +1","Remedy","Instant Warp",
		"Instant Reraise","Reraise earring","Reraise Gorget","Warp Ring",
		"Thief's Knife","Atoyac"}

end


function precast(spell)
	if spell.type == 'WeaponSkill' then	
		if sets.WS[spell.name] then
			equip(sets.WS[spell.name])
		else
			equip(sets.WS.Standard)
		end
	elseif sets.JA[spell.name] then
		equip(sets.JA[spell.name])
	end
end

	
function midcast(spell,act)

end


function aftercast(spell)
	if player.status == 'Engaged' then
		equip(sets.TP[sets.TP.index[TP_ind]])
	else
		equip(sets.Idle)
	end
end


function status_change(new,old)
	if new == 'Engaged' then
		equip_TP_set()
	else
		equip_Idle_set()
	end
end


function filtered_action(spell)

end


function self_command(command)
	if command == 'mode' then
		TP_ind = TP_ind +1
		if TP_ind > #sets.TP.index then
			TP_ind = 1
		end
		send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
		equip_TP_set()
	end
	if command == 'tp' then
		TP_ind = 1
		send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
		equip_TP_set()
	end
	if command == 'th' then
		TP_ind = 2
		send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
		equip_TP_set()
	end
	if command == 'eva' then
		TP_ind = 3
		send_command('@input /echo <----- TP Set changed to '..sets.TP.index[TP_ind]..' ----->')
		equip_TP_set()
	end
	if command == 'idle' then
		equip_Idle_set()
	end
end

-- User defined functions

function equip_TP_set()
        equip(sets.TP[sets.TP.index[TP_ind]])
end


function equip_Idle_set()
	equip(sets.Idle)
end


I have lunch with my kid atm, but I'll talk about this script later.


last edited 572 weeks ago by Alexcennah

SeekerStar Admin replied

572 weeks ago

Thank you, because I really feel stupid for not understanding how to write something like this.
"Here's a random tip for you. Criticizing the whm is stupid and suicidal. Side effect may include lack of heals in your direction, dancing on your corpse, stubborn refusal to give you raises, laughing and pointing, sudden dirt nap taking due to lack of buffs… "

Alexcennah Default replied

572 weeks ago

Let's begin. First and foremost, download this application. It's a text editor with programming support and it'll help you a lot to develop your scripts. Please, just don't use you regular Notepad…

Then read these two tutorials. The first one is a basic lua tutorial and the last one talks about GearSwap. Don't be afraid if you don't understand anything in the first time, it's much easier to look at a example code and then come back to reading.

http://wiki.windower.net/doku.php?id=addons:gearswap:tutorial:lua:start

http://www.ffxiah.com/node/145

This said, we can now look on my .lua script above.

Alexcennah Default replied

572 weeks ago

As I said earlier, the GearSwap use events to do everything. These events are functions which are already pre-determined by the addon. You can see which they are in the Variables.xml file inside GearSwap folder. In the example above, we have get_sets, precast, midcast, aftercast, status_change, filtered_action and self_command. There are two more functions in the script, but these are functions that I wrote myself to be used in the code. The GearSwap will NOT recognize them as events, so they will not start anything by themselves.


last edited 572 weeks ago by Alexcennah

Alexcennah Default replied

572 weeks ago

The get_sets event is the initializing function. It'll be read only once, at script loading. Here you define your variables and tables (and your gear sets, since they are tables). In the example above, I have defined an Idle set (sets.Idle), and basic TP set (sets.TP.Standard), a Treasure Hunter oriented TP set (sets.TP.TH), an Evasion TP set (sets.TP.Evasion), a generic weaponskill set (sets.WS.Standard), a Exenterator set (sets.WS.Exenterator), a Evisceration set (sets.WS.Evisceration), a Sneak Attack set (sets.JA['Sneak Attack']), a Trick Attack set (sets.JA['Trick Attack']), a Perfect Dodge set (sets.JA['Perfect Dodge']), and a set with items to be picked by my lovely GearCollector (sets.Utility.GearCollector). Note they are defined, but they don't need to have any gear at all in them. If they haven't, they will not change anything when they are to be used.

Furthermore, I set another table (sets.TP.index) and a variable (TP_ind) in the get_sets event. They are used to help me manage my TP sets. I'll discuss about it later.

To be continued…
Please log in to post a reply.