// TMW2 scripts.
// Author:
// Saulc
// Variables:
// 0 CandorQuest_Eistein
// Description:
// Eistein rewards players for getting level landmarks.
003-2,35,34,0 script Eistein NPC_UKAR,{
// Level, Reward
function is_level {
if (BaseLevel >= getarg(0)) {
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Congrats you passed the level cap of @@! Here is a(n) @@, you deserve it.",getarg(0), getitemlink(getarg(1)));
getitem getarg(1),1;
setq TulimsharQuest_Eistein, getq(TulimsharQuest_Eistein)+1;
close;
} else {
speech S_FIRST_BLANK_LINE,
l("You are level @@/@@. Keep building levels, you need them!", BaseLevel, getarg(0));
close;
}
}
function quest_open {
.@q = getq(TulimsharQuest_Eistein);
switch (.@q) {
case 0:
is_level(25, BronzeGift); break;
case 1:
is_level(50, GraduationCap); break;
case 2:
is_level(75, SilverGift); break;
case 3:
is_level(100, GoldenGift); break;
case 4:
is_level(125, PrismGift); break;
case 5:
is_level(150, SupremeGift); break;
default:
mesn;
mesq l("Waw, you are level @@! Many congratulations. If there were people like you, ukarania wouldn't have been destroyed...", BaseLevel);
break;
}
speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
l("Ah, welcome. Please, don't be afraid of my look, Saulc GM assigned me to here."),
l("I'm Eistein, survivor from Ukarania. I reward brave adventurers who kill monsters, which plague our lands."),
l("I'll give you a reward, in the name of Saulc, once you reach the following levels: 25, 50, 75, 100, 125 and 150.");
do
{
select
l("Interesting! can I be rewarded for my help?"),
l("Quit");
switch (@menu) {
case 1:
quest_open;
break;
}
} while (@menu != 2);
closedialog;
goodbye;
close;
OnInit:
.@npcId = getnpcid(0, .name$);
setunitdata(.@npcId, UDT_HEADTOP, GraduationCap);
setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
npcsit;
.sex = G_MALE;
.distance = 4;
end;
}