-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements all the old pickup scripts
Testsed to make sure they work Tested to make sure existing script works still killing it immedialtely is live accurate, the timer was not accurate
- Loading branch information
1 parent
33f9e9c
commit 37fe935
Showing
19 changed files
with
263 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
set(DSCRIPTS_SOURCES_AI_SPEC | ||
"SpecialImaginePowerupSpawner.cpp" | ||
set(DSCRIPTS_SOURCES_AI_SPEC | ||
"SpecialCoinSpawner.cpp" | ||
"SpecialPowerupSpawner.cpp" | ||
PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIAL10BRONZECOINSPAWNER__H__ | ||
#define __SPECIAL10BRONZECOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special10BronzeCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special10BronzeCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 10; | ||
}; | ||
|
||
#endif //!__SPECIAL10BRONZECOINSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIAL10GOLDCOINSPAWNER__H__ | ||
#define __SPECIAL10GOLDCOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special10GoldCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special10GoldCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 100000; | ||
}; | ||
|
||
#endif //!__SPECIAL10GOLDCOINSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIAL10SILVERCOINSPAWNER__H__ | ||
#define __SPECIAL10SILVERCOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special10SilverCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special10SilverCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 1000; | ||
}; | ||
|
||
#endif //!__SPECIAL10SILVERCOINSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef __SPECIAL1BRONZECOINSPAWNER__H__ | ||
#define __SPECIAL1BRONZECOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special1BronzeCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special1BronzeCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 1; | ||
}; | ||
|
||
#endif //!__SPECIAL1BRONZECOINSPAWNER__H__ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIAL1GOLDCOINSPAWNER__H__ | ||
#define __SPECIAL1GOLDCOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special1GoldCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special1GoldCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 10000; | ||
}; | ||
|
||
#endif //!__SPECIAL1GOLDCOINSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIAL1SILVERCOINSPAWNER__H__ | ||
#define __SPECIAL1SILVERCOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special1SilverCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special1SilverCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 100; | ||
}; | ||
|
||
#endif //!__SPECIAL1SILVERCOINSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIAL25BRONZECOINSPAWNER__H__ | ||
#define __SPECIAL25BRONZECOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special25BronzeCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special25BronzeCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 25; | ||
}; | ||
|
||
#endif //!__SPECIAL25BRONZECOINSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIAL25GOLDCOINSPAWNER__H__ | ||
#define __SPECIAL25GOLDCOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special25GoldCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special25GoldCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 250000; | ||
}; | ||
|
||
#endif //!__SPECIAL25GOLDCOINSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIAL25SILVERCOINSPAWNER__H__ | ||
#define __SPECIAL25SILVERCOINSPAWNER__H__ | ||
|
||
#include "SpecialCoinSpawner.h" | ||
|
||
class Special25SilverCoinSpawner : public SpecialCoinSpawner { | ||
public: | ||
Special25SilverCoinSpawner() : SpecialCoinSpawner(m_currencyDenomination) {}; | ||
private: | ||
static const uint32_t m_currencyDenomination = 2500; | ||
}; | ||
|
||
#endif //!__SPECIAL25SILVERCOINSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef __SPECIALARMORPOWERUPSPAWNER__H__ | ||
#define __SPECIALARMORPOWERUPSPAWNER__H__ | ||
|
||
#include "SpecialPowerupSpawner.h" | ||
|
||
class SpecialArmorPowerupSpawner : public SpecialPowerupSpawner { | ||
public: | ||
SpecialArmorPowerupSpawner() : SpecialPowerupSpawner(m_SkillId) {}; | ||
private: | ||
uint32_t m_SkillId = 80; | ||
}; | ||
|
||
|
||
#endif //!__SPECIALARMORPOWERUPSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "SpecialCoinSpawner.h" | ||
#include "CharacterComponent.h" | ||
|
||
void SpecialCoinSpawner::OnStartup(Entity* self) { | ||
self->SetProximityRadius(1.5f, "powerupEnter"); | ||
} | ||
|
||
void SpecialCoinSpawner::OnProximityUpdate(Entity* self, Entity* entering, const std::string name, const std::string status) { | ||
if (name != "powerupEnter" && status != "ENTER") return; | ||
if (!entering->IsPlayer()) return; | ||
auto character = entering->GetCharacter(); | ||
if (!character) return; | ||
GameMessages::SendPlayFXEffect(self, -1, u"pickup", "", LWOOBJID_EMPTY, 1, 1, true); | ||
character->SetCoins(character->GetCoins() + this->m_currencyDenomination, eLootSourceType::LOOT_SOURCE_CURRENCY); | ||
self->Smash(entering->GetObjectID(), eKillType::SILENT); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
#include "CppScripts.h" | ||
|
||
class SpecialCoinSpawner : public CppScripts::Script { | ||
public: | ||
SpecialCoinSpawner(uint32_t CurrencyDenomination) { | ||
m_currencyDenomination = CurrencyDenomination; | ||
}; | ||
void OnStartup(Entity* self) override; | ||
void OnProximityUpdate(Entity* self, Entity* entering, const std::string name, const std::string status) override; | ||
private: | ||
int32_t m_currencyDenomination = 0; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
#pragma once | ||
#include "CppScripts.h" | ||
#ifndef __SPECIALIMAGINEPOWERUPSPAWNER__H__ | ||
#define __SPECIALIMAGINEPOWERUPSPAWNER__H__ | ||
|
||
class SpecialImaginePowerupSpawner final : public CppScripts::Script | ||
{ | ||
#include "SpecialPowerupSpawner.h" | ||
|
||
class SpecialImaginePowerupSpawner : public SpecialPowerupSpawner { | ||
public: | ||
void OnStartup(Entity* self) override; | ||
void OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) override; | ||
SpecialImaginePowerupSpawner() : SpecialPowerupSpawner(m_SkillId) {}; | ||
private: | ||
uint32_t m_SkillId = 13; | ||
}; | ||
|
||
#endif //!__SPECIALIMAGINEPOWERUPSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIALIMAGINEPOWERUPSPAWNER2PT__H__ | ||
#define __SPECIALIMAGINEPOWERUPSPAWNER2PT__H__ | ||
|
||
#include "SpecialPowerupSpawner.h" | ||
|
||
class SpecialImaginePowerupSpawner2pt : public SpecialPowerupSpawner { | ||
public: | ||
SpecialImaginePowerupSpawner2pt() : SpecialPowerupSpawner(m_SkillId) {}; | ||
private: | ||
uint32_t m_SkillId = 129; | ||
}; | ||
|
||
#endif //!__SPECIALIMAGINEPOWERUPSPAWNER2PT__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __SPECIALLIFEPOWERUPSPAWNER__H__ | ||
#define __SPECIALLIFEPOWERUPSPAWNER__H__ | ||
|
||
#include "SpecialPowerupSpawner.h" | ||
|
||
class SpecialLifePowerupSpawner : public SpecialPowerupSpawner { | ||
public: | ||
SpecialLifePowerupSpawner() : SpecialPowerupSpawner(m_SkillId) {}; | ||
private: | ||
uint32_t m_SkillId = 5; | ||
}; | ||
|
||
#endif //!__SPECIALLIFEPOWERUPSPAWNER__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
#include "CppScripts.h" | ||
|
||
class SpecialPowerupSpawner : public CppScripts::Script { | ||
public: | ||
SpecialPowerupSpawner(uint32_t skillId) { | ||
m_SkillId = skillId; | ||
}; | ||
void OnStartup(Entity* self) override; | ||
void OnProximityUpdate(Entity* self, Entity* entering, std::string name, std::string status) override; | ||
private: | ||
uint32_t m_SkillId = 0; | ||
}; |