eqemu servertransfer macros

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

Moderator: MacroQuest Developers

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

eqemu servertransfer macros

Post by toolisuber » Wed Jul 08, 2015 5:32 am

hi, these are my server transfer macros, ~
eqemu servertransfer macros ----for copying chars off someones server onto ur own server
dont forget to read the entire posts

AUTOLOGIN is prolly dangerous with this many chars running btw
if you forget to turn ur clip planes down or something it could end in disaster
im gonna try to do this stuff and an offline server for u guys - still learning c++
im about half way thru fixing all the unnecessary extra garbage in emu code

also included is titanium/underfoot MQ2.zip locations,plugins,compile guide
-----------------------------------------------------------------
|
|watch out I left my eqemu server on for a week and monk was at 2gigsram
|usage with wood elf illusion clicky on?
|
|please be careful shady people may lurk the emulators... not certain on the
|decency of any random pieces of server code or anything like that...
|there is instructions on building ur own server but you would prolly want
|to fix the glitches and that takes like c++ not sure on current status of the
|source code, but last had checked allbuffs in makebuffspacket had to be
| rewritten and spell_effects buffprocess rerouted through multiple c++files
|
|building your own server is probably a better alternative than using prepackaged servers or stuff like that
|
some COMPANY CORPORATION that is SURE OF THEMSELVES AND NETWORKS OF HARDCODED TECH should make a REALLY legit server and have
a legally binding contract that items and plat are not being duped and no hacking will take place ....
CLIENT SIDE HARDEDCODED COMPUTERS ALSO
|
skills are not supported with mq2 or whatever (tradeskills are important)
laa points are not supported
flags are not supported (this might be on my end of things)
cant figure out how to get #setxp to work yet

these are good to learn from or whatever, a lot of servers going bad

prolly wouldn't recommend using this on p1999 without changing it a little
maybey different words to initiate the macro that server is very strict
too strict

these macros use guildspeech to operate usually - this can be changed
these macros use gm commands to summon items

sharedbankstart.mac
inventory.mac
char.mac
augments.mac
edit:sharedbank.mac
edit:skillstart.mac(has stringgen or w/e there is a manual on latter posts)
edit:skills.mac (important notes about eqemu glitches - ur skills wont work properly if you don't read like 1hb would be 2hb)

these servertransfer macros do not require plugins or spell_routines.inc
my macros are not safe for live



MQ2 for Titanium ---- Macroquest for Titanium ---- MQ2 titanium
------------------------------------------------------------------------------------------------
titanium is faster and better and less hdd space than underfoot
>>>>
>>dont really want to talk about project1999 but can definitely say this
>>from my personal experience
>>trains are not allowed at all even viewing a train you will be almost banned
>>and from heresay that raid mobs are delegated not ffa
>>and not so sure about the general population
>>and they ban plat sellers almost immediately wont go further
>>but ---- I would definitely say that mq is probably monitored and detected
>>
>>my goal is with personal use offline server... not project1999
>>
>>would not ever try to compile and run MQ on your valued p1999 char
>>I would never even try to run mq2 from a diff ip and diff char, and test if it gets caught and then start using MQ2 on ur character
>>they are smart enough maybey not to ban you till you have something that
>>is worth value
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

MQ2 version for titanium is MQ2-20051101 its hidden in the wiki
http://www.macroquest2.com/downloads/zips.php

--------------------------------------------------------------------
Macroquest plugins for titanium ---- titanium plugins
--------------------------------------------------------------------
mq2moveutils and mq2twist from vip, donating to mq is good

mq2Twist - Mon Sep 26, 2005 vip plugin development pg16 of post -copy paste without changing works~ ????maybey sept30th works too ????
mq2MoveUtils - june26 2005 MQ2MoveUtils Version 20060424 post page 1 ---- apply fix before compiling

--------------------------------------------------------------------
spell_routines for titanium ---- spell routines for titanium ---- spellroutines for titanium
--------------------------------------------------------------------
spell_routines-Last Modified 11/07/2004-general macro snippets-UNTESTED
my spell_routines might work UNTESTED but fasterandbetter w/alot chars
my spell_routines is in other posts for eqemu macros viewforum.php?f=43
spell_routines is a .inc file not a plugin, .inc files go in ur release/macros folder

--------------------------------------------------------------------
compile titanium macroquest with visual studio 2010 express -- titanium compile
--------------------------------------------------------------------
first we would set mq2main as startup project
with mq2main highlighted, we would follow the -->commented stuff below
--> before trying to compile titanium <--visual studio 2010 express is good
--> you must fix the naked functions unwinding error
-->
-->you have to click mq2main -make sure it is highlighted
-->
-->and then select properties from the pull down menu towards the top of the screen
-->
-->then you have to click configuration properties, c/c++, Code Generation
-->
-->enable c++ exceptions should say something like - yes (/ehsc) -- click the little arrow to the right and change to Nothen we would right click menu and select build
then we would click the macroquest solution
then we would add our plugins MQ2Twist and MQ2MoveUtils
---->MQ2MoveUtils for titanium has an error
---->the line if(strncmp(pEverQuest->GetClassDesc(GetCharInfo()->Class),"Bard",5))
---->has to be changed GetCharInfo2()

Code: Select all

bool IsBardClass()
{
   if(strncmp(pEverQuest->GetClassDesc(GetCharInfo2()->Class),"Bard",5))
      return false;
   else
      return true;
}
---->there is an unnecessary bigger explanation below
---->we can now compile, without this fix it would fail and we would have to redo the whole thing prolly
then we would click the macroquest solution
then we would right click menu and select batch build
then we would select all the stuff we want, some ppl don't use map plugin
then we would click build on that screen, the batch build screen
ur macroquest files and the macros folder we put macros in, are now in the release folder
we can create shortcuts from inside the release folder and put them on desktop
--------------------------------------------------------------------

mq2MoveUtils - june26 2005 MQ2MoveUtils Version 20060424 post page 1 ---- apply following fix before compiling

moveutils will fail getcharinfo() does not fetch class properly
moveutils will fail to compile and you will prolly have to restart over again with mq and moveutils and twist

it has to be changed to getcharinfo2()
this is the original
------------------------------------------------------------------------

Code: Select all

bool IsBardClass()
{
   if(strncmp(pEverQuest->GetClassDesc(GetCharInfo()->Class),"Bard",5))
      return false;
   else
      return true;
}
this is what you change it to

Code: Select all

bool IsBardClass()
{
   if(strncmp(pEverQuest->GetClassDesc(GetCharInfo2()->Class),"Bard",5))
      return false;
   else
      return true;
}
------------------------------------------------------------------------------------------------



MQ2 for Underfoot ---- Macroquest for Underfoot
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mq2-20100609 is mq build for underfoot client, its in the wiki - hidden -
http://www.macroquest2.com/downloads/zips.php

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Macroquest plugins for Underfoot ---- underfoot plugins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mq2moveutils and mq2twist from vip, donating to mq is good

moveutils for UF I think is june2011 vip plugins development post page 32
moveutils seems to have changed recently mine is 339,968 bytes
moveutils currently has no spaces and is 249,896 bytes

mq2twist for UF I think is 09/22/09+ vip plugins development
mq2twist is pg26 ofpost,it is the post by htw not first posting
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spell_routines for underfoot ---- spell routines for underfoot ----spellroutines for underfoot
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
spellroutines might work not sure that's hidden in macro snippets
spell_routines for uf I think is 7/05/09 macro snippets- but ill put my own

included my spellroutines in my other posts - its way better for running a lot
viewforum.php?f=43

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compile underfoot with visual studio 2010 express---- underfoot compile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

you can compile underfoot same as titanium above,just that noneof the --> steps are necessary
haven't tried compiling the current version of moveutils for uf yet to re-test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



eqemu servertransfer macros ----for copying chars off someones server onto ur own server
dont forget to read the entire posts
-----------------------------------------------------------------
hi, these are my server transfer macros, ~
|
|watch out I left my eqemu server on for a week and monk was at 2gigsram
|usage with wood elf illusion clicky on?
|
|please be careful shady people may lurk the emulators... not certain on the
|decency of any random pieces of server code or anything like that...
|there is instructions on building ur own server but you would prolly want
|to fix the glitches and that takes like c++ not sure on current status of the
|source code, but last had checked allbuffs in makebuffspacket had to be
| rewritten and spell_effects buffprocess rerouted through multiple c++files
|
|building your own server is probably a better alternative than using prepackaged servers or stuff like that
|
skills are not supported with mq2 or whatever (tradeskills are important)
laa points are not supported
flags are not supported (this might be on my end of things)
cant figure out how to get #setxp to work yet

these are good to learn from or whatever, a lot of servers going bad

prolly wouldn't recommend using this on p1999 without changing it a little
maybey different words to initiate the macro that server is very strict
too strict

these macros use guildspeech to operate usually - this can be changed
these macros use gm commands to summon items

sharedbankstart.mac
inventory.mac
char.mac
augments.mac
edit:sharedbank.mac
edit:skillstart.mac(has stringgen or w/e there is a manual on latter posts)
edit:skills.mac (important notes about eqemu glitches - ur skills wont work properly if you don't read like 1hb would be 2hb)

these servertransfer macros do not require plugins or spell_routines.inc
my macros are not safe for live

-----------------------------------------------------------------
sharedbankstart.mac
------------------------
|this macro makes a pretty ini template for recording 30 chars shared
|banks into a file.... replace name1 thru name30 with characters names....
|shared bank clicking doesn't work with mq2 unmodded I don't think...

Code: Select all

#turbo 40

Sub Main
/echo Shared Bank - .Ini TemplateMaker
:startloop
/delay 2
/call writeini
/echo Finished --> Ending...
/end

Sub writeini

/declare i int local
/declare j int local
/declare variable string local
/declare names string local name1,name2,name3,name4,name5,name6,name7,name8,name9,name10,name11,name12,name13,name14,name15,name16,name17,name18,name19,name20,name21,name22,name23,name24,name25,name26,name27,name28,name29,name30
/for i 1 to 30
/varset variable ${names.Arg[${i},,]}
    /ini "-sharedbanks" "${variable}" "InvSlot2500" "empty"
    /ini "-sharedbanks" "${variable}" "InvSlot2501" "empty"
    /for j 1 to 10
        /ini "-sharedbanks" "${variable}" "InvSlot0,Slot${j}" "empty"
    /next j
    /varset j 0
    /for j 1 to 10
        /ini "-sharedbanks" "${variable}" "InvSlot1,Slot${j}" "empty"
    /next j
    /varset j 0
/next i
/varset i 0
/return
Last edited by toolisuber on Mon Dec 14, 2015 7:38 pm, edited 78 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Wed Jul 08, 2015 5:36 am

inventory.mac
----------------
|this macro inventories all your characters items into charname-inv.ini
|it makes a separate ini for each character
|within the ini bank slots writes sloppy and im lazy
|this also inventories plat, level, aapoints, augs- this is all used in char.mac
|it also records sharedbanks to ini file created with the ini template maker
|in the post above
|
|prolly wouldn't recommend using this on p1999 without changing it a little
|maybey different words to initiate the macro that server is very strict
|too strict
|
|if ur worried about being detected with like any macros ---------------------
|
|im very tired this should all work and make sense
|
|you would change the words to initiate the macro at the top where it says
|inv and at the bottom at the sub event_inventory part should be fine
|id suggest / as if you were doing a /who or possibly a or /a like a typo or
|something, just the inventory part that inventories your items is maybey
|risky to type inv... inventory works too as is
|- that's what the #*# means you can even type invabcd or w/e it readsthe
|inv part....
|so put~

#Event inventory "#*#say, '/#*#'"

|should make it so you can type / near a banker and ull be good
|if ur worried about p1999 or something with the uh gms and macros
|
|you can prolly make a banker check too and call the banker check before
|each keypress that is automated... you might want to add a
|/delay ${Math.Rand[3]}s or something after the banker check
|so you don't have so easily identifiable automated keypresses
|that /delay math.rand 3 will do anywhere from 1s to 3s delay make sure
|the s is there that means seconds not milliseconds
|
|in our example of a hopefully perfectly working piece of code
|we will be using the milliseconds
|
|it is very easy to put a piece of code that determines keypresses happening
|every set increment of time like every 1.2 seconds repeatedly orsomething
|
|you could also do like a ${Math.Calc[${Math.Rand[20]} + 10]} that will
|do random 1 to 20 milliseconds + 10 milliseconds so you will get like
|anywhere from 1.1second delay to 3 second delay before an automated
|keypress
|
|this is an example of a banker check

Code: Select all

/delay ${Math.Calc[${Math.Rand[20]} + 10]}
:findbankerloop
/if (${NearestSpawn[1, radius 10 npc Dogle].Name.Find[Dogle]} || ${NearestSpawn[1, radius 10 npc Denton].Name.Find[Denton]}) {
    /if (${NearestSpawn[1, radius 10 npc Dogle].Name.Find[Dogle]}) {
       /if (${banker.Find[dogle]}) /goto findbankerend
    }
    /if (${NearestSpawn[1, radius 10 npc Denton].Name.Find[Denton]}) {
        /if (${banker.Find[denton]}) /goto findbankerend
    }
/echo banker has disappeared you got summoned or trixy thigns happned
/end
}
/delay 2
/goto :findbankerloop
:findbankerend
/echo found banker 
|
|you would also want to find and remove the line
|
| /guildsay NOT IN RANGE OF ${banker} RERUN INV MACRO
|
|if you are guilded and pok does not exist or something like u aren't there
|
|to be very safe !
|
|you would want the banker check within the forloop, so the banker check
| and the delay happens for each item
| you would want the banker check with random delay -
| after the for i statement and before the for j statement
| in the following 2 parts
|
| /echo --> Finding stuff in bank! <--
| /echo _-_-Finding shared bank items-_-_
|
| you prolly don't wanna try to be automated clicking sharedbank slots
|on a server where sharedbank does not exist
|
|you would want to remove that part if sharedbank does not exist on ur
|server and you are afraid of gms
|
|you would delete from
| /echo _-_-Finding shared bank items-_-_
| to not the very next /varset j 0
| but the 2nd, /varset j 0
| in that area of the macro
|
|you would leave the squiggly the squiggly is very important
|its the squiggly that is lined up with the / of the /varset
|that squiggly lets the macro figure out its done with the item inventorying
|
|-----------------------------------------------------------------------------------
|
|
|
|
|*****
|****a very important change happened to this macro, it now adds ini
|****entries as InvSlot${I}-Slot{j} or w/e instead of
|**** InvSlot${I},Slot${j} because the ini was reading the , as a 4rth
|**** comma and it was not working, you can manually update ur
|**** -sharedbanks.ini by using find Slot0, and replaceallbutton with Slot0-
|**** and then find Slot1, and replace all button with Slot1-
|****sorry
|****
|*****
|edit:to prevent confusion, was fixed like 1 day later, that was a while ago

Code: Select all

#turbo 40

#chat tell
#chat group
#chat guild

#Event inventory "#*#guild, 'inv#*#'"
#Event inventory "#*#say, 'inv#*#'"

Sub Main

/declare doinv                    int outer 0

/echo inventory macro started

:inventoryloop
/if (${doinv} == 1) /call invcheck
/delay 1s
/doevents
/goto :inventoryloop


Sub invcheck

/declare i int local 
/declare j int local

/echo -- Finding armor and Weapons --
/for i 0 to 22
    /delay 2
    /echo ${InvSlot[${i}].Item.Name} writing to file
    /ini "${Me.Name}-inv" "armorandweapons" "InvSlot${i}" "${InvSlot[${i}].Item.ID},${InvSlot[${i}].Item.Name}"
    /if (${InvSlot[${i}].Item.Item[1].ID} > 0) {
        /echo //// ITEM AUG FOUND slot1---- Writing to file \\\\
        /echo \\\\ ITEM AUG ---- ${InvSlot[${i}].Item.Item[1].Name}            
        /ini "${Me.Name}-inv" "armorandweaponsaugs1" "InvSlot${i}" "${InvSlot[${i}].Item.Item[1].ID},${InvSlot[${i}].Item.Item[1].Name}"
    }
    /if (${InvSlot[${i}].Item.Item[2].ID} > 0) {
        /echo //// ITEM AUG FOUND slot2---- Writing to file \\\\
        /echo \\\\ ITEM AUG ---- ${InvSlot[${i}].Item.Item[2].Name}
        /ini "${Me.Name}-inv" "armorandweaponsaugs2" "InvSlot${i}" "${InvSlot[${i}].Item.Item[1].ID},${InvSlot[${i}].Item.Item[1].Name}"
    }    
/next i
/varset i 0
/echo -- Finding inventory slots --
/for i 0 to 7
    /delay 2
    /echo ${InvSlot[${Math.Calc[${i} + 23]}].Item.Name} writing to file
    /if (${InvSlot[${Math.Calc[${i} + 23]}].Item.Stack} > 1) {
        /ini "${Me.Name}-inv" "invslots" "InvSlot${Math.Calc[${i} + 23].Int}" "${InvSlot[${Math.Calc[${i} + 23]}].Item.ID},${InvSlot[${Math.Calc[${i} + 23]}].Item.Name},${InvSlot[${Math.Calc[${i} + 23]}].Item.Stack}"
    }
    /if (${InvSlot[${Math.Calc[${i} + 23]}].Item.Stack} < 2) {
        /ini "${Me.Name}-inv" "invslots" "InvSlot${Math.Calc[${i} + 23].Int}" "${InvSlot[${Math.Calc[${i} + 23]}].Item.ID},${InvSlot[${Math.Calc[${i} + 23]}].Item.Name}"
    }
/next i
/varset i 0
/echo -- Finding stuff in bags! --
/for i 0 to 7
    /for j 1 to 10
    /delay 2
    /if (${InvSlot[${Math.Calc[${i} + 23]}].Item.Container} > 0) {
        /echo ${InvSlot[${Math.Calc[${i} + 23]}].Item.Name} is a container writing item ${j} to file
        /echo ==== ${InvSlot[${Math.Calc[${i} + 23]}].Item.Item[${j}].Name} ====
        /if (${InvSlot[${Math.Calc[${i} + 23]}].Item.Item[${j}].Stack} > 1) {
            /ini "${Me.Name}-inv" "Pack${i}" "InvSlot${j}" "${InvSlot[${Math.Calc[${i} + 23]}].Item.Item[${j}].ID},${InvSlot[${Math.Calc[${i} + 23]}].Item.Item[${j}].Name},${InvSlot[${Math.Calc[${i} + 23]}].Item.Item[${j}].Stack}"
        }
        /if (${InvSlot[${Math.Calc[${i} + 23]}].Item.Item[${j}].Stack} < 2) {
            /ini "${Me.Name}-inv" "Pack${i}" "InvSlot${j}" "${InvSlot[${Math.Calc[${i} + 23]}].Item.Item[${j}].ID},${InvSlot[${Math.Calc[${i} + 23]}].Item.Item[${j}].Name}"
        }
    /next j        
    }
/varset j 0
/next i
/varset i 0
/varset j 0
/if (${NearestSpawn[1, radius 20 npc Dogle].Name.Find[Dogle]} || ${NearestSpawn[1, radius 20 npc Denton].Name.Find[Denton]}) {
    /if (${NearestSpawn[1, radius 20 npc Dogle].Name.Find[Dogle]}) {
        /declare banker string outer dogle
    }
    /if (${NearestSpawn[1, radius 20 npc Denton].Name.Find[Denton]}) {
        /declare banker string outer denton
    }
    /echo Targetting and Using ${banker}
    /target npc ${banker}
    /delay 2
    /face fast npc ${banker}
    /delay 2
    /nomodkey /keypress u
    /echo --> Finding stuff in bank slots! <--
    /for i 0 to 23
        /delay 2
        /echo ${InvSlot[${Math.Calc[${i} + 2000]}].Item.Name} - writing slot to file
        /if (${InvSlot[${Math.Calc[${i} + 2000]}].Item.Stack} > 1) {
            /ini "${Me.Name}-inv" "BankSlot${Math.Calc[${i} + 0].Int}" "InvSlot${Math.Calc[${i} + 2000].Int}" "${InvSlot[${Math.Calc[${i} + 2000].Int}].Item.ID},${InvSlot[${Math.Calc[${i} + 2000]}].Item.Name},${InvSlot[${Math.Calc[${i} + 2000]}].Item.Stack}"    
        }
        /if (${InvSlot[${Math.Calc[${i} + 2000]}].Item.Stack} < 2) {
            /ini "${Me.Name}-inv" "BankSlot${Math.Calc[${i} + 0].Int}" "InvSlot${Math.Calc[${i} + 2000].Int}" "${InvSlot[${Math.Calc[${i} + 2000].Int}].Item.ID},${InvSlot[${Math.Calc[${i} + 2000]}].Item.Name}"
        }
    /next i
    /varset i 0
    /varset j 0
    /echo --> Finding stuff in bank! <--
    /for i 0 to 23
    /for j 1 to 10
    /delay 2    
    /if (${InvSlot[${Math.Calc[${i} + 2000]}].Item.Container} > 0) {
        /echo ${InvSlot[${Math.Calc[${i} + 2000]}].Item.Name} is a container writing contents of item ${j} to file
        /echo >>>> ${InvSlot[${Math.Calc[${i} + 2000]}].Item.Item[${j}].Name} <<<<
        /if (${InvSlot[${Math.Calc[${i} + 2000]}].Item.Item[${j}].Stack} > 1) {
            /ini "${Me.Name}-inv" "Bank${Math.Calc[${i} + 0].Int}" "InvSlot${j}" "${InvSlot[${Math.Calc[${i} + 2000].Int}].Item.Item[${j}].ID},${InvSlot[${Math.Calc[${i} + 2000]}].Item.Item[${j}].Name},${InvSlot[${Math.Calc[${i} + 2000]}].Item.Item[${j}].Stack}"
        }
        /if (${InvSlot[${Math.Calc[${i} + 2000]}].Item.Item[${j}].Stack} < 2) {
        /ini "${Me.Name}-inv" "Bank${Math.Calc[${i} + 0].Int}" "InvSlot${j}" "${InvSlot[${Math.Calc[${i} + 2000]}].Item.Item[${j}].ID},${InvSlot[${Math.Calc[${i} + 2000]}].Item.Item[${j}].Name}"
        }
    /next j        
    }
    /varset j 0
    /next i
    /varset i 0
    /varset j 0
    /echo _-_-Finding shared bank items-_-_
    /for i 0 to 1
    /for j 1 to 10
    /delay 2
    /if (${InvSlot[${Math.Calc[${i} + 2500]}].Item.Container} > 0) {
        /echo ${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name} is a container --writing to file
        /echo >>>> ${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name} <<<<
        /ini "${Me.Name}-inv" "aSharedBank${i}" "InvSlot${Math.Calc[${i} + 2500]}" "${InvSlot[${Math.Calc[${i} + 2500]}].Item.ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name}"
        /ini "-sharedbanks" "${Me.Name}" "InvSlot${Math.Calc[${i} + 2500].Int}" "${InvSlot[${Math.Calc[${i} + 2500].Int}].Item.ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name}"      
        /echo ${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name} is a container writing item ${j} to file
        /echo >>>> ${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Name} <<<<
        /if (${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Stack} > 1) {
            /ini "${Me.Name}-inv" "aSharedBank${i}" "InvSlot${j}" "${InvSlot[${Math.Calc[${i} + 2500].Int}].Item.Item[${j}].ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Name},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Stack}"
            /ini "-sharedbanks" "${Me.Name}" "InvSlot${i}-Slot${j}" "${InvSlot[${Math.Calc[${i} + 2500].Int}].Item.Item[${j}].ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Name},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Stack}"
        }
        /if (${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Stack} < 2) {
            /ini "${Me.Name}-inv" "aSharedBank${i}" "InvSlot${j}" "${InvSlot[${Math.Calc[${i} + 2500].Int}].Item.Item[${j}].ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Name}"
            /ini "-sharedbanks" "${Me.Name}" "InvSlot${i}-Slot${j}" "${InvSlot[${Math.Calc[${i} + 2500].Int}].Item.Item[${j}].ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Item[${j}].Name}"
        }
    /next j        
    }
    /if (${InvSlot[${Math.Calc[${i} + 2500]}].Item.Container} == 0) {
        /echo >>>> ${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name} <<<< writing to file
        /if (${InvSlot[${Math.Calc[${i} + 2500]}].Item.Stack} > 1) {
            /ini "${Me.Name}-inv" "aSharedBank${i}" "InvSlot${Math.Calc[${i} + 2500]}" "${InvSlot[${Math.Calc[${i} + 2500]}].Item.ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Stack}"
            /ini "-sharedbanks" "${Me.Name}" "InvSlot${Math.Calc[${i} + 2500].Int}" "${InvSlot[${Math.Calc[${i} + 2500].Int}].Item.ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Stack}"
        }
        /if (${InvSlot[${Math.Calc[${i} + 2500]}].Item.Stack} < 2) {
            /ini "${Me.Name}-inv" "aSharedBank${i}" "InvSlot${Math.Calc[${i} + 2500]}" "${InvSlot[${Math.Calc[${i} + 2500]}].Item.ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name}"
            /ini "-sharedbanks" "${Me.Name}" "InvSlot${Math.Calc[${i} + 2500].Int}" "${InvSlot[${Math.Calc[${i} + 2500].Int}].Item.ID},${InvSlot[${Math.Calc[${i} + 2500]}].Item.Name}"
        }
    }
/varset j 0
/next i
/varset i 0
/varset j 0
}
/if (!${NearestSpawn[1, radius 20 npc Dogle Pitt].Name.Find[Dogle]} && !${NearestSpawn[1, radius 20 npc Denton].Name.Find[Denton]}) {
    /echo Not in range of dogle pitt banker or banker denton
    /echo rerun macro for bank items to be saved
    /guildsay NOT IN RANGE OF ${banker} RERUN INV MACRO
}
/echo Checking platinum on char
/echo ${Math.Calc[${Me.Platinum} + ${Me.PlatinumBank}].Int} plat total
/ini "${Me.Name}-inv" "TotalPlat" "TotalPlat" "${Math.Calc[${Me.Platinum} + ${Me.PlatinumBank}].Int}"
/echo Checking aa on char
/echo ${Me.AAPointsTotal} total number of aa
/ini "${Me.Name}-inv" "TotalAA" "TotalAA" "${Me.AAPointsTotal}"
/echo checking level on char
/ini "${Me.Name}-inv" "CharLevel" "CharLevel" "${Me.Level}"
/echo !!! ENDING inventory macro !!!
/end
/return

Sub Event_inventory

/varset doinv 1
/return
Last edited by toolisuber on Tue Aug 18, 2015 6:02 pm, edited 27 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Wed Jul 08, 2015 5:49 am

char.mac
-----------
|this macro uses gm commands to summon all ur items, w/ unmodded mq
|normally the gm commands aren't working so it makes a hotkey and takes
|care of the hotkeys
|
|edit: **you have to delete starting newbieitems and bags before running**
|
|edit2:also included is a char.mac that does only bank items get that copy paste action on
|
|its ok to have plugins
|with "legendary" items like Siren Song, Dagger of the Sea - the comma is
|getting in the way of the arg[3,,] reading so this is rerouted
|
|you would have to add the name of the item w/ (sirensong && youritem){
|/goto :nonstacksummon
|for ur legendary comma item to work or whatever its easy
|
|this macro also does aa, levels, bank slots, gear, invslots, spells, discs
|spells can be improved to perfection -this just does all spells and discs->65
|
|mq2 is not supporting sharedbankslots , skill level checking, ?flags?,aapts
|edit:mq2 sharedbankslots is hidden!
|edit:slot 2500 is slot 1 of shared bank , slot 2501 is slot 2 of shared bank

|edit: bag slot 1 (2500) slot 1 is 2532, slot 10 is 2541
|edit: bag slot 2 (2501) slot 1 is 2542, slot 10 is 2551

|edit: 2532 -> 2541
|edit: and
|edit: 2542 -> 2551

|edit:this macro still does not support sharedbanks,
|edit:there is the summon version somewhere in this post, that uses ini file
|the sharedbank macro lets you summon items by name from ur ini file
|and deletes the ini entry afterwards if things went smoothly
|the ini file is made from like the first post or whatever that one is in
|
|edit2:somehow my aa disappeared, giveaa does aa only, but main function
|edit2:does everything for you, giveaa is just if you mysteriously lose ur aa
|
|this is char.mac
|enjoy!

Code: Select all

#turbo 40

#chat tell
#chat group
#chat guild

#Event summonandequip "#*#guild, 'summonandequip'"
#Event summonandequip "#*#say, 'summonandequip'"
#Event giveaa "#*#say, 'giveaa'"

Sub Main

/declare randomstring           string outer thisisaglitch
/declare doequip                int outer 0
/declare giveaa                 int outer 0

/echo summon and equip macro started
/echo >> REMOVE FIRST HOT BUTTON <<
/echo clearing hotbutton1
/nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
/delay 4
/keypress esc

:summonandequip
/delay 2
/if (${doequip} == 1) /call Start
/doevents
/goto :summonandequip

Sub Start
/declare i int local
/declare j int local
/if (${giveaa} == 1) /goto :aasection
/if (${Ini[${Me.Name}-inv,CharLevel,CharLevel]} > 1) {
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /ho setlevel #level ${Ini[${Me.Name}-inv,CharLevel,CharLevel]}
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /echo ? setexp this doesnt work properly ?
    /ho setlevelexp #setexp 200
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /delay 1s
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /if (${Me.Class.Name.Find[Warrior]} || ${Me.Class.Name.Find[Bard]} || ${Me.Class.Name.Find[Monk]} || ${Me.Class.Name.Find[Ranger]} || ${Me.Class.Name.Find[Rogue]} || ${Me.Class.Name.Find[Beastlord]}) {
        /echo setting dual wield
        /ho setdualwield #setskill 22 100
        /notify HotButtonWnd HB_Button1 leftmouseup
        /delay 1s
        /notify HotButtonWnd HB_Button1 leftmouseup
        /delay 1s
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
    }
}
/if (${NearestSpawn[1, radius 20 npc Dogle].Name.Find[Dogle]} || ${NearestSpawn[1, radius 20 npc denton].Name.Find[denton]}) {
    /if (${NearestSpawn[1, radius 20 npc Dogle].Name.Find[Dogle]}) {
        /declare banker string outer dogle
    }
    /if (${NearestSpawn[1, radius 20 npc denton].Name.Find[denton]}) {
        /declare banker string outer denton
    }
      /echo Targetting and Using ${banker}
      /target npc ${banker}
      /delay 2
      /face fast npc ${banker}
||    /nomodkey /keypress u
||    /echo doing shared bank items
||    /for i 0 to 1
||    /for j 1 to 10
||    /if (${Ini[${Me.Name}-inv,aSharedBank${i},InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
||        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
||        /delay 2
||        /keypress esc
||        /face fast npc ${banker}
||        /delay 2
||        /nomodkey /keypress u
||        /call HandleItem ${Ini[${Me.Name}-inv,aSharedBank${i},InvSlot${j}].Arg[1,,]} InvSlot${j}
||    }
||    /next j
||    /varset j 0
||    /next i
||    /varset i 0
    /echo EQUIPMENT SLOTS <<<<<<<<<<<<<<<
    /for i 0 to 22
    /if (${Ini[${Me.Name}-inv,armorandweapons,InvSlot${i}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /squelch /face fast npc ${banker}
        /nomodkey /keypress u
        /call HandleItem ${Ini[${Me.Name}-inv,armorandweapons,InvSlot${i}].Arg[1,,]} armorandweapons ${i}
    }
    /next i
    /varset i 0
    /varset j 0
    /echo INVENTORY SLOTS <<<<<<<<<<<<<<<
    /for i 0 to 7
    /varset j ${Math.Calc[${i} + 23]}
    /if (${Ini[${Me.Name}-inv,invslots,InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /squelch /face fast npc ${banker}
        /nomodkey /keypress u
        /call HandleItem ${Ini[${Me.Name}-inv,invslots,InvSlot${j}].Arg[1,,]} invslots ${j}
    }
    /next i
    /varset i 0
    /varset j 0
    /echo BANK SLOTS <<<<<<<<<<<<<<<
    /for i 0 to 23
    /varset j ${Math.Calc[${i} + 2000]}
    /if (${Ini[${Me.Name}-inv,BankSlot${i},InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /squelch /face fast npc ${banker}
        /nomodkey /keypress u
        /call HandleItem ${Ini[${Me.Name}-inv,BankSlot${i},InvSlot${j}].Arg[1,,]} AAABankSlot${i} ${j}
    }
    /next i
    /varset i 0
    /varset j 0
    /echo BANK ITEMS <<<<<<<<<<<<<<<    
    /for i 0 to 23
    /for j 1 to 10
    /if (${Ini[${Me.Name}-inv,Bank${i},InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /squelch /face npc ${banker}
        /delay 2
        /nomodkey /keypress u
        /call HandleItem ${Ini[${Me.Name}-inv,Bank${i},InvSlot${j}].Arg[1,,]} Bank${i} ${j}
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /varset j 0 
    /echo INV SLOT BAGS <<<<<<<<<<<<<<<    
    /for i 0 to 7
    /for j 1 to 10
    /if (${Ini[${Me.Name}-inv,Pack${i},InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /squelch /face npc ${banker}
        /delay 2
        /nomodkey /keypress u
        /call HandleItem ${Ini[${Me.Name}-inv,Pack${i},InvSlot${j}].Arg[1,,]} Pack${i} ${j}
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /varset j 0       
}
/if (!${NearestSpawn[1, radius 20 npc Dogle Pitt].Name.Find[Dogle]} && !${NearestSpawn[1, radius 20 npc denton].Name.Find[denton]}) {
    /echo Not in range of ${banker} 
    /echo rerun macro correctly for items
    /guildsay NOT IN RANGE OF ${banker} RERUN SUMMON MACRO
}
/keypress esc
/keypress esc
/delay 1s
/if (${Ini[${Me.Name}-inv,TotalPlat,TotalPlat]} > 0) {
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /ho givemoney #givemoney ${Ini[${Me.Name}-inv,TotalPlat,TotalPlat]}
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
}
/if (!${Me.Class.Name.Find[Warrior]} && !${Me.Class.Name.Find[Monk]} && !${Me.Class.Name.Find[Rogue]} && !${Me.Class.Name.Find[Berserker]}) {
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /ho scribespells #scribespells 65 1
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 6s
}
/if (!${Me.Class.HealerType} && !${Me.Class.PureCaster}) {
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /ho traindisc #traindisc 65 1
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 2s
}
:aasection
/if (${Ini[${Me.Name}-inv,TotalAA,TotalAA]} > 0) {
    /declare aatotal         float local ${Ini[${Me.Name}-inv,TotalAA,TotalAA]}
    /declare aaremaining     float local 1.00
    /declare oddnumber       int local 0
    /declare count           float local 0

    /if (${Math.Calc[${aatotal} / 20]} > ${aaremaining}) {
        /if (${Math.Calc[${aatotal} / 20]} > ${Math.Calc[${aatotal} / 20].Int}) {
            /varset oddnumber ${Math.Calc[(${Math.Calc[${aatotal} / 20]} - ${Math.Calc[${aatotal} / 20].Int}) * 20]}
        }
    }
    /if (${Math.Calc[${aatotal} / 20]} > 1) /varset count ${Math.Calc[${aatotal} / 20].Int}
    /if (${Math.Calc[${aatotal} / 20]} < 1) {
        /varset count 1
        /declare under200 int local ${Math.Calc[(${aatotal} / 20) * 20]}
    }
    :giveaaloop
    /echo --Giving AA -- ${Math.Calc[(${count} * 20) + ${oddnumber}].Int} aa, giving ${Math.Calc[${count} + 1].Int} times!
    /declare var int local
    /for var 1 to ${count}
    /if (${count} > 1) {
        /if (!${Defined[under200]}) /declare under200 int local 20
        /varset under200 20
    }
    /if (${count} == 1) {
        /varset under200 ${oddnumber}
    }
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /echo Giving _-_-> ${under200} aa -||- ${Math.Calc[${var}].Int}th aa give <-_-_
    /ho giveaa #setaapoints aa ${under200}
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /next var
    /if (${count} > 1 && ${oddnumber} > 0) {
        /varset under200 ${oddnumber}
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /call getids "${Me.Name}"
        /target ID ${Macro.Return}
        /delay 4
        /echo Giving _-_-> ${under200} aa -||- ${Math.Calc[${count} + 1].Int}th aa give <-_-_
        /ho giveaa #setaapoints aa ${under200}
        /notify HotButtonWnd HB_Button1 leftmouseup
        /delay 1s
        /notify HotButtonWnd HB_Button1 leftmouseup
        /delay 1s
    }
}
/echo Finished --> Ending....
/end
/return

Sub HandleItem(TargetItem, ReplaceSlot, ReplaceSlotTwo)

||/if (${ReplaceSlot.Find[inv]}) /declare targetslot string local 100
/if (!${ReplaceSlot.Find[inv]}) /declare targetslot int local ${ReplaceSlot}
/if (!${Defined[TargetItem]}) {
    /echo target item not defined - returning
    /return
}
/if (!${Defined[ReplaceSlot]}) {
    /echo replace slot not defined - returning
    /return
}
/if (${Cursor.ID}) {
    /echo trying to handle items but stuff is on my cursor
    /guildsay trying to handle items but stuff is on my cursor
    /guildsay ERROR SUMMONING ITEMS ERROR SHIT IS ON MY CURSOR
    /return
}
:beforesummon
/declare tempvariable string local ${Ini[${Me.Name}-inv,${ReplaceSlot},InvSlot${ReplaceSlotTwo}].Arg[3,,]})
/if (${tempvariable.Find[Dagger of the Sea]} || ${tempvariable.Find[Mace of Night]} || ${tempvariable.Find[Sword of the Sky]}) {
    /goto :nonstacksummon
}
/if (${Ini[${Me.Name}-inv,${ReplaceSlot},InvSlot${ReplaceSlotTwo}].Arg[3,,]} > 1) {
    /ho summonitem #summonitem ${TargetItem} ${Ini[${Me.Name}-inv,${ReplaceSlot},InvSlot${ReplaceSlotTwo}].Arg[3,,]}
} else {
    :nonstacksummon
    /ho summonitem #summonitem ${TargetItem}
}
:aftersummon
/notify HotButtonWnd HB_Button1 leftmouseup
/delay 1s
/notify HotButtonWnd HB_Button1 leftmouseup
/delay 1s
/if (${Cursor.ID} == ${TargetItem}) {
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /delay 1s
    /if (${ReplaceSlot.Find[sharedbank]}) {
    /echo Summoned an item that goes into shared bank invslot 
        /varset ReplaceSlot ${ReplaceSlot.Right[-11]}
        /if (${ReplaceSlotTwo} > 2500) {
            /nomodkey /itemnotify ${InvSlot[${ReplaceSlotTwo}]} leftmouseup
            /delay 1s
            /goto :end
        }
        /if (${ReplaceSlotTwo} <= 10) {
            /nomodkey /itemnotify ${InvSlot[${ReplaceSlot}]} rightmouseup
            /delay 2
            /nomodkey /itemnotify in sharedbank${Math.Calc[${ReplaceSlot} - 2499]} ${ReplaceSlotTwo} leftmouseup
            /delay 2
            /nomodkey /itemnotify ${InvSlot[${ReplaceSlot}]} rightmouseup
            /delay 2
            /goto :end
        }
    }
    /if (${ReplaceSlot.Find[armorandweapons]}) {
        /echo Summoned equipment.... equipping
        /echo --> try not to get sacrificed, rezzed, or translocated or anything like that <--
        /nomodkey /itemnotify ${InvSlot[${ReplaceSlotTwo}]} leftmouseup
        /delay 1s
        /if (${Window[ConfirmationDialogBox].Open}) {
                /nomodkey /notify ConfirmationDialogBox CD_Yes_Button leftmouseup
                /delay 1s
                /if (!${Window[ConfirmationDialogBox].Open}) /echo ERROR ATTUNING?
                /goto :end
        }
    }
    /if (${ReplaceSlot.Find[AAABankSlot]}) {
        /varset ReplaceSlot ${ReplaceSlot.Right[-11]}
        /echo Summoning Bank Slot Items.... placing in bank
        /declare i int local
        /nomodkey /itemnotify bank${Math.Calc[${ReplaceSlot} + 1].Int} leftmouseup
        /delay 2
        /goto :end
    }
    /if (${ReplaceSlot.Find[Bank]}) {
        /varset ReplaceSlot ${ReplaceSlot.Right[-4]}
        /echo Summoning Bank Items.... placing in bank
        /declare i int local
        /nomodkey /itemnotify bank${Math.Calc[${ReplaceSlot} + 1].Int} rightmouseup
        /delay 2
        /nomodkey /itemnotify in bank${Math.Calc[${ReplaceSlot} + 1].Int} ${ReplaceSlotTwo} leftmouseup
        /delay 2
        /nomodkey /itemnotify bank${Math.Calc[${ReplaceSlot} + 1].Int} rightmouseup
        /delay 2
        /goto :end
    }
    /if (${ReplaceSlot.Find[invslots]}) {
        /echo Summoning Inventory slots....
        /nomodkey /itemnotify ${InvSlot[${ReplaceSlotTwo}]} leftmouseup
        /delay 2
        /goto :end 
    }       
    /if (${ReplaceSlot.Find[pack]}) {
        /varset ReplaceSlot ${ReplaceSlot.Right[-4]}
        /echo Summoning Inventory bag items.... placing in bags
        /declare i int local
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[${ReplaceSlot} + 23]}]} rightmouseup
        /delay 2
        /nomodkey /itemnotify in pack${Math.Calc[${ReplaceSlot} + 1].Int} ${ReplaceSlotTwo} leftmouseup
        /delay 2
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[${ReplaceSlot} + 23]}]} rightmouseup
        /delay 2
        /goto :end
    }
}
    :end        
/return

Sub getids(string name)

/declare SpawnID int local
/declare SpawnName string local
/declare i int local
/for i 1 to 4
/varset SpawnID ${NearestSpawn[${i}, pc ${name}].ID}
/varset SpawnName ${NearestSpawn[${i}, pc ${name}]}	
	/if (${NearestSpawn[${i}, pc ${name}].Name.Equal[${name}]}) /return ${SpawnID}
/next i
/return 0

Sub Event_summonandequip

/varset doequip 1
/return

Sub Event_giveaa
/varset giveaa 1
/varset doequip 1
/return
this version of char.mac only does bank items gogocopypaste
you could in theory copy paste items into chars banks and then run this one
it would leave inventories and items equipped and sharedbank intact
it would only add bank bags and items in bank bags to your bank
you guys might end up finding this useful, remove more stuff if u want

Code: Select all

#turbo 40

#chat tell
#chat group
#chat guild

#Event summonandequip "#*#guild, 'summonandequip'"
#Event summonandequip "#*#say, 'summonandequip'"
#Event giveaa "#*#say, 'giveaa'"

Sub Main

/declare randomstring           string outer thisisaglitch
/declare doequip                int outer 0
/declare giveaa                 int outer 0

/echo summon and equip macro started
/echo >> REMOVE FIRST HOT BUTTON <<
/echo clearing hotbutton1
/nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
/delay 4
/keypress esc

:summonandequip
/delay 2
/if (${doequip} == 1) /call Start
/doevents
/goto :summonandequip

Sub Start
/declare i int local
/declare j int local
/if (${giveaa} == 1) /goto :aasection
/if (${Ini[${Me.Name}-inv,CharLevel,CharLevel]} > 1) {
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /ho setlevel #level ${Ini[${Me.Name}-inv,CharLevel,CharLevel]}
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /echo ? setexp this doesnt work properly ?
    /ho setlevelexp #setexp 200
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /delay 1s
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /if (${Me.Class.Name.Find[Warrior]} || ${Me.Class.Name.Find[Bard]} || ${Me.Class.Name.Find[Monk]} || ${Me.Class.Name.Find[Ranger]} || ${Me.Class.Name.Find[Rogue]} || ${Me.Class.Name.Find[Beastlord]}) {
        /echo setting dual wield
        /ho setdualwield #setskill 22 100
        /notify HotButtonWnd HB_Button1 leftmouseup
        /delay 1s
        /notify HotButtonWnd HB_Button1 leftmouseup
        /delay 1s
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
    }
}
/if (${NearestSpawn[1, radius 20 npc Dogle].Name.Find[Dogle]} || ${NearestSpawn[1, radius 20 npc denton].Name.Find[denton]}) {
    /if (${NearestSpawn[1, radius 20 npc Dogle].Name.Find[Dogle]}) {
        /declare banker string outer dogle
    }
    /if (${NearestSpawn[1, radius 20 npc denton].Name.Find[denton]}) {
        /declare banker string outer denton
    }
      /echo Targetting and Using ${banker}
      /target npc ${banker}
      /delay 2
      /face fast npc ${banker}
||    /nomodkey /keypress u
||    /echo doing shared bank items
||    /for i 0 to 1
||    /for j 1 to 10
||    /if (${Ini[${Me.Name}-inv,aSharedBank${i},InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
||        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
||        /delay 2
||        /keypress esc
||        /face fast npc ${banker}
||        /delay 2
||        /nomodkey /keypress u
||        /call HandleItem ${Ini[${Me.Name}-inv,aSharedBank${i},InvSlot${j}].Arg[1,,]} InvSlot${j}
||    }
||    /next j
||    /varset j 0
||    /next i
||    /varset i 0
    /echo BANK SLOTS <<<<<<<<<<<<<<<
    /for i 0 to 23
    /varset j ${Math.Calc[${i} + 2000]}
    /if (${Ini[${Me.Name}-inv,BankSlot${i},InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /squelch /face fast npc ${banker}
        /nomodkey /keypress u
        /call HandleItem ${Ini[${Me.Name}-inv,BankSlot${i},InvSlot${j}].Arg[1,,]} AAABankSlot${i} ${j}
    }
    /next i
    /varset i 0
    /varset j 0
    /echo BANK ITEMS <<<<<<<<<<<<<<<    
    /for i 0 to 23
    /for j 1 to 10
    /if (${Ini[${Me.Name}-inv,Bank${i},InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /squelch /face npc ${banker}
        /delay 2
        /nomodkey /keypress u
        /call HandleItem ${Ini[${Me.Name}-inv,Bank${i},InvSlot${j}].Arg[1,,]} Bank${i} ${j}
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /varset j 0        
}
/if (!${NearestSpawn[1, radius 20 npc Dogle Pitt].Name.Find[Dogle]} && !${NearestSpawn[1, radius 20 npc denton].Name.Find[denton]}) {
    /echo Not in range of ${banker} 
    /echo rerun macro correctly for items
    /guildsay NOT IN RANGE OF ${banker} RERUN SUMMON MACRO
}
/keypress esc
/keypress esc
/delay 1s
/echo Finished --> Ending....
/end
/return

Sub HandleItem(TargetItem, ReplaceSlot, ReplaceSlotTwo)

||/if (${ReplaceSlot.Find[inv]}) /declare targetslot string local 100
/if (!${ReplaceSlot.Find[inv]}) /declare targetslot int local ${ReplaceSlot}
/if (!${Defined[TargetItem]}) {
    /echo target item not defined - returning
    /return
}
/if (!${Defined[ReplaceSlot]}) {
    /echo replace slot not defined - returning
    /return
}
/if (${Cursor.ID}) {
    /echo trying to handle items but stuff is on my cursor
    /guildsay trying to handle items but stuff is on my cursor
    /guildsay ERROR SUMMONING ITEMS ERROR SHIT IS ON MY CURSOR
    /return
}
:beforesummon
/declare tempvariable string local ${Ini[${Me.Name}-inv,${ReplaceSlot},InvSlot${ReplaceSlotTwo}].Arg[3,,]})
/if (${tempvariable.Find[Dagger of the Sea]} || ${tempvariable.Find[Mace of Night]} || ${tempvariable.Find[Sword of the Sky]}) {
    /goto :nonstacksummon
}
/if (${Ini[${Me.Name}-inv,${ReplaceSlot},InvSlot${ReplaceSlotTwo}].Arg[3,,]} > 1) {
    /ho summonitem #summonitem ${TargetItem} ${Ini[${Me.Name}-inv,${ReplaceSlot},InvSlot${ReplaceSlotTwo}].Arg[3,,]}
} else {
    :nonstacksummon
    /ho summonitem #summonitem ${TargetItem}
}
:aftersummon
/notify HotButtonWnd HB_Button1 leftmouseup
/delay 1s
/notify HotButtonWnd HB_Button1 leftmouseup
/delay 1s
/if (${Cursor.ID} == ${TargetItem}) {
    /if (!${Window[InventoryWindow].Open}) /keypress i
    /delay 1s
    /if (${ReplaceSlot.Find[sharedbank]}) {
    /echo Summoned an item that goes into shared bank invslot 
        /varset ReplaceSlot ${ReplaceSlot.Right[-11]}
        /if (${ReplaceSlotTwo} > 2500) {
            /nomodkey /itemnotify ${InvSlot[${ReplaceSlotTwo}]} leftmouseup
            /delay 1s
            /goto :end
        }
        /if (${ReplaceSlotTwo} <= 10) {
            /nomodkey /itemnotify ${InvSlot[${ReplaceSlot}]} rightmouseup
            /delay 2
            /nomodkey /itemnotify in sharedbank${Math.Calc[${ReplaceSlot} - 2499]} ${ReplaceSlotTwo} leftmouseup
            /delay 2
            /nomodkey /itemnotify ${InvSlot[${ReplaceSlot}]} rightmouseup
            /delay 2
            /goto :end
        }
    }
    /if (${ReplaceSlot.Find[armorandweapons]}) {
        /echo Summoned equipment.... equipping
        /echo --> try not to get sacrificed, rezzed, or translocated or anything like that <--
        /nomodkey /itemnotify ${InvSlot[${ReplaceSlotTwo}]} leftmouseup
        /delay 1s
        /if (${Window[ConfirmationDialogBox].Open}) {
                /nomodkey /notify ConfirmationDialogBox CD_Yes_Button leftmouseup
                /delay 1s
                /if (!${Window[ConfirmationDialogBox].Open}) /echo ERROR ATTUNING?
                /goto :end
        }
    }
    /if (${ReplaceSlot.Find[AAABankSlot]}) {
        /varset ReplaceSlot ${ReplaceSlot.Right[-11]}
        /echo Summoning Bank Slot Items.... placing in bank
        /declare i int local
        /nomodkey /itemnotify bank${Math.Calc[${ReplaceSlot} + 1].Int} leftmouseup
        /delay 2
        /goto :end
    }
    /if (${ReplaceSlot.Find[Bank]}) {
        /varset ReplaceSlot ${ReplaceSlot.Right[-4]}
        /echo Summoning Bank Items.... placing in bank
        /declare i int local
        /nomodkey /itemnotify bank${Math.Calc[${ReplaceSlot} + 1].Int} rightmouseup
        /delay 2
        /nomodkey /itemnotify in bank${Math.Calc[${ReplaceSlot} + 1].Int} ${ReplaceSlotTwo} leftmouseup
        /delay 2
        /nomodkey /itemnotify bank${Math.Calc[${ReplaceSlot} + 1].Int} rightmouseup
        /delay 2
        /goto :end
    }
    /if (${ReplaceSlot.Find[invslots]}) {
        /echo Summoning Inventory slots....
        /nomodkey /itemnotify ${InvSlot[${ReplaceSlotTwo}]} leftmouseup
        /delay 2
        /goto :end 
    }       
    /if (${ReplaceSlot.Find[pack]}) {
        /varset ReplaceSlot ${ReplaceSlot.Right[-4]}
        /echo Summoning Inventory bag items.... placing in bags
        /declare i int local
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[${ReplaceSlot} + 23]}]} rightmouseup
        /delay 2
        /nomodkey /itemnotify in pack${Math.Calc[${ReplaceSlot} + 1].Int} ${ReplaceSlotTwo} leftmouseup
        /delay 2
        /nomodkey /itemnotify ${InvSlot[${Math.Calc[${ReplaceSlot} + 23]}]} rightmouseup
        /delay 2
        /goto :end
    }
}
    :end        
/return

Sub getids(string name)

/declare SpawnID int local
/declare SpawnName string local
/declare i int local
/for i 1 to 4
/varset SpawnID ${NearestSpawn[${i}, pc ${name}].ID}
/varset SpawnName ${NearestSpawn[${i}, pc ${name}]}	
	/if (${NearestSpawn[${i}, pc ${name}].Name.Equal[${name}]}) /return ${SpawnID}
/next i
/return 0

Sub Event_summonandequip

/varset doequip 1
/return

Sub Event_giveaa
/varset giveaa 1
/varset doequip 1
/return
Last edited by toolisuber on Tue Aug 18, 2015 12:32 am, edited 15 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Wed Jul 08, 2015 5:53 am

augments.mac
-----------------
|augments is untested, I am very tired
|edit:augments is still untested
|edit2:augments works it always kinda worked
|
|in theory you should be at an aug pool and run it, it is semi manual
|it detects the inv window screen and waits for you to put augs in and
|then you must hit esc or something to close the inv screen
|it will repeatedly summon ur saved augs and tell u which slot they go in
|I think

Code: Select all

#turbo 40

#chat tell
#chat group
#chat guild

#Event SummonAugs "#*#guild, '#*#augs#*#'"

Sub Main

/declare randomstring           string outer thisisaglitch
/declare doaugs                 int outer 0

/echo augments -user input- macro started <<<<
/echo make sure you are in lobby or baz <<<<
/echo make sure you are near an aug pool <<<<
/echo >> REMOVE FIRST HOT BUTTON <<
/echo >> clearing hotbutton1 <<
/nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
/delay 4
/keypress esc

:summonandwait
/delay 2
/if (${doaugs} == 1) /call Start
/doevents
/goto :summonandwait

Sub Start

/declare i int local
/if (${Zone.ShortName.Find[guildlobby]} || ${Zone.ShortName.Find[bazaar]}) {
    /echo AUG SLOTS 1<<<<<<<<<<<<<<<
    /for i 0 to 22
    /if (${Ini[${Me.Name}-inv,armorandweaponsaugs1,InvSlot${i}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /call HandleItem ${Ini[${Me.Name}-inv,armorandweaponsaugs1,InvSlot${i}].Arg[1,,]} armorandweaponsaugs1 ${i}
    }
    /next i
    /varset i 0
    /echo AUG SLOTS 2<<<<<<<<<<<<<<<
    /for i 0 to 22
    /if (${Ini[${Me.Name}-inv,armorandweaponsaugs2,InvSlot${j}].Arg[1,,].NotEqual[NULL]}) {
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 2
        /keypress esc
        /call HandleItem ${Ini[${Me.Name}-inv,armorandweaponsaugs2,InvSlot${i}].Arg[1,,]} armorandweaponsaugs2 ${i}
    }
    /next i
    /varset i 0
}
/if (!${Zone.ShortName.Find[guildlobby]} && !${Zone.ShortName.Find[bazaar]}) {
    /echo not in correct zone for augments 
    /echo rerun macro correctly for augments
    /guildsay NOT IN CORRECT ZONE FOR AUGMENTS RERUN MACRO
}
/echo ....Finished - Ending -
/end
/return

Sub HandleItem(TargetItem, ReplaceSlot, ReplaceSlotTwo)

/if (!${Defined[TargetItem]}) {
    /echo target item not defined - returning
    /return
}
/if (!${Defined[ReplaceSlot]}) {
    /echo replace slot not defined - returning
    /return
}
/if (${Cursor.ID}) {
    /echo trying to handle items but stuff is on my cursor
    /guildsay trying to handle items but stuff is on my cursor
    /guildsay ERROR SUMMONING ITEMS ERROR SHIT IS ON MY CURSOR
    /return
}
/ho summonitem #summonitem ${TargetItem}
/notify HotButtonWnd HB_Button1 leftmouseup
/delay 1s
/notify HotButtonWnd HB_Button1 leftmouseup
/delay 1s
/if (${Cursor.ID} == ${TargetItem}) {
    /if (${ReplaceSlot.Find[armorandweaponsaugs1]}) {
        /echo aug ----> ${Cursor.Name} GOES IN SLOT 1 OF ${InvSlot[${ReplaceSlotTwo}].Name}
        /call waitforwindow
        /goto :end
    }
    /if (${ReplaceSlot.Find[armorandweaponsaugs2]}) {
        /echo aug ----> ${Cursor.Name} GOES IN SLOT 2 OF ${InvSlot[${ReplaceSlotTwo}].Name}
        /call waitforwindow
        /goto :end      
    }
}
:end        
/return

Sub waitforwindow

/echo ----> waiting...
:waitloop
/delay 4
/if (!${Window[InventoryWindow].Open}) /goto :waitloop
:waitloop2
/delay 4
/if (${Window[InventoryWindow].Open}) /goto :waitloop2
/return

Sub Event_SummonAugs

/varset doaugs 1
/return

Last edited by toolisuber on Tue Aug 18, 2015 12:33 am, edited 5 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Wed Jul 08, 2015 5:56 am

I did my best, I think they size of the posting width limits is perhaps breaking some of the macros and the lines of code may manually need to be reconnected... I am very sorry
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
warlock45
a grimling bloodguard
a grimling bloodguard
Posts: 881
Joined: Sat Oct 06, 2007 8:32 pm

Re: eqemu servertransfer macros

Post by warlock45 » Wed Jul 08, 2015 6:40 am

You may want to try using the "code, /code" tags when posting

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Sun Jul 12, 2015 6:35 am

|sharedbank.mac
|
|this mac reads ur sharedbankstart generated file and summons the items
|per your choosing .... you type the name of the item like this
| summon itemname
|or you can type
| summon from name1 itemname
|
|you enter in ur char names where it says name4 etc, it supports 64 names
|
|this automatically deletes ur ini entries so u don't cheat so u backup the
|-sharedbanks ini file that was updated when u generated your char invs
|
|I played around with the uh methods of doing things its an interesting read
|it may do other things edit3: I have no memory of even writing this macro
|
| it detects if you tried to summon a lore item and doesn't delete the ini if
| you had tried to summon the lore item

|when using the list, type like list 6 to list ur items in ur shared banks and
---------------------
|you don't even have to view the itemids it does it by name
|for ppl that like to not view item ids!
---------------------
|list 6 will try to list ur shared bank inventories 6 characters at a time
|list is broken - edit3:list is prolly still partially broken
|edit:list 6 page2 will list 6 at a time, starting with page 2

|you can type list tons of times if u want and stuff but u might blow up ur
|computers so try not to type it 1000 times ok and that is good I tried list 1
| and it showed 2 chars I think so like it just has to be in a diff spot inmacro
|ididthingsfun so that this uses some sort of anti list exiting thing to exit

|you can fix this its pretty easy it works pretty good but I can b prettier
| this is an interesting starter project if u want or whatever sorry I didn't
|write it earlier when I first released this stuff, the inventory mac is done
|slightly differently 7/12/2015? or one of the macros, I updated neways
|it necessarily writes a file slightly differently or something was glitched its
|necessary you would have to update to the current as of 6:43am est
|
|edit:added page# function, type --> /gui list 6 page2 or /say list 6 page3
|edit:isnt working properly with the summoning items with operands and
|edit:multiple lists glitching the summon command path... simplefixsoon?

|edit:i think I fixed the page function a bit, sometimes it has to be restarted

|edit:it now summons items with operands and stuff, and it re-searchs with
|edit:find instead of equal for if u want partial name matches.. its fixed
|edit: almost I mean if u want to try and fix it better, its not rlly worth it
|edit: maybey the page part that's rlly simple... other problem is it can be
|edit: cleanedup more like the ini readsx2 for empty && null so I mean if
|edit: that is fixed I mean but that's like maybey only 100+ ini reads better
|edit: and that is serious for some ppl but for the everyday user that is fine
|edit: its not like ur summoning sharedbankitemssimultaneouson 18+ chars
|edit: because there is no sharedbank autoclicking in mq2 and I think that
|edit: the underfoot version is not updated any further by mq?

|edit: you would fix the null/empty by syncing thngs in inventory.mac and
|edit: now even more the writes from sharedbank.mac so the ini is singular

|edit:this macro is prolly way better than like macros for all classes andstuff

|edit: plz becareful when searching for words like thunderous DRUM of
|edit: karana or whatever Chain PANTS of lunacy when everything else is
|edit: leggings... I don't think legendary goes in sharedbank but those
|edit: prolly don't work... THIS MACRO is NOT SAFE FOR LIVE it
|edit: gmsummons items YOU HAVE to BE A GM

|edit: uh never usually use multiline but tried it in this to check if it worked
|edit: added like a typo check for page in case u use my other macros and
|edit: you end up typing /gui pagedown too much,
|edit2:it reverts to page1* if you type pagedown instead of page 1
|
|edit3:/varset numvar1 ${i},${Math.Calc[${numvar1.Arg[2,,]} + 0,${numvar1.Arg[3,,]}
|edit3: that line should not work but it does
|edit3:${Math.Calc[${numvar1.Arg[2,,]} + 0
|edit3:->
|edit3:${Math.Calc[${numvar1.Arg[2,,]} + 0]}

Code: Select all

#turbo 40

#chat tell
#chat group
#chat guild

#Event sharedbank "#*#guild, 'list#1#'"
#Event sharedbank "#*#say, 'list#1#'"
#Event continue   "#*#guild, 'continue'"
#Event continue   "#*#say, 'continue'"
#Event continue   "#*#guild, '.'"
#Event continue   "#*#say, '.'"
#Event check      "#*#guild, '#1#'"
#Event check      "#*#say, '#1#'"
#Event commacheck "#*#say, '#1#'#2#'"
#Event commacheck "#*#guild, '#1#'#2#'"
#Event lore       "#*#already have a lore#*#"


Sub Main

/declare dosharedbank int outer 0
/declare charnames string outer name1,name2,name3,name4,name5,name6,name7,name8,name9,name10,name11,name12,name13,name14,name15,name16,name17,name18,name19,name20,name21,name22,name23,name24,name25,name26,name27,name28,name29,name30,name31,name32

/echo shared bank listing and summoning macro started
/if (${charnames.Arg[1,,].Equal[name1]}) /echo don't forget to enter ur char names in the macro file

/declare listing int outer 6
/declare waitloopfinish int outer 0
/declare itemislore int outer 0


:sharedbankloop
/delay 2
/if (${dosharedbank} == 1) /call sharedbanklist
/doevents
/goto :sharedbankloop

Sub sharedbanklist

/echo toolismacro - listing items!
/declare i int local
/declare j int local
/declare var int local
/declare charname     string local empty
/declare itemname     string local empty
/declare quantity     int    local 0
/declare itemid       int    local 0
/declare numvar1 string local 0,0,0

/if (${Defined[pagenumber]}) {
    /varset i ${Math.Calc[${listing} * (${pagenumber} - 1)]})
    /varset i ${Math.Calc[${i} + 1]}
    /varset numvar1 ${Math.Calc[${pagenumber} * ${listing}]},${Math.Calc[${pagenumber} * ${listing}]},1
    /if (${dosharedbank} == 1) /varset dosharedbank 0
    /varset pagenumber 0
    /goto :pagenumberintro
}
/if (${dosharedbank} == 1) /varset dosharedbank 0
/for i 1 to 64
:pagenumberintro
/doevents flush
/varset quantity 0
/for j 2500 to 2501
:jstart
/if (${Bool[${charnames.Arg[${i},,]}]}) {
/if (${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot${j}].Arg[1,,].NotEqual[empty]}) {
    /if (${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot2500].Arg[1,,].NotEqual[empty]} || ${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot2501].Arg[1,,].NotEqual[empty]}) {
        /if (${j} == 2501) {
            /varset numvar1 ${i},${Math.Calc[${numvar1.Arg[2,,]} + 1]},1
            /goto :continue
        }
    } else {
    /varset numvar1 ${i},${Math.Calc[${numvar1.Arg[2,,]} + 0,${numvar1.Arg[3,,]}
    /next i
    }
    :continue
    /varset itemname ${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot${j}].Arg[2,,]}
    /varset itemid ${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot${j}].Arg[1,,]}
    /varset quantity ${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot${j}].Arg[3,,]}
    /if (!${Defined[quantity]} || ${quantity} == 0 || !${Bool[${quantity}]}) /varset quantity 1
||    /if (!${Bool[${itemname}]}) /goto :finish
    /echo
    /echo ----> ${charnames.Arg[${i},,]} <---- 
    /echo bagslot${j} ----> ${itemname} (${quantity})
    /echo 
    /varset quantity 0
    /varset j 0
    /for j 1 to 10
    /delay 1
    /if (${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot${var}-Slot${j}].Arg[1,,].NotEqual[NULL]}) {
        /varset itemname ${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot${var}-Slot${j}].Arg[2,,]}
        /varset itemid ${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot${var}-Slot${j}].Arg[1,,]}
        /varset quantity ${Ini[-sharedbanks,${charnames.Arg[${i},,]},InvSlot${var}-Slot${j}].Arg[3,,]}
        /if (!${Defined[quantity]} || ${quantity} == 0 || !${Bool[${quantity}]}) /varset quantity 1 
            /if (${Bool[${itemname}]}) /echo slot${j} ---> ${itemname} (${quantity})
        }
    }
    /next j
    :finish
    /varset j 0
    /if (${var} < 2) /varset var ${Math.Calc[${var} + 1]}
    /if (${var} == 2) /varset j 1234
    /varset quantity 01010101
}
}
/if (${quantity} == 01010101) {
    /if (${j} == 1234) {
        /varset var 0
        /varset j 2500
        /goto :next
    }
    /if (${j} == 0) /multiline ; /varset j 2501 ; /varset var 1 ; /goto :jstart
}
:next
/if (${numvar1.Arg[3,,]} == 1) {
    /for j 1 to ${Math.Calc[64 / ${listing}]})
    /if (${Math.Calc[${numvar1.Arg[1,,]} / ${listing}]} == ${j}) /goto :waitloop1
    /next j
}
:next2
/next i
:end
/if (${dosharedbank} == 1) /varset dosharedbank 0
/varset waitloopfinish 0
/echo sharedbanklisting complete!~
/return
:waitloop1
/varset numvar1 ${numvar1.Arg[1,,]},${numvar1.Arg[2,,]},0
/echo ~~~~>Waiting to do next listing, plz type continue or . <~~~~
:waitloop
/delay 4
/doevents continue
/doevents check
/if (${dosharedbank} == 4321) {
    /varset dosharedbank 1234
    /echo this is firing in listing area
    /call sharedbanklist
    /if (${dosharedbank} == 0) /varset dosharedbank 1234
    /if (${dosharedbank} == 1234) /multiline ; /varset dosharedbank 1 ; /goto :end
}
/if (${waitloopfinish} == 1) /goto :waitfinish
/goto :waitloop
:waitfinish
/varset waitloopfinish 0
/echo EXITING waitloop loading plz wait thx
/goto :next2


Sub check(string fromname, string itemsname, string listpage)

/declare i int local
/declare j int local
/declare var int local
/declare variable string local 0,0
/declare summonquantity   int local
/declare searchtype string local Equal
/if (${Defined[didcomma]}) /varset didcomma 0
/if (${Defined[fromnamevars]}) /varset fromnamevars 0
:startcheck
/if (${Defined[itemsname]} && ${fromname.NotEqual[empty]}) {
    /echo targetitem ${TargetItem}
    /for i 1 to 64
    /if (${Ini[-sharedbanks].Arg[${i},|].Equal[${fromname}]}) {
        /if (!${Defined[fromnamevar]}) /declare fromnamevar string local ${fromname}
        :summonitemloop
        /if (${fromnamevar.Equal[empty]}) {
            /echo Finding Name... loading plz wait
            /for j 1 to 64
            /for var 1 to 10
            /if (${Ini[-sharedbanks,${Ini[-sharedbanks].Arg[${j},|]},InvSlot0-Slot${var}].Arg[2,,].${searchtype}[${TargetItem}]}) {
                /echo ${TargetItem} targetitem findingname
                /varset fromnamevar ${Ini[-sharedbanks].Arg[${j},|]}
                /varset variable ${var},0
                /if (${Ini[-sharedbanks,${fromnamevar},InvSlot0-Slot${var}].Arg[3,,]} > 1) {
                    /varset summonquantity ${Ini[-sharedbanks,${fromnamevar},InvSlot0-Slot${var}].Arg[3,,]}
                }
                /varset TargetItem ${Ini[-sharedbanks,${fromnamevar},InvSlot0-Slot${var}].Arg[1,,]}
                /goto :beforesummon
            }
            /if (${Ini[-sharedbanks,${Ini[-sharedbanks].Arg[${j},|]},InvSlot1-Slot${var}].Arg[2,,].${searchtype}[${TargetItem}]}) {
                /echo ${TargetItem} targetitem findingname
                /varset fromnamevar ${Ini[-sharedbanks].Arg[${j},|]}
                /varset variable ${var},1
                /if (${Ini[-sharedbanks,${fromnamevar},InvSlot1-Slot${var}].Arg[3,,]} > 1) {
                    /varset summonquantity ${Ini[-sharedbanks,${fromnamevar},InvSlot1-Slot${var}].Arg[3,,]}
                }
                /varset TargetItem ${Ini[-sharedbanks,${fromnamevar},InvSlot1-Slot${var}].Arg[1,,]}
                /goto :beforesummon
            }
            /next var
            /varset var 0
            /if (${Ini[-sharedbanks,${Ini[-sharedbanks].Arg[${j},|]},InvSlot2500].${searchtype}[${TargetItem}]}) {
                /echo ${TargetItem} targetitem findingname
                /varset fromnamevar ${Ini[-sharedbanks].Arg[${j},|]]}
                /varset variable 2500
                /if (${Ini[-sharedbanks,${fromnamevar},InvSlot2500].Arg[3,,]} > 1) {
                    /varset summonquantity ${Ini[-sharedbanks,${fromnamevar},InvSlot2500].Arg[3,,]}
                }
                /varset TargetItem ${Ini[-sharedbanks,${fromnamevar},InvSlot2500].Arg[1,,]}
                /goto :beforesummon
            }
            /if (${Ini[-sharedbanks,${Ini[-sharedbanks].Arg[${j},|]},InvSlot2501].${searchtype}[${TargetItem}]}) {
                /echo ${TargetItem} targetitem findingname
                /varset fromnamevar ${Ini[-sharedbanks].Arg[${j},|]]}
                /varset variable 2501
                /if (${Ini[-sharedbanks,${fromnamevar},InvSlot2501].Arg[3,,]} > 1) {
                    /varset summonquantity ${Ini[-sharedbanks,${fromnamevar},InvSlot2501].Arg[3,,]}
                }
                /varset TargetItem ${Ini[-sharedbanks,${fromnamevar},InvSlot2501].Arg[1,,]}
                /goto :beforesummon
            }
            /next j
            /varset i 0
            /varset j 0
            /varset var 0
            /if (${searchtype.Find[Equal]}) {
                /varset searchtype Find
                /echo trying to find with partial name? retrying
                /goto :startcheck
            }
            /echo ITEM NOT FOUND ITEM ERRORS END try again
            /return
        }
        /varset j 0
        /varset var 0
        /echo Finding Item... loading plz wait
        /for var 1 to 10
        /if (${Ini[-sharedbanks,${fromnamevar},InvSlot0-Slot${var}].Arg[2,,].${searchtype}[${TargetItem}]}) {
            /echo ${TargetItem} targetitem findingitem
            /varset TargetItem ${Ini[-sharedbanks,${fromnamevar},InvSlot0-Slot${var}].Arg[1,,]}
            /varset variable ${var},0
            /if (${Ini[-sharedbanks,${fromnamevar},InvSlot0-Slot${var}].Arg[3,,]} > 1) {
                /varset summonquantity ${Ini[-sharedbanks,${fromnamevar},InvSlot0-Slot${var}].Arg[3,,]}
            }
            /goto :beforesummon
        }
        /if (${Ini[-sharedbanks,${fromnamevar},InvSlot1-Slot${var}].Arg[2,,].${searchtype}[${TargetItem}]}) {
            /echo ${TargetItem} targetitem findingitem
            /varset TargetItem ${Ini[-sharedbanks,${fromnamevar},InvSlot1-Slot${var}].Arg[1,,]}
            /varset variable ${var},1
            /if (${Ini[-sharedbanks,${fromnamevar},InvSlot1-Slot${var}].Arg[3,,]} > 1) {
                /varset summonquantity ${Ini[-sharedbanks,${fromnamevar},InvSlot1-Slot${var}].Arg[3,,]}
            }
            /goto :beforesummon
        }
        /next var
        /varset var 0
        /if (${Ini[-sharedbanks,${fromnamevar},InvSlot2500].Arg[2,,].${searchtype}[${TargetItem}]}) {
            /echo ${TargetItem} targetitem findingitem
            /varset TargetItem ${Ini[-sharedbanks,${fromnamevar},InvSlot2500].Arg[1,,]}
            /varset variable 2500
            /if (${Ini[-sharedbanks,${fromnamevar},InvSlot2500].Arg[3,,]} > 1) {
                /varset summonquantity ${Ini[-sharedbanks,${fromnamevar},InvSlot2500].Arg[3,,]}
            }
            /goto :beforesummon
        }
        /if (${Ini[-sharedbanks,${fromnamevar},InvSlot2501].Arg[2,,].${searchtype}[${TargetItem}]}) {
            /echo ${TargetItem} targetitem findingitem
            /varset TargetItem ${Ini[-sharedbanks,${fromnamevar},InvSlot2501].Arg[1,,]}
            /varset variable 2501
            /if (${Ini[-sharedbanks,${fromnamevar},InvSlot2501].Arg[3,,]} > 1) {
                /varset summonquantity ${Ini[-sharedbanks,${fromnamevar},InvSlot2501].Arg[3,,]}
            }
            /goto :beforesummon
        }
        /echo ITEM ERROR 4 ITEM NOT FOUND ok sorry try again
        /doevents flush
        /return
        :beforesummon
        /echo item from --> ${fromnamevar}'s bank
||        /if (${variable.Arg[1,,]} >= 2500) {
        /echo >> REMOVING FIRST HOT BUTTON <<
        /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
        /delay 4
        /keypress esc
        /delay 1s
        /if (${summonquantity} > 1) {
            /ho summonitem #summonitem ${TargetItem} ${summonquantity}
            /goto :aftersummon
        }
        /if (${summonquantity} < 2) {
            :nonstacksummon
            /ho summonitem #summonitem ${TargetItem}
            /goto :aftersummon
        }
        :aftersummon
        /delay 1s
        /notify HotButtonWnd HB_Button1 leftmouseup
        /delay 1s
        /notify HotButtonWnd HB_Button1 leftmouseup
        /delay 1s
        :waititemloop
        /delay 2
        /doevents lore
        /if (${itemislore} == 1) {
            /echo item you were trying to summon was lore, not deleting and returning
            /doevents flush
            /varset itemislore 0
            /return
        }
        /if (${Cursor.ID} == ${TargetItem}) {
            /echo ${Cursor.Name} summoned!
            /if (${itemislore} == 0) {
                /echo deleting ini entry!
                /if (${variable.Arg[1,,]} == 2500) {
                    /ini "-sharedbanks" "${fromnamevar}" "InvSlot2500" "emptyslot,emptyslot"
                    /goto :finishdelete
                }
                /if (${variable.Arg[1,,]} == 2501) {
                    /ini "-sharedbanks" "${fromnamevar}" "InvSlot2501" "emptyslot,emptyslot"
                    /goto :finishdelete
                }
                /ini "-sharedbanks" "${fromnamevar}" "InvSlot${variable.Arg[2,,]}-Slot${variable.Arg[1,,]}" "NULL,NULL"     
                :finishdelete   
            }
            /echo returning !!!!
            /doevents flush
            /varset itemislore 0
            /return
        }
        /if (!${Cursor.ID}) /goto :waititemloop
    }
    /next i
    /echo error ending !
    /return
}   
/if (!${Defined[itemsname]} || ${fromname.Equal[empty]}) {
    /if (${Defined[fromname]}) {
        /echo ${TargetItem} targetitem !defineditemsname
        /if (!${Defined[fromnamevar]}) /declare fromnamevar string local empty
        /goto :summonitemloop
    }
}
/echo char name to summon not found, or itemsname not defined
/return



Sub Event_sharedbank(line, number)

/if (${Bool[${number}]}) {
    /varset listing ${number}
    /varset number ${number.Right[-2]}
}
/echo ...Listing items ${listing} characters at a time
/if (${number.Find[page]}) {
    /varset number ${number.Right[-4]}
    /if (${number.Length} > 2) /varset number 1 
    /if (!${Defined[pagenumber]}) /declare pagenumber string outer ${number}
    /varset pagenumber ${number}
    /echo ${pagenumber} pagenumber
}
/varset dosharedbank 1
/return

Sub Event_continue
    /varset waitloopfinish 1
/return

Sub Event_check(Line, string summonitem)

/if (!${Defined[TargetItem]}) /declare TargetItem string outer empty
/varset TargetItem empty
/if (${summonitem.Arg[1,].Equal[list]} && ${dosharedbank} == 0 || ${summonitem.Arg[1,].Equal[list]} && ${dosharedbank} == 1234) {
/echo dosharedback in check sub event
    /varset summonitem ${summonitem.Right[-5]}
    /if (${summonitem.Arg[1,]} >= 1) {
        /varset listing ${summonitem.Arg[1,]}
        /varset summonitem ${summonitem.Right[-2]}
    }
    /if (${summonitem.Find[page]}) {
        /varset summonitem ${summonitem.Right[-4]}
        /if (${summonitem.Length} > 2) /varset summonitem 1 
        /if (!${Defined[pagenumber]}) /declare pagenumber string outer ${summonitem}
        /varset pagenumber ${summonitem}
        /echo ${pagenumber} pagenumber
    }
    /varset dosharedbank 4321
    /echo ...Listing items ${listing} characters at a time
    /return
}
|/if (${summonitem.Arg[1,].Equal[continue]} || ${summonitem.Arg[1,].Equal[.]}) {
|    /if (${dosharedbank} == 1234) {
|        /varset waitloopfinish 1
|    }
|    /return   
|}
/if (${summonitem.Arg[1,].Equal[list]}) /multiline ; /echo list in the check sub - returning ; /return
/if (${summonitem.Arg[1,].NotEqual[summon]}) {
    /echo plz call check item event with summon from charname itemname or summon itemname
    /return
}
/if (${summonitem.Arg[1,].Equal[summon]}) /varset summonitem ${summonitem.Right[-7]}
/if (${summonitem.Arg[1,].Equal[from]}) {
    /varset summonitem ${summonitem.Right[-5]}
    /declare fromname string local ${summonitem.Arg[1,]}
    :findandsetname
    /if (${didcomma} == 1) /goto :ending
    /if (${Bool[${summonitem.Arg[2,]}]}) {
        /varset TargetItem ${summonitem.Arg[2,]}       
        /if (${Bool[${summonitem.Arg[3,]}]}) {
            /if (${Bool[${summonitem.Arg[4,]}]}) {
                /if (${Bool[${summonitem.Arg[5,]}]}) {
                    /varset TargetItem ${summonitem.Arg[2,]} ${summonitem.Arg[3,]} ${summonitem.Arg[4,]} ${summonitem.Arg[5,]}
                    /echo ${TargetItem} targetitem summonitem args
                    /goto :ending
                }
            /varset TargetItem ${summonitem.Arg[2,]} ${summonitem.Arg[3,]} ${summonitem.Arg[4,]}
            /echo ${TargetItem} targetitem summonitem args
            /goto :ending
            }
        /varset TargetItem ${summonitem.Arg[2,]} ${summonitem.Arg[3,]}
        /echo ${TargetItem} targetitem summonitem args
        /goto :ending
        }
    :ending
    /echo --> summon from ${summonitem.Arg[1,]}'s bank <--
    /echo --> ${TargetItem} <---- item name
    /if (${didcomma} == 0) /call check ${fromname} ${TargetItem}
    /if (${didcomma} == 1) /call check ${fromnamevars} ${TargetItem}
    /return
    }
}
/echo summon FROMTARGET not specified, item --> ${summonitem} <-- will be removed from first ini entry if found
/if (${didcomma} == 0) /varset TargetItem ${summonitem}
/echo ${TargetItem} targetitem summonitem nonargs
/echo --> FROMTARGET <-- not specified 
/echo --> ${TargetItem} <-- item name
/call check empty ${TargetItem}
/doevents flush
/return
/echo plz specify item to summon

Sub Event_lore(Line)

/varset itemislore 1
/return

Sub Event_commacheck(Line, stringone, stringtwo)

/declare alphabet string local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
/echo this worked
/declare i int local 0
/if (!${Defined[didcomma]}) /declare didcomma string outer 1
/varset didcomma 1
/if (${stringone.Arg[1,].Equal[summon]}) {
    /varset stringone ${stringone.Right[-7]}
}
/if (${stringone.Arg[1,].Equal[from]}) {
    /varset stringone ${stringone.Right[-5]}
    /if (!${Defined[fromnamevars]}) /declare fromnamevars string outer ${stringone.Arg[1,]}
    /varset fromnamevars ${stringone.Arg[1,]}
    /echo ${stringone.Right[1]} is the possible error in string
    /for i 1 to 26
    /if (${stringone.Right[1].NotEqual[${alphabet.Arg[${i},,]}]}) {
        /if (!${Defined[count]}) /declare count int local 1
        /if (${count} == 1) /varset count 1
    }
    /if (${stringone.Right[1].Equal[${alphabet.Arg[${i},,]}]}) {
        /if (!${Defined[count]}) /declare count int local 0
        /varset count 0
        /goto :alphabetcountone
    }
    /next i
    :alphabetcountone
    /if (${count} == 1) {
        /echo ${stringone.Right[1]} is the error in string
        /varset stringone ${stringone.Right[-${Math.Calc[${fromnamevars.Arg[1,].Length} + 1]}]})
        /goto :commacheck
    }
    /goto :commacheck
}
/if (!${Defined[fromnamevars]}) /declare fromnamevars string outer empty 
/varset fromnamevars empty
/echo ${stringone.Right[1]} is the possible error in string
/for i 1 to 26
/if (${stringone.Right[1].NotEqual[${alphabet.Arg[${i},,]}]}) {
    /if (!${Defined[count]}) /declare count int local 1
    /if (${count} == 1) /varset count 1
}
/if (${stringone.Right[1].Equal[${alphabet.Arg[${i},,]}]}) {
    /if (!${Defined[count]}) /declare count int local 0
    /varset count 0
    /goto :alphabetcounttwo
}
/next i
:alphabetcounttwo
/if (${count} == 1) {
    /echo ${stringone.Right[1]} is the error in string
    /varset stringone ${stringone.Right[-${Math.Calc[${fromnamevars.Arg[1,].Length} + 1]}]})
    /goto :commacheck
}
:commacheck
/if (!${Defined[TargetItem]}) /declare TargetItem string outer empty
/varset TargetItem ${stringone}'${stringtwo}
/echo TargetItem commacheck ${TargetItem}
/call check ${fromnamevars} ${TargetItem}
/return

Last edited by toolisuber on Mon Aug 17, 2015 6:01 am, edited 9 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Mon Jul 13, 2015 10:06 am

|this is the skillstart.mac part 1
|
|edit3:-----------------------------------------
|edit3:skills updated and fixed more better! 08/12/2015?
|edit3:if you did this before 8/17/2015 8:32am est ~ and ur concerned
|edit3:you would be able to fix this by -
|edit3:entering your database and deleting all the rows in character_skills
|edit3:deleting -skills.ini from your macro folder
|edit3:rerunning skillstart.mac
|edit3:adding your tradeskill values to the new -skills.ini
|edit3:rerunning skills.mac on characters
|edit3:rangers,shadowknights,paladins,bers all had skills wrong, there was other classes before now as well
|edit3:you will have to do your specializes on casters again
|edit3:all these skills are not checked thoroughly enough repeatedly
|edit3:im highly doubting anything is wrong at this point
|edit3:it will be rechecked again eventually
|edit3:------------------------------------------
|this macro now takes up 2 posts
|the manual and outline take up 3 posts after that
|skills.mac is there, and working perfectly
|
|im thinking of a sort of manual/outline of stringgen that's on 3rd post
|
|this macro has a barely working version of stringgen at this time
|
|it generates a skillfile thatwill besoonusedto setyourskills w/ gm commands
|this will initially give 100 or so to the skills have, with special attention to
|the tradeskills you would want to copy those down and fill those in urself
|for each character, in the ini
|
|there is liek 13 tradeskills
|
|its ok if u cheat but don't ok
|
|you enter in ur char names above the spot with the skillids by class and
|then you enter them again(im sorry) and the class that character name is
|
|this is hard because macroquest does not give skill levels to use
|
|this will have a string generator thing one day so u can customwrite inifiles
|like if u have ur own server and u make a bunch of skills or a game or w/e
|
|the normal generator sequence is working and the counting
|
|I am experimenting with ideas
|
|some variables may be wrong, do not run this one on multiple chars ever
| THIS IS MEANT FOR 1 CHAR AT 1 TIME don't die ur computar
|this is liek for only 1 character anyways u don't run this multiple chars
|
|you could prolly make stringgen something interesting if you had
|real global vars because mq2 limits clients speed... to write real global vars
|prolly be like less than 1 paragraph of c++
|possibly a new function declared in a header file and very little codeatworst
|
|you could also write things to ini files and do ini reads and writes on each
|char to avoid all the c++, my macros use inis for buffing to share infoz so
|thats another idea
|
|you run this macro by /mac skillstart
|then you /gui skills or /say skills
|then you wait
|then you /gui skillcount
|
|/gui list and /gui list all work but stringgen isn't fixed yet
|math is wrong but that's gonna take like 4hrs when I get to it
|
|--this enters all skills as 100, unless it is a tradeskill it sets tradeskills to 0
|--you manually set the tradeskills in the ini file, mq does not have function
|--this macro now arranges the tradeskills at the top of each ini key entry
|--this macro nowhas support for gnomes,make sure ur gnomes are defined
|--this macro now sets ur specialize skills at 0, you gotta do those manually
|
|--this macro takes about 16mins for 64 chars...8 for 32,
|--you only run this on one character it makes the template for every1
|
|the ini file entries are searchable with .Arg[,-] if u wanted to
|edit2:iirc paladins and sks and wars get block if they have shields on
|edit2:emulator is not showing this as a skill its not coded in
|edit2: it would not work without diff server code
|
|stringgen is barely working
|/gui skillcount ini-skills key-class name-class entry-num inicount j skillid
|or whatever its all variables entry-can be rearranged
|
|I am wondering what I will do with stringgen im thinking encrypt/decrypt
|and possibly include as a function in some sort of ai
|
|THIS is not the full macro this is skillstart.mac part1
|this macro now takes up 2 posts

Code: Select all

#turbo 40

#chat group
#chat tell
#chat guild

#Event skillscreate "#*#guild, 'skillscreate'"
#Event skillcount "#*#guild, 'skillcount#1#'"
#Event skills "#*#your guild, 'skills'"
#Event skills "#*#say, 'skills'"
#Event continue "#*#guild, 'continue'"
#Event continue "#*#say, 'continue'"
#Event continue "#*#guild, '.'"
#Event continue "#*#say, '.'"
#Event list "#*#guild, 'list#1#'"
#Event list "#*#say, 'list#1#'"

Sub Main

/declare genverbose string outer 1
/declare variable string outer

/declare cleric-skills         string outer 1,3,5,6,10,11,14,15,16,19,20,25,29,32,34,41,44,45,46,47,48,51,52,56,59,61,62,64,65,66,67,68,69,70
/declare necromancer-skills    string outer 1,3,5,6,10,14,15,16,19,20,25,29,32,34,37,41,44,45,46,47,48,51,52,56,59,61,62,64,65,66,67,68,69,70 
/declare magician-skills       string outer 1,3,5,6,10,14,15,16,19,20,25,29,32,34,37,41,44,45,46,47,48,51,52,56,59,61,62,64,65,66,67,68,69,70 
/declare shaman-skills         string outer 1,3,5,6,10,14,15,16,19,20,25,29,32,34,37,41,44,45,46,47,48,51,52,56,59,60,61,62,64,65,66,67,68,69,70
/declare enchanter-skills      string outer 1,3,5,6,10,14,15,16,19,20,25,29,32,34,37,41,44,45,46,47,48,51,52,56,59,61,62,64,65,66,67,68,69,70 
/declare shadowknight-skills   string outer 1,2,3,4,5,6,8,10,11,14,15,16,17,19,20,21,25,29,32,34,35,37,38,41,44,45,46,47,48,51,52,56,59,61,62,64,65,66,67,68,69,70,74
/declare paladin-skills        string outer 1,2,3,4,5,6,8,10,11,14,15,16,17,19,20,21,25,29,32,34,35,37,38,41,44,45,46,47,48,51,52,56,59,61,62,64,65,66,67,68,69,70,74
/declare bard-skills           string outer 1,2,10,13,16,18,20,21,23,29,34,35,36,37,38,40,41,42,50,51,52,54,55,56,59,61,62,63,64,65,66,67,68,69,70,71,72,76 
/declare monk-skills           string outer 1,3,10,12,16,17,20,21,22,23,24,26,27,29,31,33,34,35,38,39,40,41,43,51,52,53,56,59,61,62,64,65,66,67,68,69,70,72
/declare rogue-skills          string outer 1,2,7,8,9,10,16,17,18,20,21,23,29,30,34,35,36,37,38,40,41,43,49,51,52,56,57,59,61,62,63,64,65,66,67,68,69,70,72,76
/declare warrior-skills        string outer 1,2,3,4,8,10,11,12,16,17,20,21,23,29,31,34,35,37,38,41,51,52,56,59,61,62,64,65,66,67,68,69,70,72,74
/declare beastlord-skills      string outer 1,3,5,6,10,12,14,15,16,17,19,20,23,25,29,31,32,34,37,38,41,44,45,46,47,48,51,52,56,59,61,62,64,65,66,67,68,69,70
/declare wizard-skills         string outer 1,3,5,6,10,14,15,16,19,20,25,29,32,34,37,41,44,45,46,47,48,51,52,56,59,61,62,64,65,66,67,68,69,70 
/declare ranger-skills         string outer 1,2,3,4,5,6,8,10,14,15,16,17,19,20,21,23,25,28,29,31,32,34,35,37,38,41,44,45,46,47,48,51,52,54,56,59,61,62,64,65,66,67,68,69,70,74
/declare druid-skills          string outer 1,2,3,5,6,10,14,15,16,19,20,15,16,19,20,25,28,29,32,34,41,44,45,46,47,48,51,52,54,56,59,61,62,64,65,66,67,68,69,70
/declare berserker-skills      string outer 3,4,10,16,17,20,21,29,31,34,35,37,38,41,51,52,56,59,61,62,64,65,66,67,68,69,70,72

/declare names string outer Tooli,Toolis,Chloroform,Lateralus,Opiate,Evildeedlit,Leviath,Undertow,Lolth,Zhzh,Atoms,Parabola,Finhmi,Schism,Abyssal,Nocturnity,Deedlit,Ticksandleeches,Sengir,Intolerance,Chronal,Severely,Astraldeva,Parabol,Starbucks,Rightintwo,Omniversal,Twitching,Abeastlord,Voodu,Dimi,Intermission,Transubstantial,Circu,Irii,Sweat

/declare name1  string outer tooli,bard
/declare name2  string outer toolis,cleric
/declare name3  string outer chloroform,necromancer
/declare name4  string outer lateralus,monk
/declare name5  string outer opiate,shaman
/declare name6  string outer evildeedlit,magician
/declare name7  string outer leviath,bard
/declare name8  string outer undertow,cleric
/declare name9  string outer lolth,shadowknight
/declare name10 string outer zhzh,enchanter
/declare name11 string outer atoms,beastlord
/declare name12 string outer parabola,shaman
/declare name13 string outer finhmi,bard
/declare name14 string outer schism,cleric
/declare name15 string outer abyssal,warrior
/declare name16 string outer nocturnity,necromancer,gnome
/declare name17 string outer deedlit,magician
/declare name18 string outer ticksandleeches,shaman
/declare name19 string outer sengir,bard
/declare name20 string outer intolerance,cleric
/declare name21 string outer chronal,warrior
/declare name22 string outer severely,rogue
/declare name23 string outer astraldeva,monk
/declare name24 string outer parabol,shaman
/declare name25 string outer starbucks,bard
/declare name26 string outer rightintwo,cleric
/declare name27 string outer omniversal,warrior
/declare name28 string outer twitching,necromancer
/declare name29 string outer abeastlord,beastlord
/declare name30 string outer voodu,shaman
/declare name31 string outer dimi,bard
/declare name32 string outer intermission,cleric
/declare name33 string outer transubstantial,warrior
/declare name34 string outer circu,necromancer
/declare name35 string outer irii,ranger
/declare name36 string outer sweat,shaman

/declare classnames string outer cleric,shaman,druid,necromancer,magician,enchanter,wizard,shadowknight,paladin,warrior,monk,rogue,bard,ranger,beastlord,berserker 
/declare classtotals string outer 34,35,40,34,34,34,34,45,45,35,39,40,41,50,41,29
/declare tradeskills string outer 7,56,57,58,59,60,61,62,64,65,66,69,70
/declare uniquerace1 string outer gnome,58
/declare uniquerace2 string outer empty,0
/declare uniquerace3 string outer empty,0
/declare uniquerace4 string outer empty,0
/declare stringgen string outer empty

/declare skillscreate int outer 0
/declare skills int outer 0
/declare skillcount int outer 0
/declare continue  int outer 0
/declare testingvar int outer 0
/declare testvar string outer abcdefghijklmnopqrstuvwxyz
/declare testvartwo string outer 0123456789
/echo =======================================
/echo everyone wins w/ this macro its good
/echo Char Skills - .Ini TemplateMaker
/echo =======================================

:startloop
/delay 2
/if (${skillscreate} == 1) /call skillscreate
/if (${skills} == 1) /call skills
/if (${skillcount} == 1) /call skillcount
/doevents
/goto :startloop

Sub skills

/declare i int local
/declare j int local
/declare var int local
/declare t int local
/declare order int local 1
/declare total string local 1,0
/echo initiating skills... 
/for i 1 to 64
/delay 1
/varset variable ${names.Arg[${i},,]}
/for var 1 to 16
/if (${total.Arg[1,,].Equal[1]}) {
    /if (${name${i}.Arg[2,,].Equal[${classnames.Arg[${var},,]}]}) {
        /varset total ${total.Arg[1,,]},${Math.Calc[${total.Arg[2,,]} + ${classtotals.Arg[${var},,]}]}
        /varset var 0
        /next i
    }
    /if (${name${i}.Arg[2,,].Length} < 1) {
        /varset total 0,${total.Arg[2,,]}
        /varset var 0
        /echo about ${Math.Calc[(${Math.Calc[(${total.Arg[2,,]} + ${total.Arg[2,,]} + (${i} * 13) )* 0.2]}/ 60)]}m remaining
        /echo
        /varset i 0
        /next i
    }
    /next var
    /varset var 0
    /next i
    /varset i 0
    /varset var 0
    /varset total 0,${total.Arg[2,,]}
}
/if (${name${i}.Arg[2,,].Equal[${classnames.Arg[${var},,]}]}) {
    /goto :foundvar
}
/next var
:foundvar
/if (${name${i}.Arg[3,,].Length} > 0) {
/echo ${variable} --> uniquerace detected  
    /declare unique int local 1
    /for t 1 to 10
    /if (${uniquerace${t}.Arg[1,,].NotEqual[NULL]} && ${name${i}.Arg[3,,].Equal[${uniquerace${t}.Arg[1,,]}]}) {
        /for j 0 to 13
        /if (${uniquerace${t}.Arg[2,,].Equal[${tradeskills.Arg[${j},,]}]}) {
            /ini "-skills" "${variable}" "${Skill[${uniquerace${t}.Arg[2,,]}].Name}" "ID${uniquerace${t}.Arg[2,,]}-${Skill[${uniquerace${t}.Arg[2,,]}].Name}-Value0"
            /varset j 0
            /varset t 0
            /goto :initialj
        }
        /next j
    }
    /next t
}   
/if (${variable.NotEqual[NULL]}) {
    /echo ${variable}
    :initialj
    /echo writing skill structure for ${variable}... please wait
    /echo ----> about ${Math.Calc[(${classtotals.Arg[${var},,]} + 15)* 0.2].Int}s remaining 
    /echo --------------------------------------
    /for j 1 to 60
    /delay 1
    /if (${${name${i}.Arg[2,,]}-skills.Arg[${j},,].NotEqual[NULL]}) {
        /for t 1 to 13
        /if (${order} == 1) {
            /if (${${name${i}.Arg[2,,]}-skills.Arg[${j},,].Equal[${tradeskills.Arg[${t},,]}]}) {
                /ini "-skills" "${variable}" "${Skill[${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}].Name}" "ID${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}-${Skill[${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}].Name}-Value0"
                /varset t 0
                /goto :wroteini
            }
        }
        /if (${order} == 2) {
            /if (${${name${i}.Arg[2,,]}-skills.Arg[${j},,].Equal[${tradeskills.Arg[${t},,]}]}) {
                /varset t 0
                /goto :wroteini
            }
            /if (${${name${i}.Arg[2,,]}-skills.Arg[${j},,].NotEqual[${tradeskills.Arg[${t},,]}]}) {
                /next t
                /if (${${name${i}.Arg[2,,]}-skills.Arg[${j},,]} > 43 && ${${name${i}.Arg[2,,]}-skills.Arg[${j},,]} < 49) {
                    /ini "-skills" "${variable}" "${Skill[${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}].Name}" "ID${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}-${Skill[${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}].Name}-Value0"
                    /varset t 0
                    /goto :wroteini
                }
                /ini "-skills" "${variable}" "${Skill[${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}].Name}" "ID${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}-${Skill[${${name${i}.Arg[2,,]}-skills.Arg[${j},,]}].Name}-Value100"
                /varset t 0
                /goto :wroteini
            }
        }
        /next t
    }
    :wroteini
    /next j
    /varset j 0
}
/if (${order} == 1) {
    /varset order 2
    /varset j 0
    /next j
}
/varset order 1
/if (${names.Arg[${Math.Calc[${i} + 1]},,].NotEqual[NULL]}) /next i
/varset i 0
/varset j 0
/varset skills 0
/echo finished writing to ini files!
/return

Sub skillcount(gen)

||determine if vars from string have operands other than space or if string has operands
||add notequal null 
||add notequal null to creation of variables or use null
/declare i int local
/declare j int local
/declare var int local
/if (${stringgen.NotEqual[empty]}) {
/echo --> stringgen
/echo 
/echo --------------------------------------
/echo --> stringgen --> ${stringgen}
/echo --------------------------------------
    /declare function1 string outer empty
    /declare function2 string outer empty
    /declare function3 string outer empty
    /declare function4 string outer empty
    /declare string1 string outer ${stringgen.Arg[1,]}
    /declare string2 string outer ${stringgen.Arg[2,]}
    /declare string3 string outer ${stringgen.Arg[3,]}
    /declare string4 string outer ${stringgen.Arg[4,]}
    /declare string5 string outer ${stringgen.Arg[5,]}
    /declare string6 string outer ${stringgen.Arg[6,]}
    /declare string7 string outer ${stringgen.Arg[7,]}
    /declare string8 string outer ${stringgen.Arg[8,]}
    /declare string9 string outer ${stringgen.Arg[9,]}
    /declare string10 string outer ${stringgen.Arg[10,]}
    /declare string11 string outer ${stringgen.Arg[11,]}
    /declare string12 string outer ${stringgen.Arg[12,]}
||by length , string1-1?, by entry
    /declare string1arg1 string outer empty
    /declare string1arg2 string outer empty
    /declare string1arg3 string outer empty
    /declare string1arg4 string outer empty
    /declare string1arg5 string outer empty
    /declare string1arg6 string outer empty
    /declare string1arg7 string outer empty
    /declare string1arg8 string outer empty
    /declare string2arg1 string outer empty
    /declare string2arg2 string outer empty
    /declare string2arg3 string outer empty
    /declare string2arg4 string outer empty
    /declare string2arg5 string outer empty
    /declare string2arg6 string outer empty
    /declare string2arg7 string outer empty
    /declare string2arg8 string outer empty
    /declare string3arg1 string outer empty
    /declare string3arg2 string outer empty
    /declare string3arg3 string outer empty
    /declare string3arg4 string outer empty
    /declare string3arg5 string outer empty
    /declare string3arg6 string outer empty
    /declare string3arg7 string outer empty
    /declare string3arg8 string outer empty
    /declare string4arg1 string outer empty
    /declare string4arg2 string outer empty
    /declare string4arg3 string outer empty
    /declare string4arg4 string outer empty
    /declare string4arg5 string outer empty
    /declare string4arg6 string outer empty
    /declare string4arg7 string outer empty
    /declare string4arg8 string outer empty
    /declare str1-1arg1   string outer empty
    /declare str1-1arg2   string outer empty
    /declare str1-1arg3   string outer empty
    /declare str1-1arg4   string outer empty
    /declare str1-1arg5   string outer empty
    /declare str1-1arg6   string outer empty
    /declare str1-1arg7   string outer empty
    /declare str1-1arg8   string outer empty
    /declare str1-2arg1   string outer empty
    /declare str1-2arg2   string outer empty
    /declare str1-2arg3   string outer empty
    /declare str1-2arg4   string outer empty
    /declare str1-2arg5   string outer empty
    /declare str1-2arg6   string outer empty
    /declare str1-2arg7   string outer empty
    /declare str1-2arg8   string outer empty
    /declare str1-3arg1   string outer empty
    /declare str1-3arg2   string outer empty
    /declare str1-3arg3   string outer empty
    /declare str1-3arg4   string outer empty
    /declare str1-3arg5   string outer empty
    /declare str1-3arg6   string outer empty
    /declare str1-3arg7   string outer empty
    /declare str1-3arg8   string outer empty
    /declare str1-4arg1   string outer empty
    /declare str1-4arg2   string outer empty
    /declare str1-4arg3   string outer empty
    /declare str1-4arg4   string outer empty
    /declare str1-4arg5   string outer empty
    /declare str1-4arg6   string outer empty
    /declare str1-4arg7   string outer empty
    /declare str1-4arg8   string outer empty
    /declare str2-1arg1   string outer empty
    /declare str2-1arg2   string outer empty
    /declare str2-1arg3   string outer empty
    /declare str2-1arg4   string outer empty
    /declare str2-1arg5   string outer empty
    /declare str2-1arg6   string outer empty
    /declare str2-1arg7   string outer empty
    /declare str2-1arg8   string outer empty
    /declare str2-2arg1   string outer empty
    /declare str2-2arg2   string outer empty
    /declare str2-2arg3   string outer empty
    /declare str2-2arg4   string outer empty
    /declare str2-2arg5   string outer empty
    /declare str2-2arg6   string outer empty
    /declare str2-2arg7   string outer empty
    /declare str2-2arg8   string outer empty
    /declare str2-3arg1   string outer empty
    /declare str2-3arg2   string outer empty
    /declare str2-3arg3   string outer empty
    /declare str2-3arg4   string outer empty
    /declare str2-3arg5   string outer empty
    /declare str2-3arg6   string outer empty
    /declare str2-3arg7   string outer empty
    /declare str2-3arg8   string outer empty
    /declare str2-4arg1   string outer empty
    /declare str2-4arg2   string outer empty
    /declare str2-4arg3   string outer empty
    /declare str2-4arg4   string outer empty
    /declare str2-4arg5   string outer empty
    /declare str2-4arg6   string outer empty
    /declare str2-4arg7   string outer empty
    /declare str2-4arg8   string outer empty
    /declare str3-1arg1   string outer empty
    /declare str3-1arg2   string outer empty
    /declare str3-1arg3   string outer empty
    /declare str3-1arg4   string outer empty
    /declare str3-1arg5   string outer empty
    /declare str3-1arg6   string outer empty
    /declare str3-1arg7   string outer empty
    /declare str3-1arg8   string outer empty
    /declare str3-2arg1   string outer empty
    /declare str3-2arg2   string outer empty
    /declare str3-2arg3   string outer empty
    /declare str3-2arg4   string outer empty
    /declare str3-2arg5   string outer empty
    /declare str3-2arg6   string outer empty
    /declare str3-2arg7   string outer empty
    /declare str3-2arg8   string outer empty
    /declare str3-3arg1   string outer empty
    /declare str3-3arg2   string outer empty
    /declare str3-3arg3   string outer empty
    /declare str3-3arg4   string outer empty
    /declare str3-3arg5   string outer empty
    /declare str3-3arg6   string outer empty
    /declare str3-3arg7   string outer empty
    /declare str3-3arg8   string outer empty
    /declare str3-4arg1   string outer empty
    /declare str3-4arg2   string outer empty
    /declare str3-4arg3   string outer empty
    /declare str3-4arg4   string outer empty
    /declare str3-4arg5   string outer empty
    /declare str3-4arg6   string outer empty
    /declare str3-4arg7   string outer empty
    /declare str3-4arg8   string outer empty
    /declare str4-1arg1   string outer empty
    /declare str4-1arg2   string outer empty
    /declare str4-1arg3   string outer empty
    /declare str4-1arg4   string outer empty
    /declare str4-1arg5   string outer empty
    /declare str4-1arg6   string outer empty
    /declare str4-1arg7   string outer empty
    /declare str4-1arg8   string outer empty
    /declare str4-2arg1   string outer empty
    /declare str4-2arg2   string outer empty
    /declare str4-2arg3   string outer empty
    /declare str4-2arg4   string outer empty
    /declare str4-2arg5   string outer empty
    /declare str4-2arg6   string outer empty
    /declare str4-2arg7   string outer empty
    /declare str4-2arg8   string outer empty
    /declare str4-3arg1   string outer empty
    /declare str4-3arg2   string outer empty
    /declare str4-3arg3   string outer empty
    /declare str4-3arg4   string outer empty
    /declare str4-3arg5   string outer empty
    /declare str4-3arg6   string outer empty
    /declare str4-3arg7   string outer empty
    /declare str4-3arg8   string outer empty
    /declare str4-4arg1   string outer empty
    /declare str4-4arg2   string outer empty
    /declare str4-4arg3   string outer empty
    /declare str4-4arg4   string outer empty
    /declare str4-4arg5   string outer empty
    /declare str4-4arg6   string outer empty
    /declare str4-4arg7   string outer empty
    /declare str4-4arg8   string outer empty
    /declare strr1-1      string outer empty
    /declare strr1-2      string outer empty
    /declare strr1-3      string outer empty
    /declare strr1-4      string outer empty
    /declare strr2-1      string outer empty
    /declare strr2-2      string outer empty
    /declare strr2-3      string outer empty
    /declare strr2-4      string outer empty
    /declare strr3-1      string outer empty
    /declare strr3-2      string outer empty
    /declare strr3-3      string outer empty
    /declare strr3-4      string outer empty
    /declare strr4-1      string outer empty
    /declare strr4-2      string outer empty
    /declare strr4-3      string outer empty
    /declare strr4-4      string outer empty
||add more args, if stringgenarg9 not equal null - add vars
    /declare variable1  string outer empty
    /declare variable2  string outer empty
    /declare variable3  string outer empty
    /declare variable4  string outer empty
    /declare variable5  string outer empty
    /declare variable6  string outer empty
    /declare variable7  string outer empty
    /declare variable8  string outer empty
    /declare variable9  string outer empty
    /declare variable10 string outer empty
    /declare variable11 string outer empty
    /declare variable12 string outer empty
    /declare var1arg1   string outer empty
    /declare var1arg2   string outer empty
    /declare var1arg3   string outer empty
    /declare var1arg4   string outer empty
    /declare var1arg5   string outer empty
    /declare var1arg6   string outer empty
    /declare var1arg7   string outer empty
    /declare var1arg8   string outer empty
    /declare var2arg1   string outer empty
    /declare var2arg2   string outer empty
    /declare var2arg3   string outer empty
    /declare var2arg4   string outer empty
    /declare var2arg5   string outer empty
    /declare var2arg6   string outer empty
    /declare var2arg7   string outer empty
    /declare var2arg8   string outer empty
    /declare var3arg1   string outer empty
    /declare var3arg2   string outer empty
    /declare var3arg3   string outer empty
    /declare var3arg4   string outer empty
    /declare var3arg5   string outer empty
    /declare var3arg6   string outer empty
    /declare var3arg7   string outer empty
    /declare var3arg8   string outer empty
    /declare var4arg1   string outer empty
    /declare var4arg2   string outer empty
    /declare var4arg3   string outer empty
    /declare var4arg4   string outer empty
    /declare var4arg5   string outer empty
    /declare var4arg6   string outer empty
    /declare var4arg7   string outer empty
    /declare var4arg8   string outer empty
||additional variables add if Defined, add if defined
    /declare var1-1arg1   string outer empty
    /declare var1-1arg2   string outer empty
    /declare var1-1arg3   string outer empty
    /declare var1-1arg4   string outer empty
    /declare var1-1arg5   string outer empty
    /declare var1-1arg6   string outer empty
    /declare var1-1arg7   string outer empty
    /declare var1-1arg8   string outer empty
    /declare var1-2arg1   string outer empty
    /declare var1-2arg2   string outer empty
    /declare var1-2arg3   string outer empty
    /declare var1-2arg4   string outer empty
    /declare var1-2arg5   string outer empty
    /declare var1-2arg6   string outer empty
    /declare var1-2arg7   string outer empty
    /declare var1-2arg8   string outer empty
    /declare var1-3arg1   string outer empty
    /declare var1-3arg2   string outer empty
    /declare var1-3arg3   string outer empty
    /declare var1-3arg4   string outer empty
    /declare var1-3arg5   string outer empty
    /declare var1-3arg6   string outer empty
    /declare var1-3arg7   string outer empty
    /declare var1-3arg8   string outer empty
    /declare var1-4arg1   string outer empty
    /declare var1-4arg2   string outer empty
    /declare var1-4arg3   string outer empty
    /declare var1-4arg4   string outer empty
    /declare var1-4arg5   string outer empty
    /declare var1-4arg6   string outer empty
    /declare var1-4arg7   string outer empty
    /declare var1-4arg8   string outer empty
    /declare var2-1arg1   string outer empty
    /declare var2-1arg2   string outer empty
    /declare var2-1arg3   string outer empty
    /declare var2-1arg4   string outer empty
    /declare var2-1arg5   string outer empty
    /declare var2-1arg6   string outer empty
    /declare var2-1arg7   string outer empty
    /declare var2-1arg8   string outer empty
    /declare var2-2arg1   string outer empty
    /declare var2-2arg2   string outer empty
    /declare var2-2arg3   string outer empty
    /declare var2-2arg4   string outer empty
    /declare var2-2arg5   string outer empty
    /declare var2-2arg6   string outer empty
    /declare var2-2arg7   string outer empty
    /declare var2-2arg8   string outer empty
    /declare var2-3arg1   string outer empty
    /declare var2-3arg2   string outer empty
    /declare var2-3arg3   string outer empty
    /declare var2-3arg4   string outer empty
    /declare var2-3arg5   string outer empty
    /declare var2-3arg6   string outer empty
    /declare var2-3arg7   string outer empty
    /declare var2-3arg8   string outer empty
    /declare var2-4arg1   string outer empty
    /declare var2-4arg2   string outer empty
    /declare var2-4arg3   string outer empty
    /declare var2-4arg4   string outer empty
    /declare var2-4arg5   string outer empty
    /declare var2-4arg6   string outer empty
    /declare var2-4arg7   string outer empty
    /declare var2-4arg8   string outer empty
    /declare var3-1arg1   string outer empty
    /declare var3-1arg2   string outer empty
    /declare var3-1arg3   string outer empty
    /declare var3-1arg4   string outer empty
    /declare var3-1arg5   string outer empty
    /declare var3-1arg6   string outer empty
    /declare var3-1arg7   string outer empty
    /declare var3-1arg8   string outer empty
    /declare var3-2arg1   string outer empty
    /declare var3-2arg2   string outer empty
    /declare var3-2arg3   string outer empty
    /declare var3-2arg4   string outer empty
    /declare var3-2arg5   string outer empty
    /declare var3-2arg6   string outer empty
    /declare var3-2arg7   string outer empty
    /declare var3-2arg8   string outer empty
    /declare var3-3arg1   string outer empty
    /declare var3-3arg2   string outer empty
    /declare var3-3arg3   string outer empty
    /declare var3-3arg4   string outer empty
    /declare var3-3arg5   string outer empty
    /declare var3-3arg6   string outer empty
    /declare var3-3arg7   string outer empty
    /declare var3-3arg8   string outer empty
    /declare var3-4arg1   string outer empty
    /declare var3-4arg2   string outer empty
    /declare var3-4arg3   string outer empty
    /declare var3-4arg4   string outer empty
    /declare var3-4arg5   string outer empty
    /declare var3-4arg6   string outer empty
    /declare var3-4arg7   string outer empty
    /declare var3-4arg8   string outer empty
    /declare var4-1arg1   string outer empty
    /declare var4-1arg2   string outer empty
    /declare var4-1arg3   string outer empty
    /declare var4-1arg4   string outer empty
    /declare var4-1arg5   string outer empty
    /declare var4-1arg6   string outer empty
    /declare var4-1arg7   string outer empty
    /declare var4-1arg8   string outer empty
    /declare var4-2arg1   string outer empty
    /declare var4-2arg2   string outer empty
    /declare var4-2arg3   string outer empty
    /declare var4-2arg4   string outer empty
    /declare var4-2arg5   string outer empty
    /declare var4-2arg6   string outer empty
    /declare var4-2arg7   string outer empty
    /declare var4-2arg8   string outer empty
    /declare var4-3arg1   string outer empty
    /declare var4-3arg2   string outer empty
    /declare var4-3arg3   string outer empty
    /declare var4-3arg4   string outer empty
    /declare var4-3arg5   string outer empty
    /declare var4-3arg6   string outer empty
    /declare var4-3arg7   string outer empty
    /declare var4-3arg8   string outer empty
    /declare var4-4arg1   string outer empty
    /declare var4-4arg2   string outer empty
    /declare var4-4arg3   string outer empty
    /declare var4-4arg4   string outer empty
    /declare var4-4arg5   string outer empty
    /declare var4-4arg6   string outer empty
    /declare var4-4arg7   string outer empty
    /declare var4-4arg8   string outer empty
||add rest of vars ^
    /declare result1    string outer empty
    /declare result2    string outer empty
    /declare result3    string outer empty
    /declare result4    string outer empty
    /declare result5    string outer empty
    /declare result6    string outer empty
    /declare result7    string outer empty
    /declare result8    string outer empty
    /declare result9    string outer empty
    /declare result10   string outer empty
    /declare result1arg1   string outer empty
    /declare result1arg2   string outer empty
    /declare result1arg3   string outer empty
    /declare result1arg4   string outer empty
    /declare result2arg1   string outer empty
    /declare result2arg2   string outer empty
    /declare result2arg3   string outer empty
    /declare result2arg4   string outer empty
    /declare result3arg1   string outer empty
    /declare result3arg2   string outer empty
    /declare result3arg3   string outer empty
    /declare result3arg4   string outer empty
    /declare result4arg1   string outer empty
    /declare result4arg2   string outer empty
    /declare result4arg3   string outer empty
    /declare result4arg4   string outer empty
    /declare es1           string outer empty
    /declare es2           string outer empty
    /declare es3           string outer empty
    /declare es4           string outer empty
    /declare es5           string outer empty
    /declare es6           string outer empty
    /declare es7           string outer empty
    /declare es8           string outer empty
    /declare es9           string outer empty
    /declare es10          string outer empty
    /declare es1arg1       string outer empty
    /declare es1arg2       string outer empty
    /declare es1arg3       string outer empty
    /declare es1arg4       string outer empty
    /declare es2arg1       string outer empty
    /declare es2arg2       string outer empty
    /declare es2arg3       string outer empty
    /declare es2arg4       string outer empty
    /declare es3arg1       string outer empty
    /declare es3arg2       string outer empty
    /declare es3arg3       string outer empty
    /declare es3arg4       string outer empty
    /declare es4arg1       string outer empty
    /declare es4arg2       string outer empty
    /declare es4arg3       string outer empty
    /declare es4arg4       string outer empty
||add rest of vars ^
    /declare var1-1         string outer empty
    /declare var1-2         string outer empty
    /declare var1-3         string outer empty
    /declare var1-4         string outer empty
    :function1
    :stringvarset
    /if (${string1.Find[ini-]}) {
        /varset result1 ${string1.Right[-4]}
        /varset variable1 ${string1.Right[-3]}
        /varset string1 ${string1.Left[4]}
        /echo string1== ${string1}    variable1== ${variable1}    result1== ${result1}
    }    
    /if (${string2.Find[key-]}) {
        /varset variable2 ${string2.Right[-4]}
        /varset result2 ${variable2}
        /varset string2 ${string2.Left[4]}
        /echo string2== ${string2}    variable2== ${variable2}     result2== ${result2}
    }
    /if (${string3.Find[name-]}) {
        /varset variable3 ${string3.Right[-5]}
        /varset result3 ${variable3}
        /varset string3 ${string3.Left[5]}
        /echo string3== ${string3}    variable3== ${variable3}     result3== ${result3}
    }
    :varsetstringset
    /if (${string4.Find[entry-]}) {
        /varset variable4 ${string4.Right[-6]}
        /if (!${Defined[stringset]}) {
            /declare stringset string outer
        }
        /for i 1 to 12
        /if (${string${i}.NotEqual[NULL]}) {
            /if (${i} == 12) /varset stringset ${variable4} ${string5} ${string6} ${string7} ${string8} ${string9} ${string10} ${string11} ${string12}
            /if (${i} == 11) /varset stringset ${variable4} ${string5} ${string6} ${string7} ${string8} ${string9} ${string10} ${string11} 
            /if (${i} == 10) /varset stringset ${variable4} ${string5} ${string6} ${string7} ${string8} ${string9} ${string10} 
            /if (${i} == 9) /varset stringset ${variable4} ${string5} ${string6} ${string7} ${string8} ${string9} 
            /if (${i} == 8) /varset stringset ${variable4} ${string5} ${string6} ${string7} ${string8} 
            /if (${i} == 7) /varset stringset ${variable4} ${string5} ${string6} ${string7} 
            /if (${i} == 6) /varset stringset ${variable4} ${string5} ${string6} 
            /if (${i} == 5) /varset stringset ${variable4} ${string5}
            /if (${i} == 4) /varset stringset ${variable4}
            /varset i ${Math.Calc[${i} + 1]}
            /if (${string${i}.NotEqual[NULL]}) {
                /varset i ${Math.Calc[(${i} + 10) - 11]}
                /next i
            }
            /varset i 0
            /varset variable4 ${stringset}
            /goto :didvarsetstringset
        }
    :didvarsetstringset
    /varset result4 ${variable4}
    /varset string4 ${string4.Left[6]}
    /echo string4== ${string4}    variable4== ${variable4}     result4== ${result4}
    }
||find number of operands stringgen 60 != 54 + 5 = 59 w/ spaces i counted wrong?
    /echo --------------------------------------
/echo ${variable4.Length} var4length ${variable4.Arg[1,].Length} var4argument1length
/if (${variable4.Length} > ${variable4.Arg[1,].Length}) {
        /echo missing items detected
        /echo
        /if (${variable4.Length} > 0) {
            /echo missing items length > 0
            /varset string4arg1 ${variable4}
|            /varset string4arg2 ${string5}
|            /varset string4arg3 ${string6}
|            /varset string4arg4 ${string7}
|            /varset string4arg5 ${string6}
|            /varset string4arg6 ${string9}
|            /varset string4arg7 ${string10}
|            /varset string4arg8 ${string11}
|            /varset string4arg9 ${string12}
             /varset var 5
            /echo variable4== ${variable4} -> string4arg1
            /echo string5== ${string5} -> string4arg2
            /echo string6== ${string6} -> string4arg3
            /echo string7== ${string7} -> string4arg4
            /echo string8== ${string8} -> string4arg5
            /goto :varsetting
        }
        /if (${variable4.Length} < 1) {
            /varset string4arg1 ${string5}
            /varset string4arg2 ${string6}
            /varset string4arg3 ${string7}
            /varset string4arg4 ${string8}
|           /varset string4arg5 ${string9}
|           /varset string4arg6 ${string10}
|           /varset string4arg7 ${string11}
|           /varset string4arg8 ${string12} 
            /varset var 6
        }
    } 
    :varsetting
    :function2
    /echo --------------------------------------
    :varset
    /echo --------------------------------------
    /echo --> varsetting started -stringarg
    /echo ${string4}
    /echo  ${variable4.Arg[1,]} / ${string5.Arg[1,]} / ${string6.Arg[1,]} / ${string7.Arg[1,]} / ${string8.Arg[1,]} / ${string9.Arg[1,]} / ${string10.Arg[1,]} / ${string11.Arg[1,]} / ${string12.Arg[1,]}
    /if (!${Defined[stringset2]}) {
        /declare stringset2 string outer
    }
    /for i 1 to 4
    /for j 1 to 8
||    /for var 1 to 4
    /if (${variable${i}.Arg[${j},].NotEqual[NULL]}) {
        /if (${j} == 8) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]} ${variable${i}.Arg[5,]} ${variable${i}.Arg[6,]} ${variable${i}.Arg[7,]} ${variable${i}.Arg[8,} 
        /if (${j} == 7) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]} ${variable${i}.Arg[5,]} ${variable${i}.Arg[6,]} ${variable${i}.Arg[7,]} 
        /if (${j} == 6) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]} ${variable${i}.Arg[5,]} ${variable${i}.Arg[6,]}  
        /if (${j} == 5) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]} ${variable${i}.Arg[5,]} 
        /if (${j} == 4) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]}   
        /if (${j} == 3) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]}  
        /if (${j} == 2) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]}  
        /if (${j} == 1) /varset stringset2 ${variable${i}.Arg[1,]}
        /varset j ${Math.Calc[${j} + 1]}
        /if (${variable${i}.Arg[${j},].NotEqual[NULL]}) {
            /varset j ${Math.Calc[(${j} + 10)- 11]}
            /goto :stringargfinish
        }
        /if (${variable${i}.Arg[${j},].Equal[NULL]}) {
            /varset j ${Math.Calc[(${j} + 10)- 11]}
            /varset string${i}arg${j} ${stringset2}
            /goto :stringargfinish
        }
        /if (${variable${i}.Arg[${j},].Length} > 0) {
            /varset j ${Math.Calc[(${j} + 10)- 11]}
        }
        /if (${variable${i}.Arg[${j},].Length} < 1) {
            /varset j ${Math.Calc[(${j} + 10)- 11]}
            /varset string${i}arg${j} ${stringset2}
        }
        :stringargfinish
        /varset string${i}arg${j} ${stringset2}
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /varset j 0    
    /varset var 0
    /if (${genverbose} == 1) {
        /echo stringarg 1-1 ${string1arg1} | 1-2 ${string1arg2} | 1-3 ${string1arg3} | 1-4 ${string1arg4}
        /echo stringarg 2-1 ${string2arg1} | 2-2 ${string2arg2} | 2-3 ${string2arg3} | 2-4 ${string2arg4}
        /echo stringarg 3-1 ${string3arg1} | 3-2 ${string3arg2} | 3-3 ${string3arg3} | 3-4 ${string3arg4}
        /echo stringarg 4-1 ${string4arg1} | 4-2 ${string4arg2} | 4-3 ${string4arg3} | 4-4 ${string4arg4}
    }
    /echo --> varsetting finished -stringarg 
    :varsettwo
    /echo --------------------------------------   
    /echo --> varsetting two started -vararg (operand -)
    /echo ${string4}
    /echo  ${string4.Arg[1,-]} / ${string4.Arg[2,-]} / ${string4.Arg[3,-]} / ${string4.Arg[4,-]} / ${string4.Arg[5,-]} / ${string4.Arg[6,-]} / ${string4.Arg[7,-]} / ${string4.Arg[8,-]}
    /for i 1 to 4
    /for j 1 to 4
||    /for var 1 to 4
    /if (${variable${i}.Arg[${j},-].Length} > 0) {
        /varset var${i}arg${j} ${variable${i}.Arg[${j},-]} 
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /varset j 0    
    /varset var 0
    /if (${genverbose} == 1) {
        /echo vararg 1-1 ${var1arg1} | 1-2 ${var1arg2} | 1-3 ${var1arg3} | 1-4 ${var1arg4}
        /echo vararg 2-1 ${var2arg1} | 2-2 ${var2arg2} | 2-3 ${var2arg3} | 2-4 ${var2arg4}
        /echo vararg 3-1 ${var3arg1} | 3-2 ${var3arg2} | 3-3 ${var3arg3} | 3-4 ${var3arg4}
        /echo vararg 4-1 ${var4arg1} | 4-2 ${var4arg2} | 4-3 ${var4arg3} | 4-4 ${var4arg4}
    }
    /echo --> varsetting two finished -vararg (operand -)
    /echo --------------------------------------
    /echo --------------------------------------
|| you may redefine result1 -> result12 here depending, also with :resultvarset
    :function3
    :varsetresultvariable
    /echo variable1 to variable4 -> result1 to result4
    /varset result1 ${variable1}
    /varset result2 ${variable2}
    /varset result3 ${variable3}
    /varset result4 ${variable4}
    /echo result1== ${result1} result2== ${result2} result3== ${result3} result4== ${result4}
    /echo
    /echo result5== ${result5} / result6== ${result6} / result7== ${result7} / result8== ${result8}
    /echo
    /goto :resultvarset
    :resultvarset
||carrying an i or j var thru variables isnt working? myfault?
    /declare svar string local
    /for i 1 to 8
    /declare s${i}var string local ${result4.Arg[${i},]}
    /next i
    /varset i 0
    /if (${string1.Equal[ini-]}) {
        /if (${string4.Equal[entry-]}) {
            /if (${result4.Arg[1,].Length} > 0) {
                /for i 1 to 8
                /varset s${i}var ${result4.Arg[${i},]}
                /if (${result4.Arg[${i},].Equal[num]}) {
                    /varset result4arg${i} 1
                    /varset s${i}var ${s${i}var},1  
                }
                /if (${result4.Arg[${i},].Equal[inicount]}) {
                    /varset result4arg${i} 2
                    /varset s${i}var ${s${i}var},2
                }
                /if (${result4.Arg[${i},].Equal[j]}) {
                    /varset result4arg${i} 3
                    /varset s${i}var ${s${i}var},3
                }
                /if (${result4.Arg[${i},].Equal[skillid]}) {
                    /varset result4arg${i} 4
                    /varset s${i}var ${s${i}var},4
                }
                /if (${s${i}var.NotEqual[NULL]})  /echo s${i}var == ${s${i}var}
                /if (${s${i}var.Arg[2,,].Length} > 0) {
                    /if (${i} == 1) {
                        /varset svar ${s1var.Arg[2,,]}
                        /varset function3 ${s1var.Arg[2,,]}
                    }
                    /if (${i} == 2) {
                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}
                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]}
                    }
                    /if (${i} == 3) {
                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}
                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]}
                    }
                    /if (${i} == 4) {
                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}
                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]}
                    }
                    /if (${i} == 5) {
                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}${s5var.Arg[2,,]}
                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]},${s5var.Arg[2,,]}
                    }
                    /if (${i} == 6) {
                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}${s5var.Arg[2,,]}${s6var.Arg[2,,]}
                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]},${s5var.Arg[2,,]},${s6var.Arg[2,,]}
                    }
                    /if (${i} == 7) {
                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}${s5var.Arg[2,,]}${s6var.Arg[2,,]}${s7var.Arg[2,,]}
                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]},${s5var.Arg[2,,]},${s6var.Arg[2,,]},${s7var.Arg[2,,]}
                    }
                    /if (${i} == 8) {
                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}${s5var.Arg[2,,]}${s6var.Arg[2,,]}${s7var.Arg[2,,]}${s8var.Arg[2,,]}
                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]},${s5var.Arg[2,,]},${s6var.Arg[2,,]},${s7var.Arg[2,,]},${s8var.Arg[2,,]}
                    }
                }
                /next i
                /varset i 0
|                /varset function3 ${result4arg1},${result4arg2},${result4arg3},${result4arg4}
            }
        }
        /echo svar --> ${svar}
        /echo function3 --> ${function3}
        /declare s1 int local 1
        /declare s2 int local 2
        /declare s3 int local 3
        /declare s4 int local 4
        /if (${function3.Length} > 0) {
        /varset var 1
            /for i 1 to 8
            /for j 1 to 8
            /if (${str${i}-${var}arg${j}.Length} > 0) {
                /if (${function3.Arg[${i},,].Length} > 0) {
                    /for var 1 to 4
                    /if (${i} == 2) {
                        /varset s1 2
                        /varset s2 1
                        /varset s3 3
                        /varset s4 4
                    }
                    /if (${i} == 3) {
                        /varset s1 3
                        /varset s2 1
                        /varset s3 2
                        /varset s4 4
                    }
                    /if (${i} == 4) {
                        /varset s1 4
                        /varset s2 1
                        /varset s3 2
                        /varset s4 3
                    }
                    /if (${j} == 1) {
                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s2},,]},${function3.Arg[${s3},,]},${function3.Arg[${s4},,]}
                    }          
                    /if (${j} == 2) {
                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s2},,]},${function3.Arg[${s4},,]},${function3.Arg[${s3},,]}
                    }                 
                    /if (${j} == 3) {
                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s3},,]},${function3.Arg[${s2},,]},${function3.Arg[${s4},,]}
                    }             
                    /if (${j} == 4) {
                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s3},,]},${function3.Arg[${s4},,]},${function3.Arg[${s2},,]}
                    } 
                    /if (${j} == 5) {
                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s4},,]},${function3.Arg[${s2},,]},${function3.Arg[${s3},,]}
                    } 
                    /if (${j} == 6) {
                    /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s4},,]},${function3.Arg[${s3},,]},${function3.Arg[${s2},,]}
                    } 
                    /if (${j} == 7) {
                        /varset j 7
                    }
                    /if (${j} == 8) {
                        /varset j 8
                    }          
                }           
            }
            /next j
            /varset j 0
||            /next var
||            /varset var 0
||            /next j
||            /varset j 0
            /next i
            /varset i 0
||            /varset s1 1
||            /varset s2 2
||            /varset s3 3
||            /varset s4 4
        }
        /if (${result1.Equal[-skills]}) {
            /echo setting -skills ini (1)...
            /echo
            /varset es1 ${result1}
        }
        /if (${string2.Equal[key-]}) {
            /if (${result2.Equal[class]}) {
                /varset es2 classnames
            }
        }
        /if (${string3.Equal[name-]}) {
            /if (${result3.Equal[class]}) {
                /varset es3 ${es2}-skills
            }
        }
        /if (${string4.Equal[entry-]}) {
            /echo string4 equals entry
            /varset es4 ${string4arg1.Arg[1,]} ${string4arg2.Arg[2,]} ${string4arg3.Arg[3,]} ${string4arg4.Arg[4,]}
            /declare es4temp1 string local empty
            /declare es4temp2 string local empty
            /declare es4temp3 string local empty
            /declare es4temp4 string local empty
            /declare es4temp5 string local empty
            /declare es4temp6 string local empty
            /declare es4temp7 string local empty
            /declare es4temp8 string local empty
            /for i 1 to 12
            /for j 1 to 8
            /if (${string4arg${i}.Arg[${j},].Length} > 0) {
                /if (${string4arg${i}.Arg[${j},].Equal[num]}) {
                    /varset es4temp${j} numcount
                }   
                /if (${string4arg${i}.Arg[${j},].Equal[inicount]}) {
                    /varset es4temp${j} inicount
                }
                /if (${string4arg${i}.Arg[${j},].Equal[j]}) {
                    /varset es4temp${j} j
                }
                /if (${string4arg${i}.Arg[${j},].Equal[skillid]}) {
                    /varset es4temp${j} skillid
                }
            }
            /next j
            /varset j 0
            /next i
            /varset i 0
            /for j 1 to 8
            /if (${es4temp${j}.NotEqual[empty]}) {
                /if (${j} == 1) {
                    /varset es4 ${es4temp1}
                }
                /if (${j} == 2) {
                    /varset es4 ${es4temp1} ${es4temp2}
                }
                /if (${j} == 3) {
                    /varset es4 ${es4temp1} ${es4temp2} ${es4temp3}
                }
                /if (${j} == 4) {
                    /varset es4 ${es4temp1} ${es4temp2} ${es4temp3} ${es4temp4}
                }
                /if (${j} == 5) {
                    /varset es4 ${es4temp1} ${es4temp2} ${es4temp3} ${es4temp4} ${es4temp5}
                }
                /if (${j} == 6) {
                    /varset es4 ${es4temp1} ${es4temp2} ${es4temp3} ${es4temp4} ${es4temp5} ${es4temp6}
                }
                /if (${j} == 7) {
                    /varset es4 ${es4temp1} ${es4temp2} ${es4temp3} ${es4temp4} ${es4temp5} ${es4temp6} ${es4temp7}
                }
                /if (${j} == 8) {
                    /varset es4 ${es4temp1} ${es4temp2} ${es4temp3} ${es4temp4} ${es4temp5} ${es4temp6} ${es4temp7} ${es4temp8}
                }
            }
            /next j
            /varset j 0
        }
    }
    /echo es1== ${es1}    es5== ${es5}    es9== ${es9} 
    /echo es2== ${es2}    es6== ${es6}    es10== ${es10}
    /echo es3== ${es3}    es7== ${es7}    
    /echo es4== ${es4}    es8== ${es8}
    /echo --------------------------------------
    :varsetresult2variable
    /echo --> varsetting three started -resultarg
    /echo result1== ${result1} / result2== ${result2} / result3== ${result3} / result4== ${result4}
    /echo
    /echo result5== ${result5} / result6== ${result6} / result7== ${result7} / result8== ${result8}
    /echo
    /for i 1 to 4
    /for j 1 to 4
||    /for var 1 to 4
    /if (${result${i}.Arg[${j},].Length} > 0) {
        /varset result${i}arg${j} ${result${i}.Arg[${j},]}
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /varset j 0    
    /varset var 0
    /if (${genverbose} == 1) {
        /echo resultarg 1-1 ${result1arg1} | 1-2 ${result1arg2} | 1-3 ${result1arg3} | 1-4 ${result1arg4}
        /echo resultarg 2-1 ${result2arg1} | 2-2 ${result2arg2} | 2-3 ${result2arg3} | 2-4 ${result2arg4}
        /echo resultarg 3-1 ${result3arg1} | 3-2 ${result3arg2} | 3-3 ${result3arg3} | 3-4 ${result3arg4}
        /echo resultarg 4-1 ${result4arg1} | 4-2 ${result4arg2} | 4-3 ${result4arg3} | 4-4 ${result4arg4} 
    }
    /echo --> varsetting three finished -resultarg
    /echo --------------------------------------
    :esargvarset
    /echo --> varsetting four started -esarg
    /echo es1== ${es1} / es2== ${es2} / es3== ${es3} / es4== ${es4} 
    /echo
    /echo es5== ${es5} / es6== ${es6} / es7== ${es7} / es8== ${es8}
    /echo
    /for i 1 to 4
    /for j 1 to 4
||    /for var 1 to 4
    /if (${es${i}.Arg[${j},].Length} > 0) {
        /varset es${i}arg${j} ${es${i}.Arg[${j},]}
    }
    /next j
    /varset j 0
    /next i
    /varset i 0
    /varset j 0    
    /varset var 0
    /if (${genverbose} == 1) {
        /echo esarg 1-1 ${es1arg1} | 1-2 ${es1arg2} | 1-3 ${es1arg3} | 1-4 ${es1arg4}
        /echo esarg 2-1 ${es2arg1} | 2-2 ${es2arg2} | 2-3 ${es2arg3} | 2-4 ${es2arg4}
        /echo esarg 3-1 ${es3arg1} | 3-2 ${es3arg2} | 3-3 ${es3arg3} | 3-4 ${es3arg4}
        /echo esarg 4-1 ${es4arg1} | 4-2 ${es4arg2} | 4-3 ${es4arg3} | 4-4 ${es4arg4} 
    }
    /echo --> varsetting four finished -esarg
    /echo --------------------------------------
    /echo --------------------------------------
    /declare tempone string local
    :function4
    /declare result4temp1 string local empty
    /declare result4temp2 string local empty
    /declare result4temp3 string local empty
    /declare result4temp4 string local empty
    /declare result4temp5 string local empty
    /declare result4temp6 string local empty
    /declare result4temp7 string local empty
    /declare result4temp8 string local empty
    /if (${string1.Equal[ini-]}) {
        /if (${string1arg1.Equal[-skills]}) {
            /echo setting -skills ini (2)...
            /echo
            /for j 1 to 8
            /if (${es4arg${j}.Length} > 0 && ${es4arg${j}.NotEqual[empty]}) {
                /if (${es4arg${j}.Arg[1,].Equal[numcount]}) {
                    /varset result4arg${j} ${es4arg${j}}
                    ||ways to do this  -math in ini, for loop overwriting ini, array of function                    
                } 
                /if (${es4arg${j}.Arg[1,].Equal[inicount]}) {
                    /varset result4arg${j} ${es4arg${j}}
                }
                /if (${es4arg${j}.Arg[1,].Equal[j]}) {
                    /varset result4arg${j} ${es4arg${j}}
                    /varset tempone ${es4arg${j}}
                }
                /if (${es4arg${j}.Arg[1,].Equal[skillid]}) {
                /echo this worked
                    /if (${es3arg1.Equal[${classnames.Arg[${i},,]}-skills]}) {
                        /echo setting skillid vars
                        /declare apply_poison   string outer 7,apply poison
                        /declare fishing        string outer 56,fishing
                        /declare make_poison    string outer 57,make poison
                        /declare tinkering      string outer 58,tinkering
                        /declare research       string outer 59,research
                        /declare alchemy        string outer 60,alchemy
                        /declare baking         string outer 61,baking
                        /declare tailoring      string outer 62,tailoring
                        /declare blacksmithing  string outer 64,blacksmithing
                        /declare fletching      string outer 65,fletching
                        /declare brewing        string outer 66,brewing
                        /declare jewelry_making string outer 69,jewelry making
                        /declare pottery        string outer 70,pottery
                    }
                    /varset result4arg${j} ${es4arg${j}}
                    /echo ${es4arg${j}} es4arg${j} checking this
                }
            }
            /next j
            /varset j 0
        }
    }
    /if (${genverbose} == 1) {
        /echo resultarg 1-1 ${result1arg1} | 1-2 ${result1arg2} | 1-3 ${result1arg3} | 1-4 ${result1arg4}
        /echo resultarg 2-1 ${result2arg1} | 2-2 ${result2arg2} | 2-3 ${result2arg3} | 2-4 ${result2arg4}
        /echo resultarg 3-1 ${result3arg1} | 3-2 ${result3arg2} | 3-3 ${result3arg3} | 3-4 ${result3arg4}
        /echo resultarg 4-1 ${result4arg1} | 4-2 ${result4arg2} | 4-3 ${result4arg3} | 4-4 ${result4arg4} 
    }            
    /if (${string4.Find[entry-]}) {
        /if (${string4arg1.Length} > 0) {
            /if (${string4arg2.Length} > 0) {
                /if (${string4arg3.Length} > 0) {
                    /if (${string4arg4.Length} > 0) {
                        /varset var1-1 ${string4arg1}-${string4arg2}-${string4arg3}-${string4arg4}
                        /echo
                        /echo var1-1 set
                    }
                }
            }
        }
    }  
    /if (${var4arg1.Length} < 0) {
        /echo
        /echo varsetting stringgen default
        /varset stringgen default
    }
/declare a- int local 1
/declare b- int local 2
/declare c- int local 3
/declare d- int local 4
/declare e- int local 5
/declare f- int local 6
/declare g- int local 7
/declare h- int local 8
/declare i- int local 9
/declare j- int local 10
/declare k- int local 11
/declare l- int local 12
/declare m- int local 13
/declare n- int local 14
/declare o- int local 15
/declare p- int local 16
/declare q- int local 17
/declare r- int local 18
/declare s- int local 19
/declare t- int local 20
/declare u- int local 21
/declare v- int local 22
/declare w- int local 23
/declare x- int local 24
/declare y- int local 25
/declare z- int local 26
}
/echo
/echo waitloop starting --> type continue or . 
/echo waitloop --> type list or list all for variable lists
/echo --------------------------------------
:waitloop
/delay 4
/doevents continue
/doevents list
/if (${continue} == 1) {
    /varset continue 0
    /goto :start
}
/goto :waitloop
Last edited by toolisuber on Mon Aug 17, 2015 11:46 am, edited 55 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Wed Jul 15, 2015 11:57 am

im thinking im going to put 2nd part of stringgen here skillstart.mac

skills.mac is a couple posts below and working perfectly

|--THIS IS NOT A MACRO ---- IT is part2 of skillstart.mac

stringgen isn't even started to be created yet and is barely operational

I may have to one day use arrays
I try to make the macros a bit easier to understand in case someone was
trying to learn or something but stringgen gets a little confusing especially
when I had to convert all the variablename1arg1 things to ${i} and ${s}

|--THIS IS NOT A MACRO ---- IT is part2 of skillstart.mac

Code: Select all

:start
/echo starting count of skills
/declare tempvariable string local empty
/declare count int local 0
/declare inicount int local 0
/declare numcount int local 0
/declare num1 string local
/declare num2 string local
/declare num3 string local
/declare num4 string local
/for i 1 to 16
/echo
/echo ${classnames.Arg[${i},,]}
/varset tempvariable ${classnames.Arg[${i},,]}
/varset tempvariable ${tempvariable}-skills
/echo ${tempvariable}
/varset skillcount 0
/for j 1 to 60
/if (${${tempvariable}.Arg[${j},,]} > 0) {
    /varset count ${Math.Calc[${count} + 1]}
    /if (${${tempvariable}.Arg[${j},,]} == 7 || ${${tempvariable}.Arg[${j},,]} == 56 || ${${tempvariable}.Arg[${j},,]} == 57 || ${${tempvariable}.Arg[${j},,]} == 58 || ${${tempvariable}.Arg[${j},,]} == 59 || ${${tempvariable}.Arg[${j},,]} == 60 || ${${tempvariable}.Arg[${j},,]} == 61 || ${${tempvariable}.Arg[${j},,]} == 62 || ${${tempvariable}.Arg[${j},,]} == 64 || ${${tempvariable}.Arg[${j},,]} == 65 || ${${tempvariable}.Arg[${j},,]} == 66 || ${${tempvariable}.Arg[${j},,]} == 69 || ${${tempvariable}.Arg[${j},,]} == 70) {
        /varset inicount ${Math.Calc[${inicount} + 1]}    
        /if (${stringgen.NotEqual[empty]} && ${stringgen.NotEqual[default]}) {
            /if (${function3.Length} > 0) {
                /if (${string4.Equal[entry-]}) {
                    /for var 1 to 4
                    /if (${es4arg${var}.Equal[numcount]}) {
                        /varset es4arg${var} ${es4arg${var}}
                        /varset num${var} ${var}
                        /goto :endvarset
                    }
                    /if (${es4arg${var}.Equal[inicount]}) {
                        /varset es4arg${var} ${es4arg${var}}
                        /varset num${var} ${var}
                        /goto :endvarset
                    }
                    /if (${es4arg${var}.Equal[j]}) {
                        /varset es4arg${var} ${es4arg${var}}
                        /varset num${var} ${var}
                        /goto :endvarset
                    }
                    /if (${es4arg${var}.Equal[skillid]}) {
                        /varset es4arg${var} Skill[${${tempvariable}.Arg[${${tempone}},,]}].ID
                        /varset num${var} ${var}
                        /goto :endvarset
                    }
                    :endvarset
                    /next var
                    /varset var 0
                    /for var 1 to 4
|/if d- > ${var} {
|&&
|/varset d- ${var}
|
                    /if (${var} == 1 && ${function3.Arg[${var},,].NotEqual[${a-}]}) {
                        /for a- 1 to 4
                        /if (${function3.Arg[${var},,].NotEqual[${a-}]} && ${var} == 1) {
                            /next a-
                        }
                    }
                    /if (${var} == 2 && ${function3.Arg[${var},,].NotEqual[${b-}]}) {
                        /for b- 1 to 4
                        /if (${function3.Arg[${var},,].NotEqual[${b-}]} && ${var} == 2) {
                            /next b-
                        }
                    }
                    /if (${var} == 3 && ${function3.Arg[${var},,].NotEqual[${c-}]}) {
                        /for c- 1 to 4
                        /if (${function3.Arg[${var},,].NotEqual[${c-}]} && ${var} == 3) {
                            /next c-
                        }
                    }
                    /if (${var} == 4 && ${function3.Arg[${var},,].NotEqual[${d-}]}) {
                        /for d- 1 to 4
                        /if (${function3.Arg[${var},,].NotEqual[${d-}]} && ${var} == 4) {
                            /next d-
                        }
                    }
                    /next var
                    /varset var 0
/if (!${Defined[a-1]}) {
|if a == a /varset a success
|/if a.Arg[i,].equal[success] {
|/next i
|
/declare a-1 string local ${a-}
/declare a-2 string local ${a-},${b-}
/declare a-3 string local ${a-},${b-},${c-}
/declare a-4 string local ${a-},${b-},${c-},${d-}
/declare a-5 string local ${a-},${b-},${c-},${d-},${e-}
/declare a-6 string local ${a-},${b-},${c-},${d-},${e-},${f-}
/declare a-7 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-}
/declare a-8 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-}
/declare a-9 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-}
/declare a-10 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-}
/declare a-11 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-}
/declare a-12 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-}
/declare a-13 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-}
/declare a-14 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-}
/declare a-15 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-}
/declare a-16 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-}
/declare a-17 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-}
/declare a-18 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-}
/declare a-19 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-}
/declare a-20 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-}
/declare a-21 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-}
/declare a-22 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-}
/declare a-23 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-}
/declare a-24 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-}
/declare a-25 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-},${y-}
/declare a-26 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-},${y-},${z-}
}
                    /for var 1 to 26
                    /if (${function3.Equal[${a-${var}}]}) {
                        /if (${numcount} == 0) {
                            /echo function3 == ${function3}
                            /echo ${a-${var}}
                        }
                        /varset numcount ${Math.Calc[${numcount} + 1]}
                        /varset var 12
                        :determine
                        /if (${result4arg${var}.Length} > 0 && ${result4arg${var}.NotEqual[empty]}) {
                            /if (${var} == 12) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}-${${es4arg${num11}}}-${${es4arg${num12}}}"
                                /goto :fin
                            }
                            /if (${var} == 11) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}-${${es4arg${num11}}}"
                                /goto :fin
                            }
                            /if (${var} == 10) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}"
                                /goto :fin
                            }
                            /if (${var} == 9) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}"
                                /goto :fin
                            }
                            /if (${var} == 8) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}"
                                /goto :fin
                            }
                            /if (${var} == 7) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}"
                            }
                            /if (${var} == 6) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}"
                                /goto :fin
                            }
                            /if (${var} == 5) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}"
                                /goto :fin
                            }
                            /if (${var} == 4) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}"
                                /goto :fin
                            }
                            /if (${var} == 3) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}"
                            }
                            /if (${var} == 2) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}"
                                /goto :fin
                            }
                            /if (${var} == 1) {
                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}"
                                /goto :fin
                            }
                        }
                        /varset var ${Math.Calc[(${var} + 10)- 11]}
                        /if (${var} > 0) /goto :determine
                        :fin
                        /varset var 0
                    }
                    /if (${var} == 0) /goto :fintwo
                    /next var
                    :fintwo
                    /varset var 0
|/if ${function3.Equal[${a-},${b-},${c-},${d-}]}         
                    /for var 1 to 4
                    /if (${result4arg${var}.Equal[num]}) {
                        /varset es4arg${var} numcount
                        |/varset num1 ${var}
                        /goto :endvars
                    }
                    /if (${result4arg${var}.Equal[inicount]}) {
                        /varset es4arg${var} inicount
                        |/varset num2 ${var}
                        /goto :endvars
                    }
                    /if (${result4arg${var}.Equal[j]}) {
                        /varset es4arg${var} j
                        |/varset num3 ${var}
                        /goto :endvars
                    }
                    /if (${result4arg${var}.Equal[skillid]}) {
                        /varset es4arg${var} skillid
                        |/varset num4 ${var}
                        /goto :endvars
                    }
                    :endvars
                    /next var
                    /varset var 0                 
                }
            }
        }
        /if (${${tempvariable}.Arg[${j},,]} == 7) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j applypoison
        /if (${${tempvariable}.Arg[${j},,]} == 56) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j fishing
        /if (${${tempvariable}.Arg[${j},,]} == 57) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j makepoison
        /if (${${tempvariable}.Arg[${j},,]} == 58) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j tinkering
        /if (${${tempvariable}.Arg[${j},,]} == 59) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j research
        /if (${${tempvariable}.Arg[${j},,]} == 60) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j alchemy
        /if (${${tempvariable}.Arg[${j},,]} == 61) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j baking
        /if (${${tempvariable}.Arg[${j},,]} == 62) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j tailoring
        /if (${${tempvariable}.Arg[${j},,]} == 64) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j blacksmithing
        /if (${${tempvariable}.Arg[${j},,]} == 65) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j fletching 
        /if (${${tempvariable}.Arg[${j},,]} == 66) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j brewing
        /if (${${tempvariable}.Arg[${j},,]} == 69) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j jewelry crafting
        /if (${${tempvariable}.Arg[${j},,]} == 70) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j pottery
        /if (${stringgen.Equal[empty]} || ${stringgen.Equal[default]}) {
            /ini "-skills" "${classnames.Arg[${i},,]}" "${tempvariable}" "1-${inicount}-${j}-7,2-${inicount}-${j}-56,3-${inicount}-${j}-57,4-${inicount}-${j}-58,5-${inicount}-${j}-59,6-${inicount}-${j}-60,7-${inicount}-${j}-61,8-${inicount}-${j}-62,9-${inicount}-${j}-64,10-${inicount}-${j}-65,11-${inicount}-${j}-66,12-${inicount}-${j}-69,13-${inicount}-${j}-70"
        }
    }
}
/next j
/varset j 0
    /echo ${count} total count of skills being written to ini
    /ini "-skills" "${classnames.Arg[${i},,]}" "${classnames.Arg[${i},,]}-skillcount" "${count}"
    /varset count 0
    /varset inicount 0
    /varset numcount 0
/next i
/varset i 0
/varset j 0
/echo finished counting skills
/deletevar stringgen
/return

Sub Event_skillscreate

/return

Sub Event_skillcount(Line, string gen)

/if (${gen.Length} > 1) {
    /if (!${Defined[stringgen]}) { 
        /declare stringgen string outer ${gen}
    }
    /varset stringgen ${gen}
}
/varset skillcount 1
/return

Sub Event_skills

/varset skills 1
/return

Sub Event_continue

/varset continue 1
/return

Sub Event_list(Line,string listtype)

/varset listtype ${listtype}
/if (${listtype.Find[all]} || ${listtype.Find[varargs]}) {
    /echo string1== ${string1}    variable1== ${variable1}     result1== ${result1}
    /echo string2== ${string2}    variable2== ${variable2}     result2== ${result2}
    /echo string3== ${string3}    variable3== ${variable3}     result3== ${result3}
    /echo string4== ${string4}    variable4== ${variable4}     result4== ${result4}
    /echo
    /echo vararg 1-1-arg1 ${var1-1arg1} | 1-2-arg1 ${var1-2arg1} | 1-3-arg1 ${var1-3arg1} | 1-4-arg1 ${var1-4arg1}
    /echo vararg 1-1-arg2 ${var1-1arg2} | 1-2-arg2 ${var1-2arg2} | 1-3-arg2 ${var1-3arg2} | 1-4-arg2 ${var1-4arg2}
    /echo vararg 1-1-arg3 ${var1-1arg3} | 1-2-arg3 ${var1-2arg3} | 1-3-arg3 ${var1-3arg3} | 1-4-arg3 ${var1-4arg3}
    /echo vararg 1-1-arg4 ${var1-1arg4} | 1-2-arg4 ${var1-2arg4} | 1-3-arg4 ${var1-3arg4} | 1-4-arg4 ${var1-4arg4}
    /echo vararg 1-1-arg5 ${var1-1arg5} | 1-2-arg5 ${var1-2arg5} | 1-3-arg5 ${var1-3arg5} | 1-4-arg5 ${var1-4arg5}
    /echo vararg 1-1-arg6 ${var1-1arg6} | 1-2-arg6 ${var1-2arg6} | 1-3-arg6 ${var1-3arg6} | 1-4-arg6 ${var1-4arg6}
    /echo vararg 1-1-arg7 ${var1-1arg7} | 1-2-arg7 ${var1-2arg7} | 1-3-arg7 ${var1-3arg7} | 1-4-arg7 ${var1-4arg7}
    /echo vararg 1-1-arg8 ${var1-1arg8} | 1-2-arg8 ${var1-2arg8} | 1-3-arg8 ${var1-3arg8} | 1-4-arg8 ${var1-4arg8}
    /echo
    /echo vararg 2-1-arg1 ${var2-1arg1} | 2-2-arg1 ${var2-2arg1} | 2-3-arg1 ${var2-3arg1} | 2-4-arg1 ${var2-4arg1}
    /echo vararg 2-1-arg2 ${var2-1arg2} | 2-2-arg2 ${var2-2arg2} | 2-3-arg2 ${var2-3arg2} | 2-4-arg2 ${var2-4arg2}
    /echo vararg 2-1-arg3 ${var2-1arg3} | 2-2-arg3 ${var2-2arg3} | 2-3-arg3 ${var2-3arg3} | 2-4-arg3 ${var2-4arg3}
    /echo vararg 2-1-arg4 ${var2-1arg4} | 2-2-arg4 ${var2-2arg4} | 2-3-arg4 ${var2-3arg4} | 2-4-arg4 ${var2-4arg4}
    /echo vararg 2-1-arg5 ${var2-1arg5} | 2-2-arg5 ${var2-2arg5} | 2-3-arg5 ${var2-3arg5} | 2-4-arg5 ${var2-4arg5}
    /echo vararg 2-1-arg6 ${var2-1arg6} | 2-2-arg6 ${var2-2arg6} | 2-3-arg6 ${var2-3arg6} | 2-4-arg6 ${var2-4arg6}
    /echo vararg 2-1-arg7 ${var2-1arg7} | 2-2-arg7 ${var2-2arg7} | 2-3-arg7 ${var2-3arg7} | 2-4-arg7 ${var2-4arg7}
    /echo vararg 2-1-arg8 ${var2-1arg8} | 2-2-arg8 ${var2-2arg8} | 2-3-arg8 ${var2-3arg8} | 2-4-arg8 ${var2-4arg8}
    /echo
    /echo vararg 3-1-arg1 ${var3-1arg1} | 3-2-arg1 ${var3-2arg1} | 3-3-arg1 ${var3-3arg1} | 3-4-arg1 ${var3-4arg1}
    /echo vararg 3-1-arg2 ${var3-1arg2} | 3-2-arg2 ${var3-2arg2} | 3-3-arg2 ${var3-3arg2} | 3-4-arg2 ${var3-4arg2}
    /echo vararg 3-1-arg3 ${var3-1arg3} | 3-2-arg3 ${var3-2arg3} | 3-3-arg3 ${var3-3arg3} | 3-4-arg3 ${var3-4arg3}
    /echo vararg 3-1-arg4 ${var3-1arg4} | 3-2-arg4 ${var3-2arg4} | 3-3-arg4 ${var3-3arg4} | 3-4-arg4 ${var3-4arg4}
    /echo vararg 3-1-arg5 ${var3-1arg5} | 3-2-arg5 ${var3-2arg5} | 3-3-arg5 ${var3-3arg5} | 3-4-arg5 ${var3-4arg5}
    /echo vararg 3-1-arg6 ${var3-1arg6} | 3-2-arg6 ${var3-2arg6} | 3-3-arg6 ${var3-3arg6} | 3-4-arg6 ${var3-4arg6}
    /echo vararg 3-1-arg7 ${var3-1arg7} | 3-2-arg7 ${var3-2arg7} | 3-3-arg7 ${var3-3arg7} | 3-4-arg7 ${var3-4arg7}
    /echo vararg 3-1-arg8 ${var3-1arg8} | 3-2-arg8 ${var3-2arg8} | 3-3-arg8 ${var3-3arg8} | 3-4-arg8 ${var3-4arg8}
    /echo
    /echo vararg 4-1-arg1 ${var4-1arg1} | 4-2-arg1 ${var4-2arg1} | 4-3-arg1 ${var4-3arg1} | 4-4-arg1 ${var4-4arg1}
    /echo vararg 4-1-arg2 ${var4-1arg2} | 4-2-arg2 ${var4-2arg2} | 4-3-arg2 ${var4-3arg2} | 4-4-arg2 ${var4-4arg2}
    /echo vararg 4-1-arg3 ${var4-1arg3} | 4-2-arg3 ${var4-2arg3} | 4-3-arg3 ${var4-3arg3} | 4-4-arg3 ${var4-4arg3}
    /echo vararg 4-1-arg4 ${var4-1arg4} | 4-2-arg4 ${var4-2arg4} | 4-3-arg4 ${var4-3arg4} | 4-4-arg4 ${var4-4arg4}
    /echo vararg 4-1-arg5 ${var4-1arg5} | 4-2-arg5 ${var4-2arg5} | 4-3-arg5 ${var4-3arg5} | 4-4-arg5 ${var4-4arg5}
    /echo vararg 4-1-arg6 ${var4-1arg6} | 4-2-arg6 ${var4-2arg6} | 4-3-arg6 ${var4-3arg6} | 4-4-arg6 ${var4-4arg6}
    /echo vararg 4-1-arg7 ${var4-1arg7} | 4-2-arg7 ${var4-2arg7} | 4-3-arg7 ${var4-3arg7} | 4-4-arg7 ${var4-4arg7}
    /echo vararg 4-1-arg8 ${var4-1arg8} | 4-2-arg8 ${var4-2arg8} | 4-3-arg8 ${var4-3arg8} | 4-4-arg8 ${var4-4arg8}
    /echo 
    /echo -- vararg 1-1 ${var1arg1} | 1-2 ${var1arg2} | 1-3 ${var1arg3} | 1-4 ${var1arg4}
    /echo -- vararg 1-5 ${var1arg5} | 1-6 ${var1arg6} | 1-7 ${var1arg7} | 1-8 ${var1arg8}
    /echo
    /echo vararg 2-1 ${var2arg1} | 2-2 ${var2arg2} | 2-3 ${var2arg3} | 2-4 ${var2arg4}
    /echo vararg 2-5 ${var2arg5} | 2-6 ${var2arg6} | 2-7 ${var2arg7} | 2-8 ${var2arg8}
    /echo
    /echo -- vararg 3-1 ${var3arg1} | 3-2 ${var3arg2} | 3-3 ${var3arg3} | 3-4 ${var3arg4}
    /echo -- vararg 3-5 ${var3arg5} | 3-6 ${var3arg6} | 3-7 ${var3arg7} | 3-8 ${var3arg8}
    /echo
    /echo vararg 4-1 ${var4arg1} | 4-2 ${var4arg2} | 4-3 ${var4arg3} | 4-4 ${var4arg4}
    /echo vararg 4-5 ${var4arg5} | 4-6 ${var4arg6} | 4-7 ${var4arg7} | 4-8 ${var4arg8}
    /echo    
}
/if (${listtype.Find[all]} || ${listtype.Find[stringargs]} || ${listtype.Find[strargs]}) {
    /echo string1== ${string1}    variable1== ${variable1}     result1== ${result1}
    /echo string2== ${string2}    variable2== ${variable2}     result2== ${result2}
    /echo string3== ${string3}    variable3== ${variable3}     result3== ${result3}
    /echo string4== ${string4}    variable4== ${variable4}     result4== ${result4}
    /echo
    /echo strarg 1-1-arg1 ${str1-1arg1} | 1-2-arg1 ${str1-2arg1} | 1-3-arg1 ${str1-3arg1} | 1-4-arg1 ${str1-4arg1}
    /echo strarg 1-1-arg2 ${str1-1arg2} | 1-2-arg2 ${str1-2arg2} | 1-3-arg2 ${str1-3arg2} | 1-4-arg2 ${str1-4arg2}
    /echo strarg 1-1-arg3 ${str1-1arg3} | 1-2-arg3 ${str1-2arg3} | 1-3-arg3 ${str1-3arg3} | 1-4-arg3 ${str1-4arg3}
    /echo strarg 1-1-arg4 ${str1-1arg4} | 1-2-arg4 ${str1-2arg4} | 1-3-arg4 ${str1-3arg4} | 1-4-arg4 ${str1-4arg4}
    /echo strarg 1-1-arg5 ${str1-1arg5} | 1-2-arg5 ${str1-2arg5} | 1-3-arg5 ${str1-3arg5} | 1-4-arg5 ${str1-4arg5}
    /echo strarg 1-1-arg6 ${str1-1arg6} | 1-2-arg6 ${str1-2arg6} | 1-3-arg6 ${str1-3arg6} | 1-4-arg6 ${str1-4arg6}
    /echo strarg 1-1-arg7 ${str1-1arg7} | 1-2-arg7 ${str1-2arg7} | 1-3-arg7 ${str1-3arg7} | 1-4-arg7 ${str1-4arg7}
    /echo strarg 1-1-arg8 ${str1-1arg8} | 1-2-arg8 ${str1-2arg8} | 1-3-arg8 ${str1-3arg8} | 1-4-arg8 ${str1-4arg8}
    /echo
    /echo strarg 2-1-arg1 ${str2-1arg1} | 2-2-arg1 ${str2-2arg1} | 2-3-arg1 ${str2-3arg1} | 2-4-arg1 ${str2-4arg1}
    /echo strarg 2-1-arg2 ${str2-1arg2} | 2-2-arg2 ${str2-2arg2} | 2-3-arg2 ${str2-3arg2} | 2-4-arg2 ${str2-4arg2}
    /echo strarg 2-1-arg3 ${str2-1arg3} | 2-2-arg3 ${str2-2arg3} | 2-3-arg3 ${str2-3arg3} | 2-4-arg3 ${str2-4arg3}
    /echo strarg 2-1-arg4 ${str2-1arg4} | 2-2-arg4 ${str2-2arg4} | 2-3-arg4 ${str2-3arg4} | 2-4-arg4 ${str2-4arg4}
    /echo strarg 2-1-arg5 ${str2-1arg5} | 2-2-arg5 ${str2-2arg5} | 2-3-arg5 ${str2-3arg5} | 2-4-arg5 ${str2-4arg5}
    /echo strarg 2-1-arg6 ${str2-1arg6} | 2-2-arg6 ${str2-2arg6} | 2-3-arg6 ${str2-3arg6} | 2-4-arg6 ${str2-4arg6}
    /echo strarg 2-1-arg7 ${str2-1arg7} | 2-2-arg7 ${str2-2arg7} | 2-3-arg7 ${str2-3arg7} | 2-4-arg7 ${str2-4arg7}
    /echo strarg 2-1-arg8 ${str2-1arg8} | 2-2-arg8 ${str2-2arg8} | 2-3-arg8 ${str2-3arg8} | 2-4-arg8 ${str2-4arg8}
    /echo
    /echo strarg 3-1-arg1 ${str3-1arg1} | 3-2-arg1 ${str3-2arg1} | 3-3-arg1 ${str3-3arg1} | 3-4-arg1 ${str3-4arg1}
    /echo strarg 3-1-arg2 ${str3-1arg2} | 3-2-arg2 ${str3-2arg2} | 3-3-arg2 ${str3-3arg2} | 3-4-arg2 ${str3-4arg2}
    /echo strarg 3-1-arg3 ${str3-1arg3} | 3-2-arg3 ${str3-2arg3} | 3-3-arg3 ${str3-3arg3} | 3-4-arg3 ${str3-4arg3}
    /echo strarg 3-1-arg4 ${str3-1arg4} | 3-2-arg4 ${str3-2arg4} | 3-3-arg4 ${str3-3arg4} | 3-4-arg4 ${str3-4arg4}
    /echo strarg 3-1-arg5 ${str3-1arg5} | 3-2-arg5 ${str3-2arg5} | 3-3-arg5 ${str3-3arg5} | 3-4-arg5 ${str3-4arg5}
    /echo strarg 3-1-arg6 ${str3-1arg6} | 3-2-arg6 ${str3-2arg6} | 3-3-arg6 ${str3-3arg6} | 3-4-arg6 ${str3-4arg6}
    /echo strarg 3-1-arg7 ${str3-1arg7} | 3-2-arg7 ${str3-2arg7} | 3-3-arg7 ${str3-3arg7} | 3-4-arg7 ${str3-4arg7}
    /echo strarg 3-1-arg8 ${str3-1arg8} | 3-2-arg8 ${str3-2arg8} | 3-3-arg8 ${str3-3arg8} | 3-4-arg8 ${str3-4arg8}
    /echo
    /echo strarg 4-1-arg1 ${str4-1arg1} | 4-2-arg1 ${str4-2arg1} | 4-3-arg1 ${str4-3arg1} | 4-4-arg1 ${str4-4arg1}
    /echo strarg 4-1-arg2 ${str4-1arg2} | 4-2-arg2 ${str4-2arg2} | 4-3-arg2 ${str4-3arg2} | 4-4-arg2 ${str4-4arg2}
    /echo strarg 4-1-arg3 ${str4-1arg3} | 4-2-arg3 ${str4-2arg3} | 4-3-arg3 ${str4-3arg3} | 4-4-arg3 ${str4-4arg3}
    /echo strarg 4-1-arg4 ${str4-1arg4} | 4-2-arg4 ${str4-2arg4} | 4-3-arg4 ${str4-3arg4} | 4-4-arg4 ${str4-4arg4}
    /echo strarg 4-1-arg5 ${str4-1arg5} | 4-2-arg5 ${str4-2arg5} | 4-3-arg5 ${str4-3arg5} | 4-4-arg5 ${str4-4arg5}
    /echo strarg 4-1-arg6 ${str4-1arg6} | 4-2-arg6 ${str4-2arg6} | 4-3-arg6 ${str4-3arg6} | 4-4-arg6 ${str4-4arg6}
    /echo strarg 4-1-arg7 ${str4-1arg7} | 4-2-arg7 ${str4-2arg7} | 4-3-arg7 ${str4-3arg7} | 4-4-arg7 ${str4-4arg7}
    /echo strarg 4-1-arg8 ${str4-1arg8} | 4-2-arg8 ${str4-2arg8} | 4-3-arg8 ${str4-3arg8} | 4-4-arg8 ${str4-4arg8}
    /echo 
    /echo -- stringarg 1-1 ${string1arg1} | 1-2 ${string1arg2} | 1-3 ${string1arg3} | 1-4 ${string1arg4}
    /echo -- stringarg 1-5 ${string1arg5} | 1-6 ${string1arg6} | 1-7 ${string1arg7} | 1-8 ${string1arg8}
    /echo
    /echo stringarg 2-1 ${string2arg1} | 2-2 ${string2arg2} | 2-3 ${string2arg3} | 2-4 ${string2arg4}
    /echo stringarg 2-5 ${string2arg5} | 2-6 ${string2arg6} | 2-7 ${string2arg7} | 2-8 ${string2arg8}
    /echo
    /echo -- stringarg 3-1 ${string3arg1} | 3-2 ${string3arg2} | 3-3 ${string3arg3} | 3-4 ${string3arg4}
    /echo -- stringarg 3-5 ${string3arg5} | 3-6 ${string3arg6} | 3-7 ${string3arg7} | 3-8 ${string3arg8}
    /echo
    /echo stringarg 4-1 ${string4arg1} | 4-2 ${string4arg2} | 4-3 ${string4arg3} | 4-4 ${string4arg4}
    /echo stringarg 4-5 ${string4arg5} | 4-6 ${string4arg6} | 4-7 ${string4arg7} | 4-8 ${string4arg8}
    /echo    
}
    /echo --------------------------------------
/if (${listtype.Length} < 2 || ${listtype.Find[all]}) {
    /echo
    /echo string1== ${string1}    variable1== ${variable1}     result1== ${result1}
    /echo string2== ${string2}    variable2== ${variable2}     result2== ${result2}
    /echo string3== ${string3}    variable3== ${variable3}     result3== ${result3}
    /echo string4== ${string4}    variable4== ${variable4}     result4== ${result4}
    /echo --------------------------------------
    /echo
    /echo stringarg 1-1 ${string1arg1} | 1-2 ${string1arg2} | 1-3 ${string1arg3} | 1-4 ${string1arg4}
    /echo stringarg 2-1 ${string2arg1} | 2-2 ${string2arg2} | 2-3 ${string2arg3} | 2-4 ${string2arg4}
    /echo stringarg 3-1 ${string3arg1} | 3-2 ${string3arg2} | 3-3 ${string3arg3} | 3-4 ${string3arg4}
    /echo stringarg 4-1 ${string4arg1} | 4-2 ${string4arg2} | 4-3 ${string4arg3} | 4-4 ${string4arg4}
    /echo --------------------------------------
    /echo 
    /echo -- vararg 1-1 ${var1arg1} | 1-2 ${var1arg2} | 1-3 ${var1arg3} | 1-4 ${var1arg4}
    /echo -- vararg 1-5 ${var1arg5} | 1-6 ${var1arg6} | 1-7 ${var1arg7} | 1-8 ${var1arg8}
    /echo
    /echo vararg 2-1 ${var2arg1} | 2-2 ${var2arg2} | 2-3 ${var2arg3} | 2-4 ${var2arg4}
    /echo vararg 2-5 ${var2arg5} | 2-6 ${var2arg6} | 2-7 ${var2arg7} | 2-8 ${var2arg8}
    /echo
    /echo -- vararg 3-1 ${var3arg1} | 3-2 ${var3arg2} | 3-3 ${var3arg3} | 3-4 ${var3arg4}
    /echo -- vararg 3-5 ${var3arg5} | 3-6 ${var3arg6} | 3-7 ${var3arg7} | 3-8 ${var3arg8}
    /echo
    /echo vararg 4-1 ${var4arg1} | 4-2 ${var4arg2} | 4-3 ${var4arg3} | 4-4 ${var4arg4}
    /echo vararg 4-5 ${var4arg5} | 4-6 ${var4arg6} | 4-7 ${var4arg7} | 4-8 ${var4arg8}
    /echo
    /echo --------------------------------------
    /echo
    /echo result1== ${result1}    result5== ${result5}    result9== ${result9}
    /echo result2== ${result2}    result6== ${result6}    result10== ${result10}
    /echo result3== ${result3}    result7== ${result7}    result11== ${result11}
    /echo result4== ${result4}    result8== ${result8}    result12== ${result12}
    /echo --------------------------------------
    /echo
    /echo function1 ${function1}
    /echo function2 ${function2}
    /echo function3 ${function3}
    /echo function4 ${function4}
    /echo svar ${svar}
    /echo --------------------------------------
    /echo
    /echo es1== ${es1}    es5== ${es5}    es9== ${es9} 
    /echo es2== ${es2}    es6== ${es6}    es10== ${es10}
    /echo es3== ${es3}    es7== ${es7}    
    /echo es4== ${es4}    es8== ${es8}
    /echo --------------------------------------
    /echo
    /echo esarg 1-1 ${es1arg1} | 1-2 ${es1arg2} | 1-3 ${es1arg3} | 1-4 ${es1arg4}
    /echo esarg 2-1 ${es2arg1} | 2-2 ${es2arg2} | 2-3 ${es2arg3} | 2-4 ${es2arg4}
    /echo esarg 3-1 ${es3arg1} | 3-2 ${es3arg2} | 3-3 ${es3arg3} | 3-4 ${es3arg4}
    /echo esarg 4-1 ${es4arg1} | 4-2 ${es4arg2} | 4-3 ${es4arg3} | 4-4 ${es4arg4}
    /echo --------------------------------------
    /echo
    /echo resultarg 1-1 ${result1arg1} | 1-2 ${result1arg2} | 1-3 ${result1arg3} | 1-4 ${result1arg4}
    /echo resultarg 2-1 ${result2arg1} | 2-2 ${result2arg2} | 2-3 ${result2arg3} | 2-4 ${result2arg4}
    /echo resultarg 3-1 ${result3arg1} | 3-2 ${result3arg2} | 3-3 ${result3arg3} | 3-4 ${result3arg4}
    /echo resultarg 4-1 ${result4arg1} | 4-2 ${result4arg2} | 4-3 ${result4arg3} | 4-4 ${result4arg4}
    /echo --------------------------------------
}
/if (${stringgen.NotEqual[empty]}) {
    /echo waitloop --> type continue or .
    /echo --------------------------------------
}
/if (${stringgen.Equal[empty]}) {
    /echo returning...
    /echo --------------------------------------
}
/return
Last edited by toolisuber on Mon Jul 20, 2015 3:30 am, edited 16 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Wed Jul 15, 2015 12:20 pm

this is not code this is the start of a manual for stringgen im gonna put some time into this stuff

skills.mac is a couple posts below, and working perfectly

stringgen is not complete nor completely functioning
im prolly gonna provide a manual thingie and a straight outline
im gonna update stringgen and manual and outline from time to time
probably as I learn more concepts and have more ideas
stringgen is something for c++ really but im working with mq2
my current goals are working with mq2 and stringgen and learning c++
also fixing/finishing some macros and providing this stuff for u guys now

this is not a macro
this is probably alot easier to read in the notepad
the colors are a distraction and cause the brain to be distracted and overworked
the font is detrimental as well

your brain will hurt at first if you are new to the coding and you will grasp
the concepts and you will be able read the code and understand it without
your brain hurting after you grasp concepts and perhaps practice concepts
to understand them better, but the first time is gonna be harder especially if
you try to read this with the posting board's colors and font
this is probably alot easier to read in the notepad

Code: Select all

stringgen

sub skillcount(gen)
|initial /echo stringgen
|
|/echo stringgen -> ${stringgen}
|/if ${stringgen} notequal empty {
|    /declare variables
|    /declare string1 thru string12 are set as stringgen.args, seperated by spaces
|
|               ----------------------------------------------------------------------------------------------------------
|               -     -e.g. ini-skills key-class name-class entry-num inicount j skillid                                
|               -     -would be string1 ini-skills, string2 key-class, string3 name-class, string4 entry-num, string5 inicount, string6 j, string7 skillid
|               ----------------------------------------------------------------------------------------------------------
|
|
|
|    
|    :function1
|    -> empty
|    :stringvarset
|    -> if string1 thru string4 find (main topics and variables)
|        ini-
|        key-
|        name-
|        entry-
|        
|        /varset variable1 thru variable3 - the strings with the main topics removed e.g ini-skills with ini- removed
|                                         - variable 1 leaves the - attached to itself, e.g ini-skills == -skills
|                                         -currently /varset variable4 has detection for 12 variables beyond the main topic
|
|               ----------------------------------------------------------------------------------------------------------
|               -     -e.g. ini-skills key-class name-class entry-num inicount j skillid                                
|               -     -would be variable1 -skills, variable2 class, variable3 class, variable4 num inicount j skillid
|               -     -currently /varset variable4 has detection for 12 variables
|               ----------------------------------------------------------------------------------------------------------
|
|        /varset result1 thru result3    - the strings with the main topics removed e.g ini-skills with the ini- removed
|                                        - result1 thru result 4 are the same as variable 1 thru variable 4 but all - removed
|                                         -currently /varset result4 copies variable4 - 12 variables beyond the main topic
|
|        /varset string1 thru string3    - the strings left of the first - e.g. ini-ininame with the ininame removed
|                                        - string1 thru string 4 leave the - attached e.g. ini-skills == ini-
|               ------------------------------------------------------------------------------------------------------------
|               -      -e.g. ini-skills key-class name-class entry-num inicount j skillid 
|               -      -would be string1 ini-, string2 key-, string3 name-, string4 entry-
|               ------------------------------------------------------------------------------------------------------------
|        
|        /echo string1thru3 variable1thru3 result1thru3 -> occur during the varsets <-
|    :varsetstringset
|        /varset string4
|        /varset result4
|    :didvarsetstringset
|              ||find number of operands in stringgen still has to be done -ini-skills key-class name-class entry-num inicount j skillid is 60 characters
|              ||/if (${stringgen.Length} > string1thru4 length plus variable1thru4 length - (string4.length - variable4.arg[1,].length - 1)
|              || (currently detects if variable4 has more than one arg)
|              || you can use args and diff code to do fun things with stringgen if different lengths or differences in length are detected 
|              ||currently we are using /if variable4.length > variable4.arg[1,].length
|
|               ------------------------------------------------------------------------------------------------------------
|               -      *explanation of arguments
|               -      -e.g. ini-skills key-class name-class entry-num inicount j skillid 
|               -      -variable4 would have 4 arguments not 1, so string1thru4 + variable1thru4
|               -      -${variable4.Arg[1,]} would be num because all the strings and variables have been cut down already
| 
|               -      - if it was ini-skills key-class name-class entry-num,inicount,j,skillid
|               -      -${variable4.Arg[1,,]} would be num (also because all the strings and variables have been cut down already
|               -      -variable4 was created using arguments to get it to what it is variable4 == num inicount j skillid
|               -      - .Arg[1,,] is the first argument seperated by the third char within the blocks[] 
|               -      - .Arg[1,] is first argument seperated by a space
|               -      - .Arg[1,,] is first argument seperated by a comma
|               -      - .Arg[1,-] is first argument seperated by a dash
|               -      - .Arg[1,_] is the first argument seperated by an underscore
|               -      -arguments are important to stringgen
|               -      - .Arg[2,,] is the second argument seperated by a comma
|               -      - .Arg[${i},,] is the ${i}th argument seperated by a comma
|               -      - you can use for loops or manual varsets or for loops with reroutes to get ${i} variable to perform the way u want
|               ------------------------------------------------------------------------------------------------------------
|    ->/if variable4.length > variable4.arg[1,,].length
|        /if variable4.length > 0
|            /varset string4arg1 ${variable4}
|            /varset var 5
|            /varset string4args manually
|        /if variable4.length < 0
|            /varset string4arg1 string5
|            /varset var 6
|            /varset string4args manually
|
|              || i use the word arg alot it is the name of the variables e.g. string4arg1
|              || if i am talking about an actual .Arg i say .Arg 
|              || var == 5 and var == 6 are where we are with the stringnumber we are setting string4arg2 -> string4arg8
|              || e.g. /varset string4arg2 ${string5} /varset string4arg2 ${string6}
|              || it is because if variable1 has length we set string4arg1 to variable4 instead of string5 
|    :varsetting
|    :function2
|    
|              ||this is where we varset our stringargs
|              ||all these numbers can be bigger as you think you want them to be
|              ||like if you wanted to do even bigger things
|              || we use ${i} and ${j} .... ${var} is not used yet
|    /declare stringset
|        /for i 1 to 4
|        /for i 1 to 8
|        /if variable${i}.Arg[${j},].notequal[NULL]} {
|            /if ${j} == 8
|
|                        |    /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]}
|                        V
|
|            /if ${j} == 1
|
|                :stringargfinish
|                /varset string${i}arg${j} ${stringset2}
|
|        /next j
|        /next i
|
|        /if (${genverbose}) /echo our completed stringargs
|               ------------------------------------------------------------------------------------------------------------
|               -   - we varset stringset2 with the correct number of strings determined by the j count and its relation to notequal[NULL] strings
|               -   - please note the spaces in between variable${i}.Arg[1,]} and ${variable${i}.Arg[2,]} we continue to use space as the arg seperator
|               -   - this finds out if variable${i}arg${j} is NULL or not and uses the ${j}count to varset stringset with the correct number of ${variable${i}.Arg[1,] and so on 2,3,4,5,6,7,8
|               -   - then we varset string${i}arg${j} ${stringset2}
|               ------------------------------------------------------------------------------------------------------------
|
|               ------------------------------------------------------------------------------------------------------------
|---------------- this is the section of code previously described
|---------------- this is how we would use a semi advanced for loop or even two for loops to do things
|---------------- for loops varset the given variable to what you want then do code up until they reach /next i or /next j
|---------------- then they return from /next i or /next j, to the start of the for loop and do code with the ${i} or ${j} being the next number 1,2,3,4 etc
|----------------
|----------------    /if (!${Defined[stringset2]}) {
|----------------        /declare stringset2 string outer
|----------------    }
|----------------    /for i 1 to 4
|----------------    /for j 1 to 8
|----------------    ||note we dont use this, this could do more things    /for var 1 to 4
|----------------    /if (${variable${i}.Arg[${j},].NotEqual[NULL]}) {
|----------------        /if (${j} == 8) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]} ${variable${i}.Arg[5,]} ${variable${i}.Arg[6,]} ${variable${i}.Arg[7,]} ${variable${i}.Arg[8,} 
|----------------        /if (${j} == 7) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]} ${variable${i}.Arg[5,]} ${variable${i}.Arg[6,]} ${variable${i}.Arg[7,]} 
|----------------        /if (${j} == 6) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]} ${variable${i}.Arg[5,]} ${variable${i}.Arg[6,]}  
|----------------        /if (${j} == 5) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]} ${variable${i}.Arg[5,]} 
|----------------        /if (${j} == 4) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]}   
|----------------        /if (${j} == 3) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]}  
|----------------        /if (${j} == 2) /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]}  
|----------------        /if (${j} == 1) /varset stringset2 ${variable${i}.Arg[1,]}
|----------------        /varset j ${Math.Calc[${j} + 1]}
|----------------        /if (${variable${i}.Arg[${j},].NotEqual[NULL]}) {
|----------------            /varset j ${Math.Calc[(${j} + 10)- 11]}
|----------------            ||this is how we avoid typing -1 because some people dont like some numbers
|----------------            /goto :stringargfinish
|----------------        }
|----------------        /if (${variable${i}.Arg[${j},].Equal[NULL]}) {
|----------------            /varset j ${Math.Calc[(${j} + 10)- 11]}
|----------------            /varset string${i}arg${j} ${stringset2}
|----------------            /goto :stringargfinish
|----------------        }
|----------------        /if (${variable${i}.Arg[${j},].Length} > 0) {
|----------------            /varset j ${Math.Calc[(${j} + 10)- 11]}
|----------------        }
|----------------        /if (${variable${i}.Arg[${j},].Length} < 1) {
|----------------            /varset j ${Math.Calc[(${j} + 10)- 11]}
|----------------            /varset string${i}arg${j} ${stringset2}
|----------------        }
|----------------        :stringargfinish
|----------------        /varset string${i}arg${j} ${stringset2}
|----------------    }
|----------------    /next j
|----------------    /varset j 0
|----------------    /next i
|----------------    /varset i 0
|----------------    /varset j 0    
|----------------    /varset var 0
|----------------    /if (${genverbose} == 1) {
|----------------        /echo stringarg 1-1 ${string1arg1} | 1-2 ${string1arg2} | 1-3 ${string1arg3} | 1-4 ${string1arg4}
|----------------        /echo stringarg 2-1 ${string2arg1} | 2-2 ${string2arg2} | 2-3 ${string2arg3} | 2-4 ${string2arg4}
|----------------        /echo stringarg 3-1 ${string3arg1} | 3-2 ${string3arg2} | 3-3 ${string3arg3} | 3-4 ${string3arg4}
|----------------        /echo stringarg 4-1 ${string4arg1} | 4-2 ${string4arg2} | 4-3 ${string4arg3} | 4-4 ${string4arg4}
|----------------    }
|----------------    /echo --> varsetting finished -stringarg 
|               ------------------------------------------------------------------------------------------------------------
|
|    :varsettwo
|               ||this is where we varset our varargs
|               ||
|               ||this process is the same as stringargs except it is with the varargs
|               ||
|               ||the varargs use the - operand (dash operand)
|               ||the varargs are untested, we have removed the words before the first - already in :stringvarset, as well the dash itself
|               ||e.g. ini-skills key-class name-class entry-num inicount j skillid
|               ||is cut down to variable1== -skills ,variable2== class, variable3== class, variable4== num inicount j skillid
|               ||the - before skills is cut that way due to personal preference and usage at my discretion, you could do things differently but may experience problems
|               ||i am pretty sure you could do ini-skills key-class name-class entry-num inicount j skillid -num inicount j skillid
|               ||and the varargs would set the var4arg1 to num inicount j skillid, and var4arg2 to the second num inicount j skillid after the dash
|               ||the dash between num inicount j skillid and the second num inicount j skillid, would be the first dash because we have chopped our variable4.Right[-6] in the :stringvarset
|               ||the varargs use the - operand (dash operand)
|               ||
|               ||you would change this or write similiar code back in :stringvarset using /varset variable1 ${variable1.Right[-4]} instead of -3
|               ||
|               ||strings in mq2 from the chat window like peoples names also have invisible operands attached to them that macroquest does not display
|               ||strings like this from chat events or carried to subroutines have to be fixed with .Right[-2].Left[-2] ... to remove the invisible operands
|               ||the manual and wiki does not explain this properly or in depth enough and these invisble operands do not even /echo
|               || 
|               ||we can even /varset stringsofnumbers with .Right[-${i}].Left[-${i}] (variables) or with .Right[-1].Left[-1] or any number
|               ||/varset stringofnumbers 0123456789
|               ||/varset stringofnumbers ${stringofnumbers.Right[-2]} would give us in an /echo and change the variable to
|               ||    23456789
|               ||we can repeatedly do this as we choose, if it is by variable names, it can be like any name
|               ||
|               ||we can /varset stringofnumbers with .Right[${i}] or with .Right[1] or any number... or .Left[${i}] or .Left[1]
|               ||/varset stringofnumbers 0123456789
|               ||/varset stringofnumbers ${stringofnumbers.Right[2]} would change the variable to 
|               ||    89
|               ||
|               ||/varset stringofnumbers 0123456789
|               ||/varset stringofnumbers ${stringofnumbers.Left[2]} would change the variable to
|               ||    01
|               ||
|               ||/varset stringofnumbers ${stringofnumbers.Right[4].Left[2]} also works
|               ||
|               ||/multiline ; /varset stringofnumbers ${stringofnumbers.Right[4]} ; /varset stringofnumbers ${stringofnumbers.Left[2]} works
|               ||
|    /echo varargs 1-1 thru 1-4 e.g. var1arg1 or var1arg4
|                  2-1 thru 2-4
|                  3-1 thru 3-4
|                  4-1 thru 4-4
|               ||
|               ||right now we are working with varargs from the variable in this example of ini-skills key-class name-class entry-num inicount j skillid
|               ||we have cut down the variables1-4 to -skills (dash is by preference), class, class, num inicount j skillid
|               ||variable4==num inicount j skillid 
|               ||varargs work with dashes, unlike stringargs which work with spaces
|               ||${variable4.Arg[1-]} (first argument seperated by a dash) is num inicount j skillid, there is no dash
|               ||${variable4} was achieved by cutting down string4 (entry-num) to (num) then adding string5, string6, string7
|               ||we use the ${stringset} variable and for loops in :stringvarset - to detect how many variables exist to be added to string4 and then to variable4
|               ||variable4==num inicount j skillid
|               ||var4arg1==num inicount j skillid ( again this is the first argument seperated by a dash, there is no dash)
|               || *to do 
|               ||with all these lovely variables, we can change variables, or perform math.calcs with variables or give math.calcs to be performed with variables
|               ||we can also /goto :varsettwo with modified variables to create modified new varargs, after further variables relating to the original varargs have done things  
|               ||the same goes for stringargs or varargs or resultargs or even function changes in :function1 :function2 :function3 :function4
|               ||you could provide a ${count} variable and add ${Math.Calc[${count} + 1]} after every time say :varargs was performed
|               ||then you could reroute to different sections of the macro with /if (${count} == 2) /goto :thisarea or /if (${count} == 3) /goto :thatarea
|               ||you could even perform multiple commands/ifstatements like this --  /if (${count} == 2 {
|               ||                                                                        /echo ${count} is my count
|               ||                                                                        /echo ${Math.Calc[${count} + 10]} is count + 10
|               ||                                                                        /declare newstring string outer abcdefghijklmnopqrstuvwxyz
|               ||                                                                        /varset newstring ${newstring.Left[4]}
|               ||                                                                        :newstringloop
|               ||                                                                        /echo ${newstring} (newstring would be cut to abcd in this example) ${letstryagain} is our letstryagain count
|               ||                                                                        /if (${newstring.Arg[1,].Equal[abcd]}) {
|               ||                                                                            /echo newstring has been cut to abcd and newstring.equals[abcd]
|               ||                                                                            /echo newstring could be anything you want or anything cut down by variables
|               ||                                                                            /echo with an ifstatement to /if diffvariables do diffthings 
|               ||                                                                            /declare int outer newint 1
|               ||                                                                            /declare newstring1 string outer 0,1,2,3,4,5,6,7,8,9
|               ||                                                                        }
|               ||                                                                        /declare i int local 0
|               ||                                                                        /for i 1 to 10
|               ||                                                                        /echo ${i} is our i variables current count
|               ||                                                                        /if (${newstring1.Arg[${i},,]} == 8) {
|               ||                                                                            /echo i count of newstring1.args == 8 !!!!
|               ||                                                                            /echo newstring1.arg 8 exists and for loop has hit 8
|               ||                                                                            /echo ${newstring}
|               ||                                                                            /echo 4
|               ||                                                                        }
|               ||                                                                        /next i
|               ||                                                                        /varset i 0
|               ||                                                                        /if (${i} == 0 && !${Defined[letstryagain]}) {
|               ||                                                                            /declare letstryagain int outer 1
|               ||                                                                            /goto :newstringloop
|               ||                                                                        }
|               ||                                                                        /echo this is the ending of the macro but a real macro would be huge and do lots of things
|               ||                                                                        /end
|               ||                                                                        
|               ||if ${Defined[variablename]} without the squigglies around variablename determines if variablename exists or not
|               ||alot of the time this doesnt work and we use .Length} > 0 to determine /if (${variablename.Length} > 0) or with .Arg[1,,]} or .Arg[${i},,]}, to determine if a variablenames length is even existant
|    :function3
|    :varsetresultvariable
|    /varset result1 ${variable1}
|    /varset result2 ${variable2}
|    /varset result3 ${variable3}
|    /varset result4 ${variable4}
|    /echo result1 thru result8
|               ||our variable1==-skills (we've carried the - by personal preference)
|               ||our variable4==num inicount j skillid
|    :resultvarset
|    /declare svar string local
|    /for i 1 to 8
|    /declare s${i}var string local ${result4.Arg[${i},]}
|    /if string1 == ini-
|        /if string4 == entry-
|            /if (${result4.Arg[${i},]}.Equal[num]}) {
|                /varset result4arg${i} 1
|                /varset s${i}var ${s${i}var},1 
|            }
|            /if (${result4.Arg[${i},]}.Equal[inicount]}) {
|                /varset result4arg${i} 2
|                /varset s${i}var ${s${i}var},2 
|            }
|            /if (${result4.Arg[${i},]}.Equal[j]}) {
|                /varset result4arg${i} 3
|                /varset s${i}var ${s${i}var},3 
|            }
|            /if (${result4.Arg[${i},]}.Equal[skillid]}) {
|                /varset result4arg${i} 4
|                /varset s${i}var ${s${i}var},4 
|            }
|               ||*--------------------------*
|               ||*----resultvarset part1----*
|               ||*--------------------------*
|               ||
|               ||we have used a for loop, to save us from writing 5 pages of code, this is a brief explanation of how this works
|               ||this specific example will not work properly if you were to copy/paste it, alot of them will not work liek that
|               ||we have determined we are working with if string1== ini, if string4==entry
|               ||we can put all sorts of ideas here if we so chose
|               ||think things must be further defined further into the macro as well
|               ||
|               ||plz note we are using the .arg seperator space in some parts, and .arg seperator comma in some parts
|               ||.Arg[${i},]} or .Arg[1,]} is using the spaces as a seperator
|               ||.Arg[${i},,]} or .Arg[1,,]} is using the commas as a seperator
|               ||we are adding s${i}var to itself and adding a ,1 or ,2 or ,3 or ,4 after it ---- we will use .Arg[2,,]} later to determine and write the number to another variable
|               ||
|               ||ok so i didnt write out inicount j skillid but they are the same as num, except they are numbered differently
|               ||ok so i did
|               ||
|               ||basically we have assigned numbers as to what these entry- options are
|               ||we will use these numbers later to determine how many variables we are trying to print with our ini write
|               ||we have also attached s${i}var with the number we want the entry- option to be, as the second argument
|               ||/varset s${i}var ${s${i}var},4 
|               ||---- attaches ,4 to ${s${i}var}
|               ||
|               || we have varsetted or actually declared s${i}var as ${result4.Arg[${i},]}
|               || so we are setting s1var to result4.arg[1,] and the other s${i}vars are declared to their corresponding result.args
|               || so we are setting s1var to result4.arg[1,],1 and so on in the end along with ,2 ,3 ,4 on their corresponding s${i}var
|               ||
|               ||this is very important and can be used for lots of other important things
|               ||we can also do things differently or whatever we want
|               ||we can varset other variables here, and now we have some defined variables to work with, we are a bit into the code
|               ||we can come back here and assign more variables to print more things with our ini writes, at the most basic of ideas
|               ||
|               ||we are still within the for loop for part2
|               ------------------------------------------------------------------------------------------------------------
|            /if (${s${i}var.Arg[2,,].Length} > 0) {
|                /if (${i} == 1) 
|
|                             |    /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}
|                             |    /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]}
|                             V    
|
|                /if (${i} == 8)
|
|                ||the .Arg[2,,] is the number we have assigned to s${i}var e.g. ${s${i}var} == ${s${i}var},4 when we added the ,4
|                ||so within this part of the for loop, we assign svar and also function3 with the total number of variables arguments
|                ||
|                ||the example above of /varset is with i == 4, so we've assigned 4 variables s1var.Arg[2,,] thru s4var.Arg[2,,]
|                ||this is very important
|                || our svar and also our function3 have detected 4 variables and added the 4 variables together into the svar or the function3 variable
|                || please note our svar uses no spaces and our function3 uses , so we can read the arguments with a .Arg[1,,]} or whatever we want
|                ||
|                ||svar in this case with all these examples and ---- entry-num inicount j skillid
|                ||
|                ||svar == 1234
|                ||function3 == 1,2,3,4
|                ||
|                ||below is the actual code
|                ||    this method with the for loop saves us from like 5 pages of code
|
|
|               ------------------------------------------------------------------------------------------------------------
|----------------this is part 2, we are still within our for loop for the s${i}var
|----------------we will determine what number ${i} is at, and varset the svar variable to how many variables we are using
|----------------this enables us to use single lines of code with variables that determine how many variables we are using or writing in this case i think
|----------------for example, we want 6 variables to stand for the 6 arguments we have (that are not NULL), so we can do ----1 iniwrite line of code---- that has the
|---------------- correct number of variables instead of ----26 iniwrite lines of code---- for each of the different total amounts of arguments (6)
|----------------this concept is important to be used for lots of other things like maybey conjugate strings together
|----------------
|----------------                /if (${s${i}var.Arg[2,,].Length} > 0) {
|----------------                    /if (${i} == 1) {
|----------------                        /varset svar ${s1var.Arg[2,,]}
|----------------                        /varset function3 ${s1var.Arg[2,,]}
|----------------                    }
|----------------                    /if (${i} == 2) {
|----------------                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}
|----------------                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]}
|----------------                    }
|----------------                    /if (${i} == 3) {
|----------------                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}
|----------------                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]}
|----------------                    }
|----------------                    /if (${i} == 4) {
|----------------                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}
|----------------                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]}
|----------------                    }
|----------------                    /if (${i} == 5) {
|----------------                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}${s5var.Arg[2,,]}
|----------------                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]},${s5var.Arg[2,,]}
|----------------                    }
|----------------                    /if (${i} == 6) {
|----------------                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}${s5var.Arg[2,,]}${s6var.Arg[2,,]}
|----------------                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]},${s5var.Arg[2,,]},${s6var.Arg[2,,]}
|----------------                    }
|----------------                    /if (${i} == 7) {
|----------------                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}${s5var.Arg[2,,]}${s6var.Arg[2,,]}${s7var.Arg[2,,]}
|----------------                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]},${s5var.Arg[2,,]},${s6var.Arg[2,,]},${s7var.Arg[2,,]}
|----------------                    }
|----------------                    /if (${i} == 8) {
|----------------                        /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}${s5var.Arg[2,,]}${s6var.Arg[2,,]}${s7var.Arg[2,,]}${s8var.Arg[2,,]}
|----------------                        /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]},${s5var.Arg[2,,]},${s6var.Arg[2,,]},${s7var.Arg[2,,]},${s8var.Arg[2,,]}
|----------------                    }
|----------------                }
|----------------                /next i
|----------------                /varset i 0
|----------------|                /varset function3 ${result4arg1},${result4arg2},${result4arg3},${result4arg4}
|----------------            }
|----------------        }
|----------------        /echo svar --> ${svar}
|----------------        /echo function3 --> ${function3}
|               ------------------------------------------------------------------------------------------------------------
|               ||
|               ||so we have varsetted the result4arg1 thru arg4s into numbers and s${i}vars into s${i}vars,1 thru s${i}vars,4
|               ||   we have varsetted the svar and the function3
|               ||the function3 has been varsetted to s1var.arg[2,,]} thru s8var.arg[2,,]} or whatever determined by our i variable
|               ||please note the second varsetting of function3 is commented out, this was the old way of doing things and is an example
|               ||of other things we can do with function3 or whatever
|               ||function3 data in these examples would be 1,2,3,4 note the comma seperators
|               ||
|
|               ||
|               ||this part is confusing even to me after not working with it for a while
|               ||it is a little easy to explain but is complicated with the many variables working in sync
|               ||this basically varsets (for example) str1-1arg1 functionorders
|               ||our function orders are defined by the s1 through s4 variables
|               ||our function orders are ordered according to what our ${j} variable is
|               || if ${j} == 4 /varset str1-1arg1 function3.arg[s1]},function3.arg[s2],function3.arg[s3],function3.arg[s4]
|               || i and j are working in sync and determines liek all mathematical possiblities in sync with the s1,s2,s3,s4
|               ||you would have to practice this concept to deeply understand it and the arguments working in sync
|               ||this is not something you would probably just read and understand perfectly
|               ||these for loop numbers can be adjusted to provide even bigger matrixes of results, this is a small portable version
|               ||
|               ||this gives us ALL combinations as 1234 and auto /varsets them into variables e.g. 1234 1243 1324 1342 1423 1432
|               ||with 4 numbers in a 1234 fashionn not a 1111 etc type fashion which is not implemented yet
|               ||we result in 6 different possibilites
|               ||1234 1243 1324 1342 1423 1432
|               ||
|               ||as far as we are talking about- in this example, this is the order of num inicount j skillid, 
|               || in whatever order we want or order aka - the order in which we have typed them when starting stringgen
|               || num =1 inicount=2 j=3 skillid=4, we are talking about words not variables in this example j is just a word, not a variable
|               || we later read j as a word, and code decides that if variable.equal[j] (as a word)
|               || to use j as a variable, same that we read inicount as a word, and decide to use inicount as a variable
|               || or even better example of we read skillid as a word and decide to use Skill[${${tempvariable}.Arg[${${tempone}},,]}].ID 
|               ||adding the final squigglies within our ini writing area - but also revarsetting skill[tempvariable.arg[tempone]].ID
|               || due to the limitations of macroquest which i cannot explain nor give a valid reason for such lack of reasoning
|               ||there may be ways to carry untouched unread ${j} variables and hold them within variables without unmodded macroquest c++
|               || but the correct method is apparently just not findable and the common reasoning would maybey even be a different type of squigglie to signify
|               || we are not reading or writing the ${j} until it is the correct time, e.g. |${j}| would be nice
|               ||
|               ||this functionality would provide massively faster and more efficient more powerful macros and cant imagine why 
|               || someone would not include such an important thing within the C++ code of a scripting language
|               ||with macroquest in its current form, we must additionally redefine our variables with ${j} inside them, inside/during
|               ||the for loop we are using in reference to the ${j}
|               ||rather than predefining ${j} to be used in proper parts of the macro
|               ||this causes 100s and 1000s and millions of needless writes and reads when performing with complex variables
|               ||and slows things down and stuff
|               ||this would be preventative to people writing efficient complex code
|               ||but i could be wrong or something
|               ||
|               ||we can do lots of things with this concept and start involving mathematical formulas
|               ||to achieve other desired operations or functions or desired functions operations
|               ||
|               ||${i} == 1 would be s1 s2 s3 s4 in their natural state so this is not necessary to define
|               ||
|    /declare s1 int local 1
|    /declare s2 int local 2
|    /declare s3 int local 3
|    /declare s4 int local 4
|    /if (${function3.Length > 0) {
|        /varset var 1
|        /for i 1 to 8
|        /for j 1 to 8
|        /if (${str${i}-${var}arg$[j}.Length} > 0) {
|            /if(${function3}.Length > 0) {
|                /for var 1 to 4
|                /if (${i} == 2) {
|                    /varset s1 2
|                    /varset s2 1
|                    /varset s3 3
|                    /varset s4 4
|                }
|                /if (${i} == 3) {
|                    /varset s1 3
|                    /varset s2 1
|                    /varset s3 2
|                    /varset s4 4
|                }
|                /if (${i} == 4) {
|                    /varset s1 4
|                    /varset s2 1
|                    /varset s3 2
|                    /varset s4 3
|                }
|               /if (${j} == 1)
|
|                            |  /varset str${i}-${var}arg${j} ----the function orders ---- this is complex think this is like memory addresses almost
|                            V
|
|               /if (${j} == 8)
|               
|               ||we've commented out things here in the actual code for even more variable setting
|               ||for even more complex things to be done with the stringgen
|            }
|        }
|        /next j
|        /varset j 0
|        /next i
|        /varset i 0
|               ||we've commented out things here in the actual code for even more s1 thru s4 manipulation, varsetting, and possibly ifstatements
|               ||for even more complex things to be done with the stringgen
|               ------------------------------------------------------------------------------------------------------------
|----------------this is part 3 
|----------------you would have to practice this concept or you already understand this concept to get this one
|----------------this is like the hardest thing here
|----------------        /declare s1 int local 1
|----------------        /declare s2 int local 2
|----------------        /declare s3 int local 3
|----------------        /declare s4 int local 4
|----------------        /if (${function3.Length} > 0) {
|----------------        /varset var 1
|----------------            /for i 1 to 8
|----------------            /for j 1 to 8
|----------------            /if (${str${i}-${var}arg${j}.Length} > 0) {
|----------------                /if (${function3.Arg[${i},,].Length} > 0) {
|----------------                    /for var 1 to 4
|----------------                    /if (${i} == 2) {
|----------------                        /varset s1 2
|----------------                        /varset s2 1
|----------------                        /varset s3 3
|----------------                        /varset s4 4
|----------------                    }
|----------------                    /if (${i} == 3) {
|----------------                        /varset s1 3
|----------------                        /varset s2 1
|----------------                        /varset s3 2
|----------------                        /varset s4 4
|----------------                    }
|----------------                    /if (${i} == 4) {
|----------------                        /varset s1 4
|----------------                        /varset s2 1
|----------------                        /varset s3 2
|----------------                        /varset s4 3
|----------------                    }
|----------------                    /if (${j} == 1) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s2},,]},${function3.Arg[${s3},,]},${function3.Arg[${s4},,]}
|----------------                    }          
|----------------                    /if (${j} == 2) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s2},,]},${function3.Arg[${s4},,]},${function3.Arg[${s3},,]}
|----------------                    }                 
|----------------                    /if (${j} == 3) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s3},,]},${function3.Arg[${s2},,]},${function3.Arg[${s4},,]}
|----------------                    }             
|----------------                    /if (${j} == 4) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s3},,]},${function3.Arg[${s4},,]},${function3.Arg[${s2},,]}
|----------------                    } 
|----------------                    /if (${j} == 5) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s4},,]},${function3.Arg[${s2},,]},${function3.Arg[${s3},,]}
|----------------                    } 
|----------------                    /if (${j} == 6) {
|----------------                    /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s4},,]},${function3.Arg[${s3},,]},${function3.Arg[${s2},,]}
|----------------                    } 
|----------------                    /if (${j} == 7) {
|----------------                        /varset j 7
|----------------                    }
|----------------                    /if (${j} == 8) {
|----------------                        /varset j 8
|----------------                    }        
|----------------                }           
|----------------            }
|----------------            /next j
|----------------            /varset j 0
|----------------||          /next var
|----------------||          /varset var 0
|----------------||          /next j
|----------------||          /varset j 0 
|----------------            /next i
|----------------            /varset i 0
|----------------||            /varset s1 1
|----------------||            /varset s2 2
|----------------||            /varset s3 3
|----------------||            /varset s4 4
|----------------        }
|               ------------------------------------------------------------------------------------------------------------
|
|               ||plz note we have /varset var 1, and no var loop yet... this is just a small beginning example version of stringgen
|               ||this varsets all of our str1-1arg1 thru arg8 and up to str8-1arg8, leaving the -1 (our var variable)
|               ||
|               ||plz note we have commented out 2 parts of this code its just there to breed ideas and to be used as an example
|               ||this gives us all variations of our numbers
|               ||the list function is available at the waitloop or in the main macro of the portable version
|               ||the list function shows all variables almost -there is too many variables created by this to post here kinda
|               ||this is the incorrect list format
|               ||this is our result from entry-num inicount j skillid 
|               ||after all we have done s1 1, s2 2, s3 3, s4 4 
|               ||these 4 numbers 1,2,3,4 have created 6 results each, so 6x4 == 24... the results from 1 go to 1-1 results from 2 go to 2-1, results from 3 go to 3-1, results from 4 go to 4-1
|               ||strarg 1-1-arg1 is an easier way to read str1-1arg1 with our list function
|               ||
|               ||this is the actual variables names
|               ||str1-1arg1==1,2,3,4    str1-2arg1==empty    str1-3arg1==empty    str1-4arg1==empty
|               ||str1-1arg2==1,2,4,3    str1-2arg2==empty    str1-3arg2==empty    str1-4arg2==empty
|               ||str1-1arg3==1,3,2,4    str1-2arg3==empty    str1-3arg3==empty    str1-4arg3==empty
|               ||str1-1arg4==1,3,4,2    str1-2arg4==empty    str1-3arg4==empty    str1-4arg4==empty
|               ||str1-1arg5==1,4,2,3    str1-2arg5==empty    str1-3arg5==empty    str1-4arg5==empty
|               ||str1-1arg6==1,4,3,2    str1-2arg6==empty    str1-3arg6==empty    str1-4arg6==empty
|               ||str1-1arg7==empty      str1-2arg7==empty    str1-3arg7==empty    str1-4arg7==empty
|               ||str1-1arg8==empty      str1-2arg8==empty    str1-3arg8==empty    str1-4arg8==empty
|               ||
|               ||str2-1arg1==2,1,3,4    str2-2arg1==empty    str2-3arg1==empty    str2-4arg1==empty
|               ||str2-1arg2==2,1,4,3    str2-2arg2==empty    str2-3arg2==empty    str2-4arg2==empty
|               ||str2-1arg3==2,3,1,4    str2-2arg3==empty    str2-3arg3==empty    str2-4arg3==empty
|               ||str2-1arg4==2,3,4,1    str2-2arg4==empty    str2-3arg4==empty    str2-4arg4==empty
|               ||str2-1arg5==2,4,1,3    str2-2arg5==empty    str2-3arg5==empty    str2-4arg5==empty
|               ||str2-1arg6==2,4,3,1    str2-2arg6==empty    str2-3arg6==empty    str2-4arg6==empty
|               ||str2-1arg7==empty      str2-2arg7==empty    str2-3arg7==empty    str2-4arg7==empty
|               ||str2-1arg8==empty      str2-2arg8==empty    str2-3arg8==empty    str2-4arg8==empty
|               ||
|               ||str3-1arg1==3,1,2,4    str3-2arg1==empty    str3-3arg1==empty    str3-4arg1==empty
|               ||str3-1arg2==3,1,4,2    str3-2arg2==empty    str3-3arg2==empty    str3-4arg2==empty
|               ||str3-1arg3==3,2,1,4    str3-2arg3==empty    str3-3arg3==empty    str3-4arg3==empty
|               ||str3-1arg4==3,2,4,1    str3-2arg4==empty    str3-3arg4==empty    str3-4arg4==empty
|               ||str3-1arg5==3,4,1,2    str3-2arg5==empty    str3-3arg5==empty    str3-4arg5==empty
|               ||str3-1arg6==3,4,2,1    str3-2arg6==empty    str3-3arg6==empty    str3-4arg6==empty
|               ||str3-1arg7==empty      str3-2arg7==empty    str3-3arg7==empty    str3-4arg7==empty
|               ||str3-1arg8==empty      str3-2arg8==empty    str3-3arg8==empty    str3-4arg8==empty
|               ||
|               ||str4-1arg1==4,1,2,3    str4-2arg1==empty    str4-3arg1==empty    str4-4arg1==empty
|               ||str4-1arg2==4,1,3,2    str4-2arg2==empty    str4-3arg2==empty    str4-4arg2==empty
|               ||str4-1arg3==4,2,1,3    str4-2arg3==empty    str4-3arg3==empty    str4-4arg3==empty
|               ||str4-1arg4==4,2,3,1    str4-2arg4==empty    str4-3arg4==empty    str4-4arg4==empty
|               ||str4-1arg5==4,3,1,2    str4-2arg5==empty    str4-3arg5==empty    str4-4arg5==empty
|               ||str4-1arg6==4,3,2,1    str4-2arg6==empty    str4-3arg6==empty    str4-4arg6==empty
|               ||str4-1arg7==empty      str4-2arg7==empty    str4-3arg7==empty    str4-4arg7==empty
|               ||str4-1arg8==empty      str4-2arg8==empty    str4-3arg8==empty    str4-4arg8==empty
|               ||
|               ||string1arg1==-skills sting1arg2==empty string1arg3==empty string1arg4==empty
|               ||string1arg5==empty sting1arg6==empty string1arg7==empty string1arg8==empty
|               ||
|               ||string2arg1==class sting2arg2==empty string2arg3==empty string2arg4==empty
|               ||string2arg5==empty sting2arg6==empty string2arg7==empty string2arg8==empty
|               ||
|               ||string3arg1==class sting3arg2==empty string3arg3==empty string3arg4==empty
|               ||string3arg5==empty sting3arg6==empty string3arg7==empty string3arg8==empty
|               ||
|               ||string4arg1==num sting4arg2==num inicount string4arg3==num inicount j string4arg4==num inicount j skillid
|               ||string4arg5==empty sting4arg6==empty string4arg7==empty string4arg8==empty
|               ||
|
|               ||our string4args are our main string variable, with str4-1arg1 and such being our lower form of the string variable
|               ||our string4args and other stringargs have been set to include all the args not just 1 arg
|               ||this enables us to do more things and further pick apart and play with variables
|               ||pretty sure this way is better at this point to even read the code variables and use them as well
|               ||
|               || in this example we have varset the str4-1arg1 thru arg8 and such with numbers corresponding to our entry- orderofvariables num 1 inicount 2 j 3 skillid 4
|               || we have numbered the entry- orderofvariables seperately in the code, they are not the actual order of variables just my desired order
|               || if we were to use ini-skills key-class name-class entry-skillid j inicount num we would have an order of 4,3,2,1 skillid being 4 and such inicount being 2
|               ||we have ordered num inicount j skillid 1,2,3,4 if we were to add diff things those would be like 5,6,7,8 or whatever and a mixture would end in
|               ||something like 2,4,6,5 
|               ||2 being inicount, 4 being skillid, 6 and 5 being other variables that we have numbered 6 and 5 in the code itself
|               ||this is important and used later, these concepts are the hardest to grasp referring to the code itself and the complicated way the /varsets are done
|               ||even my lack of integration with the code in my life causes my brain to lose the understanding of the code at first
|               ||but if outlined and practiced you become one with the code  
|
|               ||
|               ||the part for varargs isnt even written or functioning but it would basically be a 2 min copy paste job
|               ||
|               ||this is part 4
|               ||this is where we set our main esvariables
|               ||this is still under development and these areas may change, im still learning the basics of my creation
|               ||and there are several advanced techniques that will require diff things in diff areas, and reroutes back to
|               ||some of these areas in the macro... these areas may have to end up being rearranged and :loop signifiers
|               ||will have to be rearranged
|               ||
|               ||its all pretty simple from here on out
|               ||so far think the hardest part was when we did ?memory address? type varsets
|               ||
|
|               ||this part is where we /varset our main esvariables
|               ||these parts from here on out may be changed in the future
|               ||this is part 4
|    /if (${result1.Equal[skills]}) {
|        /echo setting skills ini (1)
|        /echo
|        /varset es1 ${result1}
|    }
|    /if (${string2.Equal[key-]}) {
|        /if (${result2.Equal[class]}) {
|            /varset es2 classnames
|        }
|    }
|               ||yes we just want the es1, es2, es3, es4 to be nonvariable words at this point
|               ||due to macroquest lack of functionality we cannot set our variables with variables like ${j} inside them
|               ||or our variables would be fully functioning after being /varset or /define in these areas - as previously explained
|               ||if things were different, es3 would be the most complex variable here
|
|    /if (${string3.Equal[name-]}) {
|        /if (${result3.Equal[class]}) {
|            /varset es3 ${es2}-skills       
|        }
|    }
|
|               ||for entry we will varset es4 stringargs, we could in theory /varset es4 string4arg4.Arg[1,] string4arg4.Arg[2,] string4arg4.Arg[3,] string4arg4.Arg[4,]
|               ||because ---- string4arg4 is num inicount j skillid
|               || string4arg1==num
|               || string4arg2==num inicount
|               || string4arg3==num inicount j
|               || string4arg4==num inicount j skillid
|               ||
|               ||we have done this this way from the code below, because it gives us more advanced options, and gives us a more
|               ||correct form of the exact variable.Arg because we could have previously made changes to these arguments and done things
|               || with them, and revarsetted them, prior to this line of code happening here like this...
|               ||
|               ||what is being said is, we could do more advanced things with our variables before this code hits
|               || and this way would give us a more accurate result
|               ||
|
|    /if (${string4.Equal[entry-]}) {
|        /echo string4 equals entry
|        /varset es4 ${string4arg1.Arg[1,]} ${string4arg2.Arg[2,]} ${string4arg3.Arg[3,]} ${string4arg4.Arg[4,]}
|        /declare es4temp1 string local empty
|
|                               |
|                               V
|
|        /declare es4temp8 string local empty
|        /for i 1 to 12
|        /for j 1 to 8
|        /if (${string4arg${i}.Arg[${j},].Equal[num]}) {
|            /varset es4temp${j} numcount
|        }
|        /if (${string4arg${i}.Arg[${j},].Equal[inicount]}) {
|            /varset es4temp${j} inicount
|        }
|        /if (${string4arg${i}.Arg[${j},].Equal[j]}) {
|            /varset es4temp${j} j
|        }
|        /if (${string4arg${i}.Arg[${j},].Equal[skillid]}) {
|            /varset es4temp${j} skillid
|        }
|        /next j
|        /varset j 0
|        /next i
|        /varset i 0
|
|               ||
|               ||ok so we have varsetted our es4temps with words, those are just words relating to the commands we will want
|               ||we are still within our string4.equal[entry-]
|
|        /for j 1 to 8
|        /if (${es4temp${j}.NotEqual[empty]}
|            /if (${j} == 1) 
|
|                         | /varset es4 ${es4temp1} ${es4temp2} ${es4temp3} ${es4temp4}
|                         V
|
|            /if (${j} == 8)
|        }
|    }
|    /next j
|    /varset j 0
|    /echo esvariables es1==     es5==    es9==
|    /echo             es2==     es6==    es10==
|    /echo             es3==     es7==    
|    /echo             es4==     es8==
|    
|               ||ok so here we do the same concept as before, we detect the number of variables in use with our ${j} variables count
|               ||and we make the /varset with the appropriate number of variables ranging from 1 to 8
|               ||all these for loop limitations can be whatever you want when you start working with the stringgen
|               ||    instead of doing 1 to 8 you can do 1 to 24 or whatever you want depending on what you're attempting to do
|
|               ||this is part 5
|               ||this is our varsetresult2area, varsettingthree total
|               ||this is where we varset our resultargs--  this is a matrix of strings shown further down here
|               ||this is part 5
|
|    :varsetresult2variable
|    /echo -->varsetting three started resultarg
|    /echo result1== ${result1} / result2==${result2} / result3==${result3} / result4==${result4}
|    /echo
|    /echo result1== ${result5} / result2==${result6} / result3==${result7} / result4==${result8}
|    /echo
|    /for i 1 to 4
|    /for j 1 to 4
|||    /for var 1 to 4
|    /if (${result${i}.Arg[${j},].Length} > 0) {
|        /varset result${i}arg${j} ${result${i}.Arg[${j},]}
|    }    
|    /next j
|    /varset j 0
|    /next i
|    /varset i 0
|    /varset j 0
|    /varset var 0
|    /echo resultargs
|
|               ||this is what our resultargs are going to be with what we have chosen to type /gui skillcount ini-skills key-class name-class entry-num inicount j skillid
|               ||when we /echod are resultargs (not typing all that) this is what would show in this example
|               ||result1arg1==-skills     result1arg2==empty      result1arg3==empty     result1arg4==empty
|               ||result2arg1==class       result2arg2==empty      result2arg3==empty     result2arg4==empty
|               ||result3arg1==class       result3arg2==empty      result3arg3==empty     result3arg4==empty
|               ||result4arg1==num         result4arg2==inicount   result4arg3==j         result4arg4==skillid
|               ||
|               ||result is varsetted off variable1 thru variablewhateverr so we would probably want to put custom math
|               ||calculation formulas or !!!!formula lists!!!! using the -seperator so they are read with variable and end up in result
|               ||to perform more advanced mathematical things with stringgen we would add code in this area regarding mathematical formulas
|               ||or even better mathematical formula lists in this area
|               ||
|               ||this is the first area result gets /varsetted we can make a second area later if we want too
|               ||we can even reroute things back to specific :loop signifiers to rerun the loop with different variables
|               ||and perform different varsets and use different if statements and everything or the same if statements
|               ||this portable version of stringgen offers alot of potential as to doing anything your mind can come up with
|               ||you have the power and the ability to make your creations come to life, albeit restricted by the macroquest scripting language to some extent
|               ||having multiple characters running stringgen may be a way to get past the #turbo limit of commands per second or w/e it is
|               ||
|               ||you could even develop some sort of encryption to encrypt/decrypt your files with, pretty sure the macroquest offers a /cmd  or rather a /exec function
|               ||along with other functions that can make stringgen do anything you desire such as read chat and perform automated commands and keypresses 
|               ||while you write realtime information to ini files on multiple characters/stringgens
|               ||plz dont blow up ur computer or anything make explode in ur computer ok guys?
|               ||trying to give a fun and decent way for people to learn and experiment with coding
|               ||
Last edited by toolisuber on Mon Jul 20, 2015 3:59 am, edited 55 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Thu Jul 16, 2015 2:06 pm

stringgen manual pt2
so - these posts on mq2 are hard to read because of the colors and the font
this is better in notepad
we are going to continue where we left off, with the basics of stringgen

Code: Select all

|               ||this is part 6
|               ||this is where we /varset the esargs from the esvariables
|               ||dont get too excited but this is the fun part
|               ||    -well the start of the fun part, function4 is where we get deep within the variables, re/varset the resultargs, and we can also set the var1-1 endvariables
|               ||    -we will re/echo the resultargs, do whatever else we want, and make stringgen detect user error and revert to default
|               ||we can do alot of interesting things in this section before the main functions happen
|               ||we would perform secondary math calculations in this area and make final varsets, and /goto :loop signifiers that are of interest to us, put /if statements returning us to this section of the macro, perhaps with counts or such
|               ||
|               ||the esvariables have been /define and/or /varset in part5
|               ||this is where we bring them further to the esargs
|
|    :esargvarset
|    /echo -->varsetting four started -esarg
|    /echo es1==${es1} / es2==${es2} / es3==${es3} / es4==${es4}
|    /echo
|    /echo es5==${es5} / es6==${es6} / es7==${es7} / es8==${es8}
|    /echo
|    /for i 1 to 4
|    /for j 1 to 4
|||    /for var 1 to 4
|    /if (${es${i}.Arg[${j},].Length} > 0) {
|        /varset es${i}arg${j} ${es${i}.Arg[${j},]}
|    }
|    /next j
|    /varset j 0
|    /next i
|    /varset i 0
|    /varset j 0    
|    /varset var 0
|    /echo --> varsetting four finished -esarg
|
|               ||this is what our esargs are going to be with what we have chosen to type /gui skillcount ini-skills key-class name-class entry-num inicount j skillid
|               ||when we /echod are esargs (not typing all that) this is what would show in this example
|               ||es1arg1==-skills           es1arg2==empty      es1arg3==empty     es1arg4==empty
|               ||es2arg1==classnames        es2arg2==empty      es2arg3==empty     es2arg4==empty
|               ||es3arg1==classnames-skills es3arg2==empty      es3arg3==empty     es3arg4==empty
|               ||es4arg1==numcount          es4arg2==inicount   es4arg3==j         es4arg4==skillid
|               ||
|    /declare tempone string local
|    :function4
|    /declare result4temp1 string local empty
|
|                        |
|                        V
|
|    /declare result4temp8 string local empty
|    /if (${string1.Equal[ini-]}) {
|        /echo setting -skills ini (2)
|        /echo
|               ||we basically re/varset result4arg1 thru result4arg4 in this example
|               ||this is fairly redundant and is how the basics of stringgen work for this specific example
|               ||in more complex things, you would want math.calcs and all sorts of fun stuff here for even more variable manipulation
|               ||you could even make more sets of variables based on the results of mathematical calculations if the amount of variables was so massive
|               ||that you would not want to define all those variables, only define them based on the result of mathematical equations/calculations involved
|               ||/deletevar deletes a variable
|
|        /for j 1 to 8
|        /if (${es4arg${j}.Length} > 0 && ${es4arg${j}.NotEqual[empty]}) {
|            /if (${es4arg${j}.Arg[1,].Equal[numcount]}) {
|                /varset result4arg${j} ${es4arg${j}}
|                ||ways to do this  -math in ini, for loop overwriting ini, array of function <--old comment                    
|            }
|            /if (${es4arg${j}.Arg[1,].Equal[inicount]}) {
|                /varset result4arg${j} ${es4arg${j}}                               
|            }
|            /if (${es4arg${j}.Arg[1,].Equal[j]}) {
|                /varset result4arg${j} ${es4arg${j}}                    
|            }
|            /if (${es4arg${j}.Arg[1,].Equal[skillid]}) {
|                /if (${es3arg1.Equal[${classnames.Arg[${i},,]}-skills]}) {
|                    /echo setting skillid vars
|                    /declare apply_poison   string outer 7,apply poison
|                    /declare fishing        string outer 56,fishing
|                    /declare make_poison    string outer 57,make poison
|                    /declare tinkering      string outer 58,tinkering
|                    /declare research       string outer 59,research
|                    /declare alchemy        string outer 60,alchemy
|                    /declare baking         string outer 61,baking
|                    /declare tailoring      string outer 62,tailoring
|                    /declare blacksmithing  string outer 64,blacksmithing
|                    /declare fletching      string outer 65,fletching
|                    /declare brewing        string outer 66,brewing
|                    /declare jewelry_making string outer 69,jewelry making
|                    /declare pottery        string outer 70,pottery
|                }
|                /varset result4arg${j} ${es4arg${j}}
|                /echo ${es4arg${j}} es4arg${j} checking this
|               }
|           }
|           /next j
|           /varset j 0
|       }
|   }
|              ||so we have varsetted our esargs then varsetted our resultargs redundantly here
|              ||in the process we have /declare variables that are not even used at this time
|              ||this is a good example of what goes in this section
|              ||plz note, because of the way unmodded macroquest functions we have to keep ${j} out of our variables until the time is correct
|              ||we could do all sorts of wild and crazy and fun and exciting things with our variables if we could carry an untouched unread ${j} inside of our variables
|              ||or any variable name not just ${j} or multiple variables
|              ||instead we must make the computer do more work and more effort by declaring / varsetting (varsetting) our variables inside the actual ${j} route of the for loop
|              ||or w/e the inside of the actual for loop, where ${j} is the number we want already
|              ||
|    /echo resultargs
|               ||this is what our resultargs could be re/varset and they are re/echod /gui skillcount ini-skills key-class name-class entry-num inicount j skillid
|               ||when we /echod are resultargs (not typing all that) this is what would still show in this example
|               ||result1arg1==-skills     result1arg2==empty      result1arg3==empty     result1arg4==empty
|               ||result2arg1==class       result2arg2==empty      result2arg3==empty     result2arg4==empty
|               ||result3arg1==class       result3arg2==empty      result3arg3==empty     result3arg4==empty
|               ||result4arg1==num         result4arg2==inicount   result4arg3==j         result4arg4==skillid
|               ||
|    /if (${string4.Find[entry-]}) {
|        /if (${string4arg1.Length} > 0) {
|            /if (${string4arg2.Length} > 0) {
|                /if (${string4arg3.Length} > 0) {
|                    /if (${string4arg4.Length} > 0) {
|                        /varset var1-1 ${string4arg1}-${string4arg2}-${string4arg3}-${string4arg4}
|                        /echo
|                        /echo var1-1 set
|                    }
|                }
|            }
|        }
|    }
|               ||this is where we would /varset var1-1 the endvar
|               ||because of our macroquest limitations, we cannot do what we want here usually
|               ||this is still useful for reference, and is not done properly in this code or example
|               ||if you were to view prior examples of our variable manipulation, you could create a for loop and series of if statements
|               ||to varset var1-1 or such, to the correct number of variables that you so desired or that were used in whatever processes
|               ||this is just a simple example, and happens to be what is in the code at this point in time
|               ||
|    /if (${var4arg1.Length} < 0) {
|        /echo
|        /echo varsetting stringgen default
|        /varset stringgen default
|    }
|               ||this determines if there is even a var4arg1 and if there is not sets stringgen to default
|               ||we could do all sorts of other things here if we so wanted to
|/declare a- int local 1
|/declare b- int local 2
|/declare c- int local 3
|/declare d- int local 4
|/declare e- int local 5
|/declare f- int local 6
|/declare g- int local 7
|/declare h- int local 8
|/declare i- int local 9
|/declare j- int local 10
|/declare k- int local 11
|/declare l- int local 12
|/declare m- int local 13
|/declare n- int local 14
|/declare o- int local 15
|/declare p- int local 16
|/declare q- int local 17
|/declare r- int local 18
|/declare s- int local 19
|/declare t- int local 20
|/declare u- int local 21
|/declare v- int local 22
|/declare w- int local 23
|/declare x- int local 24
|/declare y- int local 25
|/declare z- int local 26
|}
|/echo
|/echo waitloop starting --> type continue or .
|/echo waitloop --> type list or list all for variable lists
|:waitloop
|/delay 4
|/doevents continue
|/doevents list
|/if (${continue} == 1) {
|    /varset continue 0
|    /goto :start
|}
|/goto :waitloop
|              ||ok this is variable setting we have /declare variables like a- thru z- (adash thru zdash)
|              ||its a little confusing with the dash marker but thats what was chosen for such things
|              ||we also want room for lots more declares like this if we are doing diff things or something
|              ||
|              ||this is where we have a simple waitloop, it has commands that it reads basically with Sub Event_continue  and Sub Event_list
|              ||basically we could have a /doevents which will process events like chatevents specifically
|              ||so we have an endless loop with a /delay to be easy on our computers
|              ||and we have /doevents continue and /doevents list which read those 2 specific events
|              ||
|              ||just a plain /doevents will read all chatevents, we are using /doevents specificname such as continue or list
|              ||whatever we have named our Sub Event_ and the stuff we have at the very top of the macro to define such an event in the first place
|              ||#Event continue "#*#guild, 'continue'" ----will search for the word continue in all chat strings ever, whenever there is a /doevents
|              ||#Event list "#*#say, 'list#1#'" ----will search for the word list (but also search for a variable if there is one, or nothing if there isnt one)
|              ||#Event list "#*#says, 'list#1#'" ----will search for the word list again, but note the s on the end of says
|              || when we type in chat in eq, it says -- toolis says -- to other people
|              || but it says -- you say -- on your own screen... 2 different chat strings depending whether ur hearing it, or saying it
|              || guild done in this way is universal, both ways on my screen and other chars screens end in guild so both ways trigger the chat event
|              ||
|              ||#*# means negate this stuff thats in the place of the #*#.... #*#guild, 'blahblah'" the #*# negates everything before the word guild
|              ||please note the spacing and ' ' markings in our #Event are highly important and will not work correctly without these things
|              ||
|              ||this is an example of an advanced chat event ---- #Event Toggle "#1#guild, '#2#toggle#3#'"
|              ||    #1# we use to search the variable for a name in this example  ... 
|              ||    #2# is used to search for our targets-- healers, specific names whatever... 
|              ||    #3# is used to search for our commands
|              || the number is just the variable number, #3# is our third variable, #1# is our first variable
|              || the variable created is a string of text in this case
|              ||my other macros have examples of functioning code within them
|              || /gui tooli,toolis,chloroform toggle donukes 1
|              || would be tooli tells the guild, 'tooli,toolis,chloroform toggle donukes 1'"
|              || #1# == tooli tells the
|              || #2# == tooli,toolis,chloroform
|              || #3# == donukes 1
|              || we can use any .Arg seperator we want we can use space, instead of comma
|              || we then search for args or do things like if ${chatvariablename1.Arg[${i},].Equal[${Me.Name}]} --- this uses space seperator as previously explained .Arg[${i},,].Equal[${Me.Name}]} would be comma seperator
|
|              || this is what a chat sub event is like, with 3 variables
|              || Sub Event_Toggle(Line, ChatSender, Targets, action)
|              || code goes here
|              || code goes here
|              || code goes here
|              || /return
|              ||
|              ||plz note we have named our first variable ChatSender, our second variable Targets, and our third variable action
|              ||this would make it return if no actionvariable was defined ( no words for #3# )
|              ||/if (!${Bool[${action}]}) /return
|
|              || ok so thats in my other macros and on a side note
|              || sometimes names have to be chopped down from invisible operands like "-Tooli-" .... mq2 reads or causes those invisible operands but does not /echo them if you try
|              || we fix this with /varset ChatSender ${ChatSender.Right[-2].Left[-2]} ... and then we can read use manipulate those names the way we want, as mentioned near beginning of manual
|
|              ||during our waitloop we wait for continue or . or list or list all
|              ||the next part of the macro is our main function basically
|              ||this is where the dirty work happens that we all waited so long for
|              ||this macro in its portable form is pretty much designed to write ini files with whatever variables u want
|              ||it has potential for whatever you want to do with it
|
|:start
|/echo starting count of skills                          
|/declare tempvariable string local empty
|/declare count int local 0
|/declare inicount int local 0
|/declare numcount int local 0
|/declare num1 string local
|/declare num2 string local
|/declare num3 string local
|/declare num4 string local
|              ||we /declare our temporary variables, when performing complex things you prolly want to /deletevar these as you are done with them, so you can re/declare them
|/for i 1 to 16
|/echo
|/echo ${classnames.Arg[${i},,]}
|/varset tempvariable ${classnames.Arg[${i},,]}
|/varset tempvariable ${tempvariable}-skills
|/echo ${tempvariable}
|/varset skillcount 0
|/for j 1 to 60
|             ||we initiate our for loops for whatever we desire, in this case it is writing ini files and checking classnames.args for classes to determine which classes skills we are writing
|             ||some for loops may be very large and complex depending on what you are trying to do, we would simply rearrange the main function area of the macro to whatever
|             ||schematic we are trying to use to reach our desired objective
|             ||we are within the for loops now
|             ||
|             ||
|             ||we keep track of a count, this is a useful example, we can make /if statements based on the count
|             ||this specific example goes into i,j,and var loops, we determine the orderofvariables we have typed when we first start stringgen
|             ||do to macroquests limitations, we have to do this within the forloops -pretty sure we are unable to carry an untouched ${j} variable from outside the loop, or all this would have been done in part5 or part6
|             ||
|             ||we determine if function3 has any length --this is just almost unnecessary doublechecking at this point, but it being there allows for easier user creation of a function without any trouble
|             ||in this function --we start the var for loop, which we use first, and work from the inside to the outside
|             ||we are assigning a number to the variable num, this has nothing to do with the word num prior
|             ||before when we were talking about num, we were building up to turn num into ${numcount}
|             ||right now, we are using variables num1 thru num4 to assign a number to our entry-ordersofvariables
|             ||usually entry-num inicount j skillid, would be like 1234 in svar or 1,2,3,4 in function --we did this earlier
|             ||we have num here to further our flexibility with whatever order of variables we have chosen
|             ||we are actually /varset num${var} ${var} so we are finding automatically basically - which number ${var} is and setting the num${var} to that number - var==2 we are then using num2, then we are setting it 2
|             ||this 2 that we have set num${var} to, or any of the num${var} ... is relative to the number we assigned to the words back in :resultvarset of part1
|             ||
|             ||to clarify...
|             ||we varset result4arg2 or whatever, as ${result4arg2},2 back in :resultvarset of part 1
|             ||we want inicount to be 2, no matter what.... it could be 10, its just a number...
|             ||as mentioned before, it has nothing to do with the actual order you typed entry-variable variable variable variable
|             ||but in the code, we have given it a hard number
|             ||we abuse the variable var to find which argument inicount is e.g. num j skillid inicount, inicount is argument 4
|             ||but we have it coded hard to 2
|             ||we cycle through var searching for our words num j skillid inicount in this particular example
|             ||inicount is argument 4 and happens to get found last, but it is still coded hard as number 2
|             ||so we /varset num${var} ${var}, we found inicount which happens to be the fourth argument of the es4arg${var} -- or es4arg4
|             ||we are overusing var, very properly and we then varset num${var} ${var}, so num4 4.. num4==4
|             ||later in the function, we have to make the iniwrite line of code that writes the ini
|             || if we did not use num4 the iniwrite would not understand what order you typed the things in, unless you specifically told it
|             || with this method of number assigning, we can manipulate variables in the code to whatever order we want, or you typed them
|             ||and make 1 line of /ini "ininame" "inisectiontitle" "inientrymainname" "allthe ini variables we want and answers and variables and everything! (data that is relative to the inientrymainname)"
|             || in other words "Inifilename" "this specific section of the ini" "this is my ini entry name" "this is my ini entry names data"
|             ||    "MyIniName" "ClericSpells" "SpellOne" "Minor Healing"
|
|               this would be like MyIniName.Ini
|
|               [ClericSpells]
|               Spell1=Minor Healing
|               Spell2=empty
|               Spell3=empty
|               Spell4=empty
|
|               our variable manipulation allows us to do things like 
|               "MyIniName" "ClericSpells" "SpellOne" "${Spell[Minor Healing].Name},${Spell[Minor Healing].ID},${Spell[Minor Healing].Mana},${Spell[Minor Healing].Level}"
|               only our variable manipulation allows us to order it any way we want, with variables, and num1 thru num4 lets this all happen
|               MyIniName" "ClericSpells" "SpellOne" "${es4arg1},${es4arg2},${es4arg3},${es4arg4}"
|               now normally, to write our spell minor healing name, spell minor healing id, we have to have a line of code that says that
|               with variables, we can just use variables which can be anything
|
|               there is 2 problems, macroquest limitations dont allow ${j} to be inside things before we are in ${j} it will write as 0 or 1 or NULL or whatever ${j} is at the time
|               and our variables have to be predefined somewhere... we could do ${string5},${string6},${string7},${string8} (which would be normally num inicount j skillid in that order)
|               but we would have lost alot of our variable manipulation in advanced performance situations with returning to :loop signifiers
|               and we dont want to type all sorts of crazy math formulas every time we run this or whatever and we cant just type ${j} as we start and carry it through and do things to it
|               and switch to different variables based on /if statements, using the original string like that
|
|               so we have our hard number predetermined associated with the words we are or could type
|               assigning the num1 thru num4, allows us to figure out what what variable is where, and perform code accordingly
|               and make one ini write using variables, instead of 5 pages of code and "iniwrites" "whatever" "whatever" "oneofeach possiblescenerio"
|
|               our minor healing example, if done with the code actually implemented for it, either way, would turn out to
|
|               [ClericSpells]
|               Spell1=Minor Healing,200,10,1
|
|               with .args, we can search for ini entries and stuff with numbers like Spell1, and manipulate things about/with the variable
|
|               this is not the best example of the uses of stringgen, and is a distraction from the things you could do if you so wanted to
|               stringgen is alot more powerful than this, but it can do whatever
|               you can later use and manipulate data from ini entries, or write/read to inis in real time with 100 characters working in conjunction
|               you can even make and write some sort of text game and play games against yourself with all that shared ini reading/writing
|             ||
|             ||
|             || 
|             ||this allows us to type variables in any order, and things to work without 10 pages of code
|             ||this is perhaps the 2nd most hard concept in this macro to grasp
|             ||
|             ||es4arg${var} as es4arg1, we would varset it with the squigglies ${} around it,to basically activate it into a working variable
|             ||some of this could be done in part5 or part6 but in this example the variable with ${j} in it, has to be "activated" within the j forloop itself
|             ||due to macroquests limitations, "activating" this variable beforehand would make j turn into like 0 or 1 or NULL or whatever ${j} was at the time 
|             ||
|/if (${${tempvariable}.Arg[${j},,]} > 0) {
|    /varset count ${Math.Calc[${count} + 1]}
|    /if (${${tempvariable}.Arg[${j},,]} == 7 || ${${tempvariable}.Arg[${j},,]} == 56 || ${${tempvariable}.Arg[${j},,]} == 57 || ${${tempvariable}.Arg[${j},,]} == 58 || ${${tempvariable}.Arg[${j},,]} == 59 || ${${tempvariable}.Arg[${j},,]} == 60 || ${${tempvariable}.Arg[${j},,]} == 61 || ${${tempvariable}.Arg[${j},,]} == 62 || ${${tempvariable}.Arg[${j},,]} == 64 || ${${tempvariable}.Arg[${j},,]} == 65 || ${${tempvariable}.Arg[${j},,]} == 66 || ${${tempvariable}.Arg[${j},,]} == 69 || ${${tempvariable}.Arg[${j},,]} == 70) {
|        /varset inicount ${Math.Calc[${inicount} + 1]}    
|        /if (${stringgen.NotEqual[empty]} && ${stringgen.NotEqual[default]}) {
|            /if (${function3.Length} > 0) {
|                /if (${string4.Equal[entry-]}) {
|                    /for var 1 to 4
|                    /if (${es4arg${var}.Equal[numcount]}) {
|                        /varset es4arg${var} ${es4arg${var}}
|                        /varset num${var} ${var}
|                        /goto :endvarset
|                    }
|                    /if (${es4arg${var}.Equal[inicount]}) {
|                        /varset es4arg${var} ${es4arg${var}}
|                        /varset num${var} ${var}
|                        /goto :endvarset
|                    }
|                    /if (${es4arg${var}.Equal[j]}) {
|                        /varset es4arg${var} ${es4arg${var}}
|                        /varset num${var} ${var}
|                        /goto :endvarset
|                    }
|                    /if (${es4arg${var}.Equal[skillid]}) {
|                        /varset es4arg${var} Skill[${${tempvariable}.Arg[${${tempone}},,]}].ID
|                        /varset num${var} ${var}
|                        /goto :endvarset
|                    }
|                    :endvarset
|                    /next var
|                    /varset var 0
|                    /for var 1 to 4
|
|||we have commented out these interesting and useful things
|||/if d- > ${var} {
|||&&
|||/varset d- ${var}
|
|             ||in this particular example we have initiated a second var forloop
|             || or a forloop using var as the variable... which has been /varset to 0 for us to use it again
|             || we continue to use var (almost to its limits?)
|             || we are still inside and i and j for loops, using var as the third for loop, this is the second time we are using var
|             ||i and j are still like 1 and we are repeatedly using var
|             ||  
|             ||in this next area we take our a- thru z- variables (26 different variables available here like this)
|             ||
|             ||we determine our function3.Arg[${var},,]} corresponding to the function3 that resulted from :resultvarset
|             ||thats when we /varset svar 1234 and /varset function3 1,2,3,4 in this manuals general example
|             ||
|             ||now we have a- =1, b- =2 c- =3, d- =4 all the way thru z- =26
|             ||we are in a var forloop
|             ||we treat function3 like the a lock tumbler in real life and using a- thru z- as a lockpick
|             ||if function3.Arg[1,,] notequal a- (which is first at 1)
|             ||   we then enter a mini forloop for a- 1 to 4
|             ||   we /next a- if function3.arg[${var},,].NotEqual[${a-}]}
|             ||
|             || so basically we are getting our a- through z- variables to be the correct numbers we want, 1 by 1
|             || the numbers we are trying to achieve are (in this example) stored in function3
|
|             ||so basically this works like...
|             ||    function3 == 4,2,3,1 
|             ||    function3.arg[1,,] == 4
|             ||    a- is predefined as 1, b- 2, c- 3, d- 4 and so on
|             ||    we hit if var == 1 and function3.arg[${var},,]} notequal ${a-}      (our first objective)
|             ||    function3.arg[1,,](which is 4) notequal ${a-} which is 1
|             ||    /next a-
|             ||    until we get to function3.arg[1,,] (which is 4) notequal ${a-} which has slowly moved up to 4
|             ||    well, function3.arg[1,,] (which is 4) equals 4 so we dont fire the /if statement or the /next a-
|             ||    click ~~~~ a- is complete,
|             ||    we move to if var ==2 and function3.arg[2,,] (which is 2) notequal b- (in this case is 2) ---- this will autofire in the future because of how we did this example
|             ||   
|             ||    but var is still at 1! so we pass by all the /if statements till we hit /next var, none of the if statements fire
|             ||
|             ||    /next var happens, var ==2 and the /if var==2 if statement fires but it is if function3.arg[2,,](which is 2) notequal ${b-} (which is 2)
|             ||    well ---- function3.arg[2,,] equals 2... so notequal does not fire, and we dont get caught in the b- forloop to try and find the correct tumbler for b
|             ||    /next var happens
|             ||    we are at /if function3.arg[3,,](which is 3) notequal c- (which is 3) in this example, the numbers match, no for loop is initiated to try and find the correct tumbler
|             ||    and we pass by tumbler3 and onto tumbler 4
|             ||    /if ${function3.Arg[4,,] (which is 1) notequal ${d-} which is 1
|             ||        ${d-} is preset at 4, so we actually enter into the forloop briefly, the forloop adjusts d- to 1 in this example, and we exit immediately to the next area
|             ||        normally all tumblers would check and go until they hit the correct numbers defined in function or wherever you coded them to be
|             || 
|             ||
|             ||
|                    /if (${var} == 1 && ${function3.Arg[${var},,].NotEqual[${a-}]}) {
|                        /for a- 1 to 4
|                        /if (${function3.Arg[${var},,].NotEqual[${a-}]} && ${var} == 1) {
|                            /next a-
|                        }
|                    }
|                    /if (${var} == 2 && ${function3.Arg[${var},,].NotEqual[${b-}]}) {
|                        /for b- 1 to 4
|                        /if (${function3.Arg[${var},,].NotEqual[${b-}]} && ${var} == 2) {
|                            /next b-
|                        }
|                    }
|                    /if (${var} == 3 && ${function3.Arg[${var},,].NotEqual[${c-}]}) {
|                        /for c- 1 to 4
|                        /if (${function3.Arg[${var},,].NotEqual[${c-}]} && ${var} == 3) {
|                            /next c-
|                        }
|                    }
|                    /if (${var} == 4 && ${function3.Arg[${var},,].NotEqual[${d-}]}) {
|                        /for d- 1 to 4
|                        /if (${function3.Arg[${var},,].NotEqual[${d-}]} && ${var} == 4) {
|                            /next d-
|                        }
|                    }
|                    /next var
|                    /varset var 0
|
|              ||this is our defines 
|              ||we want any number of variables involved with our ini write or whatever we are doing
|              ||/if (!${Defined[a-1]} is necessary so we dont get lots of errors all the time we go to next i or next j
|              ||we are still within the i loop and j loop and they havent even hit a /next i or /next j yet
|              ||we have used var forloops twice so far and we arent done iirc
|              ||
|              ||the defines are centered wrong in the macro, these have to stand out they are a bit harder to read if they are too far inwards
|              ||
|              ||this is basically like formulas for how many variables we have
|              ||we are declaring our a-1 through a-26 as our correct key/lock tumbler results
|              ||the a- through z- variables are still the numbers we lock tumblered into
|              ||we are using this concept beyond this to determine the correct number of variables to iniwrite and their sequence
|              ||this is a very important concept and can be used for lots and lots of things and can be furthered if you so desired
|              ||e.g. moving onto a1- thru z1- and b-1 thru b-26
|              ||you can just keep adding numbers and using .Arg
|              ||
|
|/if (!${Defined[a-1]}) {
|
|||old important comments included!
|||if a == a /varset a success
|||/if a.Arg[i,].equal[success] {
|||/next i
|
|/declare a-1 string local ${a-}
|/declare a-2 string local ${a-},${b-}
|/declare a-3 string local ${a-},${b-},${c-}
|/declare a-4 string local ${a-},${b-},${c-},${d-}
|/declare a-5 string local ${a-},${b-},${c-},${d-},${e-}
|/declare a-6 string local ${a-},${b-},${c-},${d-},${e-},${f-}
|/declare a-7 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-}
|/declare a-8 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-}
|/declare a-9 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-}
|/declare a-10 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-}
|/declare a-11 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-}
|/declare a-12 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-}
|/declare a-13 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-}
|/declare a-14 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-}
|/declare a-15 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-}
|/declare a-16 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-}
|/declare a-17 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-}
|/declare a-18 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-}
|/declare a-19 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-}
|/declare a-20 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-}
|/declare a-21 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-}
|/declare a-22 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-}
|/declare a-23 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-}
|/declare a-24 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-}
|/declare a-25 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-},${y-}
|/declare a-26 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-},${y-},${z-}
|}
|               ||ok sorry for the off centered code back there
|               ||this is the third var forloop we use, within the i and j forloops
|               ||we determine if function3.Equal a-1 thu a-26
|               ||we calculate numcount since we have passed through our checking system and into the actual ini writing stage
|               ||we arent just playing with numbers now, we've determined and made the final success stage happen
|               ||
|               ||we are at the ini write stage, this would be like 10 pages if we didnt use for loops and another 160 pages if we didnt use variables to customize variableorders
|               ||
|               ||we varset var 12, and manually work backwards because some people dont like/remember the words downto
|               ||in this example we are working down from 12 because there is sometimes more variables?
|               ||this method involves returning to :determine instead of /next var
|               ||
|               ||note we have certain variables with the ${j} within them, these variables had to be defined somehwere in the actual j forloop as previously stated
|               ||this variable does not have to be written this way, it could be a shorter variable as long as the contents were defined within the j loop
|               ||this would view as a pretty little peice of code if macroquests limitations were not involved
|               ||
|               ||we use our num1 through num12 (which you would have to add num5 thru num12 if u wanted them) 
|               ||this is relative to the variable order and which one is being written in which slot
|               ||without num1 thru num4 it would like always write num inicount j skillid
|               ||
|                    /for var 1 to 26
|                    /if (${function3.Equal[${a-${var}}]}) {
|                        /if (${numcount} == 0) {
|                            /echo function3 == ${function3}
|                            /echo ${a-${var}}
|                        }
|                        /varset numcount ${Math.Calc[${numcount} + 1]}
|                        /varset var 12
|                        :determine
|                        /if (${result4arg${var}.Length} > 0 && ${result4arg${var}.NotEqual[empty]}) {
|                            /if (${var} == 12) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}-${${es4arg${num11}}}-${${es4arg${num12}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 11) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}-${${es4arg${num11}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 10) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 9) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 8) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 7) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}"
|                            }
|                            /if (${var} == 6) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 5) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 4) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 3) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}"
|                            }
|                            /if (${var} == 2) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 1) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}"
|                                /goto :fin
|                            }
|                        }
|                        /varset var ${Math.Calc[(${var} + 10)- 11]}
|                        /if (${var} > 0) /goto :determine
|                        :fin
|                        /varset var 0
|                    }
|                    /if (${var} == 0) /goto :fintwo
|                    /next var
|                    :fintwo
|                    /varset var 0
|
|               ||we use a simple sort of rerouting technique to achieve our manual var /varsets,the countdown itself, along with our :loop rerouting
|               ||the /next var is in reference to finding out a-1 through a-26 and /if function3.Equal a-1 thru a-26
|
|               ||this is our fourth and final var forloop
|               ||here we are closing to the end, and ready to restart the process all over again with /next j and eventually /next i
|               ||but before we get that far we determine which variable is which and we reset it to its original value
|               ||when the cycle restarts with something like a new ${j} the variables have to be rewritten again because some have ${j} in them
|               ||we wont be able to correctly read the variables with ${j} in them if ${j} has moved to the next number so we re/varset our variables here
|               ||they are set again when the process starts over again with the next j and the next i numbers in play
|                    /for var 1 to 4
|                    /if (${result4arg${var}.Equal[num]}) {
|                        /varset es4arg${var} numcount
|                        |/varset num1 ${var}
|                        /goto :endvars
|                    }
|                    /if (${result4arg${var}.Equal[inicount]}) {
|                        /varset es4arg${var} inicount
|                        |/varset num2 ${var}
|                        /goto :endvars
|                    }
|                    /if (${result4arg${var}.Equal[j]}) {
|                        /varset es4arg${var} j
|                        |/varset num3 ${var}
|                        /goto :endvars
|                    }
|                    /if (${result4arg${var}.Equal[skillid]}) {
|                        /varset es4arg${var} skillid
|                        |/varset num4 ${var}
|                        /goto :endvars
|                    }
|                    :endvars
|                    /next var
|                    /varset var 0                 
|                }
|            }
|        }
|
|              ||this sections /echos what skill we are doing, before the j is changed
|              ||this has the default ini action of skillstart.mac contained here in case we arent even using stringgen
|              ||
|        /if (${${tempvariable}.Arg[${j},,]} == 7) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j applypoison
|        /if (${${tempvariable}.Arg[${j},,]} == 56) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j fishing
|        /if (${${tempvariable}.Arg[${j},,]} == 57) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j makepoison
|        /if (${${tempvariable}.Arg[${j},,]} == 58) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j tinkering
|        /if (${${tempvariable}.Arg[${j},,]} == 59) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j research
|        /if (${${tempvariable}.Arg[${j},,]} == 60) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j alchemy
|        /if (${${tempvariable}.Arg[${j},,]} == 61) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j baking
|        /if (${${tempvariable}.Arg[${j},,]} == 62) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j tailoring
|        /if (${${tempvariable}.Arg[${j},,]} == 64) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j blacksmithing
|        /if (${${tempvariable}.Arg[${j},,]} == 65) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j fletching 
|        /if (${${tempvariable}.Arg[${j},,]} == 66) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j brewing
|        /if (${${tempvariable}.Arg[${j},,]} == 69) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j jewelry crafting
|        /if (${${tempvariable}.Arg[${j},,]} == 70) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j pottery
|        /if (${stringgen.Equal[empty]} || ${stringgen.Equal[default]}) {
|            /ini "-skills" "${classnames.Arg[${i},,]}" "${tempvariable}" "1-${inicount}-${j}-7-apply poison,2-${inicount}-${j}-56-fishing,3-${inicount}-${j}-57-make poison,4-${inicount}-${j}-58-tinkering,5-${inicount}-${j}-59-research,6-${inicount}-${j}-60-alchemy,7-${inicount}-${j}-61-baking,8-${inicount}-${j}-62-tailoring,9-${inicount}-${j}-64-blacksmithing,10-${inicount}-${j}-65-fletching,11-${inicount}-${j}-66-brewing,12-${inicount}-${j}-69-jewelry making,13-${inicount}-${j}-70-pottery"
|        }
|    }
|}
|:endfinish
|/next j
|/varset j 0
|    /echo ${count} total count of skills being written to ini
|    /ini "-skills" "${classnames.Arg[${i},,]}" "${classnames.Arg[${i},,]}-skillcount" "${count}"
|    /varset count 0
|    /varset inicount 0
|    /varset numcount 0
|/next i
|/varset i 0
|/varset j 0
|/echo finished counting skills
|/deletevar stringgen
|/return
|               ------------------------------------------------------------------------------------------------------------
|               -
|               -there is no stringgen
|               -
|               ------------------------------------------------------------------------------------------------------------
|
you can probably use /cmd or /exec or watever that is for command prompt like to play music based on ini things or anything
Last edited by toolisuber on Mon Jul 20, 2015 4:00 am, edited 60 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Thu Jul 16, 2015 2:06 pm

this is a horrible horrible outline for stringgen
this is not anything special compared to the above manual with the
important comments that even include instructions for basic mq2 usage

didn't spend much time with this one but whatever gotta get back to
learning c++ and stuff these servertransfer macros were a distraction
then this was even furthered by stringgen and then by the manuals

skills.mac is in the following posts

this is not skills.mac,
this is an outline for stringgen for reference like if you wanted to makeideas
or improve on the stringgen
its almost all not in the correct format

Code: Select all

stringgen

sub skillcount(gen)
|initial /echo stringgen
|
|/echo stringgen -> ${stringgen}
|/if ${stringgen} notequal empty {
|    /declare variables
|    /declare string1 thru string12 are set as stringgen.args, seperated by spaces
|
|    :function1
|    -> empty
|    :stringvarset
|    -> if string1 thru string4 find (main topics and variables)
|        ini-
|        key-
|        name-
|        entry-
|        
|        /varset variable1 thru variable3
|
|
|        /varset result1 thru result3   
|
|        /varset string1 thru string3  
|        
|        /echo string1thru3 variable1thru3 result1thru3 -> occur during the varsets <-
|    :varsetstringset
|        /varset string4
|        /varset result4
|    :didvarsetstringset
|    ->/if variable4.length > variable4.arg[1,,].length
|        /if variable4.length > 0
|            /varset string4arg1 ${variable4}
|            /varset var 5
|            /varset string4args manually
|        /if variable4.length < 0
|            /varset string4arg1 string5
|            /varset var 6
|            /varset string4args manually
|
|    :varsetting
|    :function2
|    
|    /declare stringset
|        /for i 1 to 4
|        /for i 1 to 8
|        /if variable${i}.Arg[${j},].notequal[NULL]} {
|            /if ${j} == 8
|
|                        |    /varset stringset2 ${variable${i}.Arg[1,]} ${variable${i}.Arg[2,]} ${variable${i}.Arg[3,]} ${variable${i}.Arg[4,]}
|                        V
|
|            /if ${j} == 1
|
|                :stringargfinish
|                /varset string${i}arg${j} ${stringset2}
|
|        /next j
|        /next i
|
|        /if (${genverbose}) /echo our completed stringargs
|
|    :varsettwo
|    /echo varargs 1-1 thru 1-4 e.g. var1arg1 or var1arg4
|                  2-1 thru 2-4
|                  3-1 thru 3-4
|                  4-1 thru 4-4
|    :function3
|    :varsetresultvariable
|    /varset result1 ${variable1}
|    /varset result2 ${variable2}
|    /varset result3 ${variable3}
|    /varset result4 ${variable4}
|    /echo result1 thru result8
|               ||our variable1==-skills (we've carried the - by personal preference)
|               ||our variable4==num inicount j skillid
|    :resultvarset
|    /declare svar string local
|    /for i 1 to 8
|    /declare s${i}var string local ${result4.Arg[${i},]}
|    /if string1 == ini-
|        /if string4 == entry-
|            /if (${result4.Arg[${i},]}.Equal[num]}) {
|                /varset result4arg${i} 1
|                /varset s${i}var ${s${i}var},1 
|            }
|            /if (${result4.Arg[${i},]}.Equal[inicount]}) {
|                /varset result4arg${i} 2
|                /varset s${i}var ${s${i}var},2 
|            }
|            /if (${result4.Arg[${i},]}.Equal[j]}) {
|                /varset result4arg${i} 3
|                /varset s${i}var ${s${i}var},3 
|            }
|            /if (${result4.Arg[${i},]}.Equal[skillid]}) {
|                /varset result4arg${i} 4
|                /varset s${i}var ${s${i}var},4 
|            }
|               ||----------------------------------------------------this is part 1 
|            /if (${s${i}var.Arg[2,,].Length} > 0) {
|                /if (${i} == 1) 
|
|                             |    /varset svar ${s1var.Arg[2,,]}${s2var.Arg[2,,]}${s3var.Arg[2,,]}${s4var.Arg[2,,]}
|                             |    /varset function3 ${s1var.Arg[2,,]},${s2var.Arg[2,,]},${s3var.Arg[2,,]},${s4var.Arg[2,,]}
|                             V    
|
|                /if (${i} == 8)
|    /declare s1 int local 1
|    /declare s2 int local 2
|    /declare s3 int local 3
|    /declare s4 int local 4
|    /if (${function3.Length > 0) {
|        /varset var 1
|        /for i 1 to 8
|        /for j 1 to 8
|        /if (${str${i}-${var}arg$[j}.Length} > 0) {
|            /if(${function3}.Length > 0) {
|                /for var 1 to 4
|                /if (${i} == 2) {
|                    /varset s1 2
|                    /varset s2 1
|                    /varset s3 3
|                    /varset s4 4
|                }
|                /if (${i} == 3) {
|                    /varset s1 3
|                    /varset s2 1
|                    /varset s3 2
|                    /varset s4 4
|                }
|                /if (${i} == 4) {
|                    /varset s1 4
|                    /varset s2 1
|                    /varset s3 2
|                    /varset s4 3
|                }
|               /if (${j} == 1)
|
|                            |  /varset str${i}-${var}arg${j} ----the function orders ---- this is complex think this is like memory addresses almost
|                            V
|
|               /if (${j} == 8)
|               
|               ||we've commented out things here in the actual code for even more variable setting
|               ||for even more complex things to be done with the stringgen
|            }
|        }
|        /next j
|        /varset j 0
|        /next i
|        /varset i 0
|               ||----------------------------------------------------this is part 3
|               ------------------------------------------------------------------------------------------------------------
|----------------this is part 3 
|----------------you would have to practice this concept or you already understand this concept to get this one
|----------------this is like the hardest thing here
|----------------        /declare s1 int local 1
|----------------        /declare s2 int local 2
|----------------        /declare s3 int local 3
|----------------        /declare s4 int local 4
|----------------        /if (${function3.Length} > 0) {
|----------------        /varset var 1
|----------------            /for i 1 to 8
|----------------            /for j 1 to 8
|----------------            /if (${str${i}-${var}arg${j}.Length} > 0) {
|----------------                /if (${function3.Arg[${i},,].Length} > 0) {
|----------------                    /for var 1 to 4
|----------------                    /if (${i} == 2) {
|----------------                        /varset s1 2
|----------------                        /varset s2 1
|----------------                        /varset s3 3
|----------------                        /varset s4 4
|----------------                    }
|----------------                    /if (${i} == 3) {
|----------------                        /varset s1 3
|----------------                        /varset s2 1
|----------------                        /varset s3 2
|----------------                        /varset s4 4
|----------------                    }
|----------------                    /if (${i} == 4) {
|----------------                        /varset s1 4
|----------------                        /varset s2 1
|----------------                        /varset s3 2
|----------------                        /varset s4 3
|----------------                    }
|----------------                    /if (${j} == 1) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s2},,]},${function3.Arg[${s3},,]},${function3.Arg[${s4},,]}
|----------------                    }          
|----------------                    /if (${j} == 2) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s2},,]},${function3.Arg[${s4},,]},${function3.Arg[${s3},,]}
|----------------                    }                 
|----------------                    /if (${j} == 3) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s3},,]},${function3.Arg[${s2},,]},${function3.Arg[${s4},,]}
|----------------                    }             
|----------------                    /if (${j} == 4) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s3},,]},${function3.Arg[${s4},,]},${function3.Arg[${s2},,]}
|----------------                    } 
|----------------                    /if (${j} == 5) {
|----------------                        /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s4},,]},${function3.Arg[${s2},,]},${function3.Arg[${s3},,]}
|----------------                    } 
|----------------                    /if (${j} == 6) {
|----------------                    /varset str${i}-${var}arg${j} ${function3.Arg[${s1},,]},${function3.Arg[${s4},,]},${function3.Arg[${s3},,]},${function3.Arg[${s2},,]}
|----------------                    } 
|----------------                    /if (${j} == 7) {
|----------------                        /varset j 7
|----------------                    }
|----------------                    /if (${j} == 8) {
|----------------                        /varset j 8
|----------------                    }        
|----------------                }           
|----------------            }
|----------------            /next j
|----------------            /varset j 0
|----------------||          /next var
|----------------||          /varset var 0
|----------------||          /next j
|----------------||          /varset j 0 
|----------------            /next i
|----------------            /varset i 0
|----------------||            /varset s1 1
|----------------||            /varset s2 2
|----------------||            /varset s3 3
|----------------||            /varset s4 4
|----------------        }
|               ------------------------------------------------------------------------------------------------------------
|               ||----------------------------------------------------this is part 4 
|    /if (${result1.Equal[skills]}) {
|        /echo setting skills ini (1)
|        /echo
|        /varset es1 ${result1}
|    }
|    /if (${string2.Equal[key-]}) {
|        /if (${result2.Equal[class]}) {
|            /varset es2 classnames
|        }
|    }
|    /if (${string3.Equal[name-]}) {
|        /if (${result3.Equal[class]}) {
|            /varset es3 ${es2}-skills       
|        }
|    }
|    /if (${string4.Equal[entry-]}) {
|        /echo string4 equals entry
|        /varset es4 ${string4arg1.Arg[1,]} ${string4arg2.Arg[2,]} ${string4arg3.Arg[3,]} ${string4arg4.Arg[4,]}
|        /declare es4temp1 string local empty
|
|                               |
|                               V
|
|        /declare es4temp8 string local empty
|        /for i 1 to 12
|        /for j 1 to 8
|        /if (${string4arg${i}.Arg[${j},].Equal[num]}) {
|            /varset es4temp${j} numcount
|        }
|        /if (${string4arg${i}.Arg[${j},].Equal[inicount]}) {
|            /varset es4temp${j} inicount
|        }
|        /if (${string4arg${i}.Arg[${j},].Equal[j]}) {
|            /varset es4temp${j} j
|        }
|        /if (${string4arg${i}.Arg[${j},].Equal[skillid]}) {
|            /varset es4temp${j} skillid
|        }
|        /next j
|        /varset j 0
|        /next i
|        /varset i 0
|        /for j 1 to 8
|        /if (${es4temp${j}.NotEqual[empty]}
|            /if (${j} == 1) 
|
|                         | /varset es4 ${es4temp1} ${es4temp2} ${es4temp3} ${es4temp4}
|                         V
|
|            /if (${j} == 8)
|        }
|    }
|    /next j
|    /varset j 0
|    /echo esvariables es1==     es5==    es9==
|    /echo             es2==     es6==    es10==
|    /echo             es3==     es7==    
|    /echo             es4==     es8==
|               ||----------------------------------------------------this is part 5 
|    :varsetresult2variable
|    /echo -->varsetting three started resultarg
|    /echo result1== ${result1} / result2==${result2} / result3==${result3} / result4==${result4}
|    /echo
|    /echo result1== ${result5} / result2==${result6} / result3==${result7} / result4==${result8}
|    /echo
|    /for i 1 to 4
|    /for j 1 to 4
|||    /for var 1 to 4
|    /if (${result${i}.Arg[${j},].Length} > 0) {
|        /varset result${i}arg${j} ${result${i}.Arg[${j},]}
|    }    
|    /next j
|    /varset j 0
|    /next i
|    /varset i 0
|    /varset j 0
|    /varset var 0
|    /echo resultargs
|               ||----------------------------------------------------this is part 6 
|    :esargvarset
|    /echo -->varsetting four started -esarg
|    /echo es1==${es1} / es2==${es2} / es3==${es3} / es4==${es4}
|    /echo
|    /echo es5==${es5} / es6==${es6} / es7==${es7} / es8==${es8}
|    /echo
|    /for i 1 to 4
|    /for j 1 to 4
|||    /for var 1 to 4
|    /if (${es${i}.Arg[${j},].Length} > 0) {
|        /varset es${i}arg${j} ${es${i}.Arg[${j},]}
|    }
|    /next j
|    /varset j 0
|    /next i
|    /varset i 0
|    /varset j 0    
|    /varset var 0
|    /echo --> varsetting four finished -esarg
|    /declare tempone string local
|    :function4
|    /declare result4temp1 string local empty
|
|                        |
|                        V
|
|    /declare result4temp8 string local empty
|    /if (${string1.Equal[ini-]}) {
|        /echo setting -skills ini (2)
|        /echo
|        /for j 1 to 8
|        /if (${es4arg${j}.Length} > 0 && ${es4arg${j}.NotEqual[empty]}) {
|            /if (${es4arg${j}.Arg[1,].Equal[numcount]}) {
|                /varset result4arg${j} ${es4arg${j}}
|                ||ways to do this  -math in ini, for loop overwriting ini, array of function <--old comment                    
|            }
|            /if (${es4arg${j}.Arg[1,].Equal[inicount]}) {
|                /varset result4arg${j} ${es4arg${j}}                               
|            }
|            /if (${es4arg${j}.Arg[1,].Equal[j]}) {
|                /varset result4arg${j} ${es4arg${j}}                    
|            }
|            /if (${es4arg${j}.Arg[1,].Equal[skillid]}) {
|                /if (${es3arg1.Equal[${classnames.Arg[${i},,]}-skills]}) {
|                    /echo setting skillid vars
|                    /declare apply_poison   string outer 7,apply poison
|                    /declare fishing        string outer 56,fishing
|                    /declare make_poison    string outer 57,make poison
|                    /declare tinkering      string outer 58,tinkering
|                    /declare research       string outer 59,research
|                    /declare alchemy        string outer 60,alchemy
|                    /declare baking         string outer 61,baking
|                    /declare tailoring      string outer 62,tailoring
|                    /declare blacksmithing  string outer 64,blacksmithing
|                    /declare fletching      string outer 65,fletching
|                    /declare brewing        string outer 66,brewing
|                    /declare jewelry_making string outer 69,jewelry making
|                    /declare pottery        string outer 70,pottery
|                }
|                /varset result4arg${j} ${es4arg${j}}
|                /echo ${es4arg${j}} es4arg${j} checking this
|               }
|           }
|           /next j
|           /varset j 0
|       }
|   }
|    /if (${string4.Find[entry-]}) {
|        /if (${string4arg1.Length} > 0) {
|            /if (${string4arg2.Length} > 0) {
|                /if (${string4arg3.Length} > 0) {
|                    /if (${string4arg4.Length} > 0) {
|                        /varset var1-1 ${string4arg1}-${string4arg2}-${string4arg3}-${string4arg4}
|                        /echo
|                        /echo var1-1 set
|                    }
|                }
|            }
|        }
|    }
|    /if (${var4arg1.Length} < 0) {
|        /echo
|        /echo varsetting stringgen default
|        /varset stringgen default
|    }
|/declare a- int local 1
|/declare b- int local 2
|/declare c- int local 3
|/declare d- int local 4
|/declare e- int local 5
|/declare f- int local 6
|/declare g- int local 7
|/declare h- int local 8
|/declare i- int local 9
|/declare j- int local 10
|/declare k- int local 11
|/declare l- int local 12
|/declare m- int local 13
|/declare n- int local 14
|/declare o- int local 15
|/declare p- int local 16
|/declare q- int local 17
|/declare r- int local 18
|/declare s- int local 19
|/declare t- int local 20
|/declare u- int local 21
|/declare v- int local 22
|/declare w- int local 23
|/declare x- int local 24
|/declare y- int local 25
|/declare z- int local 26
|}
|/echo
|/echo waitloop starting --> type continue or .
|/echo waitloop --> type list or list all for variable lists
|:waitloop
|/delay 4
|/doevents continue
|/doevents list
|/if (${continue} == 1) {
|    /varset continue 0
|    /goto :start
|}
|/goto :waitloop
|:start
|/echo starting count of skills                          
|/declare tempvariable string local empty
|/declare count int local 0
|/declare inicount int local 0
|/declare numcount int local 0
|/declare num1 string local
|/declare num2 string local
|/declare num3 string local
|/declare num4 string local
|              ||we /declare our temporary variables, when performing complex things you prolly want to /deletevar these as you are done with them, so you can re/declare them
|/for i 1 to 16
|/echo
|/echo ${classnames.Arg[${i},,]}
|/varset tempvariable ${classnames.Arg[${i},,]}
|/varset tempvariable ${tempvariable}-skills
|/echo ${tempvariable}
|/varset skillcount 0
|/for j 1 to 60
|/if (${${tempvariable}.Arg[${j},,]} > 0) {
|    /varset count ${Math.Calc[${count} + 1]}
|    /if (${${tempvariable}.Arg[${j},,]} == 7 || ${${tempvariable}.Arg[${j},,]} == 56 || ${${tempvariable}.Arg[${j},,]} == 57 || ${${tempvariable}.Arg[${j},,]} == 58 || ${${tempvariable}.Arg[${j},,]} == 59 || ${${tempvariable}.Arg[${j},,]} == 60 || ${${tempvariable}.Arg[${j},,]} == 61 || ${${tempvariable}.Arg[${j},,]} == 62 || ${${tempvariable}.Arg[${j},,]} == 64 || ${${tempvariable}.Arg[${j},,]} == 65 || ${${tempvariable}.Arg[${j},,]} == 66 || ${${tempvariable}.Arg[${j},,]} == 69 || ${${tempvariable}.Arg[${j},,]} == 70) {
|        /varset inicount ${Math.Calc[${inicount} + 1]}    
|        /if (${stringgen.NotEqual[empty]} && ${stringgen.NotEqual[default]}) {
|            /if (${function3.Length} > 0) {
|                /if (${string4.Equal[entry-]}) {
|                    /for var 1 to 4
|                    /if (${es4arg${var}.Equal[numcount]}) {
|                        /varset es4arg${var} ${es4arg${var}}
|                        /varset num${var} ${var}
|                        /goto :endvarset
|                    }
|                    /if (${es4arg${var}.Equal[inicount]}) {
|                        /varset es4arg${var} ${es4arg${var}}
|                        /varset num${var} ${var}
|                        /goto :endvarset
|                    }
|                    /if (${es4arg${var}.Equal[j]}) {
|                        /varset es4arg${var} ${es4arg${var}}
|                        /varset num${var} ${var}
|                        /goto :endvarset
|                    }
|                    /if (${es4arg${var}.Equal[skillid]}) {
|                        /varset es4arg${var} Skill[${${tempvariable}.Arg[${${tempone}},,]}].ID
|                        /varset num${var} ${var}
|                        /goto :endvarset
|                    }
|                    :endvarset
|                    /next var
|                    /varset var 0
|                    /for var 1 to 4
||||/if d- > ${var} {
|||&&
|||/varset d- ${var}
|                    /if (${var} == 1 && ${function3.Arg[${var},,].NotEqual[${a-}]}) {
|                        /for a- 1 to 4
|                        /if (${function3.Arg[${var},,].NotEqual[${a-}]} && ${var} == 1) {
|                            /next a-
|                        }
|                    }
|                    /if (${var} == 2 && ${function3.Arg[${var},,].NotEqual[${b-}]}) {
|                        /for b- 1 to 4
|                        /if (${function3.Arg[${var},,].NotEqual[${b-}]} && ${var} == 2) {
|                            /next b-
|                        }
|                    }
|                    /if (${var} == 3 && ${function3.Arg[${var},,].NotEqual[${c-}]}) {
|                        /for c- 1 to 4
|                        /if (${function3.Arg[${var},,].NotEqual[${c-}]} && ${var} == 3) {
|                            /next c-
|                        }
|                    }
|                    /if (${var} == 4 && ${function3.Arg[${var},,].NotEqual[${d-}]}) {
|                        /for d- 1 to 4
|                        /if (${function3.Arg[${var},,].NotEqual[${d-}]} && ${var} == 4) {
|                            /next d-
|                        }
|                    }
|                    /next var
|                    /varset var 0
|/if (!${Defined[a-1]}) {
|
|||old important comments included!
|||if a == a /varset a success
|||/if a.Arg[i,].equal[success] {
|||/next i
|
|/declare a-1 string local ${a-}
|/declare a-2 string local ${a-},${b-}
|/declare a-3 string local ${a-},${b-},${c-}
|/declare a-4 string local ${a-},${b-},${c-},${d-}
|/declare a-5 string local ${a-},${b-},${c-},${d-},${e-}
|/declare a-6 string local ${a-},${b-},${c-},${d-},${e-},${f-}
|/declare a-7 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-}
|/declare a-8 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-}
|/declare a-9 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-}
|/declare a-10 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-}
|/declare a-11 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-}
|/declare a-12 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-}
|/declare a-13 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-}
|/declare a-14 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-}
|/declare a-15 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-}
|/declare a-16 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-}
|/declare a-17 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-}
|/declare a-18 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-}
|/declare a-19 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-}
|/declare a-20 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-}
|/declare a-21 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-}
|/declare a-22 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-}
|/declare a-23 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-}
|/declare a-24 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-}
|/declare a-25 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-},${y-}
|/declare a-26 string local ${a-},${b-},${c-},${d-},${e-},${f-},${g-},${h-},${i-},${j-},${k-},${l-},${m-},${n-},${o-},${p-},${q-},${r-},${s-},${t-},${u-},${v-},${w-},${x-},${y-},${z-}
|}
|                    /for var 1 to 26
|                    /if (${function3.Equal[${a-${var}}]}) {
|                        /if (${numcount} == 0) {
|                            /echo function3 == ${function3}
|                            /echo ${a-${var}}
|                        }
|                        /varset numcount ${Math.Calc[${numcount} + 1]}
|                        /varset var 12
|                        :determine
|                        /if (${result4arg${var}.Length} > 0 && ${result4arg${var}.NotEqual[empty]}) {
|                            /if (${var} == 12) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}-${${es4arg${num11}}}-${${es4arg${num12}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 11) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}-${${es4arg${num11}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 10) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}-${${es4arg${num10}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 9) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}-${${es4arg${num9}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 8) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}-${${es4arg${num8}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 7) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}-${${es4arg${num7}}}"
|                            }
|                            /if (${var} == 6) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}-${${es4arg${num6}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 5) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}-${${es4arg${num5}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 4) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}-${${es4arg${num4}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 3) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}-${${es4arg${num3}}}"
|                            }
|                            /if (${var} == 2) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}-${${es4arg${num2}}}"
|                                /goto :fin
|                            }
|                            /if (${var} == 1) {
|                                /ini "${es1arg1}" "${${es2arg1}.Arg[${i},,]}" "${Skill[${${tempvariable}.Arg[${j},,]}].Name}" "${${es4arg${num1}}}"
|                                /goto :fin
|                            }
|                        }
|                        /varset var ${Math.Calc[(${var} + 10)- 11]}
|                        /if (${var} > 0) /goto :determine
|                        :fin
|                        /varset var 0
|                    }
|                    /if (${var} == 0) /goto :fintwo
|                    /next var
|                    :fintwo
|                    /varset var 0
|                    /for var 1 to 4
|                    /if (${result4arg${var}.Equal[num]}) {
|                        /varset es4arg${var} numcount
|                        |/varset num1 ${var}
|                        /goto :endvars
|                    }
|                    /if (${result4arg${var}.Equal[inicount]}) {
|                        /varset es4arg${var} inicount
|                        |/varset num2 ${var}
|                        /goto :endvars
|                    }
|                    /if (${result4arg${var}.Equal[j]}) {
|                        /varset es4arg${var} j
|                        |/varset num3 ${var}
|                        /goto :endvars
|                    }
|                    /if (${result4arg${var}.Equal[skillid]}) {
|                        /varset es4arg${var} skillid
|                        |/varset num4 ${var}
|                        /goto :endvars
|                    }
|                    :endvars
|                    /next var
|                    /varset var 0                 
|                }
|            }
|        }
|        /if (${${tempvariable}.Arg[${j},,]} == 7) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j applypoison
|        /if (${${tempvariable}.Arg[${j},,]} == 56) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j fishing
|        /if (${${tempvariable}.Arg[${j},,]} == 57) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j makepoison
|        /if (${${tempvariable}.Arg[${j},,]} == 58) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j tinkering
|        /if (${${tempvariable}.Arg[${j},,]} == 59) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j research
|        /if (${${tempvariable}.Arg[${j},,]} == 60) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j alchemy
|        /if (${${tempvariable}.Arg[${j},,]} == 61) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j baking
|        /if (${${tempvariable}.Arg[${j},,]} == 62) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j tailoring
|        /if (${${tempvariable}.Arg[${j},,]} == 64) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j blacksmithing
|        /if (${${tempvariable}.Arg[${j},,]} == 65) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j fletching 
|        /if (${${tempvariable}.Arg[${j},,]} == 66) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j brewing
|        /if (${${tempvariable}.Arg[${j},,]} == 69) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j jewelry crafting
|        /if (${${tempvariable}.Arg[${j},,]} == 70) /multiline ; /varset inicount ${Math.Calc[${inicount} + 0]} ; /echo ${j} j pottery
|        /if (${stringgen.Equal[empty]} || ${stringgen.Equal[default]}) {
|            /ini "-skills" "${classnames.Arg[${i},,]}" "${tempvariable}" "1-${inicount}-${j}-7-apply poison,2-${inicount}-${j}-56-fishing,3-${inicount}-${j}-57-make poison,4-${inicount}-${j}-58-tinkering,5-${inicount}-${j}-59-research,6-${inicount}-${j}-60-alchemy,7-${inicount}-${j}-61-baking,8-${inicount}-${j}-62-tailoring,9-${inicount}-${j}-64-blacksmithing,10-${inicount}-${j}-65-fletching,11-${inicount}-${j}-66-brewing,12-${inicount}-${j}-69-jewelry making,13-${inicount}-${j}-70-pottery"
|        }
|    }
|}
|:endfinish
|/next j
|/varset j 0
|    /echo ${count} total count of skills being written to ini
|    /ini "-skills" "${classnames.Arg[${i},,]}" "${classnames.Arg[${i},,]}-skillcount" "${count}"
|    /varset count 0
|    /varset inicount 0
|    /varset numcount 0
|/next i
|/varset i 0
|/varset j 0
|/echo finished counting skills
|/deletevar stringgen
|/return
|
|
this was the outline for stringgen its not that decent or whatever its an idea
stringgen is not formatted properly yet, its as im going thru the process
want to improve upon it and the ideas that happen and make changes that
have to be made not exactly change it from what it is

if things were changed not exactly the exact order of events but the sub
order of events within the events, it would provide more easy functionality
but what im saying is this portable copy is probably staying the way it is for
the most part until changes HAVE to be made to achieve my desired
functions/outcomes
Last edited by toolisuber on Mon Jul 20, 2015 4:31 am, edited 8 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Fri Jul 17, 2015 5:10 am

think im gonna have to put the skills macro thing here
skillstart.mac and skills.mac updated 07/18/2015? 12:00noon est
my variables with class skills was slightly off there was a few bard skills in
the rng skill listing, there may be more mistakes that will be fixed

fully intend on making a macro to read the inis written by skillstart.mac

prolly gonna have it read stringgen stuff too
sorry for the delay I have to finish the basics of stringgen

here is skills.mac

make sure u enter in ur tradeskills manually in the ini file -skills.ini which
should have been created by skillstart.mac.... stringgen and skillcount are
unnecessary but useful if you want to use them

there is a skill called none id77 in eqemu servers apparently

the skill commands are set 1 lower than mq registers so if you were to try
and set ur remove traps skill ---- would set mystery skill 77 on

76 is apparently 75 and so on, 1 is 0
edit: there is no triple attack in this eqemu era but that is there too
edit: I think that is actually skill 75 incorrectly labeled 76
edit: there is also a skill called frenzy, if you were to create a for loop
edit:to set your skills to 100, without passing over 73 incorrectly labeled 74
edit: you would trigger the setting of the frenzy
edit:frenzy doesn't even show up as it doing anything when u set it
edit:*this macro goes from 1 to 73, 73 actually works as 72 (berserking)
edit:and only for berserkers...
edit3:and then find out berserking is wrong = removed now sorry

edit:all the skills for all the classes are set 1 lower....
edit: if you were to try to find the skillid, and set it, you would trigger skills
edit: that do not exist or are not even implemented because everything is
edit: 1 lower, and it is a geometric blasphemy that this is such a way

edit:the serverside coding and source files available are in horrid condition
edit:and a disgrace to any true fan, player, or designer of eq things
edit:it is a shame and a blasphemy that these things are not in the most
edit:pristine of conditions and available to the public

edit: if u were to run skillswritetest and view the file, you would find
edit:a skill called null=null - not sure exactly what this is

edit:all classes checkedso far w/macros, - none are writing this null skill
edit:now im checking all with tinkering, allgnomes checked so far
edit:including tradeskills, including dragonpunch/tailrake
edit:null=null is not being set or triggered by my macros
edit: I cannot garuntee any skills are not being set in the background
edit: like remove traps but no extra skills are being added

edit:NULL=NULL not being addedto anyof those w/#setskill correctedskillids
edit:bard seems to have removetrap set to 1 and#setskill doesnot change it
edit:dragon punch and tail rake are supposed to be21 its20 and workingfine
edit2:iirc paladins and sks and wars get block if they have shields on
edit2:emulator is not showing this as a skill
edit2:but that is skillid 12 if you add it to skillstart.mac
edit2:under the appropriate class...not implemented properly emus side

we avoided this~ mostly^^^^
edit3:ok here it is guys, I fixed some skills that were added unnecessarily
edit3:my apologies but this was a lot of work and just didn't get around to it
edit3:we have some problems ----
edit3: people spec diff skills like specialize:alteration etc
edit3: emu is counting skills 1 less than they actually are supposed to be
edit3: this is tricky and even worse,
edit3:taunt is supposed to be 74 naturally and 73 on emu
edit3:for some reason taunt is giving me problems sometimes andis coming
edit3:coming up berserking maybey for some classes
edit3: to train taunt, you will target yourself and type #setskill 73 100
edit3:ive tested this on sk not sure about war/ pal at this time,
edit3:or do taunt manually through playing

edit3: now we will get into specialize skills.... these are eqemus numbers real eq is 1 higher
edit3: Abjuration 43
edit3: Alteration 44 --this is important
edit3: Conjuration 45 --this is important
edit3: Divination 46
edit3: Evocation 47 --this is important

edit3: so we have problems with doing morethan 100 sometimes so try 100

edit3:on clerics/shamans/prolly druids we want alteration specced-- always
edit3:so clerics TARGET YOURSELF and type #setskill 44 100
edit3:im definately a big fan of clerics... go clerics!

edit3:on necromancers id spec alteration-- for chain lifetap nuking
edit3:so necromancers TARGET YOURSELF and type #setskill 44 100
edit3: some necromancers dot, we aren't really grouping, we are raiding

edit3:on mages id spec conjuration-- so for conj
edit3:so mages TARGET YOURSELF and type #setskill 45 100
edit3:some mages like lineofsight boltspells that would be uh evocation
edit3:evocation would be target yourself and type #setskill 47 100
edit3:im not a fan of bolt spells they don't hit around corners and u wipe

edit3:on enchanters id spec evocation-- ench nuke with this many chars
edit3:so enchanters TARGET YOURSELF and type #setskill 47 100
edit3:some enchanters mez alot...with this many chars no thanks
edit3:enchanters that mez alot want to spec conjuration
edit3:conjuration would be target yourself and type #setskill 45 100

edit3: not sure what wizards would spec

edit3:well the list is above, have fun try not to mistype

edit3:solro has a re-specialize quest to reset specializations, never tried
edit3:-->sql has a data import/data export function....
edit3:--> would export character skills, it goes to my documents
edit3:--> would then do your skills
edit3:--> case you mistype or something you have the skills backed up
edit3:--> would import your skills back into database if you mistyped
edit3:--> alot easier to do this than to redo everything cause of error

these macros are as good as they can be rlly
no extra skills are being added, #setallskills or whatever would add those

but I am sure there are other illegitimate mechanics on these eqemuservers
one of my main problems was they were working on things like rof2
last_virus when we are in oow - por content not even working
that time could have been dedicated to epic 1.5s or 2.0s or correct mob
placement and pathing

im not sure about u guys but my characters are important to me

Code: Select all

#turbo 40



#Event skills "#*#guild, 'skills'"
#Event skills "#*#say, 'skills'"
#Event skillswritetest "#*#guild, 'skillswritetest'"
#Event skillswritetest "#*#say, 'skillswritetest'"

Sub Main

/declare skills int outer 0
/declare skillswritetest int outer 0
/declare skillvariable string outer

/declare skillnames string outer 1H Blunt,1H Slashing,2H Blunt,2H Slashing,Abjuration,Alteration,Apply Poison,Archery,Backstab,Bind Wound,Bash,Block,Brass Instruments,Channeling,Conjuration,Defense,Disarm,Disarm Traps,Divination,Dodge,Double Attack,Dragon Punch,Dual Wield,Eagle Strike,Evocation,Feign Death,Flying Kick,Forage,Hand to Hand,Hide,Kick,Meditate,Mend,Offense,Parry,Pick Lock,Piercing,Riposte,Round Kick,Safe Fall,Sense Heading,Singing,Sneak,Specialize Abjure,Specialize Alteration,Specialize Conjuration,Specialize Divination,Specialize Evocation,Pick Pockets,Stringed Instruments,Swimming,Throwing,Tiger Claw,Tracking,Wind Instruments,Fishing,Make Poison,Tinkering,Research,Alchemy,Baking,Tailoring,Sense Traps,Blacksmithing,Fletching,Brewing,Alcohol Tolerance,Begging,Jewelry Making,Pottery,Percussion Instruments,Intimidation,Berserking,Taunt,Frenzy,Remove Trap

/declare skillnamestwo string outer apply poison,fishing,make poison,research,baking,tailoring,blacksmithing,fletching,brewing,jewelry making,pottery

|-------------------------------------------------------------------------------------------------------------------------------
|not sure why triple attack is coming thru on emulator or what none skillid 77 is thats gotta be somewhere
|
|not sure why skillids are set one lower than mq registers this seems to be an emu server thing
|but that uh skill 76 is normal and would hit skill 77 none???? whatever that is, if u werent paying attention
|
|for this macro ${Math.Calc[(${inifilevariable} + 10)- 1]} is used to achieve a 1 lesser value for our skillsets
|
|alternatively you could use #setskill skillid skillvalue yourself
|
|i think #setallskills or whatever would hit this mystery skill 77 none
|and berserking,and frenzy, and triple attack
|-------------------------------------------------------------------------------------------------------------------------------


/echo skills macro starting!
/echo this macro will do tradeskills if you manually entered in ur tradeskills in ur -skills ini

:skillsloop
/delay 2
/if (${skills} == 1) /call Start
/if (${skillswritetest} == 1) /call skillswritetest
/doevents
/goto :skillsloop

Sub Start

/declare i int local
/declare j int local
/keypress esc
/keypress esc
/for i 1 to 73
/varset skillvariable ${skillnames.Arg[${i},,]}
/if (${Ini[-skills,${Me.Name},${skillvariable}].Arg[3,-].Right[-5]} > 0) {
    /if (${i} != 22) /echo ${skillvariable}
    /if (${i} == 22) /echo ---->tail rake for iksars! dragon punch for humans!
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
    /call getids "${Me.Name}"
    /target ID ${Macro.Return}
    /delay 4
    /ho skillset #setskill ${Math.Calc[(${Ini[-skills,${Me.Name},${skillvariable}].Arg[1,-].Right[-2]} + 10)- 11].Int} ${Ini[-skills,${Me.Name},${skillvariable}].Arg[3,-].Right[-5]}
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /notify HotButtonWnd HB_Button1 leftmouseup
    /delay 1s
    /nomodkey /notify HotButtonWnd HB_Button1 leftmouseheldup
    /delay 2
    /keypress esc
}
/next i
/varset i 0
/echo Finished --> Ending....
/varset skills 0
/end
/return

Sub skillswritetest

/declare i int local
/declare j int local
/for i 1 to 100
/ini "-skillstest" "skillnames" "${Skill[${i}].Name}" "${Skill[${i}].ID}"
/next i
/varset skillswritetest 0
/echo finished!
/return

Sub getids(string name)

/declare SpawnID int local
/declare SpawnName string local
/declare i int local
/for i 1 to 4
/varset SpawnID ${NearestSpawn[${i}, pc ${name}].ID}
/varset SpawnName ${NearestSpawn[${i}, pc ${name}]}	
	/if (${NearestSpawn[${i}, pc ${name}].Name.Equal[${name}]}) /return ${SpawnID}
/next i
/return 0

Sub Event_skills

/varset skills 1
/return

Sub Event_skillswritetest

/varset skillswritetest 1
/return
Last edited by toolisuber on Mon Aug 17, 2015 12:04 pm, edited 9 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Sun Jul 19, 2015 9:38 am

stuff is prolly gonna go here
[MQ2]Adding WndNotification target 'CharacterCreation'
[MQ2]Adding WndNotification target 'CC_ClassScreen'
[MQ2]Adding WndNotification target 'CC_RaceScreen'
[MQ2]Adding WndNotification target 'CC_NameScreen'
[MQ2]Adding WndNotification target 'CC_HelpScreen'
[MQ2]Adding WndNotification target 'CC_OptionsScreen'
[MQ2]Adding WndNotification target 'CC_LogoScreen'
[MQ2]Adding WndNotification target 'CC_GenderScreen'
[MQ2]Adding WndNotification target 'CC_AdvancedScreen'
[MQ2]Adding WndNotification target 'CharacterListWnd'
[MQ2]Adding WndNotification target 'CLW_LeftScreen'
[MQ2]Adding WndNotification target 'CLW_CharactersScreen'
[MQ2]Adding WndNotification target 'CLW_ButtonsScreen'
[MQ2]Adding WndNotification target 'CLW_LogoScreen'
[MQ2]Adding WndNotification target 'CLW_BottomScreen'
[MQ2]Adding WndNotification target 'PlayerCustomizationWnd'
Last edited by toolisuber on Mon Aug 03, 2015 1:54 pm, edited 2 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------

User avatar
toolisuber
a ghoul
a ghoul
Posts: 101
Joined: Wed Jun 01, 2005 10:31 pm

Re: eqemu servertransfer macros

Post by toolisuber » Sun Jul 19, 2015 9:53 am

stuff is definitely prolly gonna go here one day

this is now information about flagging characters

well you've got ur chars and they are ready to play

but where are your flags -> well they might take a day to complete

well for now ill write this, as such

-------------------------------------
ldon adventurers stone -
-------------------------------------
im thinking Ldon Adventurers stone is prolly easier to do manually,
then maybey update your ldoninfo in the sql editor in the appropriate table?
this may boost your ldon stat points ~ not sure
what im finding out is that adventurer's stone is added to your keyring
after finishing the text quest for ldon thing ~ not sure
the adventurers stone seems to be a stable/solid object
im thinking summoning the adventurer's stone is pointless as this time

-------------------------------------
intricate wooden figurine -
-------------------------------------
im thinking the uh intricate wooden figurine has to be done manually
not sure the details on the flagging process for this
hail the guy in pok he gives a CLASS SPECIFIC intricate wooden figurine
thinking summon figurine and #flagedit your character.youd stillhaveto hail
maybey its better this is done manually
the intricate wooden figurine is a class specific item

-------------------------------------
other keys - the easy stuff -
-------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
server stuff for those who don't want to do it manually -
~~~~~~~~~~~~~~~~~~~~~
WE WOULD BACK UP OUR DATABASE AND THE KEYRING TABLE MULTIPLE TIMES
ESPECIALLY BEFORE BEGINNING THIS, AND AFTER FIRST KEYS ON MAIN CHAR ARE DONE

To back up our database we would go to
(in this case its peq as our database name)
(u have to put ur name and pass in we will use random things for name/pass)
(root will be our user name)
(12345 will be our password)
(peq will be our database name)
(User will be our computers user name)

command prompt -> type
mysqldump -uroot -p12345 peq > C:\Users\User\Desktop\myserverbackup1.sql

this will save our whole peq database to a file (about 200mb)
we do this multiple times and keep copies and removable drives

this gets even easier if you edit a sql import/export file to copy your data
its really simple, like copy pasting,
the hard part is exporting your keyring table from sql, after you finish keys on one character
be careful with intricate wooden figurine, adventurers stone those are manually
you want to save those for after and last and do manually im thinking
ok so wewouldgoto sql after we have done our keys on the main character
we would export the keyring table, and it goes to my documents\dumps
we would open the keyring sql import/export file with notepad
MAKE SURE U HAVE BACKED UP COPIES BEFORE DOING THIS OK
U DONT WANT TO REMAKE UR CHARACTERS AT THIS POINT
we would copy paste a bunch of things repeatedly and edit the numbers
edit the numbers to represent which key goes on which char
we would then import the file back into our database
everything should work if you haven't mistyped!
remember you can always import a saved backup to fix any mistakes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ok here we go

my chars don't have many keys but these are the ones that they have
this method saves you alot of time

use #summonitem make sure u have room in ur inventories
we can get away with summoning these items and then using the keys on the doors
once we use appropriate key on the appropriate door, it gets added to keyring

Enchanted Ring of Torden - bot towers keys - #summonitem 9425

Stone key - cool key from city of mist - #summonitem 12961

Trakanon Idol - who wants to do hunter forager ever again- #summonitem 20883

Shrine key - Skyshrine to cobalt scar key - #summonitem 28602

Crystalline Globe -reason im doing this - #summonitem 25596

crystalline globe is like the aerin dar key for pov, it takes about 32hrs straight to flag 18 chars for it
NOBODY wants to redo that flag.... quite a bit of walking too
my goal with this is to help ppl with the flags they had before transfer

its easiest to edit import/export sql keyrings file after doing keys on 1 char
but some people are old fashioned/enjoy running through things manually

#finditem finds items by name or maybey id .... it returns link and id for summonitem
#summonitem summons an item(by id)
#flagedit edits flags (not sure how good this works)
#zone zones you wherever... these are all gm commands
#heal heals ur target to fullhp
#invulnerable on makes you invulnerable
#damage 4000000 kills just about any mob in GoD/OoW era

your gonna have to fight ur way to the doors to use the keys
use #damage 4000000 to destroy anything in ur path
you can make a hotkey or something
you prolly wanna be #invulnerable on
enjoy!
Last edited by toolisuber on Fri Aug 14, 2015 8:17 am, edited 5 times in total.
--------------------------------------------------------------------------------------------------------------------------------
Image
--------------------------------------------------------------------------------------------------------------------------------