Re: Making a custom weapon
Gleeok has some scripts for custom weapons out there somewhere. There's also the scripts in Zodiac (over at Quest Announcement) where all of my custom weapons are open for ripping. Go inspect how I'm doing them and you'll get the hang of it.
The easiest way to limit range, to answer your question, is to use a cycling combo. The script only moves the weapon-ffc while it's a certain combo. Once it cycles to another one, it stops.
For enemy damage, you have to simulate damage, flashing, and knockback to make it satisfying. This isn't so bad. But it's a little complicated, as you'll see when you review the scripts, because you want to be able to hit more than one enemy at a time.
Re: Making a custom weapon
Actually I haven't posted any weapon scripts yet as they aren't done yet. The problem with the script i'm using and the Zodiac script is it's so damn complicated for non-scripters to use. However, i've fixed the crash and bool problems with the Global Weapon script i've been working on (for so long :( ), which means i'll switch over to that eventually as it runs faster and doesn't seem to slowdown ZC from enemy->pointers as much. *Sigh* I just can never have time for all these scripts...(I wish we had more scripters)
You should at least check out what is available in the script showcase, and hopefully you'll pick up scripting in no time at all.
To answer more specifically your questions though: Yep, combo cycle the ffc.
And you need to check the coordinates of the ffc with the coordinates of every on screen enemy. If the ffc is over an enemy, you need to store that npc's id in a variable, then assign damage to it with:
npc enemy = Screen->LoadNPC(npc_id);
enemy->HP -= damage_amount;