PLassist.mac Now with INI support

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Draconis
a lesser mummy
a lesser mummy
Posts: 40
Joined: Tue Mar 23, 2004 4:53 pm

Post by Draconis » Sat Jan 22, 2005 11:02 am

Ok tried to rework it with new changes, but for some reason it wont cast now. The vars are set and the chat channel says it is casting the right spell I asked for. but it just stands for a few secs then sits down. anyways new code here did I screw something up? it looks like /call cast is not working for somereason.

also when using the give buff 1 <whatevername> MQ says there are no spawns matching any (1-100) <whatevername> even if they are standing right next to me.

EDIT: ok found the cast problem have to add " " around the

Code: Select all

${Buff[${buffnumber}]} 
code or it wont work, the give buff command is still broke, it seems to be adding a

Code: Select all

 ' 
after the name and comming up with no results for <whatevername'> not sure how to fix that yet.

Code: Select all

Newist code in 1st post
Last edited by Draconis on Mon Jan 24, 2005 9:27 am, edited 1 time in total.

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Jan 22, 2005 12:22 pm

I haven't looked, but I would consider looking to be sure you did not mispell something.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
Fluffy
a ghoul
a ghoul
Posts: 81
Joined: Sun Aug 22, 2004 5:08 pm

Post by Fluffy » Sat Jan 22, 2005 4:43 pm

To fix the ' at the end

Just change

Code: Select all

#event Buffother "#*#Give Buff #1# #2#"
to

Code: Select all

#event Buffother "#*#Give Buff #1# #2#'"
That should fix that problem.

Draconis
a lesser mummy
a lesser mummy
Posts: 40
Joined: Tue Mar 23, 2004 4:53 pm

New code need test

Post by Draconis » Sun Jan 23, 2005 7:24 pm

Ok more changes

* Ini support for buffs and most vars.
* Sit is now a var
* Casts your mount at the start of the macro *(Not tested as I dont have a horse, Should work though)
* Give buff command tweaked now say "Give buff <whatever buff> <whatever target>

First post updated.

User avatar
Fluffy
a ghoul
a ghoul
Posts: 81
Joined: Sun Aug 22, 2004 5:08 pm

Post by Fluffy » Sun Jan 23, 2005 9:41 pm

Ok for the mount thing I think you should change it to not just cast it but rather allow them to call for it or call for dismount. To allow for following and such a little better... So the following changes would allow for a little more control over that

In your events add in something like

Code: Select all

#event Mountup "#*#Mount on#*#" 
#event Dismount "#*#Mount off#*#
Then add in the follow functions

Code: Select all

Sub Event_Mountup()
/if (${havemount}) {
    /1 Mounting my horse/drogmor
    /call Cast "${mount}" item 3s 
    /return
    }
/1 Sorry I dont have a mount/drogmor edit ini to reflect if I do
/return

Sub Event_Dismount()
/1 Dismount my horse/drogmor
/dismount
/return
That should allow for you to command that portion of it and allow them to call when to mount or not... And I would also change

Code: Select all

#event mountfail "You can not summon a mount here."

|                                          | 
|------------------------------------------| 
|                                          | 
Sub Event_mountfail 
/1 Cant cast a mount here moving on.. 
/goto :loop 
/return 
|                                          | 
|------------------------------------------| 
|                                          | 
That shit is broken and wont work.. Remember you are making a call to it. So you dont need to /goto with it. It will return back from the call to right where it was called... So I would change it to be simply

Code: Select all

#event mountfail "You can not summon a mount here."

Sub Event_mountfail()
/1 Can't cast a mount here
/return
And remember, if I said something to offend you it is only becuase I hate you. -- My Mom.
If you can't find it odds are you didn't bother looking. -- My Mom.
Why do I bother, your just stupid. -- My Mom.
Hmm maybe mom didnt love me?

Draconis
a lesser mummy
a lesser mummy
Posts: 40
Joined: Tue Mar 23, 2004 4:53 pm

Post by Draconis » Sun Jan 23, 2005 11:02 pm

ah ok, I did not have the /goto :loop in there at first but in my sleep deprived state I thought It might end up just looping over it self if you have a mount and it failed to cast.

EDIT:

Ok changes made, 1st post edited. With all the new changes Im running out of ideas for it to do. Other than maybe a "help im getting my ass kicked" command that would have bot assist and attack masters target untill it died then return to the last spot it was sitting at. Although that will take alot of digging through other macros to see hows its done, RH for movement code, and so on. So ill work on that later I think.

Any other suggestions / additions pile em up more practice the better lol.

User avatar
Fluffy
a ghoul
a ghoul
Posts: 81
Joined: Sun Aug 22, 2004 5:08 pm

Post by Fluffy » Mon Jan 24, 2005 12:40 am

Draconis wrote:ah ok, I did not have the /goto :loop in there at first but in my sleep deprived state I thought It might end up just looping over it self if you have a mount and it failed to cast.

EDIT:

Ok changes made, 1st post edited. With all the new changes Im running out of ideas for it to do. Other than maybe a "help im getting my ass kicked" command that would have bot assist and attack masters target untill it died then return to the last spot it was sitting at. Although that will take alot of digging through other macros to see hows its done, RH for movement code, and so on. So ill work on that later I think.

Any other suggestions / additions pile em up more practice the better lol.
Well the next thing you should look at is converting your command structure to something more scalable.. And add a few more features to that... Like a Allowed Masters list.. Right now any idiot who says the commands will cause him to cast.. That is not good in my book. You are doing event parsing which most people first do when they are learning.. Now you need to convert that to something with more structure.. See if you can get that done.. And when you get stuck let me know and I will help you along with that..
And remember, if I said something to offend you it is only becuase I hate you. -- My Mom.
If you can't find it odds are you didn't bother looking. -- My Mom.
Why do I bother, your just stupid. -- My Mom.
Hmm maybe mom didnt love me?

Draconis
a lesser mummy
a lesser mummy
Posts: 40
Joined: Tue Mar 23, 2004 4:53 pm

Post by Draconis » Mon Jan 24, 2005 9:31 am

ok checking for master would proably be a good idea. would get rid of this bug I found the other day, when ever this monk FDed and failed the fail message soandso has fallen to the ground, made the bot stand up, no Idea why though.

fallon
a lesser mummy
a lesser mummy
Posts: 59
Joined: Sat Dec 18, 2004 7:37 pm
Location: Kuwait
Contact:

Post by fallon » Tue Jan 25, 2005 6:21 pm

Now, I want to know, how do I tell it to look for and write to and create new INI files in another/specific folder other than the macro folder; as in c:/mq2/release/macros/ini, I'd really appriciate knowing.

Code: Select all

/if(!${Ini[SomeSubDir\plassist.ini,Configuration,VERSION]} ) /call Save_New_Config
Puts plassist.ini in Macros\SomeSubDir if I remember right. I'll have to check one of the macros I have at home for sure. You can do that with .inc files too and clean up your macros dir.

Mattr35
a lesser mummy
a lesser mummy
Posts: 43
Joined: Wed Dec 29, 2004 12:27 am

Post by Mattr35 » Sat Feb 26, 2005 7:23 pm

Everything works great... but the macro locks on to my target's pet. Its a beastlord pet, so I know it is seeing the toons name... Fluffy's Warder even though I told it to /mac plassist fluffy.

Any idea how to get it to ignore the pet?

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sat Feb 26, 2005 8:59 pm

I've had that problem with a few macro's when it comes to BST and their pets. Thinking the only real fix would be for a change to the code so that it uses the PC's ID instead of name.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Sat Feb 26, 2005 11:06 pm

/target pc fluffy

When you do just /target fluffy it target's the closest thing that matches . . . most often the pet I would guess.

Change the macro to include the "pc" from above and it should fix your problem, though you may no longer heal pets.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]