Last active
January 12, 2019 11:18
-
-
Save syminical/f89388bd4a32a0bf09194d6547d7d474 to your computer and use it in GitHub Desktop.
Aura Christmas Weather Event
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
//--- Aura Script------------------------------------- | |
// Collect fire elementals | |
//--- Description------------------------------------------- | |
// Allows people to make mass elementals | |
//---------------------------------------------------- | |
public class Collect10FireElementalsQuestScript : QuestScript { | |
public override void Load() { | |
SetId(410100); | |
SetScrollId(70023); | |
SetName("Collect Fire Elementals"); | |
SetDescription("Collect 10 fire elementals to create a massive fire elemental."); | |
SetType(QuestType.Collect); | |
SetIcon(QuestIcon.Collect); | |
if (IsEnabled("QuestViewRenewal")) SetCategory(QuestCategory.Event); | |
AddObjective("collect", L("fire elementals"), 0, 0, 0, Collect(62006, 10)); | |
AddReward(Item(62009)); | |
} | |
} |
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
//--- Aura Script------------------------------------- | |
// Collect ice elementals | |
//--- Description------------------------------------------- | |
// Allows people to make mass elementals | |
//---------------------------------------------------- | |
public class Collect10IceElementalsQuestScript : QuestScript { | |
public override void Load() { | |
SetId(410101); | |
SetScrollId(70023); | |
SetName(L("Collect Ice Elementals")); | |
SetDescription("Collect 10 ice elementals to create a massive ice elemental."); | |
SetType(QuestType.Collect); | |
SetIcon(QuestIcon.Collect); | |
if (IsEnabled("QuestViewRenewal")) SetCategory(QuestCategory.Event); | |
AddObjective("collect", "ice elementals", 0, 0, 0, Collect(62007, 10)); | |
AddReward(Item(62010)); | |
} | |
} |
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
//--- Aura Script------------------------------------ | |
// Winter Angel 2nd title coupon | |
//--- Description------------------------------------------ | |
// Activates the 2nd title | |
//--------------------------------------------------- | |
[ItemScript(75712)] | |
public class WinterAngelCouponItemScript : ItemScript { | |
public override void OnUse(Creature creature, Item item, string parameter) { | |
if (creature.Titles.IsUsable(15000)) return; | |
else { | |
creature.Titles.Enable(15000); | |
creature.RemoveItem(75712); | |
} | |
} | |
} |
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
//--- Aura Script------------------------------------ | |
// If it snows on christmas 2nd title coupon | |
//--- Description------------------------------------------ | |
// Activates the 2nd title | |
//--------------------------------------------------- | |
[ItemScript(75713)] | |
public class SnowsOnChristmasCouponItemScript : ItemScript { | |
public override void OnUse(Creature creature, Item item, string parameter) { | |
if (creature.Titles.IsUsable(15001)) return; | |
else { | |
creature.Titles.Enable(15001); | |
creature.RemoveItem(75713); | |
} | |
} | |
} |
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
//--- Aura Script------------------------------------ | |
// I Hope it rains on christmas 2nd title coupon | |
//--- Description---------=====---------------------------- | |
// Activates the 2nd title | |
//--------------------------------------------------- | |
[ItemScript(75714)] | |
public class RainsOnChristmasCouponItemScript : ItemScript { | |
public override void OnUse(Creature creature, Item item, string parameter) { | |
if (creature.Titles.IsUsable(15002)) return; | |
else { | |
creature.Titles.Enable(15002); | |
creature.RemoveItem(75714); | |
} | |
} | |
} |
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
//--- Aura Script --------------------------- | |
// Christmas Weather Event | |
//--- Description --------------------------------- | |
// Snow / Rain collection event | |
//------------------------------------------- | |
public class CWEventScript : GameEventScript { | |
public override void Load() { | |
SetId("aura_CW_event"); | |
SetName("Christmas Weather"); | |
} | |
public override void AfterLoad() { | |
ScheduleEvent(DateTime.Parse("2016-12-11 00:00"), DateTime.Parse("2016-12-23 00:00"));//set event length | |
} | |
} | |
public class CWIntroScript : QuestScript { | |
public override void Load() { | |
SetId(410000); | |
SetName("Nao's Call"); | |
SetDescription("Please meet with me at the top of Spiral Hill. - Nao -"); | |
SetCancelable(true); | |
if (IsEnabled("QuestViewRenewal")) SetCategory(QuestCategory.Event); | |
SetReceive(Receive.Automatically); | |
AddPrerequisite(EventActive("aura_CW_event")); | |
AddObjective("meet_CW_Nao", "Meet with Nao", 16, 26158, 25067, Talk("Nao")); | |
AddReward(Exp(10000)); | |
AddHook("_Nao", "after_intro", MeetNao); | |
} | |
public async Task<HookResult> MeetNao(NpcScript npc, params object[] args) { | |
if (npc.QuestActive(this.Id, "meet_CW_Nao")) { | |
npc.Msg("Thank you for meeting me, <username/>."); | |
npc.Msg("I'll get right to it...<br/>As you know, Christmas will be upon us soon and I have a special gift for you.<br/>I'm tired of hearing people complain about the weather this time of year, so I'm letting you choose.<br/>If there were to be precipitation, would you rather it be rain or snow?", npc.Button("Rain", "@Rain"), npc.Button("Snow", "@Snow"), npc.Button("Is this a joke?", "@Joke")); | |
npc.Player.Vars.Perm["CW_choice"] = await npc.Select(); | |
if (npc.Player.Vars.Perm["CW_choice"] == "@Joke") { | |
npc.Msg("*giggles*<br/><br/>...", npc.Button("Rain", "@Rain"), npc.Button("Snow", "@Snow")); | |
npc.Player.Vars.Perm["CW_choice"] = await npc.Select(); | |
} | |
npc.Msg("Interesting choice..."); | |
npc.Msg("Unfortunately, it's not that simple.<br/>I need your help to make sure this happens..."); | |
npc.Msg("Don't look at me like that! This is totally legit I swear!<br/>Just pretend you're on a secret mission, ok? It'll be fun, I promise..."); | |
npc.Msg("Listen closely, <username/>.<br/>Down there, on the other side of the road you'll find some sprites in the field.<br/>Your mission is to bring me 10 massive elementals. You can handle that, right?"); | |
npc.Msg("Before you go, take this special gear.<br/>Make sure you wear that uniform at all times... *giggle*<br/>If you bring me a branch, an elemental, and some magic powder I can create a special tool.<br/>It would allow you to harvest directly from a sprite."); | |
if (npc.Player.Vars.Perm["CW_choice"] == "@Rain") {//tried to get teh nao look but she has fancy fabrics | |
//trudy rain robe | |
npc.GiveItem(new Item(new DropData(itemId: 19014, chance: 100, color1: 0x282828, color2: 0x6e6a56, color3: 0x0a0a0a))); | |
} else { | |
//nathane snow mountain coat | |
npc.GiveItem(new Item(new DropData(itemId: 19020, chance: 100, color1: 0x282828, color2: 0x6e6a56, color3: 0x0a0a0a))); | |
} | |
npc.FinishQuest(this.Id, "meet_CW_Nao"); | |
return HookResult.Break; | |
} | |
return HookResult.Continue; | |
} | |
} | |
public class CWMissionScript : QuestScript { | |
public override void Load() { | |
SetId(410001); | |
SetName("Secret Mission"); | |
SetDescription("Deliver 10 mass elementals to Nao."); | |
SetCancelable(true); | |
if (IsEnabled("QuestViewRenewal")) SetCategory(QuestCategory.Event); | |
SetReceive(Receive.Automatically); | |
AddPrerequisite(And(EventActive("aura_CW_event"),Completed(410000))); | |
AddObjective("CW_delivery", "deliver massive elementals", 16, 26158, 25067, Talk("Nao")); | |
AddReward(Exp(100000)); | |
} | |
} | |
public class CWMission2Script : QuestScript { | |
public override void Load() { | |
SetId(410002); | |
SetName("Keep on Giving"); | |
SetDescription("The best keep giving."); | |
SetCancelable(true); | |
if (IsEnabled("QuestViewRenewal")) SetCategory(QuestCategory.Event); | |
SetReceive(Receive.Automatically); | |
AddPrerequisite(And(EventActive("aura_CW_event"), Completed(410001))); | |
AddObjective("CW_meetNao", "talk with Nao", 16, 26158, 25067, Talk("Nao")); | |
AddObjective("CW_delivery", "deliver massive elementals", 16, 26158, 25067, Talk("Nao")); | |
AddReward(Exp(100000)); | |
AddHook("_Nao", "after_intro", MeetNao); | |
} | |
public async Task<HookResult> MeetNao(NpcScript npc, params object[] args) { | |
if (npc.QuestActive(this.Id, "CW_meetNao")) { | |
npc.Msg("It's nice to see you again, <username/>."); | |
npc.Msg("You did a really good job with the last mission.<br/>I actually need some more elementals though.<br/>How 'bout it? I'll make it worth your time."); | |
npc.Msg("I only need a few more massive elementals.<br/>...<br/>About 20 should do."); | |
npc.Msg("*giggles*"); | |
npc.FinishQuest(this.Id, "CW_meetNao"); | |
return HookResult.Break; | |
} | |
return HookResult.Continue; | |
} | |
} |
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
//--- Aura Script------------------------------- | |
// Christmas Weather Event Field Bosses | |
//--- Description-------------------------------------- | |
// Spawns fire sprites every 5 min for the event | |
//---------------------------------------------------- | |
public class CWFireFieldBossScript : FieldBossBaseScript { | |
protected override bool ShouldSpawn() { | |
return IsEventActive("aura_CW_event"); | |
} | |
protected override SpawnInfo GetNextSpawn() { | |
var spawn = new SpawnInfo(); | |
spawn.BossName = "Fire Sprite"; | |
spawn.LocationName = ("Battlefield North"); | |
spawn.Location = new Location(16, 15968, 26349); | |
spawn.Time = DateTime.Now.AddMinutes(5); | |
spawn.LifeSpan = TimeSpan.FromMinutes(2); | |
return spawn; | |
} | |
protected override void OnSpawnBosses() { | |
//Sprite Flock | |
SpawnBoss(80202, 0, 0); | |
SpawnBoss(80202, 250, 0); | |
SpawnBoss(80202, 200, 200); | |
SpawnBoss(80202, 0, 250); | |
SpawnBoss(80202, -200, 200); | |
SpawnBoss(80202, -250, 0); | |
SpawnBoss(80202, -200, -200); | |
SpawnBoss(80202, 0, -250); | |
SpawnBoss(80202, 200, -200); | |
BossNotice("{0} has appeared at {1}!", Spawn.BossName, Spawn.LocationName); | |
} | |
protected override void OnBossDied(Creature boss, Creature killer) { | |
BossNotice("{0} has defeated {1} that appeared at {2}!", killer.Name, Spawn.BossName, Spawn.LocationName); | |
} | |
} |
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
//--- Aura Script------------------------------- | |
// Christmas Weather Event Field Bosses | |
//--- Description-------------------------------------- | |
// Spawns fire sprites every 5 min for the event | |
//---------------------------------------------------- | |
public class CWIceFieldBossScript : FieldBossBaseScript { | |
protected override bool ShouldSpawn() { | |
return IsEventActive("aura_CW_event"); | |
} | |
protected override SpawnInfo GetNextSpawn() { | |
var spawn = new SpawnInfo(); | |
spawn.BossName = "Ice Sprite"; | |
spawn.LocationName = ("Battlefield South"); | |
spawn.Location = new Location(16, 15929, 22083); | |
spawn.Time = DateTime.Now.AddMinutes(5); | |
spawn.LifeSpan = TimeSpan.FromMinutes(2); | |
return spawn; | |
} | |
protected override void OnSpawnBosses() { | |
//Sprite Flock | |
SpawnBoss(80203, 0, 0); | |
SpawnBoss(80203, 250, 0); | |
SpawnBoss(80203, 200, 200); | |
SpawnBoss(80203, 0, 250); | |
SpawnBoss(80203, -200, 200); | |
SpawnBoss(80203, -250, 0); | |
SpawnBoss(80203, -200, -200); | |
SpawnBoss(80203, 0, -250); | |
SpawnBoss(80203, 200, -200); | |
BossNotice("{0} has appeared at {1}!", Spawn.BossName, Spawn.LocationName); | |
} | |
protected override void OnBossDied(Creature boss, Creature killer) { | |
BossNotice("{0} has defeated {1} that appeared at {2}!", killer.Name, Spawn.BossName, Spawn.LocationName); | |
} | |
} |
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
//--- Aura Script --------------------------- | |
// Nao | |
//--- Description --------------------------------- | |
// Nao script for Christmas Weather event | |
//------------------------------------------- | |
public class NaoCWScript : NpcScript { | |
public override void Load() { | |
SetRace(1); | |
SetName("_Nao"); | |
if (IsEventActive("aura_CW_event")) SetLocation(16, 26158, 25067, 132); | |
AddPhrase("..."); | |
AddPhrase("...which would I pick..."); | |
AddPhrase("Are they alright?"); | |
AddPhrase("It's too foggy to see them..."); | |
} | |
protected override async Task Talk() { | |
SetBgm("Nao_talk.mp3"); | |
await Intro("A beautiful girl in a black dress with intricate patterns.<br/>Her deep azure blue eyes remind everyone of an endless blue sea full of mystique.<br/>With her pale skin and her distinctively sublime silhouette, she seems as if she belongs in another world."); | |
if (QuestActive(410001) || QuestActive(410002)) { | |
Msg("Hello... <username/><br/><br/>How is the mission going?", Button("Craft Harvesting Tool", "@Wand"), Button("Elemental Delivery", "@Delivery"), Button("Shop", "@Shop"), Button("End Chat", "@End")); | |
switch(await Select()) { | |
case "@Wand": | |
if (HasItem(52001, 1) && HasItem(62004, 1) && (HasItem(62006, 1) || HasItem(62007, 1))) { | |
Msg("...<br/><br/>LETS DO THIS!"); | |
Msg("..."); | |
Msg("It is done..."); | |
Msg("..."); | |
Msg("If anyone asks... you did not get this from me."); | |
var wand = new Item(52005);//small blue gem placeholder | |
if (Player.Vars.Perm["CW_choice"] == "@Rain") { | |
wand = (new Item(new DropData(itemId: 40724, chance: 100, color1: 0x000000, color2: 0x000000, color3: 0x000000))); | |
RemoveItem(62006, 1);//fire elemental | |
} else { | |
wand = (new Item(new DropData(itemId: 40725, chance: 100, color1: 0x000000, color2: 0x000000, color3: 0x000000))); | |
RemoveItem(62007, 1);//ice elemental | |
} | |
RemoveItem(52001, 1);//branches | |
RemoveItem(62004, 1);//magic powder (dungeon reward) | |
wand.Durability = 1000; | |
wand.OptionInfo.DurabilityMax = 1000; | |
GiveItem(wand);//fancy 1 dura ice/fire wand | |
} else Msg("Everything has its price, <username/>.<br/><br/>...<br/><br/>Come back when you have an elemental, branches, and some magic powder."); | |
break; | |
case "@Delivery": | |
if (QuestActive(410001)) { | |
if (HasItem(62009, 10) || HasItem(62010, 10)) { | |
Msg("Awesome! Nice job <username/>!!"); | |
Msg("..."); | |
Msg("...<br/><br/>..."); | |
Msg("*sigh*<br/>Ok, I can't actually change the weather all over Uladh just for you.<br/>How would that even work if everyone gets to choose?<br/>Seriously, how did you believe I could make everyone happy at the same time??"); | |
Msg("*giggle*<br/>I can actually give you something better!<br/>How about your own personal cloud?<br/>It's soo cute!!"); | |
Msg("Merry Christmas, <username/>."); | |
switch((string)Player.Vars.Perm["CW_choice"]) { | |
case "@Rain": | |
RemoveItem(62009, 10);//mass. fire elem. | |
GiveItem(75714);//i hope it rains 2nd title coupon | |
break; | |
case "@Snow": | |
RemoveItem(62010, 10);//mass. ice elem. | |
GiveItem(75713);//if it snows on christmas 2nd title coupon | |
break; | |
} | |
FinishQuest(410001, "CW_delivery"); | |
} else Msg("...<br/><br/>I need 10 mass elementals, <username/>. Don't you want this to happen?"); | |
} else { | |
var choice = Player.Vars.Perm["CW_choice"]; | |
if ((HasItem(62009, 20) && choice == "@Rain") || (HasItem(62010, 20) && choice == "@Snow")) { | |
Msg("..."); | |
Msg("wow"); | |
Msg("You are amazing, <username/>!<br/>Your determination is impressive."); | |
Msg("...<br/><br/>You've done so much for me <username/>, you're like my Christmas Angel.<br/><br/>*giggle*"); | |
switch((string)choice) { | |
case "@Rain": | |
RemoveItem(62009, 20);//mass. fire elem. | |
break; | |
case "@Snow": | |
RemoveItem(62010, 20);//mass. ice elem. | |
break; | |
} | |
GiveItem(75712);//winter angel 2nd title coupon | |
FinishQuest(410002, "CW_delivery"); | |
} else Msg("I know I'm asking for a lot, but I need 20 massive elementals."); | |
} | |
break; | |
case "@Shop": | |
Msg("<br/>..."); | |
OpenShop("CWNaoShop"); | |
return; | |
case "@End": | |
break; | |
} | |
} else { | |
Msg("the world is quiet here, <username/>"); | |
} | |
End(); | |
} | |
} | |
public class CWNaoShop : NpcShopScript { | |
public override void Setup() { | |
AddQuest("Quest", 410100, 0); //mass fire elemental | |
AddQuest("Quest", 410101, 0); //mass ice elemental | |
} | |
} |
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
// Aura | |
// Database file | |
//----------------------------- | |
[ | |
//Custom | |
//----------------------------- | |
{ id: 80202, name: "CW Fire Sprite", group: "elemental/none", tags: "/elemental/firesprite/not_swallow/", gender: 0, vehicleType: 0, runSpeedFactor: 1, state: 0x80000000, invWidth: 6, invHeight: 10, attackMinBase: 10, attackMaxBase: 26, attackMinBaseMod: 0, attackMaxBaseMod: 0, injuryMinBase: 2, injuryMaxBase: 15, injuryMinBaseMod: 0, injuryMaxBaseMod: 0, range: 150, attackSpeed: 2, knockCount: 2, criticalBase: 40, criticalBaseMod: 0, balanceBase: 40, balanceBaseMod: 0, splashRadius: 180, splashAngle: 60, splashDamage: 0, stand: 0x03, ai: "firesprite", color1: 0x808080, color2: 0x808080, color3: 0x808080, sizeMin: 0.8, sizeMax: 1.2, level: 18, str: 10, int: 10, dex: 10, will: 10, luck: 10, cp: 1097.0, life: 450, mana: 350, stamina: 500, elementPhysical: 6, elementLightning: 0, elementFire: 3, elementIce: 0, exp: 700, goldMin: 100, goldMax: 300, drops: [{itemId: 62006, chance: 50}], skills: [{skillId: 20001, rank: "F"}, {skillId: 23001, rank: "8"}, {skillId: 23002, rank: "F"}, {skillId: 23003, rank: "A"}, {skillId: 23004, rank: "7"}, {skillId: 23005, rank: "A"}, {skillId: 30201, rank: "6"}] }, | |
{ id: 80203, name: "CW Ice Sprite", group: "elemental/none", tags: "/elemental/icesprite/not_swallow/", gender: 0, vehicleType: 0, runSpeedFactor: 1, state: 0x80000000, invWidth: 6, invHeight: 10, attackMinBase: 10, attackMaxBase: 26, attackMinBaseMod: 0, attackMaxBaseMod: 0, injuryMinBase: 2, injuryMaxBase: 15, injuryMinBaseMod: 0, injuryMaxBaseMod: 0, range: 150, attackSpeed: 2, knockCount: 2, criticalBase: 40, criticalBaseMod: 0, balanceBase: 40, balanceBaseMod: 0, splashRadius: 180, splashAngle: 60, splashDamage: 0, stand: 0x03, ai: "icesprite", color1: 0x808080, color2: 0x808080, color3: 0x808080, sizeMin: 0.8, sizeMax: 1.2, level: 18, str: 10, int: 10, dex: 10, will: 10, luck: 10, cp: 1097.0, life: 450, mana: 350, stamina: 500, elementPhysical: 6, elementLightning: 0, elementFire: 0, elementIce: 3, exp: 700, goldMin: 100, goldMax: 300, drops: [{itemId: 62007, chance: 50}], skills: [{skillId: 20001, rank: "F"}, {skillId: 23001, rank: "A"}, {skillId: 23002, rank: "F"}, {skillId: 23003, rank: "A"}, {skillId: 23004, rank: "7"}, {skillId: 23005, rank: "9"}, {skillId: 30301, rank: "6"}] }, | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment