[7.72] OTHire 0.0.1b - Based in OTServ Trunk (Latest)

secondlife

Excellent OT User
Joined
Aug 1, 2009
Messages
250
Best answers
0
Reaction score
18
@Ezzz @Nottinghster @topic

bro, its possible the time of decrease frags?

Player.cpp
Code:
                    if(it->isUnjustKill()){
                        attackerPlayer->addUnjustifiedDead(this);
                    }
                    #endif
I tried in diff ways, but without success.

Any idea?
Thanks!!!
 

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,514
Best answers
9
Reaction score
212
Location
Chile
:)
Code:
-- How long time the red skull will last in seconds (default 30 days)
red_skull_duration = 30*24*60*60

-- White skull duration, how long a player will get pz locked/white skull
unjust_skull_duration = 15*60*1000
np
 

secondlife

Excellent OT User
Joined
Aug 1, 2009
Messages
250
Best answers
0
Reaction score
18
@Felipe93

No, this configs is for pzlock dura tio and days of decrease Red Skull.

Im asking for the time to decrease a unjust kill.

thx
 

secondlife

Excellent OT User
Joined
Aug 1, 2009
Messages
250
Best answers
0
Reaction score
18
@Topic

Now i find this functions in ioplayer.cpp (i think the unjust kill time is stored here)

Code:
if(player){
//reset unjust kill cache
UnjustCacheMap::iterator it = unjustKillCacheMap.find(player->getGUID());
if(it != unjustKillCacheMap.end()){
unjustKillCacheMap.erase(it);
}
DBInsert player_killers_stmt(db);
player_killers_stmt.setQuery("INSERT INTO `player_killers` (`kill_id`, `player_id`, `unjustified`) VALUES ");
query.str("");
query << kill_id << ", " << player->getGUID() << ", " << (de.isUnjustKill() ? 1 : 0);
if(!player_killers_stmt.addRow(query.str()))
return false;
if(!player_killers_stmt.execute())
return false;
}
else{ // Kill wasn't player, store name so next insert catches it
name = c->getNameDescription();
}
}
Its possible to edit the decrease time here?
 

Felipe93

Ghost Member
Joined
Mar 21, 2015
Messages
1,514
Best answers
9
Reaction score
212
Location
Chile
Code:
-- how long does the player has to stay out of fight to get pz unlocked in ms (1000 = 1 second)
in_fight_duration = 60000
@secondlife ? or be more specific i can't understand
@Topic

Now i find this functions in ioplayer.cpp (i think the unjust kill time is stored here)

Code:
if(player){
//reset unjust kill cache
UnjustCacheMap::iterator it = unjustKillCacheMap.find(player->getGUID());
if(it != unjustKillCacheMap.end()){
unjustKillCacheMap.erase(it);
}
DBInsert player_killers_stmt(db);
player_killers_stmt.setQuery("INSERT INTO `player_killers` (`kill_id`, `player_id`, `unjustified`) VALUES ");
query.str("");
query << kill_id << ", " << player->getGUID() << ", " << (de.isUnjustKill() ? 1 : 0);
if(!player_killers_stmt.addRow(query.str()))
return false;
if(!player_killers_stmt.execute())
return false;
}
else{ // Kill wasn't player, store name so next insert catches it
name = c->getNameDescription();
}
}
Its possible to edit the decrease time here?
i think its if better if you make a new thread in support section man
 

Eldora

Intermediate OT User
Joined
Oct 19, 2009
Messages
470
Best answers
0
Reaction score
13
How can i enable premium features, such as Premium Outfits for everyone?
There is no setting for this in the config.lua

Do i need to edit this source code?
CSS:
void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
{
    uint16_t lookType = msg.GetU16();

    Outfit_t newOutfit;

    // only first 4 outfits
    uint8_t lastFemaleOutfit = 0x8B;
    uint8_t lastMaleOutfit = 0x83;

    // if premium then all 7 outfits
    if (player->getSex() == PLAYERSEX_FEMALE && player->isPremium())
        lastFemaleOutfit = 0x8E;
    else if (player->getSex() == PLAYERSEX_MALE && player->isPremium())
        lastMaleOutfit = 0x86;

    if ((player->getSex() == PLAYERSEX_FEMALE &&
        lookType >= 136 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))
    {
        newOutfit.lookType = lookType;
        newOutfit.lookHead = msg.GetByte();
        newOutfit.lookBody = msg.GetByte();
        newOutfit.lookLegs = msg.GetByte();
        newOutfit.lookFeet = msg.GetByte();
    }

    addGameTask(&Game::playerChangeOutfit, player->getID(), newOutfit);
}
 

Mitsuig

Qwizer
Joined
Feb 10, 2017
Messages
31
Best answers
0
Reaction score
7
Location
EUA
@Topic

Now i find this functions in ioplayer.cpp (i think the unjust kill time is stored here)

Code:
if(player){
//reset unjust kill cache
UnjustCacheMap::iterator it = unjustKillCacheMap.find(player->getGUID());
if(it != unjustKillCacheMap.end()){
unjustKillCacheMap.erase(it);
}
DBInsert player_killers_stmt(db);
player_killers_stmt.setQuery("INSERT INTO `player_killers` (`kill_id`, `player_id`, `unjustified`) VALUES ");
query.str("");
query << kill_id << ", " << player->getGUID() << ", " << (de.isUnjustKill() ? 1 : 0);
if(!player_killers_stmt.addRow(query.str()))
return false;
if(!player_killers_stmt.execute())
return false;
}
else{ // Kill wasn't player, store name so next insert catches it
name = c->getNameDescription();
}
}
Its possible to edit the decrease time here?
 

DRUlD

New Member
Joined
Mar 4, 2018
Messages
16
Best answers
0
Reaction score
0
How can i enable premium features, such as Premium Outfits for everyone?
There is no setting for this in the config.lua

Do i need to edit this source code?
CSS:
void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
{
    uint16_t lookType = msg.GetU16();

    Outfit_t newOutfit;

    // only first 4 outfits
    uint8_t lastFemaleOutfit = 0x8B;
    uint8_t lastMaleOutfit = 0x83;

    // if premium then all 7 outfits
    if (player->getSex() == PLAYERSEX_FEMALE && player->isPremium())
        lastFemaleOutfit = 0x8E;
    else if (player->getSex() == PLAYERSEX_MALE && player->isPremium())
        lastMaleOutfit = 0x86;

    if ((player->getSex() == PLAYERSEX_FEMALE &&
        lookType >= 136 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))
    {
        newOutfit.lookType = lookType;
        newOutfit.lookHead = msg.GetByte();
        newOutfit.lookBody = msg.GetByte();
        newOutfit.lookLegs = msg.GetByte();
        newOutfit.lookFeet = msg.GetByte();
    }

    addGameTask(&Game::playerChangeOutfit, player->getID(), newOutfit);
}
I am also looking for a solution
 

ond

Legendary OT User
Joined
Mar 24, 2008
Messages
2,683
Best answers
21
Reaction score
406
Location
Sweden
How can i enable premium features, such as Premium Outfits for everyone?
There is no setting for this in the config.lua

Do i need to edit this source code?
If you want it as a config option, try this:
C++:
void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
{
    uint16_t lookType = msg.GetU16();
    Outfit_t newOutfit;
    bool allOutfits = g_config.getBoolean(ConfigManager::ALL_OUTFITS);
   
    // only first 4 outfits
    uint8_t lastFemaleOutfit = (allOutfits ? 0x8E : 0x8B);
    uint8_t lastMaleOutfit = (allOutfits ? 0x86 : 0x83);
    // if premium then all 7 outfits
    if (!allOutfits) {
        if (player->getSex() == PLAYERSEX_FEMALE && player->isPremium())
            lastFemaleOutfit = 0x8E;
        else if (player->getSex() == PLAYERSEX_MALE && player->isPremium())
            lastMaleOutfit = 0x86;
    }
    if ((player->getSex() == PLAYERSEX_FEMALE &&
        lookType >= 136 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))
    {
        newOutfit.lookType = lookType;
        newOutfit.lookHead = msg.GetByte();
        newOutfit.lookBody = msg.GetByte();
        newOutfit.lookLegs = msg.GetByte();
        newOutfit.lookFeet = msg.GetByte();
    }
    addGameTask(&Game::playerChangeOutfit, player->getID(), newOutfit);
}
And in configmanager.cpp add:
C++:
m_confInteger[ALL_OUTFITS] = getGlobalBoolean(L, "all_outfits", false);
And in configmanager.h under PARCEL_BLOCK, add:
Code:
ALL_OUTFITS
And then somewhere in config.lua add:
Code:
all_outfits = true
 

Eldora

Intermediate OT User
Joined
Oct 19, 2009
Messages
470
Best answers
0
Reaction score
13
If you want it as a config option, try this:
C++:
void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
{
    uint16_t lookType = msg.GetU16();
    Outfit_t newOutfit;
    bool allOutfits = g_config.getBoolean(ConfigManager::ALL_OUTFITS);
  
    // only first 4 outfits
    uint8_t lastFemaleOutfit = (allOutfits ? 0x8E : 0x8B);
    uint8_t lastMaleOutfit = (allOutfits ? 0x86 : 0x83);
    // if premium then all 7 outfits
    if (!allOutfits) {
        if (player->getSex() == PLAYERSEX_FEMALE && player->isPremium())
            lastFemaleOutfit = 0x8E;
        else if (player->getSex() == PLAYERSEX_MALE && player->isPremium())
            lastMaleOutfit = 0x86;
    }
    if ((player->getSex() == PLAYERSEX_FEMALE &&
        lookType >= 136 &&
        lookType <= lastFemaleOutfit) ||
        (player->getSex() == PLAYERSEX_MALE &&
        lookType >= 128 &&
        lookType <= lastMaleOutfit))
    {
        newOutfit.lookType = lookType;
        newOutfit.lookHead = msg.GetByte();
        newOutfit.lookBody = msg.GetByte();
        newOutfit.lookLegs = msg.GetByte();
        newOutfit.lookFeet = msg.GetByte();
    }
    addGameTask(&Game::playerChangeOutfit, player->getID(), newOutfit);
}
And in configmanager.cpp add:
C++:
m_confInteger[ALL_OUTFITS] = getGlobalBoolean(L, "all_outfits", false);
And in configmanager.h under PARCEL_BLOCK, add:
Code:
ALL_OUTFITS
And then somewhere in config.lua add:
Code:
all_outfits = true
It compiled successfully, but prem outfits is not available for free acc players, even if i set "all_outfits = true" in "config.lua"
 

ond

Legendary OT User
Joined
Mar 24, 2008
Messages
2,683
Best answers
21
Reaction score
406
Location
Sweden
It compiled successfully, but prem outfits is not available for free acc players, even if i set "all_outfits = true" in "config.lua"
Have no way to test it myself, I don't, see when looking at it, why it should not work
 

secondlife

Excellent OT User
Joined
Aug 1, 2009
Messages
250
Best answers
0
Reaction score
18
you´re being a bit lazy do it yourself he shared the code
lol.. where are you watching him share the code? he just posted a picture of the system running on his own server.
I told him to commit files if he wants to share with other othire users and.. nobody mentioned you in the conversation..
 

Eldora

Intermediate OT User
Joined
Oct 19, 2009
Messages
470
Best answers
0
Reaction score
13
How can i add so that if a player is attacking another player, the text "PK!" should appear in red repeatedly above the attackers character, until the PZ is over?

Is this possible? :eek:
 
Top