Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - El Diablo

Pages: [1]
1
War3: Source - General Discussion / War3Source:EVO CSGO updated.
« on: November 24, 2016, 12:46:45 PM »
CSGO is now starting to look a lot better!

* All the annoying screens (Radar, dollar signs, etc) are now removed in CSGO while using the menu systems.
* Sounds fully tested and work!

Still need help testing and making sure all the races work.  I have tested a few, and still working on them.  Once they are stable, I'll add more.

follow me here: https://forums.alliedmods.net/showthread.php?t=284415

Latest version for CSGO here: http://107.161.29.8:8080/job/War3Source%20Evolution%20-%20CSGO/

Make sure you download the sounds too: http://107.161.29.8:8080/job/War3Source%20Evolution%20-%20Sound%20Pack/

2
RACES INCLUDED (BUT HAVE NOT BEEN TESTED ON CSGO)

    Undead Scourge
    Human Alliance
    Night Elf
    Blood Mage
    Corrupted Disciple
    Soul Reaper
    Blood Hunter
    Naix
    Succubus Hunter
    Chronos
    Lich
    Sacred Warriror
    Hammer Storm
    Scout
    Dark Elf
    Dragon Born
    Flutter Shy
    Rarity
    Rainbow Dash
    Luna
    Light Bender
    Soul Medic

Still plan to convert and add more races, any suggested races please post here.

3
New update for TF2 only:

Are your races, shop items, etc going haywire?  How about putting a speed limit up so nothing in warcraft can go beyond that limit?

ABILITY TO SET MAXSPEED LIMITS FOR WAR3SOURCE:EVO
Added a War3Source:EVO overall speed limit against itself so that any speed bonuses from itself will not go beyond the multiplier that you set.

The math for the multiplier checking is Class Base Speed * Max Speed Limit = Max Speed

* Any values added to the speed of War3Source:EVO from buffs, shop items, and races will be limited to Max Speed.
* if TF2 adds bonuses that go beyond the Max Speed limit, it will allow it and will also disable bonuses from War3Source:EVO.
* It only limits War3Source:EVO's bonuses and not TF2.
* It will allow the combination of TF2 bonuses and War3Source:EVO bonuses up to the Max Speed Limit

Convars
war3_maxspeed_limit 1.4 - 0.0 to disable speed limit. Must be a float.

war3_maxspeed_debug 0 - 1 to enable, 0 to disable. Shows speed updates to everyone's console when it updates their speed / changes.


More info click here

https://forums.alliedmods.net/showthread.php?p=2430764

P.S. I believe I added all the base races from the original War3Source now.  Has not been tested on CSGO, but TF2 works.

4
I'm working on the be skill stuff without races bound to them and just thought how a race could create itself to have tons of levels and skills that switch at different levels or better yet, gain new skills and keep the old... Unlimited number of skills one race could have if they took advantage of the new stuff I'm adding.

5
You can find War3Source Evolution project source and compiled on our Jenkins here: http://107.161.29.8:8080/

I have implemented part of the SkillCraft engine into War3Source so that races will be able to create skills that are not attached to the race and be able to swap skills at anytime.

Help me create new races based on this technology!

NightElf in SkillCraft is different than Warcraft, but will help give you a basic layout for using War3Source's new abilities.  Anyone good a programming SourceMod should be able to help construct these new races!

Here is a link to SkillCraft's NightElf: https://github.com/War3Evo/SkillCraft/blob/develop/addons/sourcemod/scripting/SkillCraft_003_NightElf.sp

Here is a link to War3Source's implementation of SkillCraft: https://github.com/War3Evo/War3Source-EVO/blob/master/addons/sourcemod/scripting/War3Source/include/War3Source_Engine_SkillsClass.inc

With War3Source you'll only need to #include <war3source> and nothing else.  The above link for War3Source_Engine_SkillsClass.inc is for reference only.


Note the major difference between Race creation skills and Skill creation is this: War3_CreateNewSkill vs War3_AddRaceSkill.  For race creation you'll still need to use War3_CreateNewRace, but for skill creation without binding to the race use War3_CreateNewSkill.

For my concept to work, when a player changes race (OnRaceChanged), then you set the player's skills based on that race's skill level or whatever you decide.  Use War3_SetSkillSlot(int client, int skillslot, int newskillid), and SkillSlot being the Skill # you wish to assign the skill.  When a player leaves that race for another, then you make sure you reset that skillslot back to 0.


Well, it should work... but atm I still need to build the Menu system to handle the new information as it changes. :/

6
Currently updating my version of War3Source to sourcemod 1.8 and here is a few things that would need to be done:

FindSendPropOffs would need to be converted to FindSendPropInfo as is deprecated.

https://github.com/War3Source/War3Source/search?utf8=%E2%9C%93&q=FindSendPropOffs

FCVAR_PLUGIN  is deprecated.

https://github.com/War3Source/War3Source/search?utf8=%E2%9C%93&q=FCVAR_PLUGIN

Seems a lot of the SendProp stuff was updated.

Anyhow, I know all you have to do is compile against 1.8 to see the errors, but giving you a heads up.

7
(Be Warned:  Your original War3Source races would need to be converted to use the new War3Source: Evolution) Most will probably continue to use War3Source Original, but if you are one of those few that move to War3Source: Evolution, you will be way ahead of the game with so many features and updates.

There has been many servers that has created War3Source private versions. I want to announce that I am working to make my version open source (again). I feel when this version is open source, that it will be the most advanced version of War3Source available and is reason I will call it War3Source: Evolution.

The only downside is that I ripped out a lot of the translations from my version of War3Source as it caused issues that I did not want to deal with at that time.  Anyone requiring translations will still need to use War3Source Original until I can fully implement them again.

It should be compatible with TF2, FoF, CS:S, and CS:GO. Out of those four, TF2 will be the most compatible and have the best new races. CS:GO will require much work and the other two will work fine.  Downside: There is a separate compile for each game mode.  Upside: You won't be running unnecessary code in the background for each game mode.

My version incorporates the latest technology that Sourcemod and Metamod has to offer.

My version allows you to write races using the MethodMap function, which makes writing races to much easier and is NOT in War3Source original.

The main thing I am doing to convert it for open source is removing "War3Evo" and "W3E" from the text and replacing it with "War3Source:EVO" and a few other details relating to War3Evo's tagging and database system.

I know a few server owners that are willing to run this new version when it becomes open source. I am here to announce that is what I'm working on it.

How long before it is released? Unsure as I only have weekends to work on this project. I will keep this thread updated as I progress each weekend.  I have been going thru the code for the last 2 days, so this project is just starting for the conversion to open source.

What does my version offer???  These features and updates (some of which the other War3Source developers did not want in the original version).  Several of the new features were debated by original War3Source developers to not be important:

* All War3Source Engines is in 1 file:  war3source.sp / war3source.smx
Code: [Select]
#include <war3source>
#include "War3Source/include/War3Source_Version_Info.inc"
#include "War3Source/include/War3Source_Variables.inc"
#include "War3Source/War3Source_001_OnPluginStart.sp"
#include "War3Source/War3Source_001_OnPluginEnd.sp"
#include "War3Source/War3Source_001_OnRaceChanged.sp"
#include "War3Source/War3Source_001_OnW3Denyable.sp"
#include "War3Source/War3Source_001_OnAddSound.sp"
#include "War3Source/War3Source_001_OnGameFrame.sp"
#include "War3Source/War3Source_001_OnPlayerRunCmd.sp"
#include "War3Source/War3Source_001_OnSkillLevelChanged.sp"
#include "War3Source/War3Source_001_OnWar3Event.sp"
#include "War3Source/War3Source_001_Configuration.sp"
#include "War3Source/War3Source_001_Clients.sp"
#include "War3Source/War3Source_001_Engine_InitNatives.sp"
#include "War3Source/War3Source_001_Engine_InitForwards.sp"
#include "War3Source/War3Source_001_GameEvents.sp"
#include "War3Source/War3Source_001_OnW3TakeDmgAllPre.sp"
#include "War3Source/War3Source_000_Engine_Misc.sp"
#include "War3Source/War3Source_000_Engine_DatabaseConnect.sp"
#include "War3Source/War3Source_000_Engine_Hint.sp"
#include "War3Source/War3Source_000_Engine_Log.sp"
#include "War3Source/War3Source_Engine_Aura.sp"
#include "War3Source/War3Source_Engine_Bank.sp"
#include "War3Source/War3Source_Engine_BuffHelper.sp"
#include "War3Source/War3Source_Engine_BuffMaxHP.sp"
#include "War3Source/War3Source_Engine_BuffSpeedGravGlow.sp"
#include "War3Source/War3Source_Engine_BuffSystem.sp"
#include "War3Source/War3Source_Engine_CommandHook.sp"
#include "War3Source/War3Source_Engine_CooldownMgr.sp"
#if GGAMETYPE == GGAME_CSGO
#include "War3Source/War3Source_Engine_CSGO_Radar.sp"
#endif
#if CYBORG_SKIN == MODE_ENABLED
#include "War3Source/War3Source_Engine_Cyborg.sp"
#endif
#include "War3Source/War3Source_Engine_DamageSystem.sp"
#include "War3Source/War3Source_Engine_DatabaseSaveXP.sp"
#include "War3Source/War3Source_Engine_DatabaseTop100.sp"
#include "War3Source/War3Source_Engine_Deny.sp"
#include "War3Source/War3Source_Engine_Dependency.sp"
#include "War3Source/War3Source_Engine_Download_Control.sp"
#include "War3Source/War3Source_Engine_Easy_Buff.sp"
#include "War3Source/War3Source_Engine_Events.sp"
#include "War3Source/War3Source_Engine_HelpMenu.sp"
#include "War3Source/War3Source_Engine_ItemClass.sp"
#include "War3Source/War3Source_Engine_ItemClass2.sp"
#if SHOPMENU3 == MODE_ENABLED
#include "War3Source/War3Source_Engine_ItemClass3.sp"
#endif
#if SHOPMENU3 == MODE_ENABLED
#include "War3Source/War3Source_Engine_ItemDatabase3.sp"
#endif
#include "War3Source/War3Source_Engine_ItemOwnership.sp"
#include "War3Source/War3Source_Engine_ItemOwnership2.sp"
#if SHOPMENU3 == MODE_ENABLED
#include "War3Source/War3Source_Engine_ItemOwnership3.sp"
#endif
#include "War3Source/War3Source_Engine_MenuChangerace.sp"
#include "War3Source/War3Source_Engine_MenuItemsinfo.sp"
#include "War3Source/War3Source_Engine_MenuItemsinfo2.sp"
#if SHOPMENU3 == MODE_ENABLED
#include "War3Source/War3Source_Engine_MenuItemsinfo3.sp"
#endif
#include "War3Source/War3Source_Engine_MenuRacePlayerinfo.sp"
#include "War3Source/War3Source_Engine_MenuShopmenu.sp"
#include "War3Source/War3Source_Engine_MenuShopmenu2.sp"
#if SHOPMENU3 == MODE_ENABLED
#include "War3Source/War3Source_Engine_MenuShopmenu3.sp"
#endif
#include "War3Source/War3Source_Engine_MenuSpendskills.sp"
#include "War3Source/War3Source_Engine_MenuWar3Menu.sp"
#include "War3Source/War3Source_Engine_Money_Timer.sp"
#include "War3Source/War3Source_Engine_NewPlayers.sp"
#include "War3Source/War3Source_Engine_Notifications.sp"
#include "War3Source/War3Source_Engine_PlayerClass.sp"
#include "War3Source/War3Source_Engine_PlayerCollision.sp"
#include "War3Source/War3Source_Engine_PlayerDeathWeapons.sp"
#include "War3Source/War3Source_Engine_PlayerLevelbank.sp"
#include "War3Source/War3Source_Engine_PlayerTrace.sp"
#include "War3Source/War3Source_Engine_RaceClass.sp"
#include "War3Source/War3Source_Engine_Race_KDR.sp"
#include "War3Source/War3Source_Engine_RaceRestrictions.sp"
#include "War3Source/War3Source_Engine_Regen.sp"
#include "War3Source/War3Source_Engine_ShowMOTD.sp"
#include "War3Source/War3Source_Engine_SkillEffects.sp"
#include "War3Source/War3Source_Engine_TrieKeyValue.sp"
#include "War3Source/War3Source_Engine_Wards_Checking.sp"
#include "War3Source/War3Source_Engine_Wards_Engine.sp"
#include "War3Source/War3Source_Engine_Wards_Engine_Behavior.sp"
#include "War3Source/War3Source_Engine_Wards_Wards.sp"
#include "War3Source/War3Source_Engine_Weapon.sp"
#include "War3Source/War3Source_Engine_XPGold.sp"
#if SHOPMENU3 == MODE_ENABLED
#include "War3Source/War3Source_Engine_XP_Platinum.sp"
#endif
#include "War3Source/War3Source_Engine_WCX_Engine_Bash.sp"
#include "War3Source/War3Source_Engine_WCX_Engine_Crit.sp"
#include "War3Source/War3Source_Engine_WCX_Engine_Dodge.sp"
#include "War3Source/War3Source_Engine_WCX_Engine_Skills.sp"
#include "War3Source/War3Source_Engine_WCX_Engine_Teleport.sp"
#if GGAMETYPE != GGAME_CSGO
#include "War3Source/War3Source_Engine_SteamTools.sp"
#endif
#include "War3Source/War3Source_Engine_BotControl.sp"
#include "War3Source/War3Source_Engine_DeciSecondLoop_Timer.sp"
#include "War3Source/War3Source_Engine_Casting.sp"
#include "War3Source/War3Source_002_OnW3HealthPickup.sp"
#if GGAMETYPE == GGAME_TF2
#include "War3Source/War3Source_002_OnW3SupplyLocker.sp"
#endif
#include "War3Source/War3Source_Engine_WCX_Engine_Vampire.sp"
#include "War3Source/War3Source_Engine_GameData.sp"
#include "War3Source/War3Source_003_RegisterPrivateForwards.sp"
#include "War3Source/War3Source_001_OnSkinChange.sp"
#include "War3Source/War3Source_Engine_Talents.sp"

Single File Compiling War3Source.sp...SourcePawn Compiler 1.7.3-dev+5283
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2014 AlliedModders LLC
Code size:           581004 bytes
Data size:          6912040 bytes
Stack/heap size:    2400000 bytes
Total requirements: 9893044 bytes
Done.
Compilation finished successfully.
* Races are external addons
* Mutant Races - Races that require other race / levels in order to be selected and used via War3_SetRaceDependency()
Code: [Select]
public OnWar3LoadRaceOrItemOrdered2(num,reloadrace_id,String:shortname[])
{
if(num==RACE_ID_NUMBER||(reloadrace_id>0&&StrEqual("halforc",shortname,false)))
{
thisRaceID=War3_CreateNewRace("Half Orc","halforc","Mutant!",reloadrace_id);

SKILL_DEVOUT=War3_AddRaceSkill(thisRaceID,"Mutant Devotion","Gives you additional 5/10/15/20 health.",false,4);

SKILL_BLITZ=War3_AddRaceSkill(thisRaceID,"Mutant Blitz",
"Increases movement speed.",false,4);

SKILL_WARSTRIKE=War3_AddRaceSkill(thisRaceID,"Mutant Strike","Chance of doing critical damage,\nand 5/10/15/20% chance to bash the enemy which renders the enemy immobile for 0.2 seconds.",false,4);

ULT_TELEPORT=War3_AddRaceSkill(thisRaceID,"Mutant Teleport","Teleport toward where you aim.\n600/700/850/1000 range. Ultimate Immunity has 350 blocking radius.",true,4);

War3_CreateRaceEnd(thisRaceID);

War3_AddSkillBuff(thisRaceID, SKILL_BLITZ, fMaxSpeed, forcblitz);

new GetRaceID=War3_GetRaceIDByShortname("humanally");
if(GetRaceID>0)
{
War3_SetRaceDependency(thisRaceID, GetRaceID, 16);
}
GetRaceID=War3_GetRaceIDByShortname("orcishforce");
if(GetRaceID>0)
{
War3_SetRaceDependency(thisRaceID, GetRaceID, 16);
}
}
}
* W3Faction was added back into War3Source and works
* uses private forwards on the most cpu intensive forwards and uses global forwards on less cpu intensive forwards. This will allow you to run so many more races with so much less lag.
-- Here is example of W3Hook for private forwards (code grabbed from my War3Source_002_HumanAlliance.sp race):
Code: [Select]
bool HooksLoaded = false;
public void Load_Hooks()
{
if(HooksLoaded) return;
HooksLoaded = true;

W3Hook(W3Hook_OnUltimateCommand, OnUltimateCommand);
W3Hook(W3Hook_OnWar3EventSpawn, OnWar3EventSpawn);
}
public void UnLoad_Hooks()
{
if(!HooksLoaded) return;
HooksLoaded = false;

W3UnhookAll(W3Hook_OnUltimateCommand);
W3UnhookAll(W3Hook_OnWar3EventSpawn);
}
bool RaceDisabled=true;
public OnWar3RaceEnabled(newrace)
{
if(newrace==thisRaceID)
{
Load_Hooks();

RaceDisabled=false;
}
}
public OnWar3RaceDisabled(oldrace)
{
if(oldrace==thisRaceID)
{
RaceDisabled=true;

UnLoad_Hooks();
}
}

public void OnUltimateCommand(int client, int race, bool pressed, bool bypass)
{
if(RaceDisabled)
return;

new userid=GetClientUserId(client);
if(race==thisRaceID && pressed && userid>1 && IsPlayerAlive(client) && !Silenced(client))
{
new ult_level=War3_GetSkillLevel(client,race,ULT_TELEPORT);
if(ult_level>0)
{
if(War3_SkillNotInCooldown(client,thisRaceID,ULT_TELEPORT,true)) //not in the 0.2 second delay when we check stuck via moving
{
W3Teleport(client,_,_,TeleportDistance[ult_level],thisRaceID,ULT_TELEPORT);
}
}
else
{
W3MsgUltNotLeveled(client);
}
}
else
{
if(Silenced(client))
{
W3Hint(client,HINT_LOWEST,5.0,"Can't use teleport because you have been silenced!");
}
}
}

public void OnWar3EventSpawn(int client)
{
if(RaceDisabled)
return;

if(War3_GetRace(client)==thisRaceID)
{
ActivateSkills(client);
}
}
* uses methodmaps. This allows you to write races much easier.
-- Method Map example of use in on of my modifed races:
Code: [Select]
public void OnWar3Event(W3EVENT event,int client)
{
if(RaceDisabled)
return;

ThisRacePlayer player = ThisRacePlayer(client);

if(event==VampireImmunityCheckPre)
{
if(player && player.raceid==thisRaceID)
{
W3SetVar(EventArg1, Immunity_Skills);
W3SetVar(EventArg2, SKILL_LEECH);
return;
}
}
else if(event==OnVampireBuff)
{
if(player)
{
if(player.raceid==thisRaceID)
{
int skill_level=player.getskilllevel( thisRaceID, SKILL_LOWGRAV );
if(skill_level>0)
{
float CurrentCritChance = player.getbuff(fCritChance,thisRaceID);
//DP("Crit before %f",CurrentCritChance);
if(CurrentCritChance<1.0)
{
CurrentCritChance+=0.01 * skill_level;
player.setbuff(fCritChance,thisRaceID,CurrentCritChance,client);
player.setbuff(iCritMode,thisRaceID,1,client);
player.setbuff(fCritModifier,thisRaceID,CritDamageIncrease,client);
player.message("{blue}BloodLust increases crit chance by %f",CurrentCritChance);
}
else if(CurrentCritChance>1.0)
{
CurrentCritChance=1.0;
player.setbuff(fCritChance,thisRaceID,CurrentCritChance,client);
player.setbuff(iCritMode,thisRaceID,1,client);
player.setbuff(fCritModifier,thisRaceID,CritDamageIncrease,client);
}
//DP("Crit after %f",CurrentCritChance);
}
}
}
}
}
* is being converted for the new variables format
* Has been rewritten multiple times. Each rewrite makes a better engine.
* Teleport Engine (lets you do amazing stuff with teleporting in your races)
-- teleport engine inc
Code: [Select]
/**
 * File: WCX_Engine_Teleport.inc
 * Author(s): El Diablo
 *
 */

/**
 * Teleports client to target location within given distance
 * or just teleports forward a certain distance.
 *
 * @param client
 * @param target
 * @param Float:ScaleVectorDistance - deals with target distance
 * @param Float:distance
 *
 * If you want to reset the cooldowns for your race / skill, then supply those
 * numbers in the correct params
 *
 * This resets cooldown if the teleport was unsuccessful due to boundaries
 * like walls being in the way.
 *
 * @param raceid *resets race/skill cooldown on fail
 * @param skillid *resets race/skill cooldown on fail
 *
 * @param return - no return
 *
 */
native W3Teleport(client,target=-1,Float:ScaleVectorDistance=-1.0,Float:distance=1200.0,raceid=-1,skillid=-1);

/**
 * Called right before GetAngleVectors Calculations.
 *
 * Currently this is the current Angle formula:
 *
 * GetClientEyeAngles(client,angle);
 *
 * If you want to use the target instead of the client and or
 * change the formula, you can do this here to change the angle
 * right before it calls GetAngleVectors.
 *
 * @param client
 * @param target
 * @param angle allows you to change the angle before the caluclations.
 *
*/
forward Action:OnW3TeleportGetAngleVectorsPre(client, target, Float:angle[3]);


/**
 * Called right before W3Teleport triggers its own TeleportEntity.
 *
 * All checks have been made, as far a distances and stuff in the way.
 * This is the time it will teleport the entity.
 *
 * We had used this to change the angle of the entity whom is teleported
 * and is the reason this Custom Action was created.
 * You can use it how you wish.
 *
 * If you would like to teleport the entity yourself, then return
 * Plugin_Handled after you teleport the entity
 * otherwise, W3Teleport will use this formula:
 * TeleportEntity(client,emptypos,NULL_VECTOR,NULL_VECTOR);
 * to teleport the entity.
 *
 * @param client
 * @param target
 *
 * @return Plugin_Handled if you plan to use this function to create
 * your own teleport entity function.
*/
forward Action:OnW3TeleportEntityCustom(client,target,Float:dir[3],Float:emptypos[3]);

/**
 * This is the location where the client will be teleporting to.
 *
 * Most races do immunity checking here.
 *
 * @return Plugin_Handled if this did NOT pass your checks and you will NOT allow the teleport to this location.
*/
forward Action:OnW3TeleportLocationChecking(client,Float:playerVec[3]);


/**
 * Called when there was a successful teleport
 *
 * @param client
 * @param target
 * @param raceid
 * @param skillid
 *
 * @param return - no return
 *
 */
forward OnW3Teleported(client,target,distance,raceid,skillid);
* Easy Buff updates. Currently the Easy buff on War3Source's website is buggy, so I will have my fixes included.
* Aura engine updates.
-- My aura engine update includes:
--- AuraStack - how many auras of this auraid does the client have?
--- AuraOwner - the owner of the aura (well tested)
* Optional Shopmenu 3 (permanent items)
* Optional Talent Specs (Similar to Warcraft's Talent Calculator) - TF2 only atm
-- this part will be fully included after all code for it has been completely looked at
* Download Control Engine -- allows you to specify the priority of certain sounds the client needs to download first.
* Extensive Notifications for players -- allows players to optionally gain text updates on exactly "what just happened to me"
* Special Players Preferences
* Players can "turn off" most War3Source graphic effects to help low cpu players
* Players can toggle on/off extra combat information that would spam their chat
* Optional KDR system - Basically handicaps players whom have "too high of a KDR"
* New Wards / Wards Checking
* If shop 3 is enabled
-- new currency - Platinum
-- shop 3 items level up and gain experience
* New Casting Engine - for "spells that require delay" & NEW special effects
* Each race can have a different skin (TF2 tested, but should work on other game consoles) -- a private forward can be setup for OnWar3SkinChange()
* New Player benefits Engine -- players with less than X levels gain X benefits until they level up.
* Optionally Hide CSGO Radar while looking at menus
* New races never seen before (Can not be used without extensive conversion for the War3Source Original)
* Banking Engine for Gold - allows players to "save gold" and then be able to "withdraw" later
* New "Instant Race Changing" --> Can cause issues between races that are not properly handling the instant change
* Owner can "Pause War3Source" during game play.  Yes you can stop War3Source during game play and restart it instantly.  If you think your server is "lagging" due to War3Source, you can test that by pausing War3Source.
* Being able to instantly reload any race during a production game for updates (some servers require you pause War3Source before attempting this or your server may crash...depends on how powerful your server is)
* Is special compiled for each game console (Why have addons or source code that don't work in one game or the other just using sourcemod memory?)
* And so much more.... figure 6 years of updates and the first 4 of those years was daily updates.

I want it to be known, that the main reason I am considering Open Sourcing my private version is to create a legacy for me.  What good is private information if it is never made public?  The 2nd open sourced War3Source private version.  I figure War3Source is the original open sourced version.  I want to know that I have helped many server owners have more features, stability, and options.

If you feel that it would be worth my time and investment into releasing my private version of War3Source, please do comment below and boost my ego on this

8
Several TF2 servers whom is friendly to War3Evo would support and run my version of War3Source if I open source it.

Anyone object to me posting my version on AlliedModders plugin page?

I'll make sure that War3Source keeps most credits.

Anyhow, this is only a thought for now and I don't plan to make a decision until after June 1st.

9
Every Year that comes around, I think about updating War3Source to my latest code / creation.  It is up to you guys if you want it.

War3Source and War3Evo... Differences and possible upgrades to War3Source.

** One of the major differences between the two is that War3Evo has been now using private forwards for races instead of global forwards.

Private forwards allows the War3Source Engine to send specific forward to races that are active in game.  If a race is not active in game, the forward will be removed from that race.

Here is parts code used in my Undead Scourge:

Code: [Select]
bool HooksLoaded = false;
public void Load_Hooks()
{
if(HooksLoaded) return;
HooksLoaded = true;

W3Hook(W3Hook_OnWar3Event, OnWar3Event);
W3Hook(W3Hook_OnWar3EventSpawn, OnWar3EventSpawn);
}
public void UnLoad_Hooks()
{
if(!HooksLoaded) return;
HooksLoaded = false;

W3UnhookAll(W3Hook_OnWar3Event);
W3UnhookAll(W3Hook_OnWar3EventSpawn);
}
bool RaceDisabled=true;
public void OnWar3RaceEnabled(newrace)
{
if(newrace==thisRaceID)
{
Load_Hooks();

RaceDisabled=false;
}
}
public void OnWar3RaceDisabled(oldrace)
{
if(oldrace==thisRaceID)
{
RaceDisabled=true;

UnLoad_Hooks();
}
}

Also take note that we use methodmaps in our War3Source code (ThisRacePlayer)
Code: [Select]
// Methodmap inherits W3player methodmap from war3source.inc
methodmap ThisRacePlayer < W3player
{
// constructor
public ThisRacePlayer(int playerindex) //constructor
{
if(!ValidPlayer(playerindex)) return view_as<ThisRacePlayer>(0);
return view_as<ThisRacePlayer>(playerindex); //make sure you do validity check on players
}
property bool canrevive
{
public get() { return Can_Player_Revive[this.index]; }
public set( bool value ) { Can_Player_Revive[this.index] =  value; }
}
property bool RESwarn
{
public get() { return RESwarn[this.index]; }
public set( bool value ) { RESwarn[this.index] =  value; }
}

public void hudmessage( char szMessage[MAX_MESSAGE_LENGTH], any ... )
{
char szBuffer[MAX_MESSAGE_LENGTH];
SetGlobalTransTarget(this.index);
VFormat(szBuffer, sizeof(szBuffer), szMessage, 3);
SetHudTextParams(-1.0, -1.0, 0.1, 255, 255, 0, 255);
ShowSyncHudText(this.index, ClientInfoMessage, szBuffer);
}
}

Code: [Select]
public void OnWar3Event(W3EVENT event,int client)
{
if(RaceDisabled)
return;

ThisRacePlayer player = ThisRacePlayer(client);

if(event==VampireImmunityCheckPre)
{
if(player && player.raceid==thisRaceID)
{
W3SetVar(EventArg1, Immunity_Skills);
W3SetVar(EventArg2, SKILL_LEECH);
return;
}
}
else if(event==OnVampireBuff)
{
if(player)
{
if(player.raceid==thisRaceID)
{
int skill_level=player.getskilllevel( thisRaceID, SKILL_LOWGRAV );
if(skill_level>0)
{
float CurrentCritChance = player.getbuff(fCritChance,thisRaceID);
//DP("Crit before %f",CurrentCritChance);
if(CurrentCritChance<1.0)
{
CurrentCritChance+=0.01 * skill_level;
player.setbuff(fCritChance,thisRaceID,CurrentCritChance,client);
player.setbuff(iCritMode,thisRaceID,1,client);
player.setbuff(fCritModifier,thisRaceID,CritDamageIncrease,client);
player.message("{blue}BloodLust increases crit chance by %f",CurrentCritChance);
}
else if(CurrentCritChance>1.0)
{
CurrentCritChance=1.0;
player.setbuff(fCritChance,thisRaceID,CurrentCritChance,client);
player.setbuff(iCritMode,thisRaceID,1,client);
player.setbuff(fCritModifier,thisRaceID,CritDamageIncrease,client);
}
//DP("Crit after %f",CurrentCritChance);
}
}
}
}
}

public void OnWar3EventSpawn (int client)
{
ThisRacePlayer player = ThisRacePlayer(client);
if(player.raceid==thisRaceID)
{
RemovePassiveSkills(client);
}
}


So yeah, another bonus is to start using methodmaps to make coding easier for race creation.   We've include that into our war3source.inc

You can also see we hook and unhook when a race is enabled or disabled.  This is added to each race so it can enable / disable private forwards to itself.


** Another improvement is putting the whole War3Source Engine into 1 source code.   Just the engine, not the addons or races.  War3source has a separate folder with all the parts of the engine labeled for function so that it is easier to find the source code you need to modify.   Adding everything into 1 source code also allows you to reuse resources throughout the code and to be able to call it internally without calling to every single native created by War3Source.


The only bad thing about this upgrade, is that any race created by you would have to be completely updated to the new code.   Since a majority of users of War3Source would have a very hard time doing that, I may just release this code separately.  It is mainly for TF2, but does have some code to support CS:S and CS:GO.   It does not have any support for Translations.   That would have to be added / worked on by someone else willing to go thru the headache with it.  I never removed "translations" functions from it completely, so that if I wanted to add it back later it would be much easier than a complete removal.


The other bad thing about upgrading War3Source without just releasing the code would be having to manually "convert" everything so that War3Source gains benefits from it.    I could make War3Source backwards compatible with private forwards included.   I would just add the option to allow you to create private forwards for your new races and give you time to convert your old races to it while still having all the global forwards functional.   Races with private forwards would allow you to save resources and helps reduce lag of the plugin.

Upgrades / Highlights:

* Private Forwards reduce plugin lag
* Creating War3Source into 1 source engine reduces plugin lag and resources
* Methodmaps makes race creation easier for everyone
* Improved bot management that creates bots with so much less lag on round start
* New ** Spell casting engine -- allows you to create spells with special graphics for your races that takes "casting time" in order to use a spell

Code: [Select]
enum W3SpellEffects
{
NoSpellEffects=0,
SpellEffectsPhysical,
SpellEffectsArcane,
SpellEffectsFire,
SpellEffectsFrost,
SpellEffectsNature,
SpellEffectsDarkness,
SpellEffectsLight,
}

enum W3SpellColor
{
NoSpellColor=0,
SpellColorYellow,
SpellColorGreen,
SpellColorBlue,
SpellColorRed,
}


/*
 * Returns if successful
 *
 * */

// if castingid = 0, then it will bring up a menu for the person wanting to cancel a spell.
native bool:War3_CancelSpell(client, target, castingid=0);

native bool:War3_CastSpell(client, target, W3SpellEffects:spelleffect, String:SpellColor[], raceid, SkillID, Float:duration);

/**
 * OnWar3StartCasting
 *
 * @param client client's index.
 * @param target client's target
 * @param spelleffect spell effect
 * @param SpellColor SpellColor = "r g b"
 * @param raceid race index
 * @param skillid skill index / also known as castingid
 * @return none
 */
forward OnWar3CastingStarted(client, target, W3SpellEffects:spelleffect, String:SpellColor[], raceid, skillid);

/**
 * OnWar3CastingStarted_Pre
 *
 * @param client client's index.
 * @param target client's target
 * @param spelleffect spell effect
 * @param SpellColor SpellColor = "r g b"
 * @param raceid race index
 * @param skillid skill index / also known as castingid
 * @param fcastingtime change the casting time here (float)
 * @return none
 */
forward Action OnWar3CastingStarted_Pre(int client, int target, W3SpellEffects spelleffect, char[] SpellColor, int raceid, int skillid, float &fcastingtime);

/**
 * OnWar3CastingFinished_Pre
 *
 * @param client client's index.
 * @param target client's target
 * @param spelleffect spell effect
 * @param SpellColor SpellColor = "r g b"
 * @param raceid race index
 * @param skillid skill index / also known as castingid
 * @return return Plugin_Handled or Plugin_Stop to prevent the spell from finshing, otherwise use Plugin_Continue
 */
forward Action:OnWar3CastingFinished_Pre(client, target, W3SpellEffects:spelleffect, String:SpellColor[], raceid, skillid);

/**
 * OnWar3EndCasting
 *
 * @param client client's index.
 * @param target client's target
 * @param spelleffect spell effect
 * @param SpellColor SpellColor = "r g b"
 * @param raceid race index
 * @param skillid skill index / also known as castingid
 * @return none
 */
forward OnWar3CastingFinished(client, target, W3SpellEffects:spelleffect, String:SpellColor[], raceid, skillid);


/**
 * OnWar3CancelSpell_Post
 *
 * @param client client's index. (The caster)
 * @param raceid client's raceid index. (The caster's raceid)
 * @param skillid client's skill index / also known as castingid (The Caster's Skill)
 * @param target client's target
 * @return none
 */
forward OnWar3CancelSpell_Post(client, raceid, skillid, target);

* If you so desire (I can add my shopmenu 3 option which allows you to create shop items that are permanent for players)
* New ** Teleport Engine for easy race creation teleport management:


Code: [Select]
/**
 * Teleports client to target location within given distance
 * or just teleports forward a certain distance.
 *
 * @param client
 * @param target
 * @param Float:ScaleVectorDistance - deals with target distance
 * @param Float:distance
 *
 * If you want to reset the cooldowns for your race / skill, then supply those
 * numbers in the correct params
 *
 * This resets cooldown if the teleport was unsuccessful due to boundaries
 * like walls being in the way.
 *
 * @param raceid *resets race/skill cooldown on fail
 * @param skillid *resets race/skill cooldown on fail
 *
 * @param return - no return
 *
 */
native W3Teleport(client,target=-1,Float:ScaleVectorDistance=-1.0,Float:distance=1200.0,raceid=-1,skillid=-1);

/**
 * Called right before GetAngleVectors Calculations.
 *
 * Currently this is the current Angle formula:
 *
 * GetClientEyeAngles(client,angle);
 *
 * If you want to use the target instead of the client and or
 * change the formula, you can do this here to change the angle
 * right before it calls GetAngleVectors.
 *
 * @param client
 * @param target
 * @param angle allows you to change the angle before the caluclations.
 *
*/
forward Action:OnW3TeleportGetAngleVectorsPre(client, target, Float:angle[3]);


/**
 * Called right before W3Teleport triggers its own TeleportEntity.
 *
 * All checks have been made, as far a distances and stuff in the way.
 * This is the time it will teleport the entity.
 *
 * We had used this to change the angle of the entity whom is teleported
 * and is the reason this Custom Action was created.
 * You can use it how you wish.
 *
 * If you would like to teleport the entity yourself, then return
 * Plugin_Handled after you teleport the entity
 * otherwise, W3Teleport will use this formula:
 * TeleportEntity(client,emptypos,NULL_VECTOR,NULL_VECTOR);
 * to teleport the entity.
 *
 * @param client
 * @param target
 *
 * @return Plugin_Handled if you plan to use this function to create
 * your own teleport entity function.
*/
forward Action:OnW3TeleportEntityCustom(client,target,Float:dir[3],Float:emptypos[3]);

/**
 * This is the location where the client will be teleporting to.
 *
 * Most races do immunity checking here.
 *
 * @return Plugin_Handled if this did NOT pass your checks and you will NOT allow the teleport to this location.
*/
forward Action:OnW3TeleportLocationChecking(client,Float:playerVec[3]);


/**
 * Called when there was a successful teleport
 *
 * @param client
 * @param target
 * @param raceid
 * @param skillid
 *
 * @param return - no return
 *
 */
forward OnW3Teleported(client,target,distance,raceid,skillid);

* CS:GO radar management for menu systems
* Updated Notification Engine


Code: [Select]
native War3_NotifyPlayerTookDamageFromSkill(victim, attacker, damage, skill);

native War3_NotifyPlayerTookDamageFromItem(victim, attacker, damage, item);

native War3_NotifyPlayerLeechedFromSkill(victim, attacker, health, skill);

native War3_NotifyPlayerLeechedFromItem(victim, attacker, health, item);

native War3_NotifyPlayerImmuneFromSkill(attacker, victim, skill);

native War3_NotifyPlayerImmuneFromItem(attacker, victim, skill);

native War3_NotifyPlayerSkillActivated(client,skill,bool:activated);

native War3_NotifyPlayerItemActivated(client,item,bool:activated);

* And numerous bug fixes that are so many to list here.


So yeah, so many updates and so little time.

How do you think I should release this code?   It completely changes War3source's current structure and races made for this would have to be optimized for it.  Or should I just release it as is, and people could just use what they need OR will you allow me to completely modify War3Source for this update so that War3Source would take the improvements and slowly migrate to the new system?


SO YEAH
UPGRADE OR NOT?
Do let me know

10
I'm trying to create a more accurate way to detect damages for a statics software to help better balance races....

also would like warcraft to be more accurate in damages.

please remember :P

11
THIS EXAMPLE IS ALL ABOUT IMPLEMENTING METHODMAPS INTO WAR3SOURCE

Here is a example of one of my methodmaps:

Code: [Select]
methodmap W3player

{

public W3player(int playerindex) //constructor

{

if(!ValidPlayer(playerindex)) return view_as<W3player>(0);

return view_as<W3player>(playerindex); //make sure you do validity check on players

}

property int index

{

public get() { return view_as<int>(this); }

}

property int alive

{

public get() { return ValidPlayer(this.index,true); }

}

property int team

{

public get() { return GetClientTeam(this.index); }

}

property int maxhp

{

public get() { return W3GetPlayerProp(this.index, iMaxHP); }

public set( int value ) { W3SetPlayerProp(this.index, iMaxHP, value); }

}

property int gold

{

public get() { return W3GetPlayerProp(this.index, PlayerGold); }

public set( int value ) { W3SetPlayerProp(this.index, PlayerGold, value); }

}

property int diamonds

{

public get() { return W3GetPlayerProp(this.index, PlayerDiamonds); }

public set( int value ) { W3SetPlayerProp(this.index, PlayerDiamonds, value); }

}

property int raceid

{

public get() { return War3_GetRace(this.index); }

public set( int value ) { War3_SetRace(this.index, value); }

}



property bool stunned

{

public get() { return W3GetBuffHasTrue(this.index,bStunned); }

}

property bool silenced

{

public get() { return W3GetBuffHasTrue(this.index,bSilenced); }

}

property bool hexed

{

public get() { return W3GetBuffHasTrue(this.index,bHexed); }

}

property bool perplexed

{

public get() { return W3GetBuffHasTrue(this.index,bPerplexed); }

}



property int speed

{

public get() { return W3GetSpeedMulti(this.index); }

}



property int hastalents

{

public get() { return W3GetPlayerProp(this.index,talentsLoaded); }

}



property TFClassType class

{

public get() { return TF2_GetPlayerClass(this.index); }

}



public void teleport(int target=-1, float ScaleVectorDistance=-1.0, float distance=1200.0, int raceid=-1, int skillid=-1)

{

W3Teleport(this.index,target,ScaleVectorDistance,distance,raceid,skillid);

}



//buff

//RESETS ALL BUFFS PERTAINGIN TO THIS CLIENT AND RACE, basically fully getting rid if all buffs attatched to this player from your race

public void resetallbuffs(int raceid)

{

W3ResetAllBuffRace(this.index, raceid);

}

public void resetbuff(W3Buff buffindex, int raceid)

{

W3ResetBuffRace(this.index,buffindex,raceid);

}



public bool immunity(War3Immunity immunityindex)

{

return W3HasImmunity(this.index, immunityindex);

}



public void setbuff(W3Buff buffindex, int raceid, any value, int buffowner=-1)

{

War3_SetBuff(this.index,buffindex,raceid,value,buffowner);

}

public any getbuff(W3Buff buffindex, int raceid)

{

return W3GetBuff(this.index,buffindex,raceid);

}



public void removeaura( int tAuraID )

{

W3RemovePlayerAura(tAuraID,this.index);

}

public bool hasaura( int tAuraID, int &level )

{

return W3HasAura(tAuraID,this.index,level);

}



public void setcooldown(float cooldownTime, int raceid, int skillNum, bool resetOnSpawn=true, bool printMsgOnExpireByTime=true)

{

War3_CooldownMGR(this.index,cooldownTime,raceid,skillNum,resetOnSpawn,printMsgOnExpireByTime);

}



public int getskilllevel( int raceid, int skill )

{

return War3_GetSkillLevel(this.index,raceid,skill);

}



public bool skillnotcooldown( int raceid, int skillNum, bool printTextIfNotReady=false )

{

return War3_SkillNotInCooldown(this.index,raceid,skillNum,printTextIfNotReady);

}

public bool skillcooldown( int raceid, int skillNum, bool printTextIfNotReady=false )

{

return !War3_SkillNotInCooldown(this.index,raceid,skillNum,printTextIfNotReady);

}



public void respawn()

{

War3_SpawnPlayer(this.index);

}



//War3_HealToMaxHP

public void HealToMaxHP( int HealAmount)

{

War3_HealToMaxHP(this.index,HealAmount);

}

//War3_TFHealingEvent

public void TFHealingEvent( int HealAmount)

{

War3_TFHealingEvent(this.index,HealAmount);

}



public void message( char szMessage[MAX_MESSAGE_LENGTH], any ... )

{

if (this.index == 0)

{

char szBuffer[MAX_MESSAGE_LENGTH];

for (int i = 1; i <= MaxClients; i++)

{

if (IsClientInGame(i) && !IsFakeClient(i))

{

SetGlobalTransTarget(i);

VFormat(szBuffer, sizeof(szBuffer), szMessage, 3);

Format(szBuffer, sizeof(szBuffer), "{green}[War3Evo]{default} %s", szBuffer);

CPrintToChat(i, szBuffer);

}

}

}

else

{

char szBuffer[MAX_MESSAGE_LENGTH];

SetGlobalTransTarget(this.index);

VFormat(szBuffer, sizeof(szBuffer), szMessage, 3);

Format(szBuffer, sizeof(szBuffer), "{green}[War3Evo]{default} %s", szBuffer);



if(ValidPlayer(this.index) && !IsFakeClient(this.index))

{

CPrintToChat(this.index, szBuffer);

}

}

}

}

In theroy, you should be able to put this on the very bottom of your addons/sourcemod/scripting/W3SIncs/War3Source_Interface.inc


Here is an example of it being used by my Undead Scourge:

PLEASE NOTE, THIS RACE WILL NOT WORK WITH YOUR WAR3SOURCE.  COMES DIRECTLY FROM MY VERSION OF IT!  My version uses private forwards, you'd have to change the code to make it work for you.

Notice that the "methodmap ThisRacePlayer < W3player"can be inherited in your races!

Code: [Select]
#include <war3source>
#assert GGAMEMODE == MODE_WAR3SOURCE
#assert GGAMETYPE_JAILBREAK == JAILBREAK_OFF

#define RACE_ID_NUMBER 10
#define RACE_LONGNAME "Undead Scourge"
#define RACE_SHORTNAME "undead"


/**
* File: War3Source_UndeadScourge.sp
* Description: The Undead Scourge race for War3Source.
* Author(s): Anthony Iacono, Necavi
*/

//#pragma semicolon 1

//#include <sourcemod>
//#include "W3SIncs/War3Source_Interface"

new thisRaceID;

new Float:CritDamageIncrease = 0.25;

#if GGAMETYPE == GGAME_TF2
// Chance/Data Arrays
//new Float:SuicideBomberRadius[5]={0.0,250.0,290.0,310.0,333.0};
//new Float:SuicideBomberDamageTF[5]={0.0,100.0,135.0,170.0,200.0};
new Float:Reincarnation[5]={0.0,60.0,50.0,40.0,30.0};

new Float:UnholySpeed[5]={1.0,1.05,1.10,1.15,1.24};
//new Float:LevitationGravity[5]={1.0,0.85,0.7,0.6,0.5};

//new Float:VampirePercent[5]={0.0,0.02,0.06,0.08,0.10};
float VampirePercent[5]={0.0,0.02,0.06,0.08,0.10};
#elseif (GGAMETYPE == GGAME_CSS || GGAMETYPE == GGAME_CSGO)
//new Float:SuicideBomberRadius[5]={0.0,250.0,290.0,310.0,333.0};
//new Float:SuicideBomberDamageTF[5]={0.0,100.0,135.0,170.0,200.0};

new Float:UnholySpeed[5]={1.0,1.05,1.10,1.15,1.24};
//new Float:LevitationGravity[5]={1.0,0.85,0.7,0.6,0.5};
new Float:VampirePercent[5]={0.0,0.02,0.06,0.08,0.10};

new Float:Reincarnation[5]={0.0,60.0,50.0,40.0,30.0};
#endif

new bool:RESwarn[MAXPLAYERSCUSTOM];
#if GGAMETYPE == GGAME_TF2
new Handle:ClientInfoMessage;
#endif

// Team switch checker
bool Can_Player_Revive[MAXPLAYERSCUSTOM+1];

// Methodmap inherits W3player methodmap from war3source.inc
methodmap ThisRacePlayer < W3player
{
// constructor
public ThisRacePlayer(int playerindex) //constructor
{
if(!ValidPlayer(playerindex)) return view_as<ThisRacePlayer>(0);
return view_as<ThisRacePlayer>(playerindex); //make sure you do validity check on players
}
property bool canrevive
{
public get() { return Can_Player_Revive[this.index]; }
public set( bool value ) { Can_Player_Revive[this.index] =  value; }
}
property bool RESwarn
{
public get() { return RESwarn[this.index]; }
public set( bool value ) { RESwarn[this.index] =  value; }
}

public void hudmessage( char szMessage[MAX_MESSAGE_LENGTH], any ... )
{
char szBuffer[MAX_MESSAGE_LENGTH];
SetGlobalTransTarget(this.index);
VFormat(szBuffer, sizeof(szBuffer), szMessage, 3);
SetHudTextParams(-1.0, -1.0, 0.1, 255, 255, 0, 255);
ShowSyncHudText(this.index, ClientInfoMessage, szBuffer);
}
}


new SKILL_LEECH,SKILL_SPEED,SKILL_LOWGRAV,SKILL_SUICIDE;

public Plugin:myinfo =
{
name = RACE_LONGNAME,
author = "PimpinJuice, Necavi",
description = "The Undead Scourge race for War3Source.",
version = "1.0",
url = "http://war3source.com"
};

bool HooksLoaded = false;
public void Load_Hooks()
{
if(HooksLoaded) return;
HooksLoaded = true;

W3Hook(W3Hook_OnWar3Event, OnWar3Event);
W3Hook(W3Hook_OnWar3EventSpawn, OnWar3EventSpawn);
}
public void UnLoad_Hooks()
{
if(!HooksLoaded) return;
HooksLoaded = false;

W3UnhookAll(W3Hook_OnWar3Event);
W3UnhookAll(W3Hook_OnWar3EventSpawn);
}
bool RaceDisabled=true;
public void OnWar3RaceEnabled(newrace)
{
if(newrace==thisRaceID)
{
Load_Hooks();

RaceDisabled=false;
}
}
public void OnWar3RaceDisabled(oldrace)
{
if(oldrace==thisRaceID)
{
RaceDisabled=true;

UnLoad_Hooks();
}
}
// War3Source Functions
public OnPluginStart()
{
//LoadTranslations("w3s.race.undead.phrases");
#if GGAMETYPE == GGAME_TF2
ClientInfoMessage = CreateHudSynchronizer();
#endif

HookEvent("player_team",PlayerTeamEvent);

CreateTimer(0.1,ResWarning,_,TIMER_REPEAT);

}
public OnAllPluginsLoaded()
{
War3_RaceOnPluginStart(RACE_SHORTNAME);
}
public OnMapStart()
{
// Reset Can Player Revive
for(new i=1;i<=MaxClients;i++)    // was MAXPLAYERSCUSTOM
{
Can_Player_Revive[i]=true;
}
}

public OnWar3PlayerAuthed(client)
{
Can_Player_Revive[client]=true;
}

public OnPluginEnd()
{
if(LibraryExists("RaceClass"))
War3_RaceOnPluginEnd(RACE_SHORTNAME);
}
public OnWar3LoadRaceOrItemOrdered2(num,reloadrace_id,String:shortname[])
{
if(num==RACE_ID_NUMBER||(reloadrace_id>0&&StrEqual(RACE_SHORTNAME,shortname,false)))
{
thisRaceID=War3_CreateNewRace(RACE_LONGNAME,RACE_SHORTNAME,"Suicidal,fast,leech hp",reloadrace_id);
SKILL_LEECH=War3_AddRaceSkill(thisRaceID,"Vampiric Aura","Leech Health\nYou recieve up to 10% of your damage dealt as Health\nCan not buy item mask any level",false,4);
SKILL_SPEED=War3_AddRaceSkill(thisRaceID,"Unholy Aura","You run 20% faster",false,4);
SKILL_LOWGRAV=War3_AddRaceSkill(thisRaceID,"Blood Lust","When you gain health from Vampiric Aura,\nyour crit chance increases slowly.\nCrit Chance resets on death.\nCrits count as 25% damage increase.",false,4);
SKILL_SUICIDE=War3_AddRaceSkill(thisRaceID,"Reincarnation","When you die, you revive on the spot.\nHas a 60/50/40/30 second cooldown.",true,4);
War3_CreateRaceEnd(thisRaceID);

War3_AddSkillBuff(thisRaceID, SKILL_LEECH, fVampirePercent, VampirePercent);
War3_AddSkillBuff(thisRaceID, SKILL_SPEED, fMaxSpeed, UnholySpeed);
//War3_AddSkillBuff(thisRaceID, SKILL_LOWGRAV, fLowGravitySkill, LevitationGravity);
War3_SetDependency(thisRaceID, SKILL_LOWGRAV, SKILL_LEECH, 4);
}
}

/* ***************************  OnRaceChanged *************************************/

public OnRaceChanged(client,oldrace,newrace)
{
if(newrace==thisRaceID)
{
InitPassiveSkills(client);
}
else //if(newrace==oldrace)
{
RemovePassiveSkills(client);
}
}
/* ****************************** InitPassiveSkills ************************** */
public InitPassiveSkills(client)
{
}
/* ****************************** RemovePassiveSkills ************************** */
public RemovePassiveSkills(client)
{
ThisRacePlayer player = ThisRacePlayer(client);
player.setbuff(fCritChance, thisRaceID, 0.0);
player.setbuff(iCritMode, thisRaceID, 0,client);
player.setbuff(fCritModifier, thisRaceID, 1.0,client);
player.RESwarn = false;
}


public PlayerTeamEvent(Handle:event,const String:name[],bool:dontBroadcast)
{
if(RaceDisabled)
return;

// Team Switch checker
int userid=GetEventInt(event,"userid");
int client=GetClientOfUserId(userid);
ThisRacePlayer player = ThisRacePlayer(client);
if(player)
{
player.setbuff(fCritChance, thisRaceID, 0.0);
player.setbuff(iCritMode, thisRaceID, 0,client);
player.setbuff(fCritModifier, thisRaceID, 1.0,client);

player.canrevive = false;
player.RESwarn = false;

int skilllevel=player.getskilllevel(thisRaceID,SKILL_SUICIDE);
CreateTimer(Reincarnation[skilllevel],PlayerCanRevive,userid);

player.setcooldown(Reincarnation[skilllevel],thisRaceID,SKILL_SUICIDE,false,true);
}
}

public Action:PlayerCanRevive(Handle:timer,any:userid)
{
// Team Switch checker
int client=GetClientOfUserId(userid);
ThisRacePlayer player = ThisRacePlayer(client);
if(player)
{
player.canrevive=true;
}
}
public OnW3Denyable(W3DENY:event,client)
{
if(RaceDisabled)
return;

if((event == DN_CanBuyItem1) && (W3GetVar(EventArg1) == War3_GetItemIdByShortname("mask")))
{
ThisRacePlayer player = ThisRacePlayer(client);
if(player.raceid==thisRaceID)
{
W3Deny();
player.message("{lightgreen}The mask would suffocate me!");
}
}
}

public void OnWar3Event(W3EVENT event,int client)
{
if(RaceDisabled)
return;

ThisRacePlayer player = ThisRacePlayer(client);

if(event==VampireImmunityCheckPre)
{
if(player && player.raceid==thisRaceID)
{
W3SetVar(EventArg1, Immunity_Skills);
W3SetVar(EventArg2, SKILL_LEECH);
return;
}
}
else if(event==OnVampireBuff)
{
if(player)
{
if(player.raceid==thisRaceID)
{
int skill_level=player.getskilllevel( thisRaceID, SKILL_LOWGRAV );
if(skill_level>0)
{
float CurrentCritChance = player.getbuff(fCritChance,thisRaceID);
//DP("Crit before %f",CurrentCritChance);
if(CurrentCritChance<1.0)
{
CurrentCritChance+=0.01 * skill_level;
player.setbuff(fCritChance,thisRaceID,CurrentCritChance,client);
player.setbuff(iCritMode,thisRaceID,1,client);
player.setbuff(fCritModifier,thisRaceID,CritDamageIncrease,client);
player.message("{blue}BloodLust increases crit chance by %f",CurrentCritChance);
}
else if(CurrentCritChance>1.0)
{
CurrentCritChance=1.0;
player.setbuff(fCritChance,thisRaceID,CurrentCritChance,client);
player.setbuff(iCritMode,thisRaceID,1,client);
player.setbuff(fCritModifier,thisRaceID,CritDamageIncrease,client);
}
//DP("Crit after %f",CurrentCritChance);
}
}
}
}
}

public void OnWar3EventSpawn (int client)
{
ThisRacePlayer player = ThisRacePlayer(client);
if(player.raceid==thisRaceID)
{
RemovePassiveSkills(client);
}
}

/*
public OnUltimateCommand(client,race,bool:pressed)
{
if(RaceDisabled)
return;

if(pressed && War3_GetRace(client)==thisRaceID && IsPlayerAlive(client) && !Silenced(client))
{
#if GGAMETYPE == GGAME_TF2
if(!Spying(client))
{
#endif
new ult_level=War3_GetSkillLevel(client,race,SKILL_SUICIDE);
if(ult_level>0)
{
ForcePlayerSuicide(client);
}
else
{
//DP("undad ");
W3MsgUltNotLeveled(client);
}
#if GGAMETYPE == GGAME_TF2
}
else
{
PrintHintText(client,"No cloaking/disguised to use ultimate");
}
#endif
}
}*/

float djAngle[MAXPLAYERSCUSTOM][3];
float djPos[MAXPLAYERSCUSTOM][3];

public OnWar3EventDeath(victim, attacker)
{
if(RaceDisabled)
return;

ThisRacePlayer pVictim = ThisRacePlayer(victim);
//ThisRacePlayer pAttacker = ThisRacePlayer(attacker);

pVictim.setbuff(fCritChance, thisRaceID, 0.0);
pVictim.setbuff(iCritMode, thisRaceID, 0);
pVictim.setbuff(fCritModifier, thisRaceID, 1.0);

if(victim==attacker)
return;

int race=W3GetVar(DeathRace);
int skill=pVictim.getskilllevel(thisRaceID,SKILL_SUICIDE);
//#if GGAMETYPE == GGAME_TF2
//if(!Spying(victim))
//{
//#endif
if(race==thisRaceID && skill>0 && !pVictim.hexed && pVictim.skillnotcooldown(thisRaceID,SKILL_SUICIDE,true))
{
pVictim.RESwarn = true;
float VecPos[3];
float Angles[3];
War3_CachedAngle(victim,Angles);
War3_CachedPosition(victim,VecPos);
djAngle[victim]=Angles;
djPos[victim]=VecPos;
CreateTimer(2.5,DoDeathReject,GetClientUserId(victim));

/*
if(!War3_IsNewPlayer(victim))
{
decl Float:location[3];
GetClientAbsOrigin(victim,location);
War3_SuicideBomber(victim, location, SuicideBomberDamageTF[skill], SKILL_SUICIDE, SuicideBomberRadius[skill]);
}
else
{
W3MsgNewbieProjectBlocked(victim,"Suicide Bomber",
"You would have\nbeen killed by Undead Scourge's Suicide Bomber,\nbut because you are new\nyou are immune",
"When your newbie protection wears out,\nyou will need to type lace in chat in order to be immune.");
}*/
}
else if(pVictim.skillcooldown(thisRaceID,SKILL_SUICIDE,true))
{
pVictim.message("{blue}Your Reincarnation skill is on cooldown.");
}
//#if GGAMETYPE == GGAME_TF2
//}
//#endif
}

/* ****************************** DoDeathReject ************************** */

public Action:DoDeathReject(Handle:timer,any:userid)
{
int client=GetClientOfUserId(userid);
ThisRacePlayer player = ThisRacePlayer(client);
if(player)
{
if(player.canrevive==false)
{
return Plugin_Handled;
}
int skilllevel=player.getskilllevel(thisRaceID,SKILL_SUICIDE);
player.respawn();
//nsEntity_SetHealth(client, death_reject_health[skilllevel]);
//War3_EmitSoundToAll(DeathRejectSound,client);
TeleportEntity(client, djPos[client], djAngle[client], NULL_VECTOR);
player.RESwarn=false;
player.setcooldown(Reincarnation[skilllevel],thisRaceID,SKILL_SUICIDE,false,true);
}
return Plugin_Continue;
}

public Action:ResWarning(Handle:timer,any:userid)
{
if(RaceDisabled)
return;

ThisRacePlayer player;

for(int client=1;client<=MaxClients;client++)
{
player = ThisRacePlayer(client);
if(player && player.RESwarn)
{
#if GGAMETYPE == GGAME_TF2
player.hudmessage("PREPARE TO REVIVE!");
//SetHudTextParams(-1.0, -1.0, 0.1, 255, 255, 0, 255);
//ShowSyncHudText(client, ClientInfoMessage, "PREPARE TO REVIVE!");
#else
player.message("PREPARE TO REVIVE!");
#endif
}
}
}
public OnClientPutInServer(client)
{
ThisRacePlayer player = ThisRacePlayer(client);
player.RESwarn=false;
}

public OnClientDisconnect(client)
{
ThisRacePlayer player = ThisRacePlayer(client);
player.RESwarn=false;
}


Its still a work in progress... but with this example, you get the picture!  It makes it so much more easier to read (even though i didn't spend anytime to clean up the code for you to look at it good enough).


12
Development and Programming Help / War3Source Private Forwards
« on: June 07, 2015, 05:15:37 AM »
After working non-stop on VSHA .. which is a combo of VSH and FF2, I found a few new ways of doing things.

You all know how SDKHooks works?  You are able to register and unregister forwards within your plugins as you need it right?  Imagine if you did that with "most" of War3Source's forwards?   With servers having well over 200 plugins, having this feature would help "completely turn off" unneeded plugins.   Even though I had implemented a way to help that for all the plugins using the current global forwards, I think that this private forward idea would be a major improvement of War3Source.

What do you think?

13
Two links for reference to question:

https://github.com/War3Source/War3Source/blob/master/addons/sourcemod/scripting/War3Source_Engine_DamageSystem.sp#L76

https://github.com/War3Source/War3Source/blob/master/addons/sourcemod/scripting/W3SIncs/War3Source_Events.inc#L32

OnW3TakeDmgAllPre, OnW3TakeDmgBulletPre, OnW3EnemyTakeDmgBulletPre, OnW3TakeDmgAll, and OnW3TakeDmgBullet do not use any Action returns.

Is there a "wait period" between each that needs to be established, and is reason you use ET_Hook or was it old coding that uses this logic?

Since there is no return value for Action, but I do understand there is a return value for War3_DamageModPercent().

Would it be just better to create a Param_FloatByRef and change the value on the function itself instead of using current method?

Please do help me understand your logic behind using ET_Hook.


extra reference:

https://wiki.alliedmods.net/Function_Calling_API_%28SourceMod_Scripting%29

15
http://ownageclan.com/wiki/index.php/Main_Page

orry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Can't contact the database server: Unknown MySQL server host 'mysql.ownageclan.com' (2) (mysql.ownageclan.com))

16
Development and Programming Help / War3Source: MetaMod:Source
« on: March 19, 2015, 04:40:59 AM »
I am going to make an attempt to create a first ever metamod version of war3source.  Any Developers want to help?  If so, I will make it github public, otherwise I will keep it private.

17
I recommend that SimplePortal to be installed as a addon for SMF.  There is a easy installation in the Admin > Main > Package Manager.

SimplePortal has a nice Shout Box that can be added, not like the old shout box we had.. but its still good.  It allows you to add many shout boxes if you want one for different pages and stuff.

18
War3: Source - General Discussion / War3Source Config files
« on: December 23, 2014, 04:38:38 AM »
I've been requested by few people to create a way to allow them to add races via configuration files.

So, I will be working on this soon and add it as an update.

I hope that the creators of War3Source will accept this up coming addition.



p.s. I plan to use a similar setup like FF2.   Where you can point to certain plugin files for your skills,abilities, and ultimates in your configuration file.  Shouldn't take too long and then non-programmers will be able to add races.

19
War3: Source - General Discussion / Sourcemod 1.7
« on: December 22, 2014, 11:42:10 PM »
https://forums.alliedmods.net/showthread.php?t=244092

I'm curious if this would make Sourcemod more efficient coding or is it just another way to write script coding?

20
War3: Source - General Discussion / Upgrade War3Source Database?
« on: December 22, 2014, 01:19:59 PM »
Let me know if you want the updates for War3Source Database.

There is no reason to touch it if there isn't enough people whom want this update.

If you decide you do not want this update, and something happens and valve/steam change the steam ids again, your players will be SOL.  Your players will lose everything they fought so hard for, and you might just loose your player base.  So think twice before answering.



How would this update work?

The system will first look to see if the player has a account id in the database, if he/she does not, it will look up their steam id, convert it, and save their account id to the database... so the next time it looks them up, it will use their account id instead of their steam id.


War3Evo is already running on this update.


Just reply if you want me to update the database or not.



Note: Being a Newbie again, I have no access to creating polls.


21
War3: Source - Servers / War3Evo | War3Source | TF2
« on: December 22, 2014, 01:06:48 PM »
Our Forums: https://war3evo.info/forums/index.php

TF2 War3Source (Heavy Customization / Optimization) - Since 2010
-- shops 1 and 2
-- every race is unique.
just add to your favorites: Click Here to connect


Pages: [1]