1. #include "ScriptPCH.h"
  2. #include "AccountMgr.h"
  3. #include "Group.h"
  4. static bool curar_1=false, curar_2=false, curar_3=false, curar_4=false, rabiar_1=false, rabiar_2=false, rabiar_3=false, rabiar_4=false, rabiar_5=false, rabiar_6=false, caldero_1=false, caldero_2=false, caldero_3=false;
  5. enum PvPIsland
  6. {
  7. AREA_PVP_ISLAND = 368,
  8. SPELL_BERSERK = 24378,
  9. SPELL_FOOD = 23493,
  10. //SPELL_SPIRITUAL_IMMUNITY = 36910,
  11. SPELL_SUMMON_PET = 883,
  12. SPELL_ANCIENT = 36910,
  13. CAMBIO_DE_FASE = 8611,
  14. NPC_GRAVEYARD_TELEPORTER = 731131,
  15. GAMEOBJECT_BERSERKING_1 = 1649780,
  16. GAMEOBJECT_BERSERKING_2 = 1649784,
  17. GAMEOBJECT_BERSERKING_3 = 1649785,
  18. GAMEOBJECT_BERSERKING_4 = 1649790,
  19. GAMEOBJECT_BERSERKING_5 = 1649791,
  20. GAMEOBJECT_BERSERKING_6 = 1649792,
  21. GAMEOBJECT_FOOD_1 = 1649781,
  22. GAMEOBJECT_FOOD_2 = 1649786,
  23. GAMEOBJECT_FOOD_3 = 1649787,
  24. GAMEOBJECT_FOOD_4 = 1649793,
  25. GAMEOBJECT_ANCIENT_1 = 1649783,
  26. GAMEOBJECT_ANCIENT_2 = 1649788,
  27. GAMEOBJECT_ANCIENT_3 = 1649789,
  28. };
  29. const int MAX_PLAYER_SPAWN_POINTS = 20;
  30. static const Position playerSpawnPoint[MAX_PLAYER_SPAWN_POINTS] =
  31. {
  32. {-1172.90f, -5331.40f, 4.85f, 4.64f},
  33. {-1319.34f, -5385.09f, 3.34f, 5.88f},
  34. {-1135.17f, -5587.93f, 10.5f, 1.53f},
  35. {-1235.21f, -5592.60f, 8.49f, 1.39f},
  36. {-1056.33f, -5639.83f, 5.49f, 1.74f},
  37. {-1031.71f, -5530.50f, 4.75f, 3.14f},
  38. {-989.878f, -5418.93f, 3.90f, 3.26f},
  39. {-1077.64f, -5347.45f, 3.93f, 4.18f},
  40. {-1136.49f, -5420.34f, 11.4f, 3.23f},
  41. {-1235.88f, -5462.10f, 5.76f, 1.29f},
  42. {-1162.98f, -5585.53f, 12.3f, 2.29f},
  43. {-840.228f, -5616.32f, 2.97f, 6.28f},
  44. {-719.558f, -5685.03f, 23.5f, 1.78f},
  45. {-638.830f, -5622.10f, 6.42f, 2.90f},
  46. {-662.432f, -5509.45f, 4.08f, 3.95f},
  47. {-772.277f, -5353.24f, 2.03f, 2.83f},
  48. {-949.171f, -5179.04f, 2.11f, 3.98f},
  49. {-1174.97f, -5116.36f, 3.65f, 6.14f},
  50. {-1372.61f, -5169.68f, 1.81f, 0.45f},
  51. {-1602.78f, -5250.65f, 6.50f, 5.05f},
  52. };
  53. const int MAX_RABIAR_SPAWN_POINTS = 3;
  54. static const Position RabiarSpawnPoint[MAX_RABIAR_SPAWN_POINTS] =
  55. {
  56. {-1126.84f, -5130.68f, 2.71f, 4.10f},
  57. {-960.9088f, -5186.46f, 1.38f, 4.09f},
  58. {-805.20f, -5334.99f, 1.99f, 4.51f},
  59. };
  60. const int MAX_CURAR_SPAWN_POINTS = 3;
  61. static const Position CurarSpawnPoint[MAX_CURAR_SPAWN_POINTS] =
  62. {
  63. {-726.1297f, -5595.66f, 25.27f, 5.57f},
  64. {-1134.96f, -5571.29f, 9.90f, 1.60f},
  65. {-1195.94f, -5390.18f, 7.69f, 6.16f},
  66. };
  67. const int MAX_CALDERO_SPAWN_POINTS = 3;
  68. static const Position CalderoSpawnPoint[MAX_CALDERO_SPAWN_POINTS] =
  69. {
  70. {-1029.60f, -5423.49f, 3.55f, 1.25f},
  71. {-1286.09f, -5534.46f, 15.19f, 0.27f},
  72. {-1544.06f, -5312.42f, 8.06f, 6.13f},
  73. };
  74. class pvp_island_resurrect_event : public BasicEvent
  75. {
  76. public:
  77. pvp_island_resurrect_event(Player* victim) : _victim(victim) { }
  78. bool Execute(uint64 /*time*/, uint32 /*diff*/)
  79. {
  80. _victim->ResurrectPlayer(1.0, false);
  81. int32 RespawnPos = urand(0, MAX_PLAYER_SPAWN_POINTS - 1);
  82. _victim->TeleportTo(1, playerSpawnPoint[RespawnPos].GetPositionX(), playerSpawnPoint[RespawnPos].GetPositionY(), playerSpawnPoint[RespawnPos].GetPositionZ(), playerSpawnPoint[RespawnPos].GetOrientation());
  83. _victim->ResetAllPowers();
  84. _victim->RemoveArenaSpellCooldowns();
  85. _victim->RemoveAllSpellCooldown();
  86. _victim->CastSpell(_victim, CAMBIO_DE_FASE, false);
  87. return true;
  88. }
  89. private:
  90. Player* _victim;
  91. };
  92. class pvp_island_resurrect_event_pet : public BasicEvent
  93. {
  94. public:
  95. pvp_island_resurrect_event_pet(Player* victim) : _victim(victim) { }
  96. bool Execute(uint64 /*time*/, uint32 /*diff*/)
  97. {
  98. _victim->CastSpell(_victim, SPELL_SUMMON_PET, false); // Summons last used pet
  99. return true;
  100. }
  101. private:
  102. Player* _victim;
  103. };
  104. class pvp_island : public PlayerScript
  105. {
  106. public:
  107. pvp_island() : PlayerScript("pvp_island") { }
  108. uint64 killerGUID;
  109. uint64 victimGUID;
  110. char msg[500];
  111. int32 Getmuertes(Player * player)
  112. {
  113. QueryResult cuenta = CharacterDatabase.PQuery("SELECT muertes FROM racha WHERE guid = '%u'", player->GetGUID());
  114. if (!cuenta)
  115. return 0;
  116. else
  117. {
  118. Field *fields = cuenta->Fetch();
  119. return fields[0].GetUInt32();
  120. }
  121. }
  122. /*int32 Getsanacion(Player * player)
  123. {
  124. QueryResult cuenta2 = CharacterDatabase.PQuery("SELECT sanacion FROM racha_sanacion WHERE guid = '%u'", player->GetGUID());
  125. if (!cuenta2)
  126. return 0;
  127. else
  128. {
  129. Field *fields = cuenta2->Fetch();
  130. return fields[0].GetUInt32();
  131. }
  132. }
  133. int32 Getsanacion2(Player * player)
  134. {
  135. QueryResult cuenta3 = CharacterDatabase.PQuery("SELECT sanacion2 FROM racha_sanacion WHERE guid = '%u'", player->GetGUID());
  136. if (!cuenta3)
  137. return 1;
  138. else
  139. {
  140. Field *fields = cuenta3->Fetch();
  141. return fields[0].GetUInt32();
  142. }
  143. }*/
  144. void OnUpdateZone(Player* player, uint32 newZone, uint32 newArea)
  145. {
  146. if (newArea == AREA_PVP_ISLAND)
  147. {
  148. QueryResult online_en_area = CharacterDatabase.PQuery("SELECT COUNT(area) FROM characters WHERE online = 1 AND area = 368");
  149. Field* fields = online_en_area->Fetch();
  150. uint32 online_area = fields[0].GetUInt16();
  151. ChatHandler(player).PSendSysMessage("En este momento hay %u jugadores en la Zona PvP.", online_area);
  152. }
  153. else if (newArea != AREA_PVP_ISLAND)
  154. CharacterDatabase.PExecute("UPDATE characters SET area=0 WHERE guid='%u'", player->GetGUID());
  155. }
  156. /*void OnPVPHeal(Player* healer, Unit* healed, uint32 healAmount)
  157. {
  158. if (healer->GetAreaId() == AREA_PVP_ISLAND)
  159. {
  160. if (healed->GetAreaId() == AREA_PVP_ISLAND)
  161. {
  162. // Evitar la racha con brujos, guerreros, rogues, dks, hunters y magos (no curan)
  163. if (healer->getClass() == CLASS_WARLOCK ||
  164. healer->getClass() == CLASS_WARRIOR ||
  165. healer->getClass() == CLASS_ROGUE ||
  166. healer->getClass() == CLASS_DEATH_KNIGHT ||
  167. healer->getClass() == CLASS_HUNTER ||
  168. healer->getClass() == CLASS_MAGE)
  169. return;
  170. if (!healed || !healer)
  171. return;
  172. // If it's for example a (bugged) area-heal that also heals enemies we should not count this for the quest
  173. if (!healed->IsFriendlyTo(healer))
  174. return;
  175. if (healed->isPet() || healed->GetTypeId() == TYPEID_PLAYER)
  176. {
  177. int32 sanacion = Getsanacion(healer);
  178. int32 sanacion2 = Getsanacion2(healer);
  179. if (sanacion == 0) //Si el healer lleva 0 de sanacion -> Se hace un replace (como insert into)
  180. QueryResult inicio = CharacterDatabase.PQuery("REPLACE INTO racha_sanacion(guid, sanacion, sanacion2) VALUES ('%u', '%u', 1)", healer->GetGUID(), healAmount);
  181. else //Si el healer lleva algo de sanacion, se hace un update sumando la cantidad
  182. {
  183. QueryResult inicio = CharacterDatabase.PQuery("UPDATE racha_sanacion SET sanacion = sanacion+'%u' WHERE guid='%u'", healAmount, healer->GetGUID());
  184. sanacion++;
  185. }
  186. //Creamos los iconos por faccion
  187. char* icono_healer;
  188. if(healer->GetTeam() == ALLIANCE)
  189. icono_healer = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  190. else
  191. icono_healer = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  192. //Creamos los colores custom
  193. //Colores healer
  194. char* color_healer;
  195. if(healer->getClass() == CLASS_WARRIOR)
  196. color_healer = "|CFFC79C6E";
  197. else if (healer->getClass() == CLASS_DEATH_KNIGHT)
  198. color_healer = "|CFFC41F3B";
  199. else if (healer->getClass() == CLASS_DRUID)
  200. color_healer = "|CFFFF7D0A";
  201. else if (healer->getClass() == CLASS_HUNTER)
  202. color_healer = "|CFFABD473";
  203. else if (healer->getClass() == CLASS_MAGE)
  204. color_healer = "|CFF69CCF0";
  205. else if (healer->getClass() == CLASS_PALADIN)
  206. color_healer = "|CFFF58CBA";
  207. else if (healer->getClass() == CLASS_PRIEST)
  208. color_healer = "|CFFFFFFFF";
  209. else if (healer->getClass() == CLASS_ROGUE)
  210. color_healer = "|CFFFFF569";
  211. else if (healer->getClass() == CLASS_SHAMAN)
  212. color_healer = "|CFF0070DE";
  213. else if (healer->getClass() == CLASS_WARLOCK)
  214. color_healer = "|CFF9482C9";
  215. if(sanacion>=150000 && sanacion2==1)
  216. {
  217. healer->ModifyHonorPoints(+2500);
  218. ChatHandler(healer).PSendSysMessage("Has obtenido |CFF87CEFA2500|r puntos de Honor EXTRA y |CFF87CEFA3|r |CFFff8000[Token Zona PvP]|r por tu racha de sanacion de %u.", sanacion);
  219. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000lleva una racha de sanación de|r |cFFFFD700%u|r |cFFFF0000sin morir!|r", icono_healer, color_healer, healer->GetName(), sanacion);
  220. QueryResult inicio = CharacterDatabase.PQuery("UPDATE racha_sanacion SET sanacion2 = sanacion2+1 WHERE guid='%u'", healer->GetGUID());
  221. healer->AddItem(32569, 3);
  222. }
  223. if(sanacion>=250000 && sanacion2==2)
  224. {
  225. healer->ModifyHonorPoints(+4000);
  226. ChatHandler(healer).PSendSysMessage("Has obtenido |CFF87CEFA4000|r puntos de Honor EXTRA y |CFF87CEFA6|r |CFFff8000[Token Zona PvP]|r por tu racha de sanacion de %u.", sanacion);
  227. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000lleva una racha de sanación de|r |cFFFFD700%u|r |cFFFF0000sin morir!|r", icono_healer, color_healer, healer->GetName(), sanacion);
  228. QueryResult inicio = CharacterDatabase.PQuery("UPDATE racha_sanacion SET sanacion2 = sanacion2+1 WHERE guid='%u'", healer->GetGUID());
  229. healer->AddItem(32569, 6);
  230. }
  231. if(sanacion>=400000 && sanacion2==3)
  232. {
  233. healer->ModifyHonorPoints(+6500);
  234. ChatHandler(healer).PSendSysMessage("Has obtenido |CFF87CEFA6500|r puntos de Honor EXTRA y |CFF87CEFA12|r |CFFff8000[Token Zona PvP]|r por tu racha de sanacion de %u.", sanacion);
  235. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000lleva una racha de sanación de|r |cFFFFD700%u|r |cFFFF0000sin morir!|r", icono_healer, color_healer, healer->GetName(), sanacion);
  236. QueryResult inicio = CharacterDatabase.PQuery("UPDATE racha_sanacion SET sanacion2 = sanacion2+1 WHERE guid='%u'", healer->GetGUID());
  237. healer->AddItem(32569, 12);
  238. }
  239. if(sanacion>=570000 && sanacion2==4)
  240. {
  241. healer->ModifyHonorPoints(+9000);
  242. ChatHandler(healer).PSendSysMessage("Has obtenido |CFF87CEFA9000|r puntos de Honor EXTRA y |CFF87CEFA25|r |CFFff8000[Token Zona PvP]|r por tu racha de sanacion de %u.", sanacion);
  243. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000lleva una racha de sanación de|r |cFFFFD700%u|r |cFFFF0000sin morir!|r", icono_healer, color_healer, healer->GetName(), sanacion);
  244. QueryResult inicio = CharacterDatabase.PQuery("UPDATE racha_sanacion SET sanacion2 = sanacion2+1 WHERE guid='%u'", healer->GetGUID());
  245. healer->AddItem(32569, 25);
  246. }
  247. if(sanacion>=760000 && sanacion2==5)
  248. {
  249. healer->ModifyHonorPoints(+12000);
  250. ChatHandler(healer).PSendSysMessage("Has obtenido |CFF87CEFA12000|r puntos de Honor EXTRA, |CFF87CEFA50|r |CFFff8000[Token Zona PvP]|r por tu racha de sanacion de %u y |CFF87CEFA1|r |CFFff8000[Insignia del Valeroso]|r.", sanacion);
  251. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000lleva una racha de sanación de|r |cFFFFD700%u|r |cFFFF0000sin morir!|r", icono_healer, color_healer, healer->GetName(), sanacion);
  252. QueryResult inicio = CharacterDatabase.PQuery("UPDATE racha_sanacion SET sanacion2 = sanacion2+1 WHERE guid='%u'", healer->GetGUID());
  253. healer->AddItem(32569, 50);
  254. healer->AddItem(15704, 1);
  255. }
  256. }
  257. }
  258. }
  259. }*/
  260. void OnPVPKill(Player * asesino, Player * muerto)
  261. {
  262. if (asesino->GetAreaId() == AREA_PVP_ISLAND)
  263. {
  264. if (muerto->GetAreaId() == AREA_PVP_ISLAND)
  265. {
  266. killerGUID = asesino->GetGUID();
  267. victimGUID = muerto->GetGUID();
  268. Group* killerGroup = asesino->GetGroup();
  269. // If player killed himself, do not execute any code (think of when a warlock uses Hellfire, when player falls to dead, etc.)
  270. if (killerGUID == victimGUID)
  271. {
  272. QueryResult limpiar = CharacterDatabase.PQuery("DELETE FROM racha WHERE guid='%u'", muerto->GetGUID());
  273. //QueryResult limpiar2 = CharacterDatabase.PQuery("DELETE FROM racha_sanacion WHERE guid='%u'", muerto->GetGUID());
  274. muerto->m_Events.AddEvent(new pvp_island_resurrect_event(muerto), muerto->m_Events.CalculateTime(250));
  275. if (muerto->getClass() == CLASS_HUNTER || muerto->getClass() == CLASS_WARLOCK)
  276. muerto->m_Events.AddEvent(new pvp_island_resurrect_event_pet(muerto), muerto->m_Events.CalculateTime(1500));
  277. return;
  278. }
  279. if (killerGUID != victimGUID)
  280. {
  281. if(killerGroup)
  282. {
  283. for(GroupReference* itr = killerGroup->GetFirstMember(); itr != NULL; itr = itr->next())
  284. {
  285. if(itr->getSource()->IsAtGroupRewardDistance(muerto))
  286. {
  287. itr->getSource()->AddItem(32569, 1);
  288. }
  289. }
  290. }
  291. else if(!killerGroup)
  292. asesino->AddItem(32569, 1);
  293. }
  294. // This will cause the victim to be resurrected, teleported and health set to 100% after 1 second of dieing
  295. muerto->m_Events.AddEvent(new pvp_island_resurrect_event(muerto), muerto->m_Events.CalculateTime(250));
  296. // This will cause warlocks and hunters to have their last-used pet to be re-summoned when arriving on the island
  297. if (muerto->getClass() == CLASS_HUNTER || muerto->getClass() == CLASS_WARLOCK)
  298. muerto->m_Events.AddEvent(new pvp_island_resurrect_event_pet(muerto), muerto->m_Events.CalculateTime(1500));
  299. //Creamos los iconos por faccion, asesino
  300. char* icono_asesino;
  301. if(asesino->GetTeam() == ALLIANCE)
  302. icono_asesino = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  303. else
  304. icono_asesino = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  305. //Creamos los iconos por faccion, muerto
  306. char* icono_muerto;
  307. if(muerto->GetTeam() == ALLIANCE)
  308. icono_muerto = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  309. else
  310. icono_muerto = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  311. //Creamos los colores custom
  312. //Colores asesino
  313. char* color_asesino;
  314. if(asesino->getClass() == CLASS_WARRIOR)
  315. color_asesino = "|CFFC79C6E";
  316. else if (asesino->getClass() == CLASS_DEATH_KNIGHT)
  317. color_asesino = "|CFFC41F3B";
  318. else if (asesino->getClass() == CLASS_DRUID)
  319. color_asesino = "|CFFFF7D0A";
  320. else if (asesino->getClass() == CLASS_HUNTER)
  321. color_asesino = "|CFFABD473";
  322. else if (asesino->getClass() == CLASS_MAGE)
  323. color_asesino = "|CFF69CCF0";
  324. else if (asesino->getClass() == CLASS_PALADIN)
  325. color_asesino = "|CFFF58CBA";
  326. else if (asesino->getClass() == CLASS_PRIEST)
  327. color_asesino = "|CFFFFFFFF";
  328. else if (asesino->getClass() == CLASS_ROGUE)
  329. color_asesino = "|CFFFFF569";
  330. else if (asesino->getClass() == CLASS_SHAMAN)
  331. color_asesino = "|CFF0070DE";
  332. else if (asesino->getClass() == CLASS_WARLOCK)
  333. color_asesino = "|CFF9482C9";
  334. //Colores muerto
  335. char* color_muerto;
  336. if(muerto->getClass() == CLASS_WARRIOR)
  337. color_muerto = "|CFFC79C6E";
  338. else if (muerto->getClass() == CLASS_DEATH_KNIGHT)
  339. color_muerto = "|CFFC41F3B";
  340. else if (muerto->getClass() == CLASS_DRUID)
  341. color_muerto = "|CFFFF7D0A";
  342. else if (muerto->getClass() == CLASS_HUNTER)
  343. color_muerto = "|CFFABD473";
  344. else if (muerto->getClass() == CLASS_MAGE)
  345. color_muerto = "|CFF69CCF0";
  346. else if (muerto->getClass() == CLASS_PALADIN)
  347. color_muerto = "|CFFF58CBA";
  348. else if (muerto->getClass() == CLASS_PRIEST)
  349. color_muerto = "|CFFFFFFFF";
  350. else if (muerto->getClass() == CLASS_ROGUE)
  351. color_muerto = "|CFFFFF569";
  352. else if (muerto->getClass() == CLASS_SHAMAN)
  353. color_muerto = "|CFF0070DE";
  354. else if (muerto->getClass() == CLASS_WARLOCK)
  355. color_muerto = "|CFF9482C9";
  356. int32 muertes = Getmuertes(asesino); // Calcula el numero de muertes del asesino
  357. int32 muertes2 = Getmuertes(muerto); //Calcula el numero de muertes del aseseino
  358. /*int32 sanacion = Getsanacion(muerto); //Calcula la sanacion que llevaba el que acaba de morir
  359. int32 sanacion2 = Getsanacion2(muerto);*/ //Calculamos el numero sanacion2 para mayor comprobacion al matar a alguien en racha
  360. if (muertes == 0) //Si el asesino lleva 0 muertes -> Se hace un replace (como insert into)
  361. QueryResult inicio = CharacterDatabase.PQuery("REPLACE INTO racha(guid, muertes) VALUES ('%u', 1)", asesino->GetGUID());
  362. else //Si el asesino lleva alguna muerte, se hace un update sumando una muerte más
  363. {
  364. QueryResult inicio = CharacterDatabase.PQuery("UPDATE racha SET muertes = muertes+1 WHERE guid='%u'", asesino->GetGUID());
  365. muertes++;
  366. }
  367. if (muertes2>0/* || sanacion>0*/) //Si el que es asesinado tiene alguna muerte se le borran
  368. {
  369. QueryResult limpiar = CharacterDatabase.PQuery("DELETE FROM racha WHERE guid='%u'", muerto->GetGUID());
  370. //QueryResult limpiar2 = CharacterDatabase.PQuery("DELETE FROM racha_sanacion WHERE guid='%u'", muerto->GetGUID());
  371. }
  372. if (muertes2>=5 && muertes2<=9) //Si el que es asesinado está en una racha de muertes, se premia al asesino
  373. {
  374. asesino->ModifyHonorPoints(+600);
  375. ChatHandler(asesino).PSendSysMessage("Has acabado con la racha de asesinatos de: %s%s%s|r. Has obtenido |CFF87CEFA600|r puntos de Honor EXTRA y |CFF87CEFA3|r |CFFff8000[Token Zona PvP]|r por matarle.", icono_muerto, color_muerto, muerto->GetName());
  376. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000ha acabado con la racha de asesinatos de|r %s%s%s|r|cFFFF0000!|r", icono_asesino, color_asesino, asesino->GetName(), icono_muerto, color_muerto, muerto->GetName());
  377. asesino->AddItem(32569, 3);
  378. }
  379. if (muertes2>=10 && muertes2<=24) //Si el que es asesinado está en una racha de muertes, se premia al asesino
  380. {
  381. asesino->ModifyHonorPoints(+1200);
  382. ChatHandler(asesino).PSendSysMessage("Has acabado con la racha de asesinatos de: %s%s%s|r. Has obtenido |CFF87CEFA1200|r puntos de Honor EXTRA y |CFF87CEFA7|r |CFFff8000[Token Zona PvP]|r por matarle.", icono_muerto, color_muerto, muerto->GetName());
  383. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000ha acabado con la racha de asesinatos de|r %s%s%s|r|cFFFF0000!|r", icono_asesino, color_asesino, asesino->GetName(), icono_muerto, color_muerto, muerto->GetName());
  384. asesino->AddItem(32569, 7);
  385. }
  386. if (muertes2>=25) //Si el que es asesinado está en una racha de muertes, se premia al asesino
  387. {
  388. asesino->ModifyHonorPoints(+2200);
  389. ChatHandler(asesino).PSendSysMessage("Has acabado con la racha de asesinatos de: %s%s%s|r. Has obtenido |CFF87CEFA2200|r puntos de Honor EXTRA y |CFF87CEFA15|r |CFFff8000[Token Zona PvP]|r por matarle.", icono_muerto, color_muerto, muerto->GetName());
  390. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000ha acabado con la racha de asesinatos de|r %s%s%s|r|cFFFF0000!|r", icono_asesino, color_asesino, asesino->GetName(), icono_muerto, color_muerto, muerto->GetName());
  391. asesino->AddItem(32569, 15);
  392. }
  393. if(muertes>=5) //Si el asesino mata a más de 5 personas inicia la racha 100p de Honor por muerte
  394. {
  395. asesino->ModifyHonorPoints(+150);
  396. asesino->GetSession()->SendAreaTriggerMessage("Llevas una racha de %u asesinatos", muertes);
  397. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000lleva una racha de|r |cFFFFD700%u|r |cFFFF0000asesinatos!|r", icono_asesino, color_asesino, asesino->GetName(), muertes);
  398. }
  399. /*if (sanacion>=50000 && sanacion<100000 && sanacion2<3) //Si el que es asesinado está en una racha de sanacion, se premia al asesino
  400. {
  401. asesino->ModifyHonorPoints(+300);
  402. ChatHandler(asesino).PSendSysMessage("Has acabado la racha de sanacion de: %s%s%s|r. Has obtenido |CFF87CEFA300|r puntos de Honor EXTRA y |CFF87CEFA3|r |CFFff8000[Token Zona PvP]|r por matarle.", icono_muerto, color_muerto, muerto->GetName());
  403. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000ha acabado con la racha de sanación de|r %s%s%s|r|cFFFF0000!|r", icono_asesino, color_asesino, asesino->GetName(), icono_muerto, color_muerto, muerto->GetName());
  404. asesino->AddItem(32569, 3);
  405. }
  406. if (sanacion>=100000 && sanacion<300000 && sanacion2<4) //Si el que es asesinado está en una racha de sanacion, se premia al asesino
  407. {
  408. asesino->ModifyHonorPoints(+300);
  409. ChatHandler(asesino).PSendSysMessage("Has acabado la racha de sanacion de: %s%s%s|r. Has obtenido |CFF87CEFA300|r puntos de Honor EXTRA y |CFF87CEFA5|r |CFFff8000[Token Zona PvP]|r por matarle.", icono_muerto, color_muerto, muerto->GetName());
  410. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000ha acabado con la racha de sanación de|r %s%s%s|r|cFFFF0000!|r", icono_asesino, color_asesino, asesino->GetName(), icono_muerto, color_muerto, muerto->GetName());
  411. asesino->AddItem(32569, 5);
  412. }
  413. if (sanacion>=300000 && sanacion2<7) //Si el que es asesinado está en una racha de sanacion, se premia al asesino
  414. {
  415. asesino->ModifyHonorPoints(+300);
  416. ChatHandler(asesino).PSendSysMessage("Has acabado la racha de sanacion de: %s%s%s|r. Has obtenido |CFF87CEFA300|r puntos de Honor EXTRA y |CFF87CEFA15|r |CFFff8000[Token Zona PvP]|r por matarle.", icono_muerto, color_muerto, muerto->GetName());
  417. sWorld->SendAreaText(368, "|cFFFF0000¡|r%s%s%s |cFFFF0000ha acabado con la racha de sanación de|r %s%s%s|r|cFFFF0000!|r", icono_asesino, color_asesino, asesino->GetName(), icono_muerto, color_muerto, muerto->GetName());
  418. asesino->AddItem(32569, 15);
  419. }*/
  420. switch(muertes) //El asesino recibe Honor e Items por muertes
  421. {
  422. case 5:
  423. asesino->ModifyHonorPoints(+500);
  424. ChatHandler(asesino).PSendSysMessage("Has obtenido |CFF87CEFA500|r puntos de Honor EXTRA y |CFF87CEFA2|r |CFFff8000[Token Zona PvP]|r por tu racha de 5.");
  425. asesino->AddItem(32569, 2);
  426. break;
  427. case 10:
  428. asesino->ModifyHonorPoints(+2000);
  429. ChatHandler(asesino).PSendSysMessage("Has obtenido |CFF87CEFA2000|r puntos de Honor EXTRA y |CFF87CEFA5|r |CFFff8000[Token Zona PvP]|r por tu racha de 10.");
  430. asesino->AddItem(32569, 5);
  431. break;
  432. case 15:
  433. asesino->ModifyHonorPoints(+2500);
  434. ChatHandler(asesino).PSendSysMessage("Has obtenido |CFF87CEFA2500|r puntos de Honor EXTRA y |CFF87CEFA10|r |CFFff8000[Token Zona PvP]|r por tu racha de 15.");
  435. asesino->AddItem(32569, 10);
  436. break;
  437. case 20:
  438. asesino->ModifyHonorPoints(+6000);
  439. ChatHandler(asesino).PSendSysMessage("Has obtenido |CFF87CEFA6000|r puntos de Honor EXTRA y |CFF87CEFA15|r |CFFff8000[Token Zona PvP]|r por tu racha de 20.");
  440. asesino->AddItem(32569, 15);
  441. break;
  442. case 25:
  443. asesino->ModifyHonorPoints(+8000);
  444. ChatHandler(asesino).PSendSysMessage("Has obtenido |CFF87CEFA8000|r puntos de Honor EXTRA y |CFF87CEFA25|r |CFFff8000[Token Zona PvP]|r por tu racha de 25 y |CFF87CEFA1|r |CFFff8000[Insignia del Valeroso]|r.");
  445. asesino->AddItem(32569, 25);
  446. asesino->AddItem(15704, 1);
  447. break;
  448. }
  449. }
  450. }
  451. }
  452. };
  453. class npc_summon_curar_1 : public CreatureScript
  454. {
  455. public:
  456. npc_summon_curar_1() : CreatureScript("npc_summon_curar_1") { }
  457. struct npc_summon_curar_1AI : public ScriptedAI
  458. {
  459. npc_summon_curar_1AI(Creature* creature) : ScriptedAI(creature) { }
  460. uint32 summonTimer_Curar_1;
  461. void Reset()
  462. {
  463. summonTimer_Curar_1 = urand(40000, 70000);
  464. }
  465. void UpdateAI(uint32 uiDiff)
  466. {
  467. if (!curar_1)
  468. {
  469. if(summonTimer_Curar_1<=uiDiff)
  470. {
  471. me->SummonGameObject(GAMEOBJECT_FOOD_1, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  472. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFF00FF00Sanaci""\xC3\xB3""n|R|CFF87CEFA!");
  473. summonTimer_Curar_1 = urand(40000, 70000);
  474. curar_1=true;
  475. }
  476. else summonTimer_Curar_1-=uiDiff;
  477. }
  478. }
  479. };
  480. CreatureAI* GetAI(Creature* creature) const
  481. {
  482. return new npc_summon_curar_1AI(creature);
  483. }
  484. };
  485. class npc_summon_curar_2 : public CreatureScript
  486. {
  487. public:
  488. npc_summon_curar_2() : CreatureScript("npc_summon_curar_2") { }
  489. struct npc_summon_curar_2AI : public ScriptedAI
  490. {
  491. npc_summon_curar_2AI(Creature* creature) : ScriptedAI(creature) { }
  492. uint32 summonTimer_Curar_2;
  493. void Reset()
  494. {
  495. summonTimer_Curar_2 = urand(40000, 70000);
  496. }
  497. void UpdateAI(uint32 uiDiff)
  498. {
  499. if (!curar_2)
  500. {
  501. if(summonTimer_Curar_2<=uiDiff)
  502. {
  503. me->SummonGameObject(GAMEOBJECT_FOOD_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  504. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFF00FF00Sanaci""\xC3\xB3""n|R|CFF87CEFA!");
  505. summonTimer_Curar_2 = urand(40000, 70000);
  506. curar_2=true;
  507. }
  508. else summonTimer_Curar_2-=uiDiff;
  509. }
  510. }
  511. };
  512. CreatureAI* GetAI(Creature* creature) const
  513. {
  514. return new npc_summon_curar_2AI(creature);
  515. }
  516. };
  517. class npc_summon_curar_3 : public CreatureScript
  518. {
  519. public:
  520. npc_summon_curar_3() : CreatureScript("npc_summon_curar_3") { }
  521. struct npc_summon_curar_3AI : public ScriptedAI
  522. {
  523. npc_summon_curar_3AI(Creature* creature) : ScriptedAI(creature) { }
  524. uint32 summonTimer_Curar_3;
  525. void Reset()
  526. {
  527. summonTimer_Curar_3 = urand(40000, 70000);
  528. }
  529. void UpdateAI(uint32 uiDiff)
  530. {
  531. if (!curar_3)
  532. {
  533. if(summonTimer_Curar_3<=uiDiff)
  534. {
  535. me->SummonGameObject(GAMEOBJECT_FOOD_3, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  536. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFF00FF00Sanaci""\xC3\xB3""n|R|CFF87CEFA!");
  537. summonTimer_Curar_3 = urand(40000, 70000);
  538. curar_3=true;
  539. }
  540. else summonTimer_Curar_3-=uiDiff;
  541. }
  542. }
  543. };
  544. CreatureAI* GetAI(Creature* creature) const
  545. {
  546. return new npc_summon_curar_3AI(creature);
  547. }
  548. };
  549. class npc_summon_curar_4 : public CreatureScript
  550. {
  551. public:
  552. npc_summon_curar_4() : CreatureScript("npc_summon_curar_4") { }
  553. struct npc_summon_curar_4AI : public ScriptedAI
  554. {
  555. npc_summon_curar_4AI(Creature* creature) : ScriptedAI(creature) { }
  556. uint32 summonTimer_Curar_4;
  557. void Reset()
  558. {
  559. summonTimer_Curar_4 = urand(40000, 70000);
  560. }
  561. void UpdateAI(uint32 uiDiff)
  562. {
  563. if (!curar_4)
  564. {
  565. if(summonTimer_Curar_4<=uiDiff)
  566. {
  567. me->SummonGameObject(GAMEOBJECT_FOOD_4, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  568. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFF00FF00Sanaci""\xC3\xB3""n|R|CFF87CEFA!");
  569. summonTimer_Curar_4 = urand(40000, 70000);
  570. curar_4=true;
  571. }
  572. else summonTimer_Curar_4-=uiDiff;
  573. }
  574. }
  575. };
  576. CreatureAI* GetAI(Creature* creature) const
  577. {
  578. return new npc_summon_curar_4AI(creature);
  579. }
  580. };
  581. class npc_summon_rabiar_1 : public CreatureScript
  582. {
  583. public:
  584. npc_summon_rabiar_1() : CreatureScript("npc_summon_rabiar_1") { }
  585. struct npc_summon_rabiar_1AI : public ScriptedAI
  586. {
  587. npc_summon_rabiar_1AI(Creature* creature) : ScriptedAI(creature) { }
  588. uint32 summonTimer_Rabiar_1;
  589. void Reset()
  590. {
  591. summonTimer_Rabiar_1 = urand(80000, 170000);
  592. }
  593. void UpdateAI(uint32 uiDiff)
  594. {
  595. if (!rabiar_1)
  596. {
  597. if(summonTimer_Rabiar_1<=uiDiff)
  598. {
  599. me->SummonGameObject(GAMEOBJECT_BERSERKING_1, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  600. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!");
  601. summonTimer_Rabiar_1 = urand(80000, 170000);
  602. rabiar_1=true;
  603. }
  604. else summonTimer_Rabiar_1-=uiDiff;
  605. }
  606. }
  607. };
  608. CreatureAI* GetAI(Creature* creature) const
  609. {
  610. return new npc_summon_rabiar_1AI(creature);
  611. }
  612. };
  613. class npc_summon_rabiar_2 : public CreatureScript
  614. {
  615. public:
  616. npc_summon_rabiar_2() : CreatureScript("npc_summon_rabiar_2") { }
  617. struct npc_summon_rabiar_2AI : public ScriptedAI
  618. {
  619. npc_summon_rabiar_2AI(Creature* creature) : ScriptedAI(creature) { }
  620. uint32 summonTimer_Rabiar_2;
  621. void Reset()
  622. {
  623. summonTimer_Rabiar_2 = urand(80000, 170000);
  624. }
  625. void UpdateAI(uint32 uiDiff)
  626. {
  627. if (!rabiar_2)
  628. {
  629. if(summonTimer_Rabiar_2<=uiDiff)
  630. {
  631. me->SummonGameObject(GAMEOBJECT_BERSERKING_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  632. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!");
  633. summonTimer_Rabiar_2 = urand(80000, 170000);
  634. rabiar_2=true;
  635. }
  636. else summonTimer_Rabiar_2-=uiDiff;
  637. }
  638. }
  639. };
  640. CreatureAI* GetAI(Creature* creature) const
  641. {
  642. return new npc_summon_rabiar_2AI(creature);
  643. }
  644. };
  645. class npc_summon_rabiar_3 : public CreatureScript
  646. {
  647. public:
  648. npc_summon_rabiar_3() : CreatureScript("npc_summon_rabiar_3") { }
  649. struct npc_summon_rabiar_3AI : public ScriptedAI
  650. {
  651. npc_summon_rabiar_3AI(Creature* creature) : ScriptedAI(creature) { }
  652. uint32 summonTimer_Rabiar_3;
  653. void Reset()
  654. {
  655. summonTimer_Rabiar_3 = urand(80000, 170000);
  656. }
  657. void UpdateAI(uint32 uiDiff)
  658. {
  659. if (!rabiar_3)
  660. {
  661. if(summonTimer_Rabiar_3<=uiDiff)
  662. {
  663. me->SummonGameObject(GAMEOBJECT_BERSERKING_3, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  664. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!");
  665. summonTimer_Rabiar_3 = urand(80000, 170000);
  666. rabiar_3 = true;
  667. }
  668. else summonTimer_Rabiar_3-=uiDiff;
  669. }
  670. }
  671. };
  672. CreatureAI* GetAI(Creature* creature) const
  673. {
  674. return new npc_summon_rabiar_3AI(creature);
  675. }
  676. };
  677. class npc_summon_rabiar_4 : public CreatureScript
  678. {
  679. public:
  680. npc_summon_rabiar_4() : CreatureScript("npc_summon_rabiar_4") { }
  681. struct npc_summon_rabiar_4AI : public ScriptedAI
  682. {
  683. npc_summon_rabiar_4AI(Creature* creature) : ScriptedAI(creature) { }
  684. uint32 summonTimer_Rabiar_4;
  685. void Reset()
  686. {
  687. summonTimer_Rabiar_4 = urand(80000, 170000);
  688. }
  689. void UpdateAI(uint32 uiDiff)
  690. {
  691. if (!rabiar_4)
  692. {
  693. if(summonTimer_Rabiar_4<=uiDiff)
  694. {
  695. me->SummonGameObject(GAMEOBJECT_BERSERKING_4, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  696. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!");
  697. summonTimer_Rabiar_4 = urand(80000, 170000);
  698. rabiar_4 = true;
  699. }
  700. else summonTimer_Rabiar_4-=uiDiff;
  701. }
  702. }
  703. };
  704. CreatureAI* GetAI(Creature* creature) const
  705. {
  706. return new npc_summon_rabiar_4AI(creature);
  707. }
  708. };
  709. class npc_summon_rabiar_5 : public CreatureScript
  710. {
  711. public:
  712. npc_summon_rabiar_5() : CreatureScript("npc_summon_rabiar_5") { }
  713. struct npc_summon_rabiar_5AI : public ScriptedAI
  714. {
  715. npc_summon_rabiar_5AI(Creature* creature) : ScriptedAI(creature) { }
  716. uint32 summonTimer_Rabiar_5;
  717. void Reset()
  718. {
  719. summonTimer_Rabiar_5 = urand(80000, 170000);
  720. }
  721. void UpdateAI(uint32 uiDiff)
  722. {
  723. if (!rabiar_5)
  724. {
  725. if(summonTimer_Rabiar_5<=uiDiff)
  726. {
  727. me->SummonGameObject(GAMEOBJECT_BERSERKING_5, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  728. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!");
  729. summonTimer_Rabiar_5 = urand(80000, 170000);
  730. rabiar_5 = true;
  731. }
  732. else summonTimer_Rabiar_5-=uiDiff;
  733. }
  734. }
  735. };
  736. CreatureAI* GetAI(Creature* creature) const
  737. {
  738. return new npc_summon_rabiar_5AI(creature);
  739. }
  740. };
  741. class npc_summon_rabiar_6 : public CreatureScript
  742. {
  743. public:
  744. npc_summon_rabiar_6() : CreatureScript("npc_summon_rabiar_6") { }
  745. struct npc_summon_rabiar_6AI : public ScriptedAI
  746. {
  747. npc_summon_rabiar_6AI(Creature* creature) : ScriptedAI(creature) { }
  748. uint32 summonTimer_Rabiar_6;
  749. void Reset()
  750. {
  751. summonTimer_Rabiar_6 = urand(80000, 170000);
  752. }
  753. void UpdateAI(uint32 uiDiff)
  754. {
  755. if (!rabiar_6)
  756. {
  757. if(summonTimer_Rabiar_6<=uiDiff)
  758. {
  759. me->SummonGameObject(GAMEOBJECT_BERSERKING_6, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  760. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!");
  761. summonTimer_Rabiar_6 = urand(80000, 170000);
  762. rabiar_6 = true;
  763. }
  764. else summonTimer_Rabiar_6-=uiDiff;
  765. }
  766. }
  767. };
  768. CreatureAI* GetAI(Creature* creature) const
  769. {
  770. return new npc_summon_rabiar_6AI(creature);
  771. }
  772. };
  773. class npc_summon_caldero_1 : public CreatureScript
  774. {
  775. public:
  776. npc_summon_caldero_1() : CreatureScript("npc_summon_caldero_1") { }
  777. struct npc_summon_caldero_1AI : public ScriptedAI
  778. {
  779. npc_summon_caldero_1AI(Creature* creature) : ScriptedAI(creature) { }
  780. uint32 summonTimer_Caldero_1;
  781. void Reset()
  782. {
  783. summonTimer_Caldero_1 = urand(120000, 180000);
  784. }
  785. void UpdateAI(uint32 uiDiff)
  786. {
  787. if (!caldero_1)
  788. {
  789. if(summonTimer_Caldero_1<=uiDiff)
  790. {
  791. me->SummonGameObject(GAMEOBJECT_ANCIENT_1, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  792. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un |CFF800080Caldero Ancestral|R|CFF87CEFA!");
  793. summonTimer_Caldero_1 = urand(120000, 180000);
  794. caldero_1=true;
  795. }
  796. else summonTimer_Caldero_1-=uiDiff;
  797. }
  798. }
  799. };
  800. CreatureAI* GetAI(Creature* creature) const
  801. {
  802. return new npc_summon_caldero_1AI(creature);
  803. }
  804. };
  805. class npc_summon_caldero_2 : public CreatureScript
  806. {
  807. public:
  808. npc_summon_caldero_2() : CreatureScript("npc_summon_caldero_2") { }
  809. struct npc_summon_caldero_2AI : public ScriptedAI
  810. {
  811. npc_summon_caldero_2AI(Creature* creature) : ScriptedAI(creature) { }
  812. uint32 summonTimer_Caldero_2;
  813. void Reset()
  814. {
  815. summonTimer_Caldero_2 = urand(120000, 180000);
  816. }
  817. void UpdateAI(uint32 uiDiff)
  818. {
  819. if (!caldero_2)
  820. {
  821. if(summonTimer_Caldero_2<=uiDiff)
  822. {
  823. me->SummonGameObject(GAMEOBJECT_ANCIENT_2, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  824. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un |CFF800080Caldero Ancestral|R|CFF87CEFA!");
  825. summonTimer_Caldero_2 = urand(120000, 180000);
  826. caldero_2=true;
  827. }
  828. else summonTimer_Caldero_2-=uiDiff;
  829. }
  830. }
  831. };
  832. CreatureAI* GetAI(Creature* creature) const
  833. {
  834. return new npc_summon_caldero_2AI(creature);
  835. }
  836. };
  837. class npc_summon_caldero_3 : public CreatureScript
  838. {
  839. public:
  840. npc_summon_caldero_3() : CreatureScript("npc_summon_caldero_3") { }
  841. struct npc_summon_caldero_3AI : public ScriptedAI
  842. {
  843. npc_summon_caldero_3AI(Creature* creature) : ScriptedAI(creature) { }
  844. uint32 summonTimer_Caldero_3;
  845. void Reset()
  846. {
  847. summonTimer_Caldero_3 = urand(120000, 180000);
  848. }
  849. void UpdateAI(uint32 uiDiff)
  850. {
  851. if (!caldero_3)
  852. {
  853. if(summonTimer_Caldero_3<=uiDiff)
  854. {
  855. me->SummonGameObject(GAMEOBJECT_ANCIENT_3, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), me->GetOrientation(), 0);
  856. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""Se ha spawneado un |CFF800080Caldero Ancestral|R|CFF87CEFA!");
  857. summonTimer_Caldero_3 = urand(120000, 180000);
  858. caldero_3=true;
  859. }
  860. else summonTimer_Caldero_3-=uiDiff;
  861. }
  862. }
  863. };
  864. CreatureAI* GetAI(Creature* creature) const
  865. {
  866. return new npc_summon_caldero_3AI(creature);
  867. }
  868. };
  869. class go_powerup_food_1 : public GameObjectScript
  870. {
  871. public:
  872. go_powerup_food_1() : GameObjectScript("go_powerup_food_1") { }
  873. bool OnGossipHello(Player* player, GameObject* go)
  874. {
  875. //Creamos los iconos por faccion
  876. char* icono_jugador;
  877. if(player->GetTeam() == ALLIANCE)
  878. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  879. else
  880. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  881. //Creamos los colores custom
  882. //Colores jugador
  883. char* color_jugador;
  884. if(player->getClass() == CLASS_WARRIOR)
  885. color_jugador = "|CFFC79C6E";
  886. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  887. color_jugador = "|CFFC41F3B";
  888. else if (player->getClass() == CLASS_DRUID)
  889. color_jugador = "|CFFFF7D0A";
  890. else if (player->getClass() == CLASS_HUNTER)
  891. color_jugador = "|CFFABD473";
  892. else if (player->getClass() == CLASS_MAGE)
  893. color_jugador = "|CFF69CCF0";
  894. else if (player->getClass() == CLASS_PALADIN)
  895. color_jugador = "|CFFF58CBA";
  896. else if (player->getClass() == CLASS_PRIEST)
  897. color_jugador = "|CFFFFFFFF";
  898. else if (player->getClass() == CLASS_ROGUE)
  899. color_jugador = "|CFFFFF569";
  900. else if (player->getClass() == CLASS_SHAMAN)
  901. color_jugador = "|CFF0070DE";
  902. else if (player->getClass() == CLASS_WARLOCK)
  903. color_jugador = "|CFF9482C9";
  904. player->CastSpell(player, SPELL_FOOD, false);
  905. go->RemoveFromWorld();
  906. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFF00FF00Sanaci""\xC3\xB3""n|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  907. curar_1=false;
  908. return false;
  909. }
  910. };
  911. class go_powerup_food_2 : public GameObjectScript
  912. {
  913. public:
  914. go_powerup_food_2() : GameObjectScript("go_powerup_food_2") { }
  915. bool OnGossipHello(Player* player, GameObject* go)
  916. {
  917. //Creamos los iconos por faccion
  918. char* icono_jugador;
  919. if(player->GetTeam() == ALLIANCE)
  920. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  921. else
  922. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  923. //Creamos los colores custom
  924. //Colores jugador
  925. char* color_jugador;
  926. if(player->getClass() == CLASS_WARRIOR)
  927. color_jugador = "|CFFC79C6E";
  928. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  929. color_jugador = "|CFFC41F3B";
  930. else if (player->getClass() == CLASS_DRUID)
  931. color_jugador = "|CFFFF7D0A";
  932. else if (player->getClass() == CLASS_HUNTER)
  933. color_jugador = "|CFFABD473";
  934. else if (player->getClass() == CLASS_MAGE)
  935. color_jugador = "|CFF69CCF0";
  936. else if (player->getClass() == CLASS_PALADIN)
  937. color_jugador = "|CFFF58CBA";
  938. else if (player->getClass() == CLASS_PRIEST)
  939. color_jugador = "|CFFFFFFFF";
  940. else if (player->getClass() == CLASS_ROGUE)
  941. color_jugador = "|CFFFFF569";
  942. else if (player->getClass() == CLASS_SHAMAN)
  943. color_jugador = "|CFF0070DE";
  944. else if (player->getClass() == CLASS_WARLOCK)
  945. color_jugador = "|CFF9482C9";
  946. player->CastSpell(player, SPELL_FOOD, false);
  947. go->RemoveFromWorld();
  948. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFF00FF00Sanaci""\xC3\xB3""n|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  949. curar_2=false;
  950. return false;
  951. }
  952. };
  953. class go_powerup_food_3 : public GameObjectScript
  954. {
  955. public:
  956. go_powerup_food_3() : GameObjectScript("go_powerup_food_3") { }
  957. bool OnGossipHello(Player* player, GameObject* go)
  958. {
  959. //Creamos los iconos por faccion
  960. char* icono_jugador;
  961. if(player->GetTeam() == ALLIANCE)
  962. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  963. else
  964. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  965. //Creamos los colores custom
  966. //Colores jugador
  967. char* color_jugador;
  968. if(player->getClass() == CLASS_WARRIOR)
  969. color_jugador = "|CFFC79C6E";
  970. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  971. color_jugador = "|CFFC41F3B";
  972. else if (player->getClass() == CLASS_DRUID)
  973. color_jugador = "|CFFFF7D0A";
  974. else if (player->getClass() == CLASS_HUNTER)
  975. color_jugador = "|CFFABD473";
  976. else if (player->getClass() == CLASS_MAGE)
  977. color_jugador = "|CFF69CCF0";
  978. else if (player->getClass() == CLASS_PALADIN)
  979. color_jugador = "|CFFF58CBA";
  980. else if (player->getClass() == CLASS_PRIEST)
  981. color_jugador = "|CFFFFFFFF";
  982. else if (player->getClass() == CLASS_ROGUE)
  983. color_jugador = "|CFFFFF569";
  984. else if (player->getClass() == CLASS_SHAMAN)
  985. color_jugador = "|CFF0070DE";
  986. else if (player->getClass() == CLASS_WARLOCK)
  987. color_jugador = "|CFF9482C9";
  988. player->CastSpell(player, SPELL_FOOD, false);
  989. go->RemoveFromWorld();
  990. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFF00FF00Sanaci""\xC3\xB3""n|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  991. curar_3=false;
  992. return false;
  993. }
  994. };
  995. class go_powerup_food_4 : public GameObjectScript
  996. {
  997. public:
  998. go_powerup_food_4() : GameObjectScript("go_powerup_food_4") { }
  999. bool OnGossipHello(Player* player, GameObject* go)
  1000. {
  1001. //Creamos los iconos por faccion
  1002. char* icono_jugador;
  1003. if(player->GetTeam() == ALLIANCE)
  1004. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1005. else
  1006. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1007. //Creamos los colores custom
  1008. //Colores jugador
  1009. char* color_jugador;
  1010. if(player->getClass() == CLASS_WARRIOR)
  1011. color_jugador = "|CFFC79C6E";
  1012. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1013. color_jugador = "|CFFC41F3B";
  1014. else if (player->getClass() == CLASS_DRUID)
  1015. color_jugador = "|CFFFF7D0A";
  1016. else if (player->getClass() == CLASS_HUNTER)
  1017. color_jugador = "|CFFABD473";
  1018. else if (player->getClass() == CLASS_MAGE)
  1019. color_jugador = "|CFF69CCF0";
  1020. else if (player->getClass() == CLASS_PALADIN)
  1021. color_jugador = "|CFFF58CBA";
  1022. else if (player->getClass() == CLASS_PRIEST)
  1023. color_jugador = "|CFFFFFFFF";
  1024. else if (player->getClass() == CLASS_ROGUE)
  1025. color_jugador = "|CFFFFF569";
  1026. else if (player->getClass() == CLASS_SHAMAN)
  1027. color_jugador = "|CFF0070DE";
  1028. else if (player->getClass() == CLASS_WARLOCK)
  1029. color_jugador = "|CFF9482C9";
  1030. player->CastSpell(player, SPELL_FOOD, false);
  1031. go->RemoveFromWorld();
  1032. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFF00FF00Sanaci""\xC3\xB3""n|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1033. curar_4=false;
  1034. return false;
  1035. }
  1036. };
  1037. class go_powerup_berserking_1 : public GameObjectScript
  1038. {
  1039. public:
  1040. go_powerup_berserking_1() : GameObjectScript("go_powerup_berserking_1") { }
  1041. bool OnGossipHello(Player* player, GameObject* go)
  1042. {
  1043. //Creamos los iconos por faccion
  1044. char* icono_jugador;
  1045. if(player->GetTeam() == ALLIANCE)
  1046. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1047. else
  1048. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1049. //Creamos los colores custom
  1050. //Colores jugador
  1051. char* color_jugador;
  1052. if(player->getClass() == CLASS_WARRIOR)
  1053. color_jugador = "|CFFC79C6E";
  1054. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1055. color_jugador = "|CFFC41F3B";
  1056. else if (player->getClass() == CLASS_DRUID)
  1057. color_jugador = "|CFFFF7D0A";
  1058. else if (player->getClass() == CLASS_HUNTER)
  1059. color_jugador = "|CFFABD473";
  1060. else if (player->getClass() == CLASS_MAGE)
  1061. color_jugador = "|CFF69CCF0";
  1062. else if (player->getClass() == CLASS_PALADIN)
  1063. color_jugador = "|CFFF58CBA";
  1064. else if (player->getClass() == CLASS_PRIEST)
  1065. color_jugador = "|CFFFFFFFF";
  1066. else if (player->getClass() == CLASS_ROGUE)
  1067. color_jugador = "|CFFFFF569";
  1068. else if (player->getClass() == CLASS_SHAMAN)
  1069. color_jugador = "|CFF0070DE";
  1070. else if (player->getClass() == CLASS_WARLOCK)
  1071. color_jugador = "|CFF9482C9";
  1072. player->CastSpell(player, SPELL_BERSERK, false);
  1073. go->RemoveFromWorld();
  1074. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1075. rabiar_1=false;
  1076. return false;
  1077. }
  1078. };
  1079. class go_powerup_berserking_2 : public GameObjectScript
  1080. {
  1081. public:
  1082. go_powerup_berserking_2() : GameObjectScript("go_powerup_berserking_2") { }
  1083. uint32 DespawnTimer;
  1084. bool OnGossipHello(Player* player, GameObject* go)
  1085. {
  1086. //Creamos los iconos por faccion
  1087. char* icono_jugador;
  1088. if(player->GetTeam() == ALLIANCE)
  1089. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1090. else
  1091. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1092. //Creamos los colores custom
  1093. //Colores jugador
  1094. char* color_jugador;
  1095. if(player->getClass() == CLASS_WARRIOR)
  1096. color_jugador = "|CFFC79C6E";
  1097. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1098. color_jugador = "|CFFC41F3B";
  1099. else if (player->getClass() == CLASS_DRUID)
  1100. color_jugador = "|CFFFF7D0A";
  1101. else if (player->getClass() == CLASS_HUNTER)
  1102. color_jugador = "|CFFABD473";
  1103. else if (player->getClass() == CLASS_MAGE)
  1104. color_jugador = "|CFF69CCF0";
  1105. else if (player->getClass() == CLASS_PALADIN)
  1106. color_jugador = "|CFFF58CBA";
  1107. else if (player->getClass() == CLASS_PRIEST)
  1108. color_jugador = "|CFFFFFFFF";
  1109. else if (player->getClass() == CLASS_ROGUE)
  1110. color_jugador = "|CFFFFF569";
  1111. else if (player->getClass() == CLASS_SHAMAN)
  1112. color_jugador = "|CFF0070DE";
  1113. else if (player->getClass() == CLASS_WARLOCK)
  1114. color_jugador = "|CFF9482C9";
  1115. player->CastSpell(player, SPELL_BERSERK, false);
  1116. go->RemoveFromWorld();
  1117. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1118. rabiar_2=false;
  1119. return false;
  1120. }
  1121. };
  1122. class go_powerup_berserking_3 : public GameObjectScript
  1123. {
  1124. public:
  1125. go_powerup_berserking_3() : GameObjectScript("go_powerup_berserking_3") { }
  1126. bool OnGossipHello(Player* player, GameObject* go)
  1127. {
  1128. //Creamos los iconos por faccion
  1129. char* icono_jugador;
  1130. if(player->GetTeam() == ALLIANCE)
  1131. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1132. else
  1133. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1134. //Creamos los colores custom
  1135. //Colores jugador
  1136. char* color_jugador;
  1137. if(player->getClass() == CLASS_WARRIOR)
  1138. color_jugador = "|CFFC79C6E";
  1139. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1140. color_jugador = "|CFFC41F3B";
  1141. else if (player->getClass() == CLASS_DRUID)
  1142. color_jugador = "|CFFFF7D0A";
  1143. else if (player->getClass() == CLASS_HUNTER)
  1144. color_jugador = "|CFFABD473";
  1145. else if (player->getClass() == CLASS_MAGE)
  1146. color_jugador = "|CFF69CCF0";
  1147. else if (player->getClass() == CLASS_PALADIN)
  1148. color_jugador = "|CFFF58CBA";
  1149. else if (player->getClass() == CLASS_PRIEST)
  1150. color_jugador = "|CFFFFFFFF";
  1151. else if (player->getClass() == CLASS_ROGUE)
  1152. color_jugador = "|CFFFFF569";
  1153. else if (player->getClass() == CLASS_SHAMAN)
  1154. color_jugador = "|CFF0070DE";
  1155. else if (player->getClass() == CLASS_WARLOCK)
  1156. color_jugador = "|CFF9482C9";
  1157. player->CastSpell(player, SPELL_BERSERK, false);
  1158. go->RemoveFromWorld();
  1159. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1160. rabiar_3=false;
  1161. return false;
  1162. }
  1163. };
  1164. class go_powerup_berserking_4 : public GameObjectScript
  1165. {
  1166. public:
  1167. go_powerup_berserking_4() : GameObjectScript("go_powerup_berserking_4") { }
  1168. bool OnGossipHello(Player* player, GameObject* go)
  1169. {
  1170. //Creamos los iconos por faccion
  1171. char* icono_jugador;
  1172. if(player->GetTeam() == ALLIANCE)
  1173. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1174. else
  1175. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1176. //Creamos los colores custom
  1177. //Colores jugador
  1178. char* color_jugador;
  1179. if(player->getClass() == CLASS_WARRIOR)
  1180. color_jugador = "|CFFC79C6E";
  1181. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1182. color_jugador = "|CFFC41F3B";
  1183. else if (player->getClass() == CLASS_DRUID)
  1184. color_jugador = "|CFFFF7D0A";
  1185. else if (player->getClass() == CLASS_HUNTER)
  1186. color_jugador = "|CFFABD473";
  1187. else if (player->getClass() == CLASS_MAGE)
  1188. color_jugador = "|CFF69CCF0";
  1189. else if (player->getClass() == CLASS_PALADIN)
  1190. color_jugador = "|CFFF58CBA";
  1191. else if (player->getClass() == CLASS_PRIEST)
  1192. color_jugador = "|CFFFFFFFF";
  1193. else if (player->getClass() == CLASS_ROGUE)
  1194. color_jugador = "|CFFFFF569";
  1195. else if (player->getClass() == CLASS_SHAMAN)
  1196. color_jugador = "|CFF0070DE";
  1197. else if (player->getClass() == CLASS_WARLOCK)
  1198. color_jugador = "|CFF9482C9";
  1199. player->CastSpell(player, SPELL_BERSERK, false);
  1200. go->RemoveFromWorld();
  1201. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1202. rabiar_4=false;
  1203. return false;
  1204. }
  1205. };
  1206. class go_powerup_berserking_5 : public GameObjectScript
  1207. {
  1208. public:
  1209. go_powerup_berserking_5() : GameObjectScript("go_powerup_berserking_5") { }
  1210. bool OnGossipHello(Player* player, GameObject* go)
  1211. {
  1212. //Creamos los iconos por faccion
  1213. char* icono_jugador;
  1214. if(player->GetTeam() == ALLIANCE)
  1215. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1216. else
  1217. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1218. //Creamos los colores custom
  1219. //Colores jugador
  1220. char* color_jugador;
  1221. if(player->getClass() == CLASS_WARRIOR)
  1222. color_jugador = "|CFFC79C6E";
  1223. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1224. color_jugador = "|CFFC41F3B";
  1225. else if (player->getClass() == CLASS_DRUID)
  1226. color_jugador = "|CFFFF7D0A";
  1227. else if (player->getClass() == CLASS_HUNTER)
  1228. color_jugador = "|CFFABD473";
  1229. else if (player->getClass() == CLASS_MAGE)
  1230. color_jugador = "|CFF69CCF0";
  1231. else if (player->getClass() == CLASS_PALADIN)
  1232. color_jugador = "|CFFF58CBA";
  1233. else if (player->getClass() == CLASS_PRIEST)
  1234. color_jugador = "|CFFFFFFFF";
  1235. else if (player->getClass() == CLASS_ROGUE)
  1236. color_jugador = "|CFFFFF569";
  1237. else if (player->getClass() == CLASS_SHAMAN)
  1238. color_jugador = "|CFF0070DE";
  1239. else if (player->getClass() == CLASS_WARLOCK)
  1240. color_jugador = "|CFF9482C9";
  1241. player->CastSpell(player, SPELL_BERSERK, false);
  1242. go->RemoveFromWorld();
  1243. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1244. rabiar_5=false;
  1245. return false;
  1246. }
  1247. };
  1248. class go_powerup_berserking_6 : public GameObjectScript
  1249. {
  1250. public:
  1251. go_powerup_berserking_6() : GameObjectScript("go_powerup_berserking_6") { }
  1252. bool OnGossipHello(Player* player, GameObject* go)
  1253. {
  1254. //Creamos los iconos por faccion
  1255. char* icono_jugador;
  1256. if(player->GetTeam() == ALLIANCE)
  1257. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1258. else
  1259. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1260. //Creamos los colores custom
  1261. //Colores jugador
  1262. char* color_jugador;
  1263. if(player->getClass() == CLASS_WARRIOR)
  1264. color_jugador = "|CFFC79C6E";
  1265. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1266. color_jugador = "|CFFC41F3B";
  1267. else if (player->getClass() == CLASS_DRUID)
  1268. color_jugador = "|CFFFF7D0A";
  1269. else if (player->getClass() == CLASS_HUNTER)
  1270. color_jugador = "|CFFABD473";
  1271. else if (player->getClass() == CLASS_MAGE)
  1272. color_jugador = "|CFF69CCF0";
  1273. else if (player->getClass() == CLASS_PALADIN)
  1274. color_jugador = "|CFFF58CBA";
  1275. else if (player->getClass() == CLASS_PRIEST)
  1276. color_jugador = "|CFFFFFFFF";
  1277. else if (player->getClass() == CLASS_ROGUE)
  1278. color_jugador = "|CFFFFF569";
  1279. else if (player->getClass() == CLASS_SHAMAN)
  1280. color_jugador = "|CFF0070DE";
  1281. else if (player->getClass() == CLASS_WARLOCK)
  1282. color_jugador = "|CFF9482C9";
  1283. player->CastSpell(player, SPELL_BERSERK, false);
  1284. go->RemoveFromWorld();
  1285. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un Buffo de |CFFFF0000Rabiar|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1286. rabiar_6=false;
  1287. return false;
  1288. }
  1289. };
  1290. class go_powerup_ancient_1 : public GameObjectScript
  1291. {
  1292. public:
  1293. go_powerup_ancient_1() : GameObjectScript("go_powerup_ancient_1") { }
  1294. bool OnGossipHello(Player* player, GameObject* go)
  1295. {
  1296. //Creamos los iconos por faccion
  1297. char* icono_jugador;
  1298. if(player->GetTeam() == ALLIANCE)
  1299. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1300. else
  1301. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1302. //Creamos los colores custom
  1303. //Colores jugador
  1304. char* color_jugador;
  1305. if(player->getClass() == CLASS_WARRIOR)
  1306. color_jugador = "|CFFC79C6E";
  1307. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1308. color_jugador = "|CFFC41F3B";
  1309. else if (player->getClass() == CLASS_DRUID)
  1310. color_jugador = "|CFFFF7D0A";
  1311. else if (player->getClass() == CLASS_HUNTER)
  1312. color_jugador = "|CFFABD473";
  1313. else if (player->getClass() == CLASS_MAGE)
  1314. color_jugador = "|CFF69CCF0";
  1315. else if (player->getClass() == CLASS_PALADIN)
  1316. color_jugador = "|CFFF58CBA";
  1317. else if (player->getClass() == CLASS_PRIEST)
  1318. color_jugador = "|CFFFFFFFF";
  1319. else if (player->getClass() == CLASS_ROGUE)
  1320. color_jugador = "|CFFFFF569";
  1321. else if (player->getClass() == CLASS_SHAMAN)
  1322. color_jugador = "|CFF0070DE";
  1323. else if (player->getClass() == CLASS_WARLOCK)
  1324. color_jugador = "|CFF9482C9";
  1325. ChatHandler handler(player);
  1326. player->CastSpell(player, SPELL_ANCIENT, false);
  1327. player->RemoveArenaSpellCooldowns();
  1328. player->RemoveAllSpellCooldown();
  1329. handler.PSendSysMessage("|CFFFFD700Tiempo de reutilizaci""\xC3\xB3""n de tus habilidades reiniciado.");
  1330. go->RemoveFromWorld();
  1331. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un |CFF800080Caldero Ancestral|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1332. caldero_1=false;
  1333. return false;
  1334. }
  1335. };
  1336. class go_powerup_ancient_2 : public GameObjectScript
  1337. {
  1338. public:
  1339. go_powerup_ancient_2() : GameObjectScript("go_powerup_ancient_2") { }
  1340. bool OnGossipHello(Player* player, GameObject* go)
  1341. {
  1342. //Creamos los iconos por faccion
  1343. char* icono_jugador;
  1344. if(player->GetTeam() == ALLIANCE)
  1345. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1346. else
  1347. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1348. //Creamos los colores custom
  1349. //Colores jugador
  1350. char* color_jugador;
  1351. if(player->getClass() == CLASS_WARRIOR)
  1352. color_jugador = "|CFFC79C6E";
  1353. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1354. color_jugador = "|CFFC41F3B";
  1355. else if (player->getClass() == CLASS_DRUID)
  1356. color_jugador = "|CFFFF7D0A";
  1357. else if (player->getClass() == CLASS_HUNTER)
  1358. color_jugador = "|CFFABD473";
  1359. else if (player->getClass() == CLASS_MAGE)
  1360. color_jugador = "|CFF69CCF0";
  1361. else if (player->getClass() == CLASS_PALADIN)
  1362. color_jugador = "|CFFF58CBA";
  1363. else if (player->getClass() == CLASS_PRIEST)
  1364. color_jugador = "|CFFFFFFFF";
  1365. else if (player->getClass() == CLASS_ROGUE)
  1366. color_jugador = "|CFFFFF569";
  1367. else if (player->getClass() == CLASS_SHAMAN)
  1368. color_jugador = "|CFF0070DE";
  1369. else if (player->getClass() == CLASS_WARLOCK)
  1370. color_jugador = "|CFF9482C9";
  1371. ChatHandler handler(player);
  1372. player->CastSpell(player, SPELL_ANCIENT, false);
  1373. player->RemoveArenaSpellCooldowns();
  1374. player->RemoveAllSpellCooldown();
  1375. handler.PSendSysMessage("|CFFFFD700Tiempo de reutilizaci""\xC3\xB3""n de tus habilidades reiniciado.");
  1376. go->RemoveFromWorld();
  1377. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un |CFF800080Caldero Ancestral|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1378. caldero_2=false;
  1379. return false;
  1380. }
  1381. };
  1382. class go_powerup_ancient_3 : public GameObjectScript
  1383. {
  1384. public:
  1385. go_powerup_ancient_3() : GameObjectScript("go_powerup_ancient_3") { }
  1386. bool OnGossipHello(Player* player, GameObject* go)
  1387. {
  1388. //Creamos los iconos por faccion
  1389. char* icono_jugador;
  1390. if(player->GetTeam() == ALLIANCE)
  1391. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Alliance:18:18|t";
  1392. else
  1393. icono_jugador = "|TInterface\\PVPFrame\\PVP-Currency-Horde:18:18|t";
  1394. //Creamos los colores custom
  1395. //Colores jugador
  1396. char* color_jugador;
  1397. if(player->getClass() == CLASS_WARRIOR)
  1398. color_jugador = "|CFFC79C6E";
  1399. else if (player->getClass() == CLASS_DEATH_KNIGHT)
  1400. color_jugador = "|CFFC41F3B";
  1401. else if (player->getClass() == CLASS_DRUID)
  1402. color_jugador = "|CFFFF7D0A";
  1403. else if (player->getClass() == CLASS_HUNTER)
  1404. color_jugador = "|CFFABD473";
  1405. else if (player->getClass() == CLASS_MAGE)
  1406. color_jugador = "|CFF69CCF0";
  1407. else if (player->getClass() == CLASS_PALADIN)
  1408. color_jugador = "|CFFF58CBA";
  1409. else if (player->getClass() == CLASS_PRIEST)
  1410. color_jugador = "|CFFFFFFFF";
  1411. else if (player->getClass() == CLASS_ROGUE)
  1412. color_jugador = "|CFFFFF569";
  1413. else if (player->getClass() == CLASS_SHAMAN)
  1414. color_jugador = "|CFF0070DE";
  1415. else if (player->getClass() == CLASS_WARLOCK)
  1416. color_jugador = "|CFF9482C9";
  1417. ChatHandler handler(player);
  1418. player->CastSpell(player, SPELL_ANCIENT, false);
  1419. player->RemoveArenaSpellCooldowns();
  1420. player->RemoveAllSpellCooldown();
  1421. handler.PSendSysMessage("|CFFFFD700Tiempo de reutilizaci""\xC3\xB3""n de tus habilidades reiniciado.");
  1422. go->RemoveFromWorld();
  1423. sWorld->SendAreaText(368, "|CFF87CEFA""\xc2\xa1""%s%s%s |CFF87CEFAha utilizado un |CFF800080Caldero Ancestral|R|CFF87CEFA!", icono_jugador, color_jugador, player->GetName());
  1424. caldero_3=false;
  1425. return false;
  1426. }
  1427. };
  1428. class go_piedra_de_hogar : public GameObjectScript
  1429. {
  1430. public:
  1431. go_piedra_de_hogar() : GameObjectScript("go_piedra_de_hogar") { }
  1432. bool OnGossipHello(Player* player, GameObject* go)
  1433. {
  1434. player->RemoveSpellCooldown(8690, true);
  1435. player->CastSpell(player, 8690, false);
  1436. //go->RemoveFromWorld();
  1437. return true;
  1438. }
  1439. };
  1440. class npc_teleport_pvp_island : public CreatureScript
  1441. {
  1442. public:
  1443. npc_teleport_pvp_island() : CreatureScript("npc_teleport_pvp_island") { }
  1444. struct npc_teleport_pvp_islandAI : public ScriptedAI
  1445. {
  1446. npc_teleport_pvp_islandAI(Creature* creature) : ScriptedAI(creature) { }
  1447. void UpdateAI(uint32 diff)
  1448. {
  1449. if (Player* player = me->SelectNearestPlayer(1.0f))
  1450. {
  1451. if (!player || player->IsBeingTeleported() || !player->isAlive() || player->isInCombat())
  1452. return;
  1453. // Prevent Group
  1454. if (Group* group = player->GetGroup())
  1455. {
  1456. if (group->GetMembersCount() > 2)
  1457. ChatHandler(player).PSendSysMessage("Tu grupo no puede tener m""\xC3\xA1""s de 2 miembros en la Zona PvP.");
  1458. group->Disband(true);
  1459. }
  1460. /*player->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP);
  1461. player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);*/
  1462. //player->CastSpell(player, SPELL_SPIRITUAL_IMMUNITY, true);
  1463. int i = urand(0, MAX_PLAYER_SPAWN_POINTS - 1);
  1464. player->TeleportTo(1, playerSpawnPoint[i].GetPositionX(), playerSpawnPoint[i].GetPositionY(), playerSpawnPoint[i].GetPositionZ(), playerSpawnPoint[i].GetOrientation());
  1465. }
  1466. }
  1467. };
  1468. CreatureAI* GetAI(Creature* creature) const
  1469. {
  1470. return new npc_teleport_pvp_islandAI(creature);
  1471. }
  1472. };
  1473. void AddSC_isla_pvp()
  1474. {
  1475. new pvp_island();
  1476. new npc_teleport_pvp_island();
  1477. //NPCs
  1478. new npc_summon_curar_1();
  1479. new npc_summon_curar_2();
  1480. new npc_summon_curar_3();
  1481. new npc_summon_curar_4();
  1482. new npc_summon_rabiar_1();
  1483. new npc_summon_rabiar_2();
  1484. new npc_summon_rabiar_3();
  1485. new npc_summon_rabiar_4();
  1486. new npc_summon_rabiar_5();
  1487. new npc_summon_rabiar_6();
  1488. new npc_summon_caldero_1();
  1489. new npc_summon_caldero_2();
  1490. new npc_summon_caldero_3();
  1491. //GOBs
  1492. new go_powerup_food_1();
  1493. new go_powerup_food_2();
  1494. new go_powerup_food_3();
  1495. new go_powerup_food_4();
  1496. new go_powerup_berserking_1();
  1497. new go_powerup_berserking_2();
  1498. new go_powerup_berserking_3();
  1499. new go_powerup_berserking_4();
  1500. new go_powerup_berserking_5();
  1501. new go_powerup_berserking_6();
  1502. new go_powerup_ancient_1();
  1503. new go_powerup_ancient_2();
  1504. new go_powerup_ancient_3();
  1505. new go_piedra_de_hogar();
  1506. }

fyxi - i4xabier c++ example