• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Question - How would I create an .ini file for macros? (1 Viewer)

Joined
Oct 5, 2012
RedCents
2,324¢
I was looking at a macro Rusty~ (edited/ fixed up by DigitalMocking) HERE, and a few even here (KissAssist), that generate an ini file for any variable inputs that are completely separate from the macro. I feel like it's a good feature, as it keeps a person out of the finished macro for editing and instead puts them in a much cleaner looking ini file to change things like assist at HP%, or the name of the spell you'd like to use, or whatever. Is there a "standard" way of having a macro generate an ini file? In the example I linked it looks like it is done in the /declare section. How would you control how the ini is named?

Rich (BB code):
Sub Main 
   /call GeneralDeclares 

   /call DeclareIniVar mainAssist      string Settings
   /call DeclareIniVar secondAssist    string Settings 
   /call DeclareIniVar privateChannel  string Settings 
   /call DeclareIniVar maxMezLevel     int    Settings 73
   /call DeclareIniVar maxAEMezLevel   int    Settings 70
   /call DeclareIniVar maxPBAEMezLevel int    Settings 65 
   /call DeclareIniVar minRadius       int    Settings 150 /radius 
   /call DeclareIniVar engageDelay     int    Settings 55 /engagedelay 
   /call DeclareIniVar minHP           int    Settings 85 /minhp 
   /call DeclareIniVar autoBuff        int    Settings 1 /buff 
   /call DeclareIniVar useMount        int    Settings 0 /mount 
   /call DeclareIniVar useMez          int    Settings 1 /mez 
   /call DeclareIniVar useDebuff       int    Settings 1 /debuff
   /call DeclareIniVar useTashOnly     int    Settings 0 /tashonly
   /call DeclareIniVar nukeMode        int    Settings 1 /nuke 
   /call DeclareIniVar useCharm        int    Settings 0 /charm 
   /call DeclareIniVar useTashFocus    int    Settings 0 /tash 
   /call DeclareIniVar useDPS          int    Settings 0 /dps 
   /call DeclareIniVar hasteGroup      int    Settings 0 /haste 
   /call DeclareIniVar channelAnnounce int    Settings 1 
   /call DeclareIniVar noInterrupt     int    Settings 0 
   /call DeclareIniVar useManaStone    int    Settings 0 /manastone 
   /call DeclareIniVar checkNamed      int    Settings 0 /checknamed 
   /call DeclareIniVar noInvis         int    Settings 1 
   /call DeclareIniVar useManaRobe     int    Settings 0
   /call DeclareIniVar manaRobeMode    int    Settings 1 
   /call DeclareIniVar manaRobeMinMana int    Settings 70 
   /call DeclareIniVar manaRobeMaxMana int    Settings 90 
   /call DeclareIniVar nukeMana        int    Settings 50 /nukemana 
   /call DeclareIniVar nukeDelay       int    Settings 0 /nukedelay 
   /call DeclareIniVar nukeMode        int    Settings 1 /nukemode 
   /call DeclareIniVar ignoreList      string Settings 
   /call DeclareIniVar runeHP          int    Settings 70 
   /call DeclareIniVar cleanUp         int    Settings 0 /cleanup 
   /call DeclareIniVar spellSet        string Settings "spells" 
   /call DeclareIniVar mezDuration     string Settings 500 
   /call DeclareIniVar tashDuration    string Settings 14m 
   /call DeclareIniVar slowDuration    string Settings 2100 
   /call DeclareIniVar autoAnnounce    string Settings 1    
   /call DeclareIniVar announceTells   string Settings 0 /announcetells 
   /call DeclareIniVar rodBitch        string Settings 
   /call DeclareIniVar noKnockBack     string Settings 0 /usezoom 
   /call DeclareIniVar usePet          int    Settings 1 /companion 

   /call DeclareIniVar rootSpell string Spells "Greater Fetter" 
   /call DeclareIniVar nuke1 string Spells "Psychosis" 
   /call DeclareIniVar nuke2 string Spells "Insanity"
   /call DeclareIniVar mezSpell string Spells "Euphoria" 
   /call DeclareIniVar tashSpell string Spells "Howl of Tashan" 
   /call DeclareIniVar slowSpell string Spells "Forlorn Deeds" 
   /call DeclareIniVar slowType string Spells "item" 
   /call DeclareIniVar charmSpell string Spells "Compel" 
   /call DeclareIniVar aeMezSpell string Spells "Word of Felicity" 
   /call DeclareIniVar pbaeMezSpell string Spells "Word of Morell"
   /call DeclareIniVar shielding string spells "Mystic Shield" 
   /call DeclareIniVar singleHasteSpell string Spells "Speed of Salik" 
   /call DeclareIniVar groupHasteSpell string Spells "Vallon's Quickening" 
   /call DeclareIniVar selfRune string Spells "Ethereal Rune" 
   /call DeclareIniVar petSpell string Spells "Salik's Animation" 
   /call DeclareIniVar selfBuff1 string Spells " " 
   /call DeclareIniVar selfBuffNoStack1 string Spells " " 
   /call DeclareIniVar selfBuff2 string Spells " " 
   /call DeclareIniVar selfBuffNoStack2 string Spells " " 
   /call DeclareIniVar selfBuff3 string Spells " " 
   /call DeclareIniVar selfBuffNoStack3 string Spells " " 
   /call DeclareIniVar selfBuff4 string Spells " " 
   /call DeclareIniVar selfBuffNoStack4 string Spells " " 
   /call DeclareIniVar selfBuff5 string Spells " " 
   /call DeclareIniVar selfBuffNoStack5 string Spells " " 
   /call DeclareIniVar buffList1 string Spells "c6,crack,clarity,c5,c" 
   /call DeclareIniVar buffName1 string Spells "c6" 
   /call DeclareIniVar buffType1 string Spells "gem8" 
   /call DeclareIniVar buffList2 string Spells "haste,sov,salik,speed,pants" 
   /call DeclareIniVar buffName2 string Spells "haste" 
   /call DeclareIniVar buffType2 string Spells "gem8" 
   /call DeclareIniVar buffList3 string Spells " " 
   /call DeclareIniVar buffName3 string Spells " " 
   /call DeclareIniVar buffType3 string Spells " " 
   /call DeclareIniVar buffList4 string Spells "tranq,c4" 
   /call DeclareIniVar buffName4 string Spells "Tranquility" 
   /call DeclareIniVar buffType4 string Spells "gem8" 
   /call DeclareIniVar buffList5 string Spells "c3,kei,c3" 
   /call DeclareIniVar buffName5 string Spells "koadic's endless intellect" 
   /call DeclareIniVar buffType5 string Spells "gem8" 

   /call DeclareIniVar hpRobe string Items "${InvSlot[chest].Item.Name}" 
   /call DeclareIniVar clicky1 string Items " " 
   /call DeclareIniVar clickyNoStack1 string Items " " 
   /call DeclareIniVar clicky2 string Items " " 
   /call DeclareIniVar clickyNoStack2 string Items " " 
   /call DeclareIniVar clicky3 string Items " " 
   /call DeclareIniVar clickyNoStack3 string Items " " 
   /call DeclareIniVar clicky4 string Items " " 
   /call DeclareIniVar clickyNoStack4 string Items " " 
   /call DeclareIniVar clicky5 string Items " " 
   /call DeclareIniVar clickyNoStack5 string Items " " 
   /call DeclareIniVar useFood int Items 1 
   /call DeclareIniVar statFood string Items " " 
   /call DeclareIniVar food1 string Items " " 
   /call DeclareIniVar food2 string Items " " 
   /call DeclareIniVar food3 string Items " " 
   /call DeclareIniVar food4 string Items " " 
   /call DeclareIniVar food5 string Items " " 
   /call DeclareIniVar meleeWep string Items " " 
   /call DeclareIniVar invisItem string Items " " 
   /call DeclareIniVar dispellItem string Items " " 
   /call DeclareIniVar tashFocusItem string Items " " 
   /call DeclareIniVar normalMainhand string Items "${InvSlot[mainhand].Item.Name}"
 
Is there a "standard" way of having a macro generate an ini file?

There is only what MQ2 limits you to. Then figuring out how to use that.
Here is what you will have to work with:

To read data from an ini file:
http://www.redguides.com/wiki/TLO:Ini
and to write data/entries to an ini file:
http://www.macroquest2.com/wiki/index.php/Ini

Out of all the macros I have looked at, I have not found a standard anyone has adopted for managing ini files, but most use basically the same logic.

Check the ini file for the data.
If the data is NOT found then create the entry.
Now get the data from the ini file and store it for later use.

How would you control how the ini is named?

Somewhere in the sub main, preferably at the top. You need to /declare an outer variable and set it. This is how KA does it. Example:

Rich (BB code):
    /declare IniFileName            string      outer 		
	| if Kiss finds a Kissassist_ServerName_ToonName.ini file it will use that one
		/if (${Ini[${MacroName}_${EverQuest.Server}_${Me.CleanName}.ini,General,KissAssistVer].Length}) {
			/varset IniFileName ${MacroName}_${EverQuest.Server}_${Me.CleanName}.ini
			/echo Server Name ini file detected using ${IniFileName}
		} else {
			/varset IniFileName ${MacroName}_${Me.CleanName}.ini
		}
 
Question - How would I create an .ini file for macros?

Users who are viewing this thread

Back
Top