When you get a "There is already a variable with the name" error, that usually means you've imported a header file twice. In this case that's probably ghost.zh because I can't imagine you or a script you're using would have imported ghost2_common.zh on its own.
Your other questions are a little much to answer in a forum topic, but here's some thoughts (though not necessarily answers) for each:
I also need to make enemies teleport say...3 tiles behind the player.
This is a little more complicated than it may seem. The logic for placing the enemy three tiles behind the player isn't so bad (I'd use DirX() and DirY()), but then what happens if that space is occupied? What if it's offscreen? That's the fun thing with teleporting logic, finding ways to handle these special cases.
I want to make enemies summon other enemies, that's why I downloaded the summoner script.
This would use Screen->CreateNPC() (ZScript.txt) or CreateNPCAt() (std_functions.zh). Pretty straightforward. To create multiple enemies, you'd do it in a loop, to spread them out use a Rand() call or some trig.
I need to make enemies spawn at your location, then despawn after 180 frames (60 fps) for a boss fight.
You probably don't want enemies telefragging the player without any indication, but you can get the player's position with Link->X and Link->Y, then move your enemy to that spot. Delays can be done with Waitframes() or a timer variable.
I need to make an enemy spawn right at the location another enemy died for another boss fight.
This is somewhat easy if you have a structure for enemies having a custom death animation down. Otherwise it may be easier to just write a separate script that tracks your boss enemy's HP and then spawns in the next one when it hits 0.
I need to make an enemy randomly select between multiple attacks for boss fights.
At the simplest that's just the Rand() function. Your bosses will be way more interesting if you give them some logic besides random number generation but a switch statement with Rand() is perfectly functional for something simple.
I need to know how to make custom attacks for enemies.
That's a doozy of a question right there. I'd still like to know myself. For starters you're probably going to be creating a lot of for loops that do different things with eweapons. Just playing around with different bullet patterns and bullet sprites is a good starting point for bosses. Then you have to start thinking about "what purpose does this attack serve?" and some might say this is the point I dropped out.
If you're making enemies there's a few things you're gonna want to familiarize yourself with. Definitely get to know how npc and eweapon pointers work in ZScript. There's a section in the scripting tutorial going over that and more you understand of it, the better. You'll be creating a bunch of projectiles and enemies and pointers are your way of accessing those.
You'll also want to know how to write your own functions. You're going to want to know how to write a wrapper function for the waitframe behavior so you can control what your enemy is doing even when it's waiting in its main loop. You're going to want to use functions for whatever you think your enemy might end up reusing. Parts of attacks, whole attacks even if that suits you. Don't write the same block of code twice if you don't need to.
You'll probably want to be well acquainted with either arrays (2.53, 2.55) or classes (2.55). These are powerful tools for managing data in your waitframe wrapper function as they let you cram many variables into a single parameter. This way you can keep the size of your waitframe calls to a minimum and add onto the waitframe later without the tedious process of adding new parameters to every call. Arrays also have the unique property of being passed by reference, so any change to an array in a function will affect the original in the script. This is handy because everything else in ZScript is passed by value, so the function only has access to a copy.
If you're using ghost.zh, you'll want to know all the tools that gives you. You'll want to know how ghost's combo setups work, and by extension a bit about the ZQuest FFC editor. You'll want to know all the movement and eweapon functions. The special weapon behaviors too (though these are way less necessary in 2.55). For all of this ghost.txt is your friend.
If you end up using npc script instead...I commend your bravery. That's no man's land there. It's a lot simpler but you'll end up having to do more on your own. I have a header that should cover for some of the stuff that's lacking, but it's definitely the harder of the two options.
This has been one long ramble and probably not all that helpful. Enemy design is tricky business, so if you stick with it I salute you. Wishing the best of luck!