Script de racket
Voici un script utile (ou pas ) pour une zone FFA !
Celui-ci permet de racketter son ennemi quand on le tue, ses POs ainsi que ses PHs :
/* * Copyright © 2013-2014 Molios */ #include "ScriptPCH.h" #include <cstring> #ifdef WIN32 #pragma warning(disable:4305) #endif enum eEnums { GOLD1 = 100, // Po HONNEUR = 100, // points d'honneur par kill }; class zone_ffa : public PlayerScript { public: zone_ffa() : PlayerScript("zone_ffa") {} void OnPVPKill(Player *pKiller, Player *pVictim) { int pvparea = 1336; // Zone FFA VERS TANARIS 1336 (donc à éditer selon votre zone ) int area1 = pKiller->GetAreaId(); int area2 = pVictim->GetAreaId(); if(area1 == pvparea && area2 == pvparea) { //////////// // // // Racket // // //////////// // HONNEUR int32 honor1 = pKiller->GetHonorPoints(); int32 honor2 = pVictim->GetHonorPoints(); int32 honorvalue1 = honor1 + HONNEUR; int32 honorvalue2 = honor2 - HONNEUR; if (pVictim->GetHonorPoints() >= HONNEUR) { pKiller->SetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY, honorvalue1); pVictim->SetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY, honorvalue2); } // PO int32 GetGold1 = pKiller->GetUInt32Value(PLAYER_FIELD_COINAGE); int32 GetGold2 = pVictim->GetUInt32Value(PLAYER_FIELD_COINAGE); int32 Rob1 = GetGold1 + GOLD1; int32 Rob2 = GetGold2 - GOLD1; if (pVictim->GetUInt32Value(PLAYER_FIELD_COINAGE) >= GOLD1) { pKiller->SetUInt32Value(PLAYER_FIELD_COINAGE, Rob1); pVictim->SetUInt32Value(PLAYER_FIELD_COINAGE, Rob2); } } } }; void AddSC_zone_ffa() { new zone_ffa(); }