Currently the out of the box add on is allowing buffing one's self inside the mog house. Person just today started making the switch, had literally no other files associated with it yet.
Currently the out of the box add on is allowing buffing one's self inside the mog house. Person just today started making the switch, had literally no other files associated with it yet.
Start casting but the spell don't go, same as you can ws even if you are not engaged, all "known issues" if can call tha issues...
For a while we didn't know how to distinguish mog house zones from normal zones, but we figured it out a week or two ago. I had forgotten that it was an issue with GearSwap, though.
Just pushed a fix to -dev that should prevent actions in the mog house. I'll test it when I get home and push it live shortly after (probably).
Okay so I'm totally new to GS, but seeing as Spellcast isn't supported anymore, time to learn the new, right? Certainly a big difference in languages. Now, I've already run into a few issues trying to figure out how to make things work:
1) How in the world do I get my file to run period? I have Gearswap loaded and Spellcast unloaded, yet it doesn't seem to be finding anything. Is it somewhere I need to create a folder and I just derped or...? Sorry for the noob question but... I'm new to this!
2) I'm working on transferring important XMLs over just so I can get used to the system, so I'm working on my GEO one now as I use it most often for events. Now I'm trying to figure out how to set which aftercast is switched into; with Spellcast I could just use a variable set (i.e. switch to the proper DT set (standard or pet) or idle set (standard or pet). Essentially, if I cast a Geo-spell, I want to switch my idle set to my pet set. If I cast it in my DT set, I want it to switch to my hybrid pet/DT set. I also see there's things for whether your pet lives or not (pet.isvalid, I think?) and so I'm wondering if there's a way to switch based on that. From my very rudimentary understanding of the code (never worked in Lua before), I think it might look something like this?
for just handling pets. i.e. if pet is valid, then it switches to my pet set aftercast. If it's not valid, it switches to my standard. Now, how would I cycle that to a DT or Hybrid Pet/DT instead of a Standard or Pet set?Code:if pet.isvalid then equip(sets.idle.pet) end else equip(sets.idle.standard) end
Again, I'm incredibly new at this and I'm pretty much deciphering this from scratch, so forgive me if even this little snippet is riddled with errors. I was this bad when I was learning Spellcast too.![]()
Getting error's from Motenten's utility whenever I try to ws/cast spells.
GearSwap: lua error (runtime) - directoryyadayadaydyayada/addons/GearSwap/flow.lua:268:
GearSwap has detected an error in the user function precast:
Mote-Utility.lua:394: attempt to index local 'item_map' (a nil value).
you need to put you lua in Windower4\addons\GearSwap\data\<playername>
you can still name you files DNC but there .lua
this depends on what your trying to do
extra
this is my basic.lua http://pastebin.com/RrKy7KPU
Oh. I had to create a folder for my character. Heh, whoops? Anyway, at least it's registering it now in-game, though obviously my script is riddled with bugs as of yet so... >.>; Yeah. Okay! Step one at least is done, now let's work on refining it.
What I'm essentially trying to do is this: I want to be able to switch sets based on my casting set and whether or not I have a pet. After doing some digging, I've seen some things in the examples and on other gearswap examples that have it so you can toggle your gearset, so that seems pretty straightforward once I get that down. I think what I'm trying to do essentially is this: I want my aftercast to switch into one of four sets: Standard (refresh etc), DT (For when I'm danger GEO), Pet Standard (Backline, pet set), or Pet DT (hybrid pet set and self DT set). However, I want it done in a specific way, if it's possible. If I'm in my standard set (i.e. I'm in no danger), I want to end in my Pet Standard set when I have a luopan up. However, if I'm in my DT set (i.e. I'm in the frontlines for an Indi-debuff), I want to end in my hybrid set when I have a luopan up.
With Spellcast I could do this with variables (though I don't recall being able to check pet status; I had to toggle pet on or off manually) but I'm not sure how that'd be done with Gearswap.
1. Put your .lua in ...\addons\GearSwap\data, same name as you used on SC, I use Playername_job.lua , if you are already as the job, after you put it there write //gs reload
2. First in ...addons\GearSwap\beta_examples_and_information there is excel archive named "Variables" that can help.
For this will try to give a non complicated example.
I'm assuming you already have your sets defined ex.
sets.pet.dt
sets.pet.hybrid
sets.pet.standard
so to define the set you wanna be when your luapan is out, use a variable, ex. petset, 1 for Standard, 2 for DT, 3 for Hybrid
So the aftercast code would be:
now to set the variable you need a "self_command"Code:function aftercast(spell) if pet.isvalid then if setpet == 1 then equip(sets.pet.standard) elseif setpet == 2 then equip(sets.pet.dt) elseif setpet == 3 then equip(sets.pet.hybrid) end end end
to use the self commands you can put in your SE macro, /console gs c "command" in this case /console gs c toggle Pet set, they are case sensitive... everything in .lua is case sensitive...Code:function self_command(command) if command == 'toggle Pet set' then petset = petset +1 if petset > 3 then petset = 1 send_command('@input /echo ----- Pet Set changed to Standard -----') equip(sets.pet.standard) elseif petset == 2 then send_command('@input /echo ----- Pet Set changed to DT -----') equip(sets.pet.dt) elseif petset == 3 then send_command('@input /echo ----- Pet Set changed to Hybrid -----') equip(sets.pet.hybrod) end end end
and at the start of your sets function you have to add
petset = 1 (so by default your set will be standard)
NOTE : they are more efficient ways to do this... but IMO are a bit complicated for starters
I see how that works, but then there's something that bothers me; if toggling it makes it go up every time, how would you manage to change sets after you go to three? Dumb question I'm sure, but if toggling it makes it go from 1 > 2 > 3, wouldn't the petset +1 make it 4, 5, etc and not work?
w/
it check if its more than 3, if so it will set petset back to 1 (petset = 1), then say that pet set changed to standard then equip the set.Code:if petset > 3 then petset = 1 send_command('@input /echo ----- Pet Set changed to Standard -----') equip(sets.pet.standard)
I normally dont toggle sets... just set them directly like w/ a command petset standard, so go directly to standard and go on...
this is how i did it with my debug include
but mine is more advanced then hisCode:function get_sets () fulldebug.type = S{ [1] = "status_change", [2] = "pet_change", [3] = "filtered_action", [4] = "pretarget", [5] = "precast", [6] = "buff_change", [7] = "midcast", [8] = "pet_midcast", [9] = "aftercast", [10] = "pet_aftercast", [11] = "All"} fulldebug.count = 1 function debug_self_command(command) if command == 'Debugtype' then if fulldebug.count <= 11 then fulldebug.count = fulldebug.count +1 else fulldebug.count = 1 end add_to_chat(123,'Debug Mode Type = ' .. tostring(fulldebug.type[fulldebug.count])) end
and to do it with his example
Code:function get_sets () petset = S{ [1] = "Standard", [2] = "DT", [3] = "Hybrid", petset.count = 1 end function aftercast(spell) if pet.isvalid then equip(sets.pet.[petset[petset.count]]) -- will output sets.pet.standard/sets.pet.dt/sets.pet.hybrod based on how you have it setup end end function self_command(command) if command == 'toggle Pet set' then if petset.count < 3 then petset.count = petset.count +1 equip(sets.pet.[petset[petset.count]]) -- will output sets.pet.standard/sets.pet.dt/sets.pet.hybrod based on how you have it setup else petset.count = 1 equip(sets.pet.[petset[petset.count]]) -- will output sets.pet.standard/sets.pet.dt/sets.pet.hybrod based on how you have it setup end add_to_chat(123,'Pet Set changed to ' .. tostring(petset[petset.count])) end end
Alright! The information has really helped, and all of these examples are doing wonders for teaching me the language. I was trying to close all of the Elses with Ends and such, for example because I got used to Spellcast's tag system where you closed EVERYTHING. <else> </else> etc etc.
Anywho, I've sorta finished my GEO setup but I'm still getting an error of '(' expected near '{' or something like that, and I have no idea where I messed up. Here's what I've got, and hopefully you all can see my screwups.
http://pastebin.com/JSh5VcaF
(don't laugh, it's newbie coding)
Edit: Also, don't mind the Dark Ring stuff at the top, I was playing with the advanced augment stuff for the fun of it and forgot to remove those when it wasn't working. XD
Edit2: Unless that's screwing me up. Then by all means mind it. ._.
I'm... not sure. xD; Here's the error.
User file problem: ...(long link to where it is in my files)/Kensagaku_Geo.lua:1: '(' expected near '{' That's all I've got. =x
Whoops, I made lots of little syntax errors. Missed some commas, forgot some Thens... but it's working now, says it was successfully loaded!
Uuuuuuuunfortunately still a lot of bugs, it seems. xD I can't figure out how to cast now; do I have to do it the old way (i.e. /ma "spell" <target>)? Because //spell isn't working anymore. Additionally, I cast cure manually, but I get the error:
"153: attempt to index field 'JA' (a nil value)" I think I dun derped on that, but that was me trying to figure out how it worked from one of the examples. Additionally, it does that for all of my JAs.
here i cleaned it up some(it will expire tomorrow)
http://pastebin.com/Wc3fEcH3
--edit--
fixed your ja rule
I seem to be problems incarnate with this. I made the adjustments thanks to your cleanup, including the JA thing not appearing when I cast anymore, but a few more problems came up.
1) I can change sets by resting, and toggling my pet set, but casting spells doesn't change my set at all. Fixed this too, yay for fiddling! Just 2 broken now.
2) My self toggle seems to have broken; I tap it once and nothing happens, I tap it a second time and it gives me the proper message as if I had switched from my DT set to my idle set. In short, idle > DT does nothing and gives me no message despite not changing anything about that code, but DT > Idle gives me the proper message and switch. Weirdly enough, it's identical to the pet toggle with the proper changes (changing "pet" to "self") yet one works and the other doesn't. Even checked case in the macros, no issues.
3) JAs still give me the nil value error. Fixed this myself! Still stuck on 1 and 2 though. ;;
Edit: Fixed Everything!
try this
http://pastebin.com/Wc3fEcH3
--edit--
found out what was wrong with you self command
you had
elseif petset == 2 then
it should be
elseif selfset == 2 then
It's almost working! I got JAs working, my toggle works, my resting/etc sets work... but now I'm fizzling out on the midcast. I've checked on a few things (like switching if spell.type= to if spell.action_type, which fixed my precast and JAs) but there's something screwy going on. It's not even equipping the proper fast cast set; I cast Fire and it switches to my normal Fast Cast set (which it shouldn't, seeing as the spell.cast_time < 3 should switch it straight to midcast). So yeah, I have no idea. @_@
Edit: Updated file - http://pastebin.com/9Tyk4bFq