I don't know quite what you have in mind but what i did with my fight sequences goes something like this...
within my game i have a number of different characters of different professions. They all have somewhat different keysets they use when fighting or harvesting etc. What i did for that was to set up an ini file with the character's name as the key. In each ini section for that character is a keyset like the one in the example i gave you. They may have different keys and even a different number of keys in their fight sequences but at the beginning of my script i select one of the characters through a dialog and load their individual keysets into a comman variable then split it out so i can use them exactly like the sample i showed you.
here is a sample ranger from one of my games
Code: Select all
[rick]
name=rick level 40 ranger
longbowkeys=1,500,0/2,3000,5000/3,500,6000
swordkeys=1,2000,0/2,1000,2000/3,2000,6000/4,4000,0/5,500,12000
autoheal=1
healkey=637,940,0xAC1404,0xAC1404,6,1000,0
notes=none
each key in the key sequence uses the key number, a cast time in ms, a recharge time in ms
for self healing the health bar position is the location of the point being scanned on the screen, the color that's supposed to be there if they don't need a heal, the heal key number, it's cast time and it's recovery time. As you can see it can get a bit complex For fight sequences the key sequences are split the first time on the / to give a complete key definition that's sent to the fight handler. The fight handler takes each key sent to it and splits it again to get the specific key to send, how long to sleep after sending, and how long before the key is ready to be used again. The fight handler loops until the mob or mobs i'm fighting are dead then stops. One button on the mouse starts this whole process and can stop it on command if needed to switch targets. So, yeah it's something you might need to grow into.
One way you could do this simply in your script is to give each keyset you want to use a slightly different name and select them off a list in a dialog box. An example might be
Code: Select all
setnames = rickset,babeset,tinyset
rickset = 1,2,5,4,9
babeset = 2,8,{f1},9,!6
tinyset = 5,4,^3
or something similar, Then you could read the set names...select the one you want... load the selected variable... split it up and proceed to kick butt.