• 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 --->

Trying ini based macros, need help. (1 Viewer)

nijhal

Member
Joined
Feb 22, 2006
RedCents
10¢
Ok now that I know alot more about macros, and was able to test a few that I wrote today, I want to learn how to read an ini file and use it. I cant figure this out for the life of me, even reading other ini based macros. I wanted to make something simple to learn from, maybe Army or Z or one of you guys can fill in my blanks here, here is what I got in my head and cant find info for.

This is a basic target macro from an ini, target names will be in the ini, if the target names are NOT found it will end the macro.

What I think it should look like

Target.mac
Rich (BB code):
/declare mob int outer

/call ReadIni

Sub Main
   :loop
   /target ${Mob}
   /if (${Target.CleanName} {
   /end 
   }
   else
   {
   /goto :loop
/return

|--------------
|Read Ini
|--------------
Sub ReadIni

No idea what to put here

/return

I may be way off as I am still wet behind the ears to the 'else' commands and /if but I think thats right if cleanname means no target.

the ini would look like this

target.ini
Rich (BB code):
mob1=a decaying skeleton
mob2=a mummy

I am sorry if I ask too many questions but I am just trying to learn. I have gotten good at editing current macros to have them do what I want them to do as long as I use my charecters for the /target and a specific name of a mob to attack and dont need ini's. But I would like to get into declaring tanks or clerics in the macro startup to make them so everyone can use, such as

/mac KillInChardok Cleric01 Tank01

Tank would be who the bot will assist.

And I for the life of me cant figure out how to make a druid snare at 25% in a sub and either not keep recasting snare or not recast if it resists. I am learnin tho lol.

So basicly if anyone can point me in the right direction on this I would be most helpful.

Also, tested my pirate bb mm macros for the roguebot and warriorbot tonight and they work PERFECT for....

selecting monster, talking to mr squish to enter zone, loading aa's and waiting for assist call warping to main tank attacking. Then when chest spawns warping to docks looting shard zoning out and repeating it.

When I can test the main warrior macro, cleric and enchanter I will be posting them for everyone. I want to make sure they work first tho. And with no cable internet this will be anouther week or two till I post them cause I cant test well on dialup running 5 toons. But rest assured all the help everyone gives me will be returning back to the community.

Army I also was wondering if you could help me modify that wine mac to declare the item to buy and turn in and the merchant to buy from and guy to give to. So others can use it for what they would want. Bandages, Brandy in Qeynos for Rohand, Muffins for pandos, I am sure theres more turn in quests and that would make it great for everyone for faction.

Anyways Nijhal signing off for the eve, goodnight all!!
 
Ok, where to start lol....

From what your describing your looking for a short macro that you would run say once you zone into a new zone to check for specific mob names (like key named mobs and such).

Thats pretty easily accomplished but to give you a bit more insight into working with inis to start... Your ini file has 4 key parts that you will reference when looking up from an ini. The Filename, Section, Key, and NULL Value. Here is the standard format. For the examples this ini we'll work with will be referenced as filename.ini
Rich (BB code):
[Section]
Key=Value
Now lets say you want to look up the value for Key... you would accomplish this by the following:
Rich (BB code):
/varset result ${Ini[filename.ini,Section,Key,NULL]}
/varset result2 ${Ini[filename.ini,Section,Key2,NULL]}
When displaying ${result} the responce would then be "Value". But since we have no "Key2" value set in the ini, ${result2} would be set to "NULL".

Now that you have the basics of looking up a value you can also save values to an ini in similar fashion. Just this time its by using a /ini command.
Rich (BB code):
/ini "filename.ini" "Section2" "Key2" "Value2"
This command will result in creating a new section, key, and value in the origional filename.ini that we were using before as they have the same ini file name. The new ini should look like this:
Rich (BB code):
[Section]
Key=Value

[Section2]
Key2=Value2

Now getting to the actual macro you were talking about creating.

Rich (BB code):
|SpawnChecker.mac
|
|This macro assumes your SpawnCheck.ini is made with the following format.
|[${Zone.Name}]
|Spawn1=a decaying skeleton
|Spawn2=a mummy

Sub Main
/declare ZoneName 	string 	local ${Zone.Name}

/declare temp 		int 	local 0
/declare tempname	string  local

:toploop
	/varcalc temp ${temp}+1
	/varset tempname ${Ini[SpawnCheck.ini,${ZoneName},Spawn${temp},NULL]}
	/if (${tempname.Equal[NULL]}) /end
	/if (${SpawnCount[npc ${tempname}]}) /echo ${SpawnCount[${tempname}]} ${tempname} in the zone.
/goto :toploop
/end
 
Trying ini based macros, need help.

Users who are viewing this thread

Back
Top