/* Warcraft 3 XP by SpaceDude email: eayumns@nottingham.ac.uk MSN: eayumns@nottingham.ac.uk ICQ: 1615758 IRC: Quakenet, nickname: "SpaceDude" 2.5.x Maintainer: DopeFish email: dopefish@gmx.li ICQ: 6636660 IRC: Quakenet, nickname: "Dopy" 2.6.x Maintainer: ferret email: ferret@gamehavoc.com MSN: ferret@gamehavoc.com Revision History ---------------- . | The 2.6.x version and changes to it -> amxmodx | The 2.5.x version and changes to it -> amxmodx | The 2.22.x version and changes to it -> amxmod ` * #################### Changelog for 2.6.3 ###################################### * Fixed, for good, the "Bad file Server is enforcing file consistency for..." error message that was booting everybody from the server. * #################### Changelog for 2.6.2 ###################################### * Renamed several variables to remove 'local variable shadows a variable at a preceding level' warnings. * Updated SQL queries to only pull needed data, not the full records. * Added mp_changeracepastfreezetime cvar to allow race changes while alive. * Increased the length of the team name variables in death logging. * Replaced the check_say() function with either direct calls to the corresponding function with register_clcmd(), or with say_*() functions. * Changed the Troll ultimate to allow healing of self. * Changed the SQL "CREATE TABLE" statements to minimize differences between MySQL and SQLite. * Changed the SQL error handling system with a global new Result:res and a remake of dbi_check_error(). * Added missing famas and galil to damage_event() weaponname variable. * Removed forcing setting mp_consistency, it was booting everybody from the server under AMX Mod X 1.5x. * #################### Changelog for 2.6.1 ###################################### * Removed inconsistent_file() function to allow compiling for AMX Mod X 1.5x. * Added support for SQLite database XP storage. * Updated/checked SQL statements. * #################### Changelog for 2.6.0 ###################################### * Adopted by ferret * AMX is NOT supported. You must use AMXX 1.0 or newer. * CS 1.5 and WON are NOT supported. You must use STEAM/CS 1.6 * The old flat file save method is removed. The plugin now uses VAULT by default, MySQL is optional in the CFG. The plugin will still convert war3users.ini files into VAULT. * Blood Elf is no longer part of the plugin in "Original Mode" * To get Blood Elf and 3 new races, enable "EXPANDED_RACES" in the CFG file. The 3 new races are Troll, Dwarf, and Lich. * Many old config options have been removed. We have trimmed some features that had little to do with WC3 out of the code. You can find similar plugins at amxmodx.org * Weapons do not drop in front of players who had reincarnated anymore * VAULT is far more reliable with tracking when to delete a player's data * Added a config option ORCNADELESS. This is on by default and works like version 2.5. The plugin causes orc nades to do less damage than normal if you do not have the option ORCNECKLACE enabled. Turning off ORCNADELESS will return orc grenades to max damage. * VAULT will work with SAVE_WITH_IP now * You can say "shopmenu" now rather than having to bind it * Admins can now give or take XP with wc3_givexp * Freeze round and many other speed-related bugs have been fixed * Many many many many runtime errors fixed * #################### Changelog for 2.5.1 ###################################### Fixed weapon reincarnation bug where on some servers the player would get stuck under the map * #################### Changelog for 2.5.0 ###################################### All functions changed to use engine/fun/cstrike and amxmodx directly full support for amxmodx * #################### Changelog for 2.22.12 ###################################### Get money back for item if you already have one and buy a new one Armour reincarantion bug fixed Ability to save XP via IP (for unofficial cs1.6 LAN server versions) Option to have dead players drop their item (just as they drop their weapon) Players can manuall drop their item with the command "dropitem" * #################### Changelog for 2.22.11 ###################################### Bugfix time again, this version is mainly a "cleanup" version with stuff for admins. Paving the road with stable clean working code so we can introduce new stuff in 2.22.12 ferret implemented vault saving and pruning for long term servers without mysql. stable and fast. trinity recoded the vampiric HP gain and thorns damage. No more overbalanced races due to bugs. optional Icons over the heads of teammates showing their race for 1-2 sec when aimed at. clients can turn this on or off (say icons or say /icons, or via the war3menu). night elf ultimate making enemy drop weapon was changed to a pre compilation directive. check and set CSW_GALI and CSW_FAMAS if the entries are not in the servers amxconst.inc Updated code to log kills that happen by harmful skills/ultimates. (for psychostats) error fixed where random race couldn't be selected. Admins can choose if they want to use the vexd module or the war3 module. -> in the long run I would like to migrate to vexd.^ changeable starting level for new players weapon reincarnation when killed by bomb works again various changerace bugs fixed. "point and click" teleportation restricted to minimize exploiting (skywalking). ultimates can be deactivated in the first round usage of warcraft3.cfg simplified * ################# So, here goes 2.22.10 ######################################## threw out anti grenade spamming code to reduce lag fixed freezetime bug to work better now (no more ugly workarounds) fixed some blood elves code added possibility to disable the "shopmenu in buyzone" restriction via the cvar mp_shopzone fixed bomb countdown problem if round ends before the countdown is done added german translation changes from AoL were all workarounds for the old method of freezetime, not needed here. when caught by nightelf entangle roots you drop your current weapon code for html website stats about the players included Psychostats compatible logging * #################### Changelog for 2.22.9 ###################################### ########## Dopy's Changelog ####### hell of a lot of bugfixes from other people put in here changed invisibility a bit cleaned up weapon reincarnation and put some stuff from 2.30 in put in most bugfixes from 2.21 into this version added all changes from "guest" that weren't alredy in here > http://spacedude.games-fed.com/forum/viewtopic.php?t=1326&start=0 put in the war3menu from trimoon changed sv_warcraft3 to FCVAR_SERVER so that programs like ase or kali can query if warcraft is running (thanks to Mike4066 for this one) Reverted all balancing back to defaults, serveradmins can do that themselves if they wish Weapon reincarnation now only gives you back a 1 primary weapon max Steam Support from This version by [AoL]LuckyJ, [AoL]Demandred, and Pimp Daddy Immunity to Orc grenade via Necklace item, pre-compiler toggle Resetskills put into the war3menu, skills reset on next round (not exp) ########## Denkkar's Changelog ####### RC1 & RC2 changes: Added "better" hostage handling code. The old code worked poorly in my opinion, for one thing it only tracked one hostage rescuer at a time. This one will work even if there's 5 hostage rescuers... such as on Walmart... all rescuing one hostage each... Added an XP reset upon reaching level 11. RC3 version changes: Level info on bottom left of screen altered to reflect level 11 change (if enabled). Dopey, with slight change by me. Level dependent ALTBONUS formula fully implemented. Please report bugs if any. Race ultimate level requirements made changeable. Please report bugs if any. Added message saying /savexp does nothing. Refrained from calling player a n00b. Orc Grenades can be disabled with a CVAR. Please report bugs if any. XP reset @ lvl 11, GOD now intervenes to give back XP. Might work... test... Other small changes. RC4 & RC5 version changes: Fixed default XP bonus. Fixed hostage punish to be less annoying. 3 x 11 damage slaps for capital offense. RC6 version changes: Fixed XP reset code. It's still flawed though. I give up. Leave it off. Fixed bug where the RESET_XP_LEVEL_SAVE wasn't being afected by the xpmultiplier Fixed menu for ultimate skill when using modified level requirements. 2nd attempt. Fixed skill checking... so skills aren't > than XP. This occurs when you lose XP. Added ability for external plugins to modify WC3 XP. Fixed names not being processed by mySQL. Names with '. Fixed compiling issues when LogD & Hostage code was disabled. Possible fix for Night Elf death not being reported on odd occassions. Added an alternate Human Teleportation ultimate. Blink style. Note: players can still get stuck, but far less so than with old teleport. Give Undead Scourge players a chance when they hit their Ultimate key, probably an accident. Added warmup for *ALL* Ultimates, so they can't be used when you spawn. Encourage rushing. Fixed huge error in level dependent XP. Couldn't isolate it, so redid code. Added sound to alert players when their Ultimate is ready for use. Needs a bit more work. RC7 changes: A small bug fix when the new teleport was enabled. Blink teleport modified to make player dizzy when used, balances it. You can now disable the sound that lets you know when your ultimate is ready You can now disable warmup time for ultimates. RC8 changes: Completely removed LOGD. You don't need it. Delete it. The functionality of the LogD module is now achieved with a simple money_processor function. Robust Hostage Code with no hassles is now a reality folks! Made the Blink teleport more flexible. Added option to slay the losing team by default. Ex: defuse the bomb or die trying. Added bonus for headshots. Added bonus for killing the bomb defuser. Small bug fixes. RC9 changes: Fixed a HUGE bug in all the bonus code I've done since RC5. XP loss was being causes by an overflow of an array (if you wanted to know). RC10 changes: Found the money track code lacking. Re-wrote it all with AMX log event tracker. Now tracks VIP events. Code now has fewer functions. Can now give a Bomb countdown. Can now give HUD message warnings when objectives are occuring. (To team or to all as appropriate) Fixed objective slayer so it doesn't remove XP. RC11 Changes: Fixed error where dropping the bomb gave XP. Fixed the exploitation script for buying ulimited grenades. It's not perfect, but grenades are definately not unlimited now. Increased the accuracy of Scotty's aim with the teleporter beam considerably. If you point at a player, teleport will no longer fail. The catch is that you can no longer teleport by pointing to a cieling. "Fixed" the XP level checker by basically deleting it. If your skills don't match your level, you must now rechoose all your skills. This is guaranteed to work. Even if the database returns 1000 levels of the ultimate skill... it will recover. Added yet another way to gain XP... kill the bomb carrier. Moved initilization code from the end_round function to the new_round function. The end_round function is not called when the map changes, leading to unfortunate first rounds on the next map. Fixed an error where an xpgiven array could overflow. Added mySQL auto-pruning of database at 5:00 AM. Totally untested and unrecommended until properly tested. Added Willyumyum's code for Orc Nades. Same as mine, but easier to read lol. Improved the bomb countdown. Included fun.dll RC5 in case people didn't have the latest version. RC 12 Changelog: Gave people 10 seconds to choose a race while alive. This option is configurable. If you would like a CVAR let me know. Modified humans to have a bit less health, improved unholy aura a bit. Modifed claws of attack to +10 and boots of speed to speed of unholy 2. Increased costs. Changed the Grenade protection code. It is now bulletproof and totally transparent to normal users. NOTE: Some users have reported that the buy menu now doesn't close on it's own. Added option to restrict the shopmenu to the buyzone only. Fixed Ultimates not working first round and teleport not working at round end. Added an icon to show if your Ultimate is ready. Added a death & endround damage and hit reporter. A simple stats, but with the real WC3 damage. Fixed bomb countdown continuing after dying. Note: sometimes the bomb countdown continues anyway. Change the Teleport "dizzyness". The old method was client side, this is server side. Added an option to compile the MOD for "test mode", giving access to lvl 10 chars. Fixed Night Elves not being able to evade the first bullet. RC 13 Changelog: Changed Night Elves evade. Now they evade only bullets & knives. This addresses a number of bugs, including spectators seeing Elves with 1000+ health. Added spawn protection code. For X seconds, users are invincible. Made Blink Teleport not work if Entangled. Made Blink Teleport blind the teleportee if the destination was near an enemy with an immunity necklace. Fixed the Ultimate ready icon showing up even when the ultimate was not ready. Fixed equipement re-incarnation not saving pistols. NOTE: this was a major re-write. My code guarantees that even if a multiple weapon situation occurs, it cannot persist. Side-Effect: Fills ammo of players who lived last round for free. (I survived bonus?) Modified the war3stats to use readable colors (I drew on knowledge from a psyche class for those). Modified war3stats so that the victims, or attackers screen would disapear less. Added say command "stats" to show the stats again. Altered the static formula for Armor loss when hit by lightning. Randomized! RC 14 Changelog: Moved to AMX 0.9.6, replaced Warcraft.dll with VexD Utilities. Fixed the re-incarnation code. Should be completely transparent now. Fixed issues with the periapt of health. Fixed XP stats to not show ZERO as a negative number... Fixed Ultimate Icon not showing up if Warmup time was disabled. Changed Blink Teleport. It will now fail teleports near enemies with necklaces. Fixed (maybe) issues with the skill reseter in the war3menu. Fixed the mySQL name bug and actually tested it this time. RC 15 Changelog: Reworked all the Ultimate Ready Icon code. Cleaner code and an icon for each race. Disabled all VIP Ultimate abilities. Controlled by: NON_ULTIMATE_VIP Added option to disable all Forceskin code. This fixes graphical bug on death. Reduced cost of Claws Of Attack +10 to 1000$. Fixed bug where Humans could teleport while planting the bomb, and plant it far away... Changed Ultimate Warmup time to 25 seconds. Added glow so players will know when Spawn Protection time is up. RC 16 Changelog (rACEmic): Rewrote SQL save code (less random deletion - I hope). Removed the save queue for MySQL users only, because it served no useful purpose (didn't cut down on SQL queries). Optimized the precompiler directives. This means the .amx file actually decreases in size! Yay! The worthless sv_mysql cvar is gone. Compile it the way you want it - you can't switch from SQL to not without recompilation. RC 17 Changelog: Modified the Blink Teleport a bit to further reduce chances of getting stuck. Fixed a bug in the levelup code. When you select a skill it should now be active right away. Fixed bug allowing players to move before freezetime is up (thx to [AoL] Demandred) Added Ranks & Top 15 mySQL based block to the War3 stats. Updated on map change. Re-wrote the mySQL auto pruning code. On by default. Prunes chars older than 14 days by default. Activates on mapchange occuring between 5:36 and 5:59 AM inclusive. Prunes Stats as well, but between 5:05 and 5:35 AM inclusive. Removed CVARS related to pruning, they are now pre-compiler options. Re-wrote the bomb countdown timer. 1) No longer continues during the next round 2) Accuracy is excellent under any server conditions 3) Requires AMX supporting task_exists such as AMX 0.9.6 Made anti-grenade spam code always active (no more mp_grenadeprotection CVAR). Fixed bug where VIP's could use Ultimate on 2nd round. Removed the Changerace time at the start of the round. It was being exploited. Major bug found in RC 18 -- working back off the RC17 code. RC 19 Changelog: Added proper CS 1.6 STEAM support for mySQL XP databases. No longer uses VexD Utilities (uses updated war3.dll) RC 19a Changelog (rACEmic): Improved short-term XP support. Restored CS 1.5 support (lost in RC 19). RC 20 Changelog (rACEmic): Freezetime bug fixed. Changerace bug fixed. Shields can be bought reliably again. New race: Blood Elves. Better changerace handling. Willyumyum: Blood elves added, and slowdown bugs within blood elf race fixed. - v2.22.xs (2.22.8) - as of 2.22.8 the release includes two versions of the warcraft3 mod. the normal version for cs1.5 and a second version (e.g. 2.22.8s) for cs1.6 (steam version). the .amx and .sma files for cs1.6 have the suffix "_steam" The steam support is from [AoL]LuckyJ, [AoL]Demandred, and Pimp Daddy. Great job there guys. - v2.22.x - All modifications based on the 2.20 source, not 2.21. - MySQL Support from Mr. B - many bugfixes - calculation og invisibility changed a bit - weapon reincarnation fixed to work better - put in the war3menu from trimoon - changed sv_warcraft3 to FCVAR_SERVER - Necklace works against Ork Grenades - v2.20: - added a shop to buy items, bind a key to "shopmenu" to use it - added option to gain more xp with weaker weapons "mp_weaponxpmodifier" default 1 - changed skillsinfo to show actual skill values rather than hardcoding - changed playerinfo to also work when not connected to the server (via rcon) - v2.11: - reduced thorns aura effectiveness by half - vampiric aura no longer restores health higher than 100 hp - added race name to the bottom left of the screen - added player levels to playerskills command - added option to save xp by name "mp_savexpbyname" default 0 - fixed problem with changing race when mp_savexp was on - fixed bug related to aggressive skills and falling damage - fixed bug with vampiric aura "green flash" (i hope) - fixed bug with undead levitation skill being removed when gaining xp - fixed bug where death message sometimes showed wrong message - improved grenade spam protection (now only stops you from buying, doesn't kill) - v2.10: - added hegrenade, flashbang and smokegrenade to Orc equipment reincarnation - gain xp for saving hostages, 100 xp per hostage, 50 xp if closeby when rescued - gain xp for killing the guy who is trying to save the hostages - lose xp for killing hostages - fixed bug where you could teleport at the end of the round - fixed bug where you would gain xp for planting bomb when sv_warcraft 3 was 0 - sv_warcraft3 setting is only checked every 30 seconds to improve performance - added long term XP (saves your XP in a txt file, but you gain xp slower) read the "Server Settings" section above for more info on this - finally managed to remove double death messages ("player1 commited suicide" followed by "player2 killed player1"). Thanks to the AMX module. - v2.06: - fixed some bugs - v2.05: - human now becomes even more invisible while he holds his knife - new XP system, no longer based on frags, you gain more xp for killing higher level players - gain xp for planting and defusing bomb, and assisting plant/defuse - fixed various bugs - added command sv_war3debug, logs a lot of the plugin activity to a .log file in "addons/amx/logs/war3%m%d.log", will create some quite big files if left running for too long. Use this if your server is crashing and then send me the log files so i can figure out what is wrong. default 0, disabled. - v2.04: - removed sv_uploadsounds, sounds will now upload if the server has them, if not then HL sounds will be used instead - changed mp_forceskin default to 0, skins will still be set according to race but not until the player dies. set it to 1 to force skin even if player is alive. - say commands now work with and without the slash ("say /level" & "say level" both work) - removed race selection before team (was causing more problems than anything else) - added voting to switch plugin on and off with "war3vote" and "sv_allowwar3vote" - changed weapon reincarnation to equipment reincarnation (also get armor & defuse kit back) - v2.03: - Fixed a bug with the race selection not working properly on connect - Added mp_grenadeprotection, allows you to switch off spam protection - Undead with vampiric aura can go up to 105, 110 or 115 health depending on level. - Moved "you gained a level" up slightly on the screen - v2.02: - Added warcraft 3 sounds, if the sounds arn't on your computer it will use HL sounds - You now have to select race before team - Devotion Aura hp increased for human from 110, 120, 130 to 115, 130, 145 - Added HE grenade spam protection for orcs with critical grenade - Added sv_uploadsounds, allows you to force players to download warcraft3 sounds - v2.01: - Reduced night elf evasion to (10%, 20%, 30%) chance from (15%, 30%, 45%) - Human devotion aura change, you now get extra health instead of armor - Human invisibilty increased a little - Added say /selectskill, say /skillsinfo, say /playerskills, etc... - Chain lightning damage decreases by 1/3 instead of 1/2 and does damage to armor too - Teleport now lets your choose a player to teleport to from a menu instead of aiming at the player - Chain lighting and Entangle roots have 45 second cooldown time - added say /war3help and war3help client commands - skill selection now automatically appears at round end and when you die - added mp_forceskin, forces player to choose skin according to race - fixed bug where you could "bash" yourself when falling from high up - v2.00: - Fixed problem where player gets permanently frozen if hit twice by bash within 1 second - Added new client command to view skills information "skillsinfo" - Added screen fading so that when your model is glowing you can see it - Added level 6 ultimate skills for all races, they are: Undead : Suicide Bomber, player will explode when he dies, killing enemies around him Humain : Ability to teleport to team mates (10 second cooldown) Orc : Ability to cast chain lightning harming all players near the target once per round Night Elf : Ability to entangle roots, immobilising enemy for 10 seconds once per round - Replaced Endurance Aura with Invisibility for humans (all skills are now unique) - Added a cheat to become level 10 when sv_cheats is 1, see client console commands above. - Bots will use chain lightning and entangle roots when they shoot players with guns - Note: entangle roots does not work on bots (same as bash) - v1.07: - Fixed problem where if you joined in the middle of the game you would have the level of the player who left the game and had the same id as you. Now your level is reset to 0 on connect and disconnect. - Fixed bug where you would be able to move during freezetime with unholy/endurance aura - Fixed bug where you would be able to move when bashed if you had unholy/endurance aura - Added description of skills and glows at the top of the file - v1.06: - Added weapon names and headshots to death messages - Fixed a few small bugs related to changing race during the game - The 4 compiling "tag mismatch" warnings have gone with v0.8.4 of AMX which is good :) - Bots now choose random race and skills (before they wouldn't choose anything) - Added client command "playerskills" to see what skills everybody has chosen - Changed name of Undead skill "Decreased Gravity" to "Levitation" - v1.05: - Fixed another bug to do with frags that cropped up :( - Added death messages for offensive skills (critical strike/grenade, trueshot, etc) you will see 2 death messages :(, one suicide and the new death message added by the plugin. with the current version of AMX i think it isn't possible to remove the suicide message (but if i am wrong plz tell me how ;). - Fixed several bugs with evasion aura, you will find that in previous versions that it does very strange things. hopefully its fixed now! - Replaced Ankh of Reincarnation with Weapon Reincarnation. What this means is that when you die, there is a 33%, 66% or 100% chance that your primary weapon will be saved for the next round. Reason being that the Ankh of Reincarnation code was buggy. - v1.04: - Better devotion aura, you now get more armor but you have to buy it first its not free like before. You now get 150, 200 or 250 armor depending on the skill level - Number of "maxspeed set for player" messages decreased - v1.03: - Fixed evasion bug where you would get 100 health after evading a shot - Fixed bug where if you pressed cancel on race select you wouldn't be able to select a race if "mp_allowchangerace" was set to "0" - added cvar "sv_warcraft3" to switch the plugin on and off - v1.02: - Skills like Critical Strike/Grenade, Thorns Aura and Trueshot Aura DO kill players again, but frags are awarded accordingly (note: scoreboard doesn't refresh immediatly) - v1.01: - Added red glow for trueshot aura - Re-arranged code for extra performance - Added server-side svar "mp_allowchangerace" allows you to change race during the game if set to 1. use "changerace" command to change race, "selectskill" for skills. - Skills like Critical Strike/Grenade, Thorns Aura and Trueshot Aura no longer actually kill the enemy they will only set your health down to a minimum of 1 - Evasion now works better, the player is given 1024 + whatever health he was on if he is going to evade the next shot. This way, even if he is shot in the head with an AWP he will still survive and allow the plugin to correct his health before he dies. 1024 health shows up as 0 health on the HUD so the player will not notice. * ################################################################################# * * Priority Queue: * Modify the 10 levels into 100 levels. No big difference, just incremental skill improvements. * Add a new shopmenu with new items. * Add 4 new races. * * Known Bugs: * Entangle roots doesn't work on shielders. * * Unfixable Bugs: If you plant the bomb on de_jeepathon2k in the jeep, and ride the jeep to the hostages * and then the bomb explodes, you get punished for killing hostages. LOL * However, if you RUN THE HOSTAGES OVER, it doesn't detect it. Sigh. * * Hostages: impossible to detect if a hostage was stolen from another player * because the hostages have no unique id's. * Hostages2: it's also impossible to tell which hostage was killed or un-used * so a T can get a kill bonus erroneously. * */