[Tutorial] Add the advantages legend

Newbie Spellweaver
Joined
Apr 21, 2013
Messages
92
Reaction score
58
I Use WarZTHv2, ok?
Let's go:
​

Adding server for private lagends
WarZ.snl
Find:

void FrontendWarZ::InitButtons()

You will see this:

void FrontendWarZ::InitButtons(){
Scaleform::GFx::Value vars[7];
vars[0].SetBoolean(false);
vars[1].SetBoolean(true);
vars[2].SetBoolean(true); // private
vars[3].SetBoolean(false);
vars[4].SetBoolean(true);
vars[5].SetBoolean(false);
vars[6].SetBoolean(false);
gfxMovie.Invoke("_root.api.Main.BrowseGamesChannelsAnim.initButtons", vars, 7);
}

Overrides for this:

void FrontendWarZ::InitButtons(){
Scaleform::GFx::Value vars[7];
vars[0].SetBoolean(false);
vars[1].SetBoolean(true);
vars[2].SetBoolean(true); // private
vars[3].SetBoolean(false);
if (gUserProfile.ProfileData.AccountType == 0){
vars[4].SetBoolean(true);
}
else {
vars[4].SetBoolean(false);
}
vars[5].SetBoolean(false);
vars[6].SetBoolean(false);
gfxMovie.Invoke("_root.api.Main.BrowseGamesChannelsAnim.initButtons", vars, 7);
}

Adding double XP for legends
WarZ_server
find:
SetReward(1, "ZombieKill", 5, 5, 10, 10);

Add below:

SetReward(2, "ZombieKillL", 20, 20, 40, 40);

20 = xp normal
40 = xp hardcore

find:

RWD_ZombieKill = 1,

Add below:

RWD_ZombieKillL = 2,

find:

gServerLogic.AddPlayerReward(plr, RWD_ZombieKill, 0);

replease:

if(plr->profile_.ProfileData.AccountType == 0){
gServerLogic.AddPlayerReward(plr, RWD_ZombieKillL, 0);
}
else
{
gServerLogic.AddPlayerReward(plr, RWD_ZombieKill, 0);
}

Your code look like this:

if(fromObj->Class->Name == "obj_ServerPlayer") {
obj_ServerPlayer* plr = (obj_ServerPlayer*)fromObj;
if(plr->profile_.ProfileData.AccountType == 0)
{
gServerLogic.AddPlayerReward(plr, RWD_ZombieKillL, 0);
}
else
{
gServerLogic.AddPlayerReward(plr, RWD_ZombieKill, 0);
}
}


return true;
}
That's my contribution. Thank ragezone!
skype: live:fuzzzion_1​
 
(EXTRA)

Disconnect time



(EN) Time to disconnect server.
(PT-BR) Tempo de saída do servidor.​

Search
Code:
void HUDPause::eventQuitGame(r3dScaleformMovie* pMovie, const Scaleform::GFx::Value* args, unsigned argCount)
{
#ifndef FINAL_BUILD    
    d_navmesh_debug->SetBool(false);
#endif // FINAL_BUILD


    // send disconnect request to server
    PKT_C2S_DisconnectReq_s n;
    p2pSendToHost(gClientLogic().localPlayer_, &n, sizeof(n), true);


    if(!gClientLogic().localPlayer_->bDead)
        DisconnectAt = r3dGetTime() + 10.0f; 
    else
        DisconnectAt = r3dGetTime();
}

Change to
(Red is different line!)

Code:
void HUDPause::eventQuitGame(r3dScaleformMovie* pMovie, const Scaleform::GFx::Value* args, unsigned argCount)
{
#ifndef FINAL_BUILD    
    d_navmesh_debug->SetBool(false);
#endif // FINAL_BUILD


    // send disconnect request to server
    // time to disconnect from the server changed to privileged accounts - [LCCB]
    PKT_C2S_DisconnectReq_s n;
    p2pSendToHost(gClientLogic().localPlayer_, &n, sizeof(n), true);


    if (!gClientLogic().localPlayer_->bDead)
[COLOR=#b22222]        if (gUserProfile.ProfileData.AccountType == 0){ // Legend Account[/COLOR]
[COLOR=#b22222]            DisconnectAt = r3dGetTime() + 5.0f;[/COLOR]
[COLOR=#b22222]        }[/COLOR]
[COLOR=#b22222]        else{[/COLOR]
[COLOR=#b22222]            DisconnectAt = r3dGetTime() + 10.0f; // Others[/COLOR]
[COLOR=#b22222]        }[/COLOR]
    else
        DisconnectAt = r3dGetTime(); // this is to disconnect instantly (if the player is dead!)
}

Types of permissions

Code:
]UserProfile.ProfileData.isDevAccount // Dev
gUserProfile.ProfileData.AccountType == 2 // Survivor
gUserProfile.ProfileData.AccountType == 0 // Legend

New Source infestation perm.
ProfileData.AccountType >= 20 && ProfileData.AccountType <= 29; // Trial Account
ProfileData.AccountType >= 50 && ProfileData.AccountType <= 59; // Russian Account
 
Last edited:
Aura SpawnProtection Color


Code:
			else if(This->PlayerAuraType == obj_Player::AT_SPAWNPROTECTION) // golden color - Color SpawnProtection - [LCCB]
			{
				if(gUserProfile.ProfileData.AccountType == 0)
				{
					r = 1.f ;
					g = 0.f ;
					b = 1.f ;
				}else{
					r = 0.0f ;
					g = 0.62f ;
					b = 1.15f ;
				}
			}
 
Back