Pyrokorian Admin
Number of posts : 23 Age : 36 Location : Cali Job/Hobbies : Sailor. Main Class : Social Studies? Registration date : 2008-09-07
| Subject: World PvP system Wed Sep 10, 2008 1:34 am | |
| This is a world PvP script, that whenever you kill a player, you get money and or tokens. Anyway, I don't take any credit from it. here it is: - Code:
-
//Made by ?? //Modified by WigSplitta whole code //Re-Modified and Rewritten by HalestormXV (Added More Features and events) //Random Dice Concept to Hopla for Helping me
#include "StdAfx.h" #include "Setup.h"
#define GOLD_AMOUNT 1000000 //it is in copper #define PVP_TOKEN 19712 //Put Your Token ID Here
void onPvpKill(Player* plr, Player* victim) { if(plr->getLevel() >= 80 && victim->getLevel() >= 80 && plr->GetTeam() != victim->GetTeam()) { char message[200]; sprintf(message, "|cff00ff00[World PvP]|r |cffff0000%s has killed %s...The hunt begins!|r", plr->GetName(), victim->GetName()); sWorld.SendWorldWideScreenText(message); sLog.outColor(TRED,"\n[WPVP]: WPVP Activated - the killer was %s...The victim was %s.", plr->GetName(), victim->GetName()); sLog.outColor(TNORMAL,"\n"); int32 gold_check_p = plr->GetUInt32Value( PLAYER_FIELD_COINAGE ); int32 gold_check_v = victim->GetUInt32Value( PLAYER_FIELD_COINAGE ); int32 new_gold_p = gold_check_p + GOLD_AMOUNT; int32 new_gold_v; if(gold_check_v < GOLD_AMOUNT) { new_gold_v = 0; } else { new_gold_v = gold_check_v - GOLD_AMOUNT; } plr->SetUInt32Value( PLAYER_FIELD_COINAGE, new_gold_p ); plr->BroadcastMessage("You have gained 100 gold for this kill and the victim's soul for your own use."); plr->CastSpell(plr, 27239, true); plr->PlaySoundToSet(11466); victim->SetUInt32Value( PLAYER_FIELD_COINAGE, new_gold_v ); victim->BroadcastMessage("You have lost 100 gold and your soul! Learn to fight!!");
int Chance = 20; int Generator = RandomUInt(100);
if(Generator <= Chance) { plr->GetItemInterface()->SafeAddItem(PVP_TOKEN, INVENTORY_SLOT_NOT_SET, -1); Item * it = objmgr.CreateItem(PVP_TOKEN, plr); plr->GetItemInterface()->AddItemToFreeSlot(it); sLog.outColor(TGREEN,"[WPVP]: A Token was added for this kill to %s", plr->GetName()); sLog.outColor(TNORMAL,"\n"); } else { sLog.outColor(TYELLOW,"[WPVP]: A Token was not added to %s", plr->GetName()); sLog.outColor(TNORMAL,"\n"); }
} } void SetupPvP(ScriptMgr * mgr) { mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, (void*)onPvpKill); } Original Link: http://wow-v.com/forums/index.php?topic=4768.0 | |
|
Pyrokorian Admin
Number of posts : 23 Age : 36 Location : Cali Job/Hobbies : Sailor. Main Class : Social Studies? Registration date : 2008-09-07
| Subject: Re: World PvP system Wed Sep 10, 2008 1:34 am | |
| If i understand correctly, this would be useful. | |
|
Azirion Admin
Number of posts : 13 Registration date : 2008-09-01
| Subject: Re: World PvP system Wed Sep 10, 2008 8:50 am | |
| Thing is, this looks like a patch script not SQL, you should try to give this to dave for us so he can attach it to any repack that he makes for us. I doubt we can do anything with it really. | |
|
Dave Chaos Senior Member
Number of posts : 4 Age : 41 Location : UK, Manchester Job/Hobbies : Security Officer, Webmaster, GM+Developer for WoTLK Registration date : 2008-09-09
| Subject: Re: World PvP system Wed Sep 10, 2008 10:15 am | |
| Year thats a patch script, i can add it to a core some time if you like, but lets w8 for a new core update first, the auras are being worked on at the moment | |
|
Azirion Admin
Number of posts : 13 Registration date : 2008-09-01
| Subject: Re: World PvP system Wed Sep 10, 2008 3:55 pm | |
| Also, does this patch cut out honor >.> | |
|
Sponsored content
| Subject: Re: World PvP system | |
| |
|