Okay, I've been working for the past 30 or so hours on creating a plugin to make a directory full of .txt files of items. A few things to begin with. First, I am so far using the FileSystemObject code to create the .txt files.
Currently, I can take the data and create the <eq_name>.txt file with all of it except the things that repeat. Here is an example of the data the triggers use.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Name : A circlet of ivy
Object: circlet ivy febriwyn
Level : 53
Type : armor Weight: 2
Flags : glow magic bless antievil antineutral burnproof
Value : 0 gold, 0 silver
Armor class: 9 pierce
9 bash
9 slash
4 vs. magic.
Affects: damroll by 5.
Affects: hitroll by 5.
Affects: wisdom by 1.
Affects: constitution by 1.
Affects: intelligence by 1.
Affects: ac by -4.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Now, I can get everything to work right except the affects, so I have set a seperate function to write each one as they are triggered then let the next one do the same. That, of course, requires they append to <eq_name>.txt instead of rewriting it.
Two side things. First, could someone tell me why this works: StatePath = World.GetInfo(60) & "state\" & World.GetPluginName & "\" & "jewelry\"
--> This one tosses in C:\...\jewelry\ directory
And this works: StatePath = World.GetInfo(60) & "state\" & World.GetPluginName & "\" & World.GetVariable("EQ_Type")
--> This one adds var EQ_Type to txt name
But this does not: StatePath = World.GetInfo(60) & "state\" & World.GetPluginName & "\" & World.GetVariable("EQ_Type") & "\"
--> This one SHOULD toss in C:\...\jewelry\ directory if EQ_Type = jewelry
I would really prefer to use a capture mode instead of the triggered method. What I mean is the user types idspell, this is aliases to run idStart and c ident *. idStart activates capture mode to get all the output from c ident * or it could capture all until idStop was run. Not sure how exactly I'd like to do it. For the affects I was wondering if there was any way for a multiline capture possibly. (ie, capture all information inside *-*-* lines)
Thanks in advance. I am brand spankin-new to VBscript but I have programmed in a variety of languages. The code overwrites var Affects that the trigger captures the value of Affects: into and the result is the code tells me I have only one Affect instead of x as I really do.
Currently, I can take the data and create the <eq_name>.txt file with all of it except the things that repeat. Here is an example of the data the triggers use.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Name : A circlet of ivy
Object: circlet ivy febriwyn
Level : 53
Type : armor Weight: 2
Flags : glow magic bless antievil antineutral burnproof
Value : 0 gold, 0 silver
Armor class: 9 pierce
9 bash
9 slash
4 vs. magic.
Affects: damroll by 5.
Affects: hitroll by 5.
Affects: wisdom by 1.
Affects: constitution by 1.
Affects: intelligence by 1.
Affects: ac by -4.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Now, I can get everything to work right except the affects, so I have set a seperate function to write each one as they are triggered then let the next one do the same. That, of course, requires they append to <eq_name>.txt instead of rewriting it.
Two side things. First, could someone tell me why this works: StatePath = World.GetInfo(60) & "state\" & World.GetPluginName & "\" & "jewelry\"
--> This one tosses in C:\...\jewelry\ directory
And this works: StatePath = World.GetInfo(60) & "state\" & World.GetPluginName & "\" & World.GetVariable("EQ_Type")
--> This one adds var EQ_Type to txt name
But this does not: StatePath = World.GetInfo(60) & "state\" & World.GetPluginName & "\" & World.GetVariable("EQ_Type") & "\"
--> This one SHOULD toss in C:\...\jewelry\ directory if EQ_Type = jewelry
I would really prefer to use a capture mode instead of the triggered method. What I mean is the user types idspell, this is aliases to run idStart and c ident *. idStart activates capture mode to get all the output from c ident * or it could capture all until idStop was run. Not sure how exactly I'd like to do it. For the affects I was wondering if there was any way for a multiline capture possibly. (ie, capture all information inside *-*-* lines)
Thanks in advance. I am brand spankin-new to VBscript but I have programmed in a variety of languages. The code overwrites var Affects that the trigger captures the value of Affects: into and the result is the code tells me I have only one Affect instead of x as I really do.