Killstreak Code with Sound

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Killstreak Code with Sound

    Can anybody provide me with a working killstreaks script that play sound when a certain amount of kills get reached?

    Thanks


  2. #2
    Account Upgraded | Title Enabled! medotarek is offline
    MemberRank
    Apr 2012 Join Date
    Egypt/RageZoneLocation
    615Posts

    Re: Killstreak Code with Sound

    me too need to this but i had one but not working idk why

    i know the code for the sounds lol

  3. #3
    Daemonsring Developer Gunblade is offline
    MemberRank
    Jul 2007 Join Date
    On the moonLocation
    728Posts

    Re: Killstreak Code with Sound

    Start learning to code, don't even attempt to create a new GunZ Server if you don't want to learn how to code.
    GunZ is dead, unless you can make a highly modificated client, you have no chance of your server getting populated.
    Besides, doing it yourself gives you more experience in coding which might be usefull later in your life.

  4. #4
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Killstreak Code with Sound

    Quote Originally Posted by Gunblade View Post
    Start learning to code, don't even attempt to create a new GunZ Server if you don't want to learn how to code.
    GunZ is dead, unless you can make a highly modificated client, you have no chance of your server getting populated.
    Besides, doing it yourself gives you more experience in coding which might be usefull later in your life.
    Yes your exactly right, but you cannot learn to code in the gunz source if you have no idea where to start. Also why post this unnecessary comment if your not even going to bother helping.

  5. #5
    Account Upgraded | Title Enabled! medotarek is offline
    MemberRank
    Apr 2012 Join Date
    Egypt/RageZoneLocation
    615Posts

    Re: Killstreak Code with Sound

    Quote Originally Posted by Gunblade View Post
    Start learning to code, don't even attempt to create a new GunZ Server if you don't want to learn how to code.
    GunZ is dead, unless you can make a highly modificated client, you have no chance of your server getting populated.
    Besides, doing it yourself gives you more experience in coding which might be usefull later in your life.
    what's happend to do gunz is dead??

  6. #6
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Killstreak Code with Sound

    Gunz is dying, not many people like it as much as they used to.

  7. #7
    Daemonsring Developer Gunblade is offline
    MemberRank
    Jul 2007 Join Date
    On the moonLocation
    728Posts

    Re: Killstreak Code with Sound

    You are simply asking 'us' to provide you with a script, which doesn't give the impression you want to learn to code.
    If you ever had put a small effort in searching you would've already found a site to learn C++
    Anyway to make your life a bit easier: Learn C++

  8. #8
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Killstreak Code with Sound

    Quote Originally Posted by Gunblade View Post
    You are simply asking 'us' to provide you with a script, which doesn't give the impression you want to learn to code.
    If you ever had put a small effort in searching you would've already found a site to learn C++
    Anyway to make your life a bit easier: Learn C++
    Why do you think the "Request" option is put there for.

  9. #9
    Daemonsring Developer Gunblade is offline
    MemberRank
    Jul 2007 Join Date
    On the moonLocation
    728Posts

    Re: Killstreak Code with Sound

    Quote Originally Posted by Sensor View Post
    Why do you think the "Request" option is put there for.
    Help & Support, not slavery

  10. #10
    In Progress... FFXIV... Anju is offline
    MemberRank
    Oct 2010 Join Date
    Mist Ward 7 #38Location
    1,946Posts

    Re: Killstreak Code with Sound

    Just look into the same codes as the "Fantasy", "You killed them all", etc sound.

  11. #11
    Rival Gamers Owner own_prox is offline
    MemberRank
    Jul 2007 Join Date
    HellLocation
    1,077Posts

    Re: Killstreak Code with Sound

    basically MMatchServer::OnGameKill(MUID a, MUID b)

    that void right there you can design a kill streak on very easily and efficiently, its what i did with ugg.

  12. #12
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Killstreak Code with Sound

    Thanks, ill give it a go.

  13. #13
    Rival Gamers Owner own_prox is offline
    MemberRank
    Jul 2007 Join Date
    HellLocation
    1,077Posts

    Re: Killstreak Code with Sound

    sorry i ment MMatchServer::PostGameDeadOnGameKill(MUID& uidStage, MMatchObject* pAttacker, MMatchObject* pVictim,
    int nAddedAttackerExp, int nSubedVictimExp)

    then for the struct MMatchObject add a int KillStreak; then at MMatchObject() { KillStreak = 0;}



    then find C(MC_MATCH_GAME_DEAD, "Game.Dead", "Game.Dead", MCDT_MACHINE2MACHINE)
    and add P(MPT_INT, "KillStreak"); under the
    P(MPT_UINT, "VictimArg"); // Exp | °æÇèÄ¡ÆÛ¼¾Æ®


    then replace the old postgamedeadongamekill with this
    void MMatchServer::PostGameDeadOnGameKill(MUID& uidStage, MMatchObject* pAttacker, MMatchObject* pVictim,
    int nAddedAttackerExp, int nSubedVictimExp)
    {
    unsigned long int nAttackerArg = 0;
    unsigned long int nVictimArg =0;

    int nRealAttackerLevel = pAttacker->GetCharInfo()->m_nLevel;
    int nRealVictimLevel = pVictim->GetCharInfo()->m_nLevel;

    unsigned long int nChrExp;
    int nPercent;

    nChrExp = pAttacker->GetCharInfo()->m_nXP;
    nPercent = MMatchFormula::GetLevelPercent(nChrExp, nRealAttackerLevel);
    nAttackerArg = MakeExpTransData(nAddedAttackerExp, nPercent);

    nChrExp = pVictim->GetCharInfo()->m_nXP;
    nPercent = MMatchFormula::GetLevelPercent(nChrExp, nRealVictimLevel);
    nVictimArg = MakeExpTransData(nSubedVictimExp, nPercent);
    pAttacker->KillStreak++;
    pVictim->KillStreak = 0;
    MCommand* pCmd = CreateCommand(MC_MATCH_GAME_DEAD, MUID(0,0));
    pCmd->AddParameter(new MCommandParameterUID(pAttacker->GetUID()));
    pCmd->AddParameter(new MCommandParameterUInt(nAttackerArg));
    pCmd->AddParameter(new MCommandParameterUID(pVictim->GetUID()));
    pCmd->AddParameter(new MCommandParameterUInt(nVictimArg));
    pCmd->AddParameter(new MCommandParameterInt(pAttacker->KillStreak));
    RouteToBattle(uidStage, pCmd);
    }

    change to this(both of them)
    OnPeerDead(const MUID& uidAttacker, const unsigned long int nAttackerArg,
    const MUID& uidVictim, const unsigned long int nVictimArg, int Kills);
    ^^ also at the end of this void after
    CheckKillSound(pAttacker);
    change
    OnPeerDieMessage(pVictim, pAttacker); to OnPeerDieMessage(pVictim, pAttacker, Kills);

    and change to this(both of them)

    OnPeerDieMessage(ZCharacter* pVictim, ZCharacter* pAttacker, int Kills)

    then make this like this
    case MC_MATCH_GAME_DEAD:
    {
    MUID uidAttacker, uidVictim;
    unsigned long int nAttackerArg, nVictimArg;
    int Kills;
    pCommand->GetParameter(&uidAttacker, 0, MPT_UID);
    pCommand->GetParameter(&nAttackerArg, 1, MPT_UINT);
    pCommand->GetParameter(&uidVictim, 2, MPT_UID);
    pCommand->GetParameter(&nVictimArg, 3, MPT_UINT);
    pCommand->GetParameter(&Kills, 4, MPT_INT);

    OnPeerDead(uidAttacker, nAttackerArg, uidVictim, nVictimArg, Kills);
    }
    break;

    then goto onpeerdiemessage and at the end before the last } add

    sprintf(szMsg, "%s is on a %d kill streak!", szAttacker, Kills);
    ZChatOutput(MCOLOR(0xFF707070), szMsg);

    ive given you anoth now lol the sounds you can do yourself, this code is untested but in theory should work any issues let me know
    Last edited by own_prox; 06-06-13 at 02:51 AM.

  14. #14
    Alpha Member Chrisss is offline
    MemberRank
    Feb 2012 Join Date
    Ask the Fox!Location
    1,660Posts

    Re: Killstreak Code with Sound

    <3<3<3<3 Thank you soo much!

  15. #15
    Rival Gamers Owner own_prox is offline
    MemberRank
    Jul 2007 Join Date
    HellLocation
    1,077Posts

    Re: Killstreak Code with Sound

    no problem mate always happy to help only took around a min or 2 to write up
    another example for at the end of onpeerdiemessage
    bool bmsg = true;
    switch(Kills)
    {
    case 4:
    sprintf(szMsg, "%s is on a %d kill streak!", szAttacker, Kills);
    break;
    case 8:
    sprintf(szMsg, "%s is Pwning with a %d kill streak!", szAttacker, Kills);
    break;
    case 12:
    sprintf(szMsg, "%s is Dominating with a %d kill streak!", szAttacker, Kills);
    break;
    default:
    if(Kills >= 12)
    {
    sprintf(szMsg, "%s is Unstoppable with a %d kill streak!", szAttacker, Kills);
    } else bmsg = false;
    break;
    }
    if(bmsg)
    {
    ZChatOutput(MCOLOR(0xFF707070), szMsg);
    }
    Last edited by own_prox; 06-06-13 at 02:51 AM.



Page 1 of 2 12 LastLast

Advertisement