Macro depository for macros written before the user variable changes that broke all of them.
Moderator: MacroQuest Developers
-
kagonis
- a hill giant

- Posts: 228
- Joined: Sat May 24, 2003 8:48 pm
Post
by kagonis » Fri Aug 22, 2003 9:06 pm
Well, I was bored, and I was tired of allways asking for that link for some item that I like to drool over, so I made this to store the links for me.
There is a reason that I add a dash before and after the link, for some reason the link doesn't work when displayed otherwise.
Code: Select all
#turbo
#define INIPATH "d:\games\mq\ini\links.ini"
Sub Main
/if "$p0"=="add" {
/if "$p1"=="" /call Syntax
/call ListKeys empty
/if n $return==0 {
/echo No empty keys were found.
/endmacro
}
/ini "INIPATH" "Links" "$int($return)" "- $p1 -"
/echo Added: Key: $return - Value: $p1
} else /if "$p0"=="edit" {
/if n $strlen("$p1")>3 /call Syntax
/if "$p2"=="" /call Syntax
/ini "INIPATH" "Links" "$int($p1)" "- $p2 -"
/echo Updated: Key: $p1 - Value: $p2
} else /if "$p0"=="list" {
/call ListKeys echo
} else {
/call Syntax
}
/return
Sub ListKeys
/if "$p0"!="echo" /if "$p0"!="empty" {
/echo Syntax: /call ListKeys <echo|empty>
/endmacro
}
/varset l0 0
:Loop
/varadd l0 1
/if "$p0"=="echo" /if n $strlen("$ini("INIPATH","Links","$int($l0)")")>8 /echo Key: $int($l0) // $ini("INIPATH","Links","$int($l0)")
/if "$p0"=="empty" /if n $strlen("$ini("INIPATH","Links","$int($l0)")")==8 /return $int($l0)
/if n $l0<100 /goto :Loop
/return 0
Sub Syntax
/echo Syntax: /macro link <add|edit|list> ["link"|key] ["link"]
/echo Example: /macro link add "Some Item Link"
/echo Example: /macro link edit 5 "Some Item Link"
/echo Example: /macro link list
/endmacro
/return
Last edited by
kagonis on Sun Sep 07, 2003 2:45 am, edited 2 times in total.
-
Jabber
- a lesser mummy

- Posts: 32
- Joined: Sat Aug 23, 2003 2:45 pm
Post
by Jabber » Sat Aug 23, 2003 2:47 pm
Hmmm do the items show as links?
All i seem to get is 00273236ESword
-
kagonis
- a hill giant

- Posts: 228
- Joined: Sat May 24, 2003 8:48 pm
Post
by kagonis » Sat Aug 23, 2003 7:43 pm
They should, they do for me. But I had to put some thing before and after the actual link, in the ini file, otherwise it would show just a hexnumber and the item text.
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Sat Aug 23, 2003 10:13 pm
It is adding items to the ini, but when I do /macro link list I do not get a list of links, just /echo's of the item names . This is an example:
/macro link list
[Macroquest] Key: 1 // - Two Tined Corpse Pitchfork -
[Macroquest] Key: 2 // - The Putrid Fish -
-
Jabber
- a lesser mummy

- Posts: 32
- Joined: Sat Aug 23, 2003 2:45 pm
Post
by Jabber » Sun Aug 24, 2003 11:03 am
Well my links.ini looks like this:
[Links]
1=- 002904744E507A1Bloodmetal -
that correct?
Last edited by
Jabber on Sun Aug 24, 2003 2:52 pm, edited 1 time in total.
-
Imperfect
- Macro Author

- Posts: 319
- Joined: Fri Jun 14, 2002 1:52 am
Post
by Imperfect » Sun Aug 24, 2003 11:50 am
This shouldn't work because of VI changing the way Links worked. Origionally people could create links by just experimenting and VI decided they didn't want people knowing what all was available.
-
Jabber
- a lesser mummy

- Posts: 32
- Joined: Sat Aug 23, 2003 2:45 pm
Post
by Jabber » Sun Aug 24, 2003 2:03 pm
well the problem is with parameters are parsed by space and most item names have spaces in them. The script technically works perfect really, but this is the problem.
ie:
Code: Select all
0025024A1CF3BC9Mask of War
|----$p0----------| |$p1| |$p2|
to fix this is simple. Just put quotes around the item to add to the list.
ie:
Code: Select all
/macro link add "0025024A1CF3BC9Mask of War"
EDIT: The numbers are just there to show its a link. Really its just the text
Nice job on the script btw.
Last edited by
Jabber on Mon Aug 25, 2003 12:31 pm, edited 1 time in total.
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Sun Aug 24, 2003 2:15 pm
For the items I listed I typed:
Code: Select all
/macro link add "Two Tined Corpse Pitchfork"
/macro link add "The Putrid Fish"
and the result in the ini is:
Code: Select all
[Links]
1=- Two Tined Corpse Pitchfork -
2=- The Putrid Fish -
Is there any other condition I am missing? I don't see how you are getting numbers preceding the item name.
-
kagonis
- a hill giant

- Posts: 228
- Joined: Sat May 24, 2003 8:48 pm
Post
by kagonis » Tue Aug 26, 2003 10:14 pm
Uhm, first of all, I think some of you missed the point of this macro ;)
Its not one that makes a link out of an item name, its one for storing links you want to be able to dig out late and drool over..
Ie..
You type:
/macro link add "
then you clidk on the gfx that pastes a link, and ends the line with "
So the complete line looks like:
/macro link add "Some link here"
But to MQ it looks more like
/macro link add "[]2342342e32aSome link here[]"
[] is to illustrate the special chars that define the start and end of a link.
Then I want to say that I recompiled a new MQ today after patch, and now it doesnt work anymore. It stores the links okay, but doesnt echo them out.
You can store them in aliases though
/alias /mylink001 /echo Link: "My link here"
This works still, but its messy, thats why I made the macro. Gonna try and figure out why it doesnt work anymore though.
-
kagonis
- a hill giant

- Posts: 228
- Joined: Sat May 24, 2003 8:48 pm
Post
by kagonis » Tue Aug 26, 2003 10:26 pm
The MQ where it worked, was from Aug. 6th. I can see. Dunno what has changed since then.
I'm gonna try and load that one back up and see if its due to the patch, or some changes in MQ.
This how the links.ini should look like..
Code: Select all
[Links]
1=- 0016257EF4F4940Signet of the Arcane -
2=- 0012510B8DD7BDDGleaming Mesh Girdle -
3=- 0026757505B2612Ring of Resistance -
4=- 002678730667F26Wristband of Judgement -
5=- 002677029B93CD8Great Shadow Platemail -
6=- 0008364FB097F60Talisman of Vah Kerrath -
7=- 0030566F916CE84Shawl of Awakenings -
8=- 0008781B810EE8FTwisted Twig Charm -
9=- 0024789085A3FD9Staff of Eternal Flames -
10=- 0015822A21AA8F1Shroud of the Stonecrafter -
11=- 00077691CCEB6BBTalisman of the Elements -
12=- 0026993665F42FEPulsing Onyx Ring -
13=- 0009444D76BFC42Mask of Conceptual Energy -
14=- 0019260B63EA8DFSpell: Form of the Hunter -
15=- 00305634A85DBDDWistful Tunic of the Void -
16=- 001660564DEDF1ESeaweed Woven Leggings -
-
kagonis
- a hill giant

- Posts: 228
- Joined: Sat May 24, 2003 8:48 pm
Post
by kagonis » Tue Aug 26, 2003 10:45 pm
They changed the format of links today, probably has something to do with you now are able to open 4 link windows at the same time.
At least I just tried with adding a new link, and listing it. Works flawlessly.
Code: Select all
17=- 0007943-00001-00001-00001-00001-000013A95A57EBracelet of Beauty -
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Tue Aug 26, 2003 10:56 pm
Ie..
You type:
/macro link add "
then you clidk on the gfx that pastes a link, and ends the line with "
So the complete line looks like:
/macro link add "Some link here"
But to MQ it looks more like
/macro link add "[]2342342e32aSome link here[]"
That was the problem... I didn;t understand the useage. I was not doing it that way.
-
md703
- a lesser mummy

- Posts: 34
- Joined: Wed Oct 09, 2002 11:04 pm
Post
by md703 » Sat Aug 30, 2003 3:55 pm
I can't seem to get it to work, it keeps saying "No empty keys were found."
not sure if its my MQ or if its the script. but i'm typing /macro link add "clicking icon link" and it returns that message. Any ideas?
-
Coraz
- a lesser mummy

- Posts: 41
- Joined: Mon Sep 09, 2002 11:24 pm
Post
by Coraz » Sun Aug 31, 2003 4:43 am
broken since new CVS

-
ieatacid
- Developer

- Posts: 2727
- Joined: Wed Sep 03, 2003 7:44 pm
Post
by ieatacid » Wed Sep 03, 2003 7:45 pm
Any chance on this getting fixed?