ابزار سرور  WoW | World Of WarCraft  | Scirpt

ابزار سرور WoW | World Of WarCraft | Scirpt

ابزار سرور | ابزار WOW | ابزار بازی های انلاین | ابزار گیم سرور ها | رفع مشکلات | رتبه بندی | تبلیغات | اموزش | هک | کتاب های اموزشی | خرید و فروش
ابزار سرور  WoW | World Of WarCraft  | Scirpt

ابزار سرور WoW | World Of WarCraft | Scirpt

ابزار سرور | ابزار WOW | ابزار بازی های انلاین | ابزار گیم سرور ها | رفع مشکلات | رتبه بندی | تبلیغات | اموزش | هک | کتاب های اموزشی | خرید و فروش

Kill System


کد PHP:
/*
*******************************
*            I-Script             *
*                              *
*        Packed By Imorate     *
*                              *
*  YID! Mr.Amirooo@Yahoo.Com  *
*                              *
*      Website: IranCore.Ir      *
*******************************
*/

#include "ScriptPCH.h"
#include <cstring>

///////////////////////      CONFIG      /////////////////////////////
/////////////////////////////////////////////////////////////////////
float Version 2.50f//Don't touch this.bool PvPSystemEnabled true//Set to false if you want to disable the PvP Systembool OnlyInBattlegrounds true//Set to true if you want to enable this only in battlegrounds.bool LooseTokenOnPvPDeath true//Set to true if you want the victim to loose tokens when the victim dies.int32 AmountOfItemsYouWantTheVictimToLoose 1//Amount of items you want the victim to loose when victim dies.bool AddTokenOnPvPKill true//Set to false if you don't want the killer to be rewarded.int32 ItemReward 23247//The ItemID of the reward.int32 AmountOfRewardsOnKillStreak[5] = { 510152025 }; //With how many items you want to reward the killer when he slays the victim.int32 HowManyTimesYouWantTheKillerToGetAwardedForKillingTheSameVictim 2//Name speaks for It self.const int32 KillerStreak1 05
const 
int32 KillerStreak2 10
const 
int32 KillerStreak3 15
const 
int32 KillerStreak4 20
const 
int32 KillerStreak5 30int32 KillStreaks[5] = { KillerStreak1KillerStreak2KillerStreak3KillerStreak4KillerStreak5 };///////////////////////////////////////////////////////////////////
///////////////////////      END      ////////////////////////////
/////////////////////////////////////////////////////////////////
struct SystemInfo{
    
uint32 KillStreak;
    
uint32 LastGUIDKill;
    
uint8 KillCount;
};

static 
std::map<uint32SystemInfoKillingStreak;

class 
System_OnPvPKill : public PlayerScript{
    public:
        
System_OnPvPKill() : PlayerScript("System_OnPvPKill") {}

        
void OnPVPKill(Player *pKillerPlayer *pVictim)
{
    if(
PvPSystemEnabled == false)
    {
             return;
    }
    else if(
PvPSystemEnabled == true)
    {
        
uint32 kGUID
        
uint32 vGUID;
        
char msg[500];
        
kGUID pKiller->GetGUID();
        
vGUID pVictim->GetGUID();                 
        if(
kGUID == vGUID)
        {
          return;
        }
                
      if(
KillingStreak[kGUID].LastGUIDKill == vGUID)
        {
        
KillingStreak[kGUID].KillCount++;
        
KillingStreak[vGUID].KillCount 1;
          
pKiller->AddItem(ItemReward1);
        if(
LooseTokenOnPvPDeath == true)
          
pVictim->DestroyItemCount(ItemRewardAmountOfItemsYouWantTheVictimToLoosetruefalse);
       
ChatHandler(pVictim->GetSession()).PSendSysMessage("You died, because of that you have lost an Event Token!");
    }
      if(
KillingStreak[kGUID].LastGUIDKill != vGUID)
      {
        
KillingStreak[kGUID].KillCount 1;
        
KillingStreak[vGUID].KillCount 1;
      }

      if(
KillingStreak[kGUID].KillCount == HowManyTimesYouWantTheKillerToGetAwardedForKillingTheSameVictim)
      {
        return;
      }

      if(
OnlyInBattlegrounds == true)
      {
        if(!
pKiller->GetMap()->IsBattleground() || pKiller->GetMapId() == 30)
           return;
      }

        
KillingStreak[kGUID].KillStreak++;
        
KillingStreak[vGUID].KillStreak 0;
        
KillingStreak[kGUID].LastGUIDKill vGUID;
        
KillingStreak[vGUID].LastGUIDKill 0;
      if(
AddTokenOnPvPKill == true)
          
pKiller->AddItem(294351);
       
ChatHandler(pKiller->GetSession()).PSendSysMessage("You killed a player therefor you have been rewarded with his soul!");
      if(
LooseTokenOnPvPDeath == true)
          
pVictim->DestroyItemCount(ItemRewardAmountOfItemsYouWantTheVictimToLoosetruefalse);
                
        switch(
KillingStreak[kGUID].KillStreak)
        {
        case 
KillerStreak1:
        
sprintf(msg"|cffFF0000%s|cffFFFF05 killed |cffFF0000%s|cffFFFF05 and is on a |cffFF00005|cffFFFF05 kill streak. "pKiller->GetName(), pVictim->GetName());
        
sWorld->SendWorldText(LANG_PVPKILL_SYSTEMmsg);
        
pKiller->AddItem(ItemRewardAmountOfRewardsOnKillStreak[1]);
     
pKiller->ModifyHonorPoints(250);
     
pKiller->CastSpell(pKiller24378true);
        break;

        case 
KillerStreak2:
        
sprintf(msg"|cffFF0000%s|cffFFFF05 killed |cffFF0000%s|cffFFFF05 and is on a |cffFF000010|cffFFFF05 kill streak. "pKiller->GetName(), pVictim->GetName());
        
sWorld->SendWorldText(LANG_PVPKILL_SYSTEMmsg);
        
pKiller->AddItem(ItemRewardAmountOfRewardsOnKillStreak[2]);
     
pKiller->ModifyHonorPoints(250);
     
pKiller->CastSpell(pKiller24378true);
        break;

        case 
KillerStreak3:
        
sprintf(msg"|cffFF0000%s|cffFFFF05 killed |cffFF0000%s|cffFFFF05 and is on a |cffFF000015|cffFFFF05 kill streak. "pKiller->GetName(), pVictim->GetName());
        
sWorld->SendWorldText(LANG_PVPKILL_SYSTEMmsg);
        
pKiller->AddItem(ItemRewardAmountOfRewardsOnKillStreak[3]);
     
pKiller->ModifyHonorPoints(250);
     
pKiller->CastSpell(pKiller24378true);
        break;

        case 
KillerStreak4:
        
sprintf(msg"|cffFF0000%s|cffFFFF05 killed |cffFF0000%s|cffFFFF05 and is on a |cffFF000020|cffFFFF05 kill streak. "pKiller->GetName(), pVictim->GetName());
        
sWorld->SendWorldText(LANG_PVPKILL_SYSTEMmsg);
        
pKiller->AddItem(ItemRewardAmountOfRewardsOnKillStreak[4]);
     
pKiller->ModifyHonorPoints(250);
     
pKiller->CastSpell(pKiller24378true);
        break;

        case 
KillerStreak5:
        
sprintf(msg"|cffFF0000%s|cffFFFF05 killed |cffFF0000%s|cffFFFF05 and is on a |cffFF000030|cffFFFF05 kill streak. "pKiller->GetName(), pVictim->GetName());
        
sWorld->SendWorldText(LANG_PVPKILL_SYSTEMmsg);
        
pKiller->AddItem(2324725);
        
KillingStreak[kGUID].KillStreak 0;
     
pKiller->ModifyHonorPoints(250);
     
pKiller->CastSpell(pKiller24378true);
        break;
     }
    }
}
};
void AddSC_System()
{
    new 
System_OnPvPKill;
}  

منبع : Irancore