LOOKING FOR BEST WAY ...

EQDAB

Premium Member
Joined
Nov 13, 2015
Messages
225
Reaction score
12
Points
18
Age
68
Location
Wdbg., VA Eastern USA
I want to define a list of spells when a char logs in, so they can be referred to later in macs, melee, etc. I originally thought a CFG, but which one? And the CFG's won't work cleanly for different chars? My other reason/goal is to make it easier/faster to update spell names. I suspect I've over thought this and missed the oblivious, so call me names if ya like, but give me a hand up is all I'm asking. And maybe hints or even better a simple description/example in proper use too, thanks so much!! At the least the best direction & why, and I'll fill the rest in. Damn :eek:, a para for an single request for help, sorry.
 
This is what I was working on some time back to dump the character information.

Pete has code that does this a lot better with the BOT macro/plugin.

Code:
Sub NewINI()
	/varset  MyName ${Me.Name}
	/varset  mcsINI mcs_${Me.Name}.ini
	
	
	/popup MCS Building new ini file for ${Me.Name} as ${mcsINI}
	/echo  MCS Building new ini file for ${Me.Name} as ${mcsINI}

	/declare a int
	/declare b int
	/declare SpellName string local
	
	/ini "${mcsINI}"	"${MyName}-spells"	"shortname"			"spell name,start message,landed message,gem,recast if worn off?,resist if resisted,assist type"

	|- Dump spells that are loaded 
	/echo Checking spells
	/for a 1 to 20
		/echo /if (${Me.Gem[${a}].ID}) ${a}
		/if (${Me.Gem[${a}].ID}) { 
			/ini "${mcsINI}"	"${MyName}-spells"	"gem${a}"			"${Me.Gem[${a}]},,,${a}"
			/ini "${mcsINI}"	"MQ2Melee-buff"		"downshit${a}"		"/if (!$ {Me.Moving} && !$ {Me.Invis} && !$ {Me.Feigning} && !$ {Me.Sitting} && !$ {Me.AFK} && !$ {Stick.Active} && $ {Spell[${Me.Gem[${a}]}].Stacks} && !$ {Me.Buff[${Me.Gem[${a}]}} && $ {Cast.Ready[${Me.Gem[${a}]}]} && $ {Me.PctMana}>5) /casting "${Me.Gem[${a}]}"
			/ini "${mcsINI}"	"MQ2Melee-atk"		"holyshit${a}"		"/if ($ {Me.Combat} && $ {Target.Type.Equal[NPC]} && $ {Cast.Ready[${Me.Gem[${a}]}]}) /casting ${Me.Gem[${a}]}
			}
	/next a
	|- Dump worn and pack clicky items
	/echo Checking items
	/for a 1 to 32
		/if (${Me.Inventory[${a}].EffectType.Equal[Click Inventory]}) {
			/ini "${mcsINI}"	"${MyName}-spells"	"inv${a}"			"${Me.Inventory[${a}]},,,-1,0,0,blind"
		}
		|-- if its a container check to see whats in it. 
		/if (${Me.Inventory[${a}].Container}) {
			/for b 1 to ${Me.Inventory[${a}].Container} 
				/if (${Me.Inventory[${a}].Item[${b}].EffectType.Equal[Click Inventory]}) {
					/ini "${mcsINI}"	"${MyName}-spells"	"inv${a}_${b}"			"${Me.Inventory[${a}].Item[${b}]},,,-1,0,0,blind"
				}
			/next b
		}
	/next a
	/popup Scanning AA's this will take a few seconds. 
	|- Dump AA with an effect
	/varset a 1
	/varset b 4
	/if (${Window[AAWindow].Child[CanPurchaseFilter].Checked}) {
		/nomodkey /notify AAWindow CanPurchaseFilter leftmouseup 
		/delay 5
	}
	/nomodkey /notify AAWindow AAW_Subwindows tabselect ${b}			
	/delay 5	
	:Loop
	/if (${Window[AAWindow].Child[List${b}].List[${a}].Length}) {
		/nomodkey /notify AAWindow List${b} listselect ${a}	
		/if (${Window[AAWindow].Child[HotButton].Enabled}) {
			/ini "${mcsINI}"	"${MyName}-spells"	"aa${b}_${a}"			"${Window[AAWindow].Child[List${b}].List[${a}, 1]},,,0,0,0,blind"
		}
		/varcalc a ${a}+1
		/goto :Loop
	}
	/if (${b}>1) {
		/varcalc b ${b}-1
		/varset a 1
		/nomodkey /notify AAWindow AAW_Subwindows tabselect ${b}	
		/delay 5
		/goto :Loop
	}
	|- Dump Discs
	/for a 1 to 8
		/echo (${Window[CombatAbilityWnd].Child[CAW_Button${a}].Text.Length}) a = CAW_Button${a}
		/if (${Window[CombatAbilityWnd].Child[CAW_Button${a}].Text.Length}) {
			/varset SpellName ${Window[CombatAbilityWnd].Child[CAW_Button${a}].Text}
			/ini "${mcsINI}"	"${MyName}-spells"	"disc${a}"	"${SpellName},,,-2,0,0,blind"
			/ini "${mcsINI}"	"MQ2Melee-FLAG"		"holyflag${a}"	"0"
			/ini "${mcsINI}"	"MQ2Melee-DISC"		"holyshit${a}"	"/if (!$ {Melee.DiscID} && $ {Me.PctEndurance} > 25 && ${Me.CombatAbilityReady[${SpellName}]}) /disc ${SpellName}
		}
	/next a
/return
 
Have you considered using EQ's built in save spell set?

You could then use the Ini TLO to read it, passing file name as the full path to it. E.g. if I had EQ installed in C:\Games\EQ, and character named Wizzie on server povar, I could access: C:\Games\EQ\Wizzie_povar.ini

Then read in a specific saved spell set, e.g.:

[SpellLoadouts]
SpellLoadout1.inuse=1
SpellLoadout1.name=Current
SpellLoadout1.slot1=10832
SpellLoadout1.slot2=10823
SpellLoadout1.slot3=10841
SpellLoadout1.slot4=10817
SpellLoadout1.slot5=36
SpellLoadout1.slot6=1633
SpellLoadout1.slot7=1631
SpellLoadout1.slot8=1744
SpellLoadout1.slot9=10783

Then loadout number is the spell ID.

Just a thought.

htw
 
  • Like
Reactions: EQDAB
Clarification, I hope

Umm, sorry I must have confused everyone. I don't need a load-out list. I want to global define a list of spell names, to use the defines in macros, etc. It would also simplify updating new spells/spell names. Rather then editing each macro, etc.
====
Can global defines be placed in the charname_server.ini? Or can an macro be executed from there? Hmm.
 
Can global defines be placed in the charname_server.ini? Or can an macro be executed from there?

No. The charname_server.ini is just a list of key=value pairs for various plugins. The plugins would have to be written to support what I think you are asking for.
 
you can just do it with a config.

/if (!${Defined[Spell1]}) /declare Spell1 string global "Splash of Tada"

then you can just:
/casting "${Spell1}"
 
  • Love
Reactions: EQDAB
I don't see why not.

You can just define the global variables. And execute a macro too if you want.

If you want it done same for every toon, just use autoexec.cfg

For chars, use server_char.cfg (e.g. povar_wizzie.cfg)

A simple example:

/declare myspell1 global
/varset myspell1 abc
|or combine
/mac mymac

In your mac, you can then reference ${myspell1} as you wish (and of course, any other ones you set up).

If you wanted them in a separate INI (the spell names), then just declare the globals in the cfg, and then read them in to set them (or combine to single lines).

etc.

If this isn't what you're talking about, please excuse my ignorance. :)

htw
 
  • Love
Reactions: EQDAB
Very cool, thanks guys. I'll play it out some. but that sounds like exactly what I was asking for.