Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Tutorial] Add news barricades

Initiate Mage
Joined
Sep 15, 2007
Messages
44
Reaction score
7
ADD NEWS BARRICADES
- Open WarZ.sln


Find:
Code:
wpn->getItemID() == WeaponConfig::ITEMID_SandbagBarricade)


Replace:
Code:
wpn->getItemID() == WeaponConfig::ITEMID_SandbagBarricade ||                                wpn->getItemID() == WeaponConfig::ITEMID_BlockDoorWood ||
                                wpn->getItemID() == WeaponConfig::ITEMID_BlockLight ||
                                wpn->getItemID() == WeaponConfig::ITEMID_BlockSolarWater ||
                                wpn->getItemID() == WeaponConfig::ITEMID_BlockWallBrickShort ||
                                wpn->getItemID() == WeaponConfig::ITEMID_BlockWallBrick ||
                                wpn->getItemID() == WeaponConfig::ITEMID_BlockWallMetal ||
                                wpn->getItemID() == WeaponConfig::ITEMID_BlockWallWood)




Find:
Code:
wi.itemID == WeaponConfig::ITEMID_SandbagBarricade)


Replace:
Code:
wi.itemID == WeaponConfig::ITEMID_SandbagBarricade ||                                wi.itemID == WeaponConfig::ITEMID_BlockDoorWood ||
                                wi.itemID == WeaponConfig::ITEMID_BlockLight ||
                                wi.itemID == WeaponConfig::ITEMID_BlockSolarWater ||
                                wi.itemID == WeaponConfig::ITEMID_BlockWallBrickShort ||
                                wi.itemID == WeaponConfig::ITEMID_BlockWallBrick ||
                                wi.itemID == WeaponConfig::ITEMID_BlockWallMetal ||
                                wi.itemID == WeaponConfig::ITEMID_BlockWallWood)




Find:
Code:
else if(m_needToDrawBarricadePlacement == WeaponConfig::ITEMID_SandbagBarricade)                        {
                            if(m_BarricadeMeshPlacement == NULL)
                                m_BarricadeMeshPlacement = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\item_barricade_Sandbag_built.sco", true, false, true, true );
                            riotMesh = m_BarricadeMeshPlacement;
                        }


Add below:
Code:
else if(m_needToDrawBarricadePlacement == WeaponConfig::ITEMID_BlockDoorWood)                        {
                            if(m_BarricadeMeshPlacement == NULL)
                                m_BarricadeMeshPlacement = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_door_wood_2m_01.sco", true, false, true, true );
                            riotMesh = m_BarricadeMeshPlacement;
                        }
                        else if(m_needToDrawBarricadePlacement == WeaponConfig::ITEMID_BlockLight)
                        {
                            if(m_BarricadeMeshPlacement == NULL)
                                m_BarricadeMeshPlacement = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_light_01.sco", true, false, true, true );
                            riotMesh = m_BarricadeMeshPlacement;
                        }
                        else if(m_needToDrawBarricadePlacement == WeaponConfig::ITEMID_BlockSolarWater)
                        {
                            if(m_BarricadeMeshPlacement == NULL)
                                m_BarricadeMeshPlacement = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_solarwater_01.sco", true, false, true, true );
                            riotMesh = m_BarricadeMeshPlacement;
                        }
                        else if(m_needToDrawBarricadePlacement == WeaponConfig::ITEMID_BlockWallBrickShort)
                        {
                            if(m_BarricadeMeshPlacement == NULL)
                                m_BarricadeMeshPlacement = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_wall_brick_short_01.sco", true, false, true, true );
                            riotMesh = m_BarricadeMeshPlacement;
                        }
                        else if(m_needToDrawBarricadePlacement == WeaponConfig::ITEMID_BlockWallBrick)
                        {
                            if(m_BarricadeMeshPlacement == NULL)
                                m_BarricadeMeshPlacement = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_wall_brick_tall_01.sco", true, false, true, true );
                            riotMesh = m_BarricadeMeshPlacement;
                        }
                        else if(m_needToDrawBarricadePlacement == WeaponConfig::ITEMID_BlockWallMetal)
                        {
                            if(m_BarricadeMeshPlacement == NULL)
                                m_BarricadeMeshPlacement = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_wall_metal_2m_01.sco", true, false, true, true );
                            riotMesh = m_BarricadeMeshPlacement;
                        }
                        else if(m_needToDrawBarricadePlacement == WeaponConfig::ITEMID_BlockWallWood)
                        {
                            if(m_BarricadeMeshPlacement == NULL)
                                m_BarricadeMeshPlacement = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_wall_wood_2m_01.sco", true, false, true, true );
                            riotMesh = m_BarricadeMeshPlacement;
                        }
Find:
Code:
else if(m_ItemID == WeaponConfig::ITEMID_SandbagBarricade)
                m_PrivateModel = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\item_barricade_Sandbag_built.sco", true, false, true, true );


Add below:
Code:
else if(m_ItemID == WeaponConfig::ITEMID_BlockDoorWood)                m_PrivateModel = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_door_wood_2m_01.sco", true, false, true, true );
            else if(m_ItemID == WeaponConfig::ITEMID_BlockLight)
                m_PrivateModel = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_light_01.sco", true, false, true, true );
            else if(m_ItemID == WeaponConfig::ITEMID_BlockSolarWater)
                m_PrivateModel = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_solarwater_01.sco", true, false, true, true );
            else if(m_ItemID == WeaponConfig::ITEMID_BlockWallBrickShort)
                m_PrivateModel = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_wall_brick_short_01.sco", true, false, true, true );
            else if(m_ItemID == WeaponConfig::ITEMID_BlockWallBrick)
                m_PrivateModel = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_wall_brick_tall_01.sco", true, false, true, true );
            else if(m_ItemID == WeaponConfig::ITEMID_BlockWallMetal)
                m_PrivateModel = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_wall_metal_2m_01.sco", true, false, true, true );
            else if(m_ItemID == WeaponConfig::ITEMID_BlockWallWood)
                m_PrivateModel = r3dGOBAddMesh("Data\\ObjectsDepot\\Weapons\\block_wall_wood_2m_01.sco", true, false, true, true );




Find:
Code:
ITEMID_SandbagBarricade = 101324,


Add below:
Code:
ITEMID_BlockDoorWood = 101371,                ITEMID_BlockLight = 101373,
                ITEMID_BlockSolarWater = 101376,
                ITEMID_BlockWallBrickShort = 101377,
                ITEMID_BlockWallBrick = 101378,
                ITEMID_BlockWallMetal = 101379,
                ITEMID_BlockWallWood = 101380,




Find:
Code:
wi.itemID == WeaponConfig::ITEMID_SandbagBarricade)


Replace:
Code:
wi.itemID == WeaponConfig::ITEMID_SandbagBarricade ||                wi.itemID == WeaponConfig::ITEMID_BlockDoorWood ||
                wi.itemID == WeaponConfig::ITEMID_BlockLight ||
                wi.itemID == WeaponConfig::ITEMID_BlockSolarWater ||
                wi.itemID == WeaponConfig::ITEMID_BlockWallBrickShort ||
                wi.itemID == WeaponConfig::ITEMID_BlockWallBrick ||
                wi.itemID == WeaponConfig::ITEMID_BlockWallMetal ||
                wi.itemID == WeaponConfig::ITEMID_BlockWallWood)




Find:
Code:
n.itemID == WeaponConfig::ITEMID_SandbagBarricade)


Replace:
Code:
n.itemID == WeaponConfig::ITEMID_SandbagBarricade ||                n.itemID == WeaponConfig::ITEMID_BlockDoorWood ||
                n.itemID == WeaponConfig::ITEMID_BlockLight ||
                n.itemID == WeaponConfig::ITEMID_BlockSolarWater ||
                n.itemID == WeaponConfig::ITEMID_BlockWallBrickShort ||
                n.itemID == WeaponConfig::ITEMID_BlockWallBrick ||
                n.itemID == WeaponConfig::ITEMID_BlockWallMetal ||
                n.itemID == WeaponConfig::ITEMID_BlockWallWood)


- Open WarZ_Server.sln


Find:
Code:
case WeaponConfig::ITEMID_SandbagBarricade:


Add below:
Code:
case WeaponConfig::ITEMID_BlockDoorWood:
        case WeaponConfig::ITEMID_BlockLight:
        case WeaponConfig::ITEMID_BlockSolarWater:
        case WeaponConfig::ITEMID_BlockWallBrickShort:
        case WeaponConfig::ITEMID_BlockWallBrick:
        case WeaponConfig::ITEMID_BlockWallMetal:
        case WeaponConfig::ITEMID_BlockWallWood:




Find:
Code:
ITEMID_SandbagBarricade = 101324,


Add below:
Code:
ITEMID_BlockDoorWood = 101371,
        ITEMID_BlockLight = 101373,
        ITEMID_BlockSolarWater = 101376,
        ITEMID_BlockWallBrickShort = 101377,
        ITEMID_BlockWallBrick = 101378,
        ITEMID_BlockWallMetal = 101379,
        ITEMID_BlockWallWood = 101380,




Find:
Code:
else if(m_ItemID == WeaponConfig::ITEMID_SandbagBarricade)
    {
        FileName = "Data\\ObjectsDepot\\Weapons\\item_barricade_Sandbag_built.sco";
        bsize    = r3dPoint3D(1.513974f, 1.057301f, 1.111396f);
    }


Add below:
Code:
else if(m_ItemID == WeaponConfig::ITEMID_BlockDoorWood)
    {
        FileName = "Data\\ObjectsDepot\\Weapons\\block_door_wood_2m_01.sco";
        bsize    = r3dPoint3D(1.513974f, 1.057301f, 1.111396f);
    }
    else if(m_ItemID == WeaponConfig::ITEMID_BlockLight)
    {
        FileName = "Data\\ObjectsDepot\\Weapons\\block_light_01.sco";
        bsize    = r3dPoint3D(1.513974f, 1.057301f, 1.111396f);
    }
    else if(m_ItemID == WeaponConfig::ITEMID_BlockSolarWater)
    {
        FileName = "Data\\ObjectsDepot\\Weapons\\block_solarwater_01.sco";
        bsize    = r3dPoint3D(1.513974f, 1.057301f, 1.111396f);
    }
    else if(m_ItemID == WeaponConfig::ITEMID_BlockWallBrickShort)
    {
        FileName = "Data\\ObjectsDepot\\Weapons\\Block_Wall_Brick_Short_01.sco";
        bsize    = r3dPoint3D(1.513974f, 1.057301f, 1.111396f);
    }
    else if(m_ItemID == WeaponConfig::ITEMID_BlockWallBrick)
    {
        FileName = "Data\\ObjectsDepot\\Weapons\\block_wall_brick_tall_01.sco";
        bsize    = r3dPoint3D(1.513974f, 1.057301f, 1.111396f);
    }
    else if(m_ItemID == WeaponConfig::ITEMID_BlockWallMetal)
    {
        FileName = "Data\\ObjectsDepot\\Weapons\\block_wall_metal_2m_01.sco";
        bsize    = r3dPoint3D(1.513974f, 1.057301f, 1.111396f);
    }
    else if(m_ItemID == WeaponConfig::ITEMID_BlockWallWood)
    {
        FileName = "Data\\ObjectsDepot\\Weapons\\block_wall_wood_2m_01.sco";
        bsize    = r3dPoint3D(1.513974f, 1.057301f, 1.111396f);
    }




Compile WarZ.sln and WarZ_Server.sln, finish.
 
Initiate Mage
Joined
Jun 27, 2013
Messages
70
Reaction score
2
Once I did just that, but I forgot to add the objects to WarZ_Server.sln! lol!

Thank you!
 
Initiate Mage
Joined
Sep 15, 2007
Messages
44
Reaction score
7
Once I did just that, but I forgot to add the objects to WarZ_Server.sln! lol!

Thank you!
WarZ_Server.sln, everything you see in the game that other players need to see, need to make modifications to it(WARZ_SERVER.sln).

There is a button to thank.
fGbJZFa - [Tutorial] Add news barricades - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Initiate Mage
Joined
Oct 21, 2013
Messages
22
Reaction score
1
Error 7 error C2365: 'ITEMID_BlockLight' : redefinition; previous definition was 'enumerator' g:\server\warz\src\eclipsestudio\sources\objectscode\weapons\WeaponConfig.h 140 Eclipse Studio
...Why is it so

(Well I solved. Repeat.)
 
Last edited:
Initiate Mage
Joined
Oct 21, 2013
Messages
22
Reaction score
1
Worked?

Like ...
fGbJZFa - [Tutorial] Add news barricades - RaGEZONE Forums
ITEMID_BarbWireBarricade = 101316,
ITEMID_WoodShieldBarricade = 101317,
ITEMID_RiotShieldBarricade = 101318,
ITEMID_SandbagBarricade = 101324,
ITEMID_BlockDoorWood = 101352,
ITEMID_BlockLight = 101361,
ITEMID_BlockWallBrickShort = 101356,
ITEMID_BlockWallBrick = 101354,
ITEMID_BlockWallMetal = 101353,
ITEMID_BlockSolarWater = 101360,
ITEMID_BlockWallWood = 101355,
ITEMID_WoodenDoor2M = 101352,
ITEMID_PersonalLocker = 101348,

itemsDB.xml This is :huh:
 

Attachments

You must be registered for see attachments list
Initiate Mage
Joined
Jul 9, 2017
Messages
9
Reaction score
0
Hello, I'm sorry for the English, but I need to know if there is a method that the barricades destroy themselves automatically.
 
☆Dying Dawn☆
Joined
Jan 30, 2012
Messages
971
Reaction score
727
Hello, I'm sorry for the English, but I need to know if there is a method that the barricades destroy themselves automatically.
if you look in the server side obj_ServerBarricade.cpp for this const static int BARRICADE_EXPIRE_TIME you can see the time to destroy automatic the barricade
 
Last edited:
Initiate Mage
Joined
Jul 9, 2017
Messages
9
Reaction score
0
thanks for the force, I found the solution yes I made the change but it did not work, I think it has to change in db too.
std::vector<obj_ServerBarricade*> obj_ServerBarricade::allBarricades;const static int BARRICADE_EXPIRE_TIME = 5 * 24 * 60 * 60; // barricade will expire in 5 minutesconst static int STRONGHOLD_EXPIRE_TIME = 30 * 24 * 60 * 60; // stronghold items will expire in 30 minutesconst static int DEV_EVENT_EXPIRE_TIME = 30 * 60; // dev event items will expire in 30 minutes
 
Back
Top