Installation :
--------------

To run this plugin you NEED:

- Latest version of Metamod installed and working (www.metamod.org)
- Latest version of AMX installed and working (http://amxmod.net/amx-dl.php)
- Modules needed: Vexd's Utilities, sniperbeamer's, xtrafun and jghg
It won't work with older version, you NEED at least AMX v0.9.3!!! (I run this on AMX 0.9.6 and it runs perfect)
The .amx was compiled for amx 0.9.6, people using any other version should recompile the sma

Now on how to install the actual plugin:

- Extract file warcraft3FT.amx to directory cstrike\addons\amx\plugins
- Open cstrike\addons\amx\plugins\plugins.ini
- Add a line containing : warcraft3FT.amx
- Extract the sound files to base cstrike directory and check they got put in cstrike\sound\warcraft3
- Extract the sprite files to base cstrike directory and check they got put in cstrike\sprites
- Extract the model files to base cstrike directory and check they got put in cstrike\models\player\goomba

Your not done yet, you need to install the warcraft3 AMX module:
(This Module is the same one from the 2.20 Version, it was just renamed to stop confusion about the differnet versions)

For win32 servers:

- Extract file war3_222_ms.dll to directory cstrike\addons\amx\dlls
- Extract file mysql_ms.dll to directory cstrike\addons\amx\dlls
- Open cstrike\addons\amx\modules.ini
- Add a line containing : addons/amx/dlls/war3_222_ms.dll
- Add a line containing : addons/amx/dlls/mysql_ms.dll
- Open cstrike\addons\metamod\plugins.ini
- Add a line containing : win32 addons/amx/dlls/war3_222_ms.dll

For linux servers(this plugin has not been tested on linux servers):

- Extract file war3_222_ms_i386.so to directory cstrike\addons\amx\dlls
- Extract file mysql_ms_i386.so to directory cstrike\addons\amx\dlls
- Open cstrike\addons\amx\modules.ini
- Add a line containing : addons/amx/dlls/war3_222_ms_i386.so
- Add a line containing : addons/amx/dlls/mysql_ms_i386.so
- Open cstrike\addons\metamod\plugins.ini
- Add a line containing : linux addons/amx/dlls/war3_222_ms_i386.so


Problems / Troubleshooting
--------------------------

Ok your done now, if you are getting the following error:
"[AMX] Unavailable native functions (plugin "warcraft3FT.amx")"

Then it could be one of the following:
- AMX fun module isn't installed correctly
- War3 module isn't installed correctly (check that you installed the warcraft3 AMX module)
- Mysql Module isn't installed correctly (check that you installed the mysql AMX module)

If you want to compile warcraft3FT.sma you will have to also do this:

- Extract file war3.inc to directory cstrike\addons\amx\examples\include

- If you have problems with the shopmenu not working try this link:
http://spacedude.games-fed.com/forum/viewtopic.php?t=161

- Converting XP from file to mysql:
http://spacedude.games-fed.com/forum/viewtopic.php?t=1357

And of course the discussion thread for this version:
http://amxmod.net/forums/viewtopic.php?p=152227#152227
http://spacedude.games-fed.com/forum/viewtopic.php?t=1826

Description: 
------------

When you enter the game you get to choose a race (undead, human, orc, night elf, blood mage, shadow hunter, warden, crypt lord), each race has 3
different skills and an ultimate skill. You start out without any special skills, but as you gain
frags you gain Experience. With each new level of experience you get to select a new skill or upgrade
a skill you already have (the menu will popup at the start of the next round automatically, or you can
do it manually by typing "selectskill" in the console or binding a key to it). Once you get to level 6
you can choose the ultimate skill, to use these your going to need to bind a key to the command "ultimate".
type "war3help" in the game for more details.

Server Settings:
----------------

There are two modes this plugin can be run in: Short term XP and Long term XP.

Short Term XP

This is the default, in this mode XP is gained quite fast as is designed so that you should
be able to reach a high level within 30/40 minutes of playing. Your XP, race and skill information
are reset to 0 on each now map. If you just want to have a quick game then this is the best option.

Long Term XP

This is a new mode added in v2.10, in this mode you gain XP slower than the regular mode
but your XP is kept from map to map. Even if you disconnect and come back later your XP is saved
to a text file and you retreive it as soon as you join the server. XP is saved to "war3users.ini"
in the root CStrike directory. The plugin will first try to save XP for each person based on WonID
if that fails it will use the IP address (this is usefull for lans). Please don't mess around with
this file as it will most likely cause the plugin not to load properly.

To activate this mode you must set "mp_savexp 1"
If you wish to save the XP in a mysql DB set "sv_mysql 1"

please note that this will not take effect until the next map change. Also there is another server
variable that will help you adjust the speed at which you gain levels. "mp_xpmultiplier 1.0", the
default is 1.0, by changing this to say 0.5 it would allow you to gain a level at half the normal
xp required for that level. "mp_xpmultiplier 2.0" would require you to gain twice as much XP to reach
the same level. This is usefull for say lan parties where you want to play over the whole week-end,
you could adjust it take make sure you would reach level 10 by the end of the week-end but not before.

XP is saved for each race independently, this means that you can play as one race and then switch to
another race starting from 0 xp. But then if you switch back to your original race you will regain the
XP you had.

XP does not stay forever though, once per day the war3users.ini is updated removing any inactive entries.
If you don't connect to the server for a certain number of days you will be removed, there are two cvars
for this:

"sv_daysbeforedelete" (default 1)
"sv_dayslevelmodifier" (default 3)

sv_daysbeforedelete will set the number of days before you get deleted from the list. The default of 1
allows you to stay "offline" for 1 day without being deleted.

sv_dayslevelmodifier is added to daysbeforedelete to give the total number of days you can stay "offline".
is it easiest to explain by example, say sv_dayslevelmodifier is 3. This means that if you have reached
level 3 you will gain an extra day before being deleted, level 6 will get you 2 extra days, level 9 will get
you 3 extra days.

the formula is given by:

days = sv_daysbeforedelete + level / sv_dayslevelmodifier

days are always rounded down to a whole number
I have made the following table to illustrate how it works with default values (1 and 3):

level	days
-----	----
0	1
1	1
2	1
3	2
4	2
5	2
6	3
7	3
8	3
9	4
10	4

This is to prevent the war3users.ini file from getting too big, while allowing high level players to
keep their settings for longer.

Also if you want to prevent certain maps from being played with longterm xp, create a file named
war3maps.ini and place it in your cstrike root directory and put the name of the maps you want
on a seperate line, for example:

aim_map
awp_map
aim_ak-colt


Console Commands
----------------

Client:
"war3menu" - Show WarCraft3 XP Player menu
"selectskill" - Allows you to select skills before the start of the next round
"changerace" - Allows you to change race during the game if "mp_allowchangerace" is "1"
"playerskills" - Shows you what skills other players have chosen
"skillsinfo" - Shows you what each skill does for the race you have selected
"itemsinfo" - Shows you a list of items and what they do
"iamadirtycheater" - if "sv_cheats" is "1" then it will set you to level 10
"cheatsoff" - will set your level back to what it should be
"war3help" - gives you a list of the console commands
"war3vote" - vote to switch the plugin on and off
"say /shopmenu" - same as "shopmenu"
"say /shopmenu2" - same as "shopmenu2"
"say /changerace" - same as "changerace"
"say /selectskill" - same as "selectskill"
"say /playerskills" - same as "playerskills"
"say /skillsinfo" - same as "skillinfo"
"say /itemsinfo" - same as "itemsinfo"
"say /itemsinfo2" - same as "itemsinfo2"
"say /level" - displays level, race and skill information
"say /war3vote" - vote to switch the plugin on or off
"say /war3help" - displays info about the plugin

Server:
"sv_warcraft3" - Enable/Disable the plugin (default 1, enabled)
"sv_allowwar3vote" - Enabled/Disable voting (default 1, enabled)
"sv_cheats" - this is a standard HL cvar, but you need this if you want to cheat
"mp_allowchangerace" - Allow people to change race during the game (default 0, disabled)
"mp_forceskin" - Forces player to choose skin according to race (default 0, disabled)
"mp_grenadeprotection" - prevents buying more than 1 HE gren per round (default 1, enabled)
"mp_weaponxpmodifier" - gives additional XP for using certain weaker weapons (default 1, enabled)
"amx_vote_delay" - set delay between which votes can be started (default 60)
"amx_vote_time" - set the amount of time you have to vote (default 10)
"amx_votewar3_ratio" - set the minimum ratio of votes required (default 0.40)
"amx_vote_answers" - display player votes (default 1, enabled)
"mp_savexp" - save XP to a txt file and restore it when player reconnects (default 0)
"mp_xpmultiplier" - set the level required to gain a level as a multiple (default 1.0)
"sv_daysbeforedelete" - see server settings above (default 1)
"sv_dayslevelmodifier" - see server settings above (default 3)


Skill Descriptions  (for new race info travel to: http://ootoaoo.no-ip.com/dp/war3info.htm
------------------

UNDEAD

Vampiric Aura: Gives you (15%, 30% or 45%) of the damage you do in attack back as health,
               (i.e. if you shoot someone and do 100 hp damage you will get back either
               (15, 30 or 45 hp) back depending on the skill level)

Unholy Aura: Gives you a speed boost, also all weapons make you go at the same speed
             (running with knife will not make you move faster than running with AWP) 

Levitation: Allows you to jump higher, basically reduces your gravity to reach high places
            you wouldn't normally be able to reach. 

Ultimate, Suicide Bomber: player will explode when he dies, killing enemies around him

HUMAN

Invisibility: You become partially invisible

Devotion Aura: Gives you more heatlh at the start of each round (115, 130, 145)

Bash: When you shoot someone you have a (15%, 30% or 45%) chance of rendering them immobile
      for 1 second. (their maxspeed is set to 0 for a second) 

Ultimate, Teleport: Ability to teleport to team mates (10 second cooldown)

ORC

Critical Strike: Gives you a 15% chance of doing (2, 3, or 4) times normal damage on each shot

Critical Grenade: Will ALWAYS do (2, 4 or 6) times normal damage when you hit someone with
                  a grenade.

Equipment Reincarnation (Ankh): Gives you a (33%, 67% or 100%) chance in respawning with the
                                equipment you had before you died last round. 

Ultimate, Chain Lightning: Ability to cast lightning jumping from player to player harming them,
                           damage decreases by 2/3 each jump.

NIGHT ELF

Evasion: Gives you a (10%, 20% or 30%) chance of evading a shot, i.e. you will not lose any
         health over it but it will still seem as though you where hit. 

Thorns Aura: Does (10%, 20% or 30%) mirror damage to the person who shot you. 

Trueshot Aura: Does (15%, 30% or 45%) extra damage on each of your bullets. 

Ultimate, Entangle Roots: Immobilises enemy for 10 seconds.


Glow Colors

Red: Extra damage done to the player who glows (Critical Strike/Grenade or Thorns/Trueshot Aura)

White: This is when you get bashed, player glowing can't move for 1 second

Green: You will glow green if you have vampiric aura and do dammage to another player.
       You will also glow green at the start of the round if you have Weapon Reincarnation.

Blue: You glow blue when you evade a shot with the Night Elf Evade ability.


Shop Items
----------

The shop works in the same way as buying weapons, except you can buy anywhere. You can hold only
1 item at a time, with the exception of the tome of experience (you can buy as many as these as
you want without losing your current item). If you buy an item while already holding an
item your previous item will be lost.
In order to buy items you must bind a key to "shopmenu" for example (bind i shopmenu)

Ankh of Reincarnation: If you die you will retreive your equipment the following round

Boots of Speed: Allows you to run faster

Claws of Attack +6: An additional 6 hp will be removed from the enemy on every hit

Cloak of Shadows: Makes you partially invisible, invisibility is increased when holding the knife

Mask of Death: You will receive health for every hit on the enemy

Necklace of Immunity: You will be imune enemy ultimates and critical grenades

Orb of Frost: Slows your enemy down when you hit him

Periapt of Health: Receive extra health

Tome of Experience: Automatically gain experience, the item is used on purchase

Shop Items 2
------------

Scroll of Respawning: You will respawn after death 

Mole Protectant: You will be protected from a mole for the first 6 seconds of each round
 
Amulet of the Cat: You cannot be heard when running/going up ladders 

Sock of the Feather: Low gravity, more than Undead's level 3 levitation 

Helm of Excellence: Immune to headshots 

Flaming Gloves of Warmth: Given a nade every 10 seconds 

Ring of Regeneration +1: Gives 1 health every 2 seconds, you can have 5 max (type rings to receive 5) 

Chameleon: You look like the enemy!! 

Mole: Teleported to enemy spawn at the start of the round


Revision History
----------------


- v1.0  Public release (still beta)
	Based on Spacedude's v2.20 War3


Known Bugs
----------

- If you are warden, sometimes the ankh does not work in the next round.. still working on a solution :(