macman104
Member
*Solved, read the last edit if you want to know, or, ya know, read it all if you want*
I'm working on a map for my namespaces script to allow easy switching of the auto attack preference. I initially was going to have a map, that was the following
However, as you can see by the one commented line in the middle, mafia doesn't necessarily recognize all the skills (I'll submit that it is a skill granted from an ultra-rare, and I didn't even know mafia didn't have it as a skill until I started working on this. Add that one skill, plus the fact that I realized I needed things like pickpocket, and attack with weapon, and disabled. So I started moving over to having a record that looked like this:
Now, the trouble I'm having is purely a preference thing, but I'll ask about it anyway. I'm having trouble getting over the redundency of mapping the skills to an int, when the record has the int.
Well..."why not take the int out of the record and just go with that" you say? I could, and if I have to, I will. However, the complete structure of an attack skill, consists of the name, shortcut name, and the skill number that will be used to set the property. Because of that, the record feels incomplete without that value in there.
So...is there any way to have an aggregate of attack skills without mapping them to a certain integer? If not, and you (hola and veracity) are either too busy (which I'm sure you are with the end of school approaching), or feel that the time to change this outweighs the priority of this, please feel free to say so. This was less of a post to get you to change things, than it was to simply explore if there was a way available now (although don't let that discourage you
).
Thanks.
EDIT: I just realized I have some issues with my record/map of said record. So...don't pick on that ;D. Either I'll figure out what I actually wanted to do, or if someone suggest something, that works as well.
EDIT^2: I'll leave this thread up for the hell of it. But I realized in trying to "fix" my map, since I obviously can't index by a record (at least...I don't think you can), and by reading over the initial discussion when records were first thought of on the dev forum, that I should simply be setting the record type as the value for the map. So I now have:
Where the strings will be mapped according to the shortcut name.
So...
*Sigh* This is what not writing anything for ASH since, g-d knows when does to you... thanks for reading all. Lol
I'm working on a map for my namespaces script to allow easy switching of the auto attack preference. I initially was going to have a map, that was the following
Code:
skill [string] autoAttackSkills;
autoAttackSkills["CHRONIC INDIGESTION"] = $skill[Chronic Indigestion];
autoAttackSkills["CLEESH"] = $skill[CLEESH];
autoAttackSkills["COLD BREATH"] = $skill[Cold Breath];
autoAttackSkills["CONE OF WHATEVER"] = $skill[Cone of Whatever];
autoAttackSkills["DISCO DANCE II: ELECTRIC BOOGALOO"] = $skill[Disco Dance II: Electric Boogaloo];
autoAttackSkills["DISCO DANCE OF DOOM"] = $skill[Disco Dance of Doom];
autoAttackSkills["DISCO EYE-POKE"] = $skill[Disco Eye-Poke];
autoAttackSkills["DISCO FACE STAB"] = $skill[Disco Face Stab];
autoAttackSkills["ENTANGLING NOODLES"] = $skill[Entangling Noodles];
autoAttackSkills["EXTREME RAY OF SOMETHING"] = $skill[eXtreme Ray of Something];
autoAttackSkills["FEARFUL FETTUCINI"] = $skill[Fearful Fettucini];
//autoAttackSkills["GIVE IN TO YOUR VAMPIRIC URGES"] = $skill[Give In To Your Vampiric Urges]
autoAttackSkills["HEAD + KNEE + SHIELD COMBO"] = $skill[Head + Knee + Shield Combo];
autoAttackSkills["HEAD + KNEE COMBO"] = $skill[Head + Knee Combo];
autoAttackSkills["HEAD + SHIELD COMBO"] = $skill[Head + Shield Combo];
autoAttackSkills["HEADBUTT"] = $skill[Headbutt];
autoAttackSkills["HOT BREATH"] = $skill[Hot Breath];
autoAttackSkills["KNEE + SHIELD COMBO"] = $skill[Knee + Shield Combo];
autoAttackSkills["KNEEBUTT"] = $skill[Kneebutt];
autoAttackSkills["LASAG"] = $skill[Lasagna Bandages];
autoAttackSkills["LS"] = $skill[Lunge-Smack];
autoAttackSkills["LTS"] = $skill[Lunging Thrust-Smack];
autoAttackSkills["MAGIC MISSILE"] = $skill[Magic Missile];
autoAttackSkills["MINOR RAY OF SOMETHING"] = $skill[Minor Ray of Something];
autoAttackSkills["MOXIOUS MANEUVER"] = $skill[Moxious Maneuver];
autoAttackSkills["PICKP"] = $skill[Pickpocket];
autoAttackSkills["SAUCEGEYSER"] = $skill[Saucegeyser];
autoAttackSkills["SAUCESTORM"] = $skill[Saucestorm];
autoAttackSkills["SAUCY SALVE"] = $skill[Saucy Salve];
autoAttackSkills["SHAKE HANDS"] = $skill[Shake Hands];
autoAttackSkills["SHIELDBUTT"] = $skill[Shieldbutt];
autoAttackSkills["SLEAZY BREATH"] = $skill[Sleazy Breath];
autoAttackSkills["SPECTRAL SNAPPER"] = $skill[Spectral Snapper];
autoAttackSkills["SPOOKY BREATH"] = $skill[Spooky Breath];
autoAttackSkills["STINKY BREATH"] = $skill[Stinky Breath];
autoAttackSkills["STREAM"] = $skill[Stream of Sauce];
autoAttackSkills["TANGO OF TERROR"] = $skill[Tango of Terror];
autoAttackSkills["TS"] = $skill[Thrust-Smack];
autoAttackSkills["WAVE OF SAUCE"] = $skill[Wave of Sauce];
autoAttackSkills["WEAPON OF THE PASTALORD"] = $skill[Weapon of the Pastalord];
Code:
record attackSkill
{
string fullName;
string shortcutName;
int skillNum;
}
int [attackSkill] autoAttackSkills;
Well..."why not take the int out of the record and just go with that" you say? I could, and if I have to, I will. However, the complete structure of an attack skill, consists of the name, shortcut name, and the skill number that will be used to set the property. Because of that, the record feels incomplete without that value in there.
So...is there any way to have an aggregate of attack skills without mapping them to a certain integer? If not, and you (hola and veracity) are either too busy (which I'm sure you are with the end of school approaching), or feel that the time to change this outweighs the priority of this, please feel free to say so. This was less of a post to get you to change things, than it was to simply explore if there was a way available now (although don't let that discourage you

Thanks.
EDIT: I just realized I have some issues with my record/map of said record. So...don't pick on that ;D. Either I'll figure out what I actually wanted to do, or if someone suggest something, that works as well.
EDIT^2: I'll leave this thread up for the hell of it. But I realized in trying to "fix" my map, since I obviously can't index by a record (at least...I don't think you can), and by reading over the initial discussion when records were first thought of on the dev forum, that I should simply be setting the record type as the value for the map. So I now have:
Code:
record attackSkill
{
string fullName;
string shortcutName;
int skillNum;
}
attackSkill [string] autoAttackSkills;
So...
Code:
boolean changeAutoAttack(string newAttack)
{
int attackNum;
foreach attack in autoAttackSkill
{
if(autoAttackSkill[attack].shortcutName == newAttack)
{
attackNum = autoAttackSkill[attack].skillNum;
set_property("defaultAutoAttack", attackNum);
}
}
}