Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Scripts: Add a ballon skip script
Browse files Browse the repository at this point in the history
  • Loading branch information
AriDEV3 committed Nov 30, 2023
1 parent ce2771d commit 790baef
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/server/scripts/Pandaria/zone_wandering_island.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@
#include "Player.h"
#include "Spell.h"

const Position ballonPos1 = { 1081.4185, 4796.375, 157.66225 };
class npc_hot_air_balloon : public CreatureScript
{
public:
npc_hot_air_balloon() : CreatureScript("npc_hot_air_balloon") { }

struct npc_hot_air_balloonAI : public CreatureAI
{
npc_hot_air_balloonAI(Creature* creature) : CreatureAI(creature) { }

void OnSpellClick(Unit* Clicker, bool& /*result*/) OVERRIDE
{
if (Creature* vehicle = me->SummonCreature(55649, me->GetHomePosition(), TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, 1000))
{
//Clicker->ToPlayer()->EnterVehicle(vehicle, 0);
//vehicle->GetMotionMaster()->MovePoint(0, ballonPos1);

// TODO: ballon vehicle changes areas and zone ids...
// and we get ejected at every area change.
// use a teleport to ballons endpos instead for now
Clicker->NearTeleportTo(744.496f, 3664.6455f, 193.9989f, 0.0f);
Clicker->ToPlayer()->KilledMonsterCredit(56378);
Clicker->ToPlayer()->KilledMonsterCredit(55939);

}
}
};
CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_hot_air_balloonAI(creature);
}
};

const Position masterShangXiWoodsPos1 = { 871.0573f, 4460.548f, 241.33667f };
const Position masterShangXiWoodsPos2 = { 868.00696f, 4464.8384f, 241.60161f };
const Position masterShangXiWoodsPos3 = { 869.67883f, 4467.752f, 241.66815f };
Expand Down Expand Up @@ -1873,6 +1906,7 @@ class npc_aysa_cloudsinger : public CreatureScript

void AddSC_wandering_island()
{
new npc_hot_air_balloon();
new npc_master_shang_xi_wood_of_staves();
new npc_guardian_of_the_elders();
new npc_master_shang_xi_worthy_questgiver();
Expand Down

0 comments on commit 790baef

Please sign in to comment.