// TMW2 script
// Author:
// Jesusalva
// Description:
// Magic Olympics
001-14,91,90,0 script #MOLY_Sign00 NPC_NO_SPRITE,{
dispbottom l("Welcome to Porthos - The Town of Portals (Kaizei's æther / Moubootaur Legends)");
end;
OnInit:
.distance=2;
end;
}
// FIXME
001-14,88,27,0 script Hocus#MOLY1200 NPC_BLACKWIZARD,{
npctalk l("Icicle Challenge");
end;
OnInit:
.distance=7;
end;
}
// FIXME
001-14,111,42,0 script Hocus#MOLY0100 NPC_BLACKWIZARD,{
if (gettimetick(2) < @moly_tick) end;
mes ".:: " + l("Energy Ball Challenge") + ":: .";
mes l("The goal is simple - I'll spawn an energy ball and you must kill it quickly. You'll be disqualified if you equip a non-magical weapon at any time.");
dnext;
mes l("You'll have 60 seconds to kill as many balls as you can!");
mesc l("NOTE: Beside wands and staves, %s, %s, and the %s count as magic weapons.", getitemlink(Judgement), getitemlink(DarkPulsar), getitemlink(Lightbringer));
mes "";
mesc l("Your progress thus far: %s sparks", fnum(FYMOLY_ENBALL)), 3;
next;
mesc l("Begin campaign?"), 1;
if (askyesno() == ASK_NO) close;
@moly_tick = gettimetick(2) + 60;
@moly_score = 0;
.m$=getmap();
@map$=getmap();
.@m=areamonster(.m$, 108, 43, 118, 48, "Target", YellowSpark, 1, "Hocus#MOLY0100::OnClick");
setunitdata(.@m, UDT_HP, 1);
setunitdata(.@m, UDT_MAXHP, 1);
setunitdata(.@m, UDT_LEVEL, 1);
setunitdata(.@m, UDT_SPEED, 60);
npctalk3 l("Countdown: 1 minute");
addtimer 2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck";
initnpctimer;
closeclientdialog;
close;
OnTimer15000:
npctalk "45 seconds";
end;
OnTimer30000:
npctalk "30 seconds";
end;
OnTimer45000:
npctalk "15 seconds";
end;
OnTimer55000:
npctalk col("5 seconds", 1);
end;
OnTimer60000:
killmonsterall(.m$);
maptimer2(.m$, 10, "Hocus#MOLY0100::OnEnd");
npctalk col("Time out!", 1);
stopnpctimer;
end;
OnClick:
if (gettimetick(2) > @moly_tick) end;
@moly_score+=1;
.@m=areamonster(@map$, 108, 43, 118, 48, "Target", YellowSpark, 1, "Hocus#MOLY0100::OnClick");
setunitdata(.@m, UDT_HP, 1);
setunitdata(.@m, UDT_MAXHP, 1);
setunitdata(.@m, UDT_LEVEL, 1);
setunitdata(.@m, UDT_SPEED, 60);
end;
OnCheck:
if (gettimetick(2) > @moly_tick) end;
.@wp = getequipid(EQI_HAND_R);
if (.@wp < 1) addtimer(2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck");
if (.@wp != Judgement &&
.@wp != DarkPulsar &&
.@wp != Lightbringer &&
getiteminfo(.@wp, ITEMINFO_SUBTYPE) != W_STAFF) {
@moly_score = -1;
@moly_tick = 0;
dispbottom col(l("You have been disqualified - illegal weapon: %s", getitemname(.@wp)), 1);
stopnpctimer;
end;
}
addtimer 2000, instance_npcname("Hocus#MOLY0100")+"::OnCheck";
end;
OnEnd:
dispbottom l("End! Score this time: %d", @moly_score);
FYMOLY_ENBALL = max(FYMOLY_ENBALL, @moly_score);
@moly_score = 0;
end;
OnInit:
.distance=7;
.m$="001-14";
end;
}
001-14,135,61,0 script Hocus#MOLY0200 NPC_BLACKWIZARD,{
mes ".:: " + l("Intensive Mage Challenge") + ":: .";
mes l("Description: Use a lot of magic spells, regardless of type or raw strength. Points earned by skill level.");
mesc l("Note: Passives and some skills (e.g. Resync) doesn't count."), 1;
mes "";
mesc l("Your progress thus far: %s skills casted", fnum(FYMOLY_SPAMMY)), 3;
close;
OnInit:
.distance=7;
end;
}
// FIXME
001-14,139,85,0 script Hocus#MOLY0300 NPC_BLACKWIZARD,{
npctalk l("Fluffy Hunter Challenge");
end;
OnInit:
.distance=7;
end;
}
// Note: Do player knows any chants?
001-14,135,117,0 script Hocus#MOLY0400 NPC_BLACKWIZARD,{
mes ".:: " + l("Chanting Challenge") + ":: .";
mes l("Description: Use chant-based magic. All chants score equally.");
mes "";
mesc l("Your progress thus far: %s chants casted", fnum(FYMOLY_CHANTI)), 3;
close;
OnInit:
.distance=7;
end;
}
001-14,119,135,0 script Hocus#MOLY0500 NPC_NICHOLAS,{
mes ".:: " + l("Alchemy Master Challenge") + ":: .";
mes l("Description: Whoever crafts more potions, regardless of type, wins this event.");
mes "";
mesc l("Your progress thus far: %s potions baked", fnum(FYMOLY_ALCHMY)), 3;
next;
// FREE brewing during event
do {
mesc l("What will you brew today?");
mes "";
if (AlchemySystem(CRAFT_PLAYER)) {
mesc l("Success!"), 3;
} else {
mesc l("That didn't work!"), 1;
}
next;
mesc l("Try again?");
} while (askyesno() == ASK_YES);
close;
OnInit:
.distance=7;
end;
}
// FIXME
001-14,88,139,0 script Hocus#MOLY0600 NPC_BLACKWIZARD,{
npctalk l("Ent Challenge");
end;
OnInit:
.distance=7;
end;
}
001-14,54,133,0 script Hocus#MOLY0700 NPC_BLACKWIZARD,{
mes ".:: " + l("Mana Experience Challenge") + ":: .";
mes l("Description: Similar to Intensive Mage, but measures mana experience - meaning even less skills will count, and swapping skills give a better effect.");
mes "";
mesc l("Your progress thus far: %s exp earned", fnum(FYMOLY_MANAXP)), 3;
close;
OnInit:
.distance=7;
end;
}
// FIXME
001-14,39,114,0 script Hocus#MOLY0800 NPC_BLACKWIZARD,{
npctalk l("Maze Race Challenge");
end;
OnInit:
.distance=7;
end;
}
// FIXME
001-14,37,84,0 script Hocus#MOLY0900 NPC_BLACKWIZARD,{
npctalk l("Hocus Said So Challenge");
end;
OnInit:
.distance=7;
end;
}
// FIXME
001-14,41,46,0 script Hocus#MOLY1000 NPC_BLACKWIZARD,{
npctalk l("Survival Challenge");
end;
OnInit:
.distance=7;
end;
}
001-14,62,37,0 script Hocus#MOLY1100 NPC_BLACKWIZARD,{
mes ".:: " + l("Friendship's Strength Challenge") + ":: .";
mes l("Description: Use support skills and win the event with the power of FRIENDSHIP!");
mesc l("Note: Support skills used on self does not count."), 1;
mes "";
mesc l("Your progress thus far: %s friends supported", fnum(FYMOLY_FRIEND)), 3;
close;
OnInit:
.distance=7;
end;
}