69 lines
1.6 KiB
Plaintext
69 lines
1.6 KiB
Plaintext
//Determines the price of a henchman based on character level.
|
|
//Not perfectly balanced, but somewhat working.
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetPCSpeaker();
|
|
|
|
if (GetHitDice(oPC) <= 2)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 200);
|
|
SetLocalInt(oPC, "hench_equipment", 1);
|
|
}
|
|
else if (GetHitDice(oPC) <= 5)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 600);
|
|
SetLocalInt(oPC, "hench_equipment", 2);
|
|
}
|
|
else if (GetHitDice(oPC) <= 10)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 1000);
|
|
SetLocalInt(oPC, "hench_equipment", 3);
|
|
}
|
|
else if (GetHitDice(oPC) <= 15)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 3500);
|
|
SetLocalInt(oPC, "hench_equipment", 4);
|
|
}
|
|
else if (GetHitDice(oPC) <= 20)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 6000);
|
|
SetLocalInt(oPC, "hench_equipment", 5);
|
|
}
|
|
else if (GetHitDice(oPC) <= 25)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 12000);
|
|
SetLocalInt(oPC, "hench_equipment", 6);
|
|
}
|
|
else if (GetHitDice(oPC) <= 30)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 20000);
|
|
SetLocalInt(oPC, "hench_equipment", 7);
|
|
}
|
|
else if (GetHitDice(oPC) <= 35)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 30000);
|
|
SetLocalInt(oPC, "hench_equipment", 8);
|
|
}
|
|
else if (GetHitDice(oPC) <= 39)
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 40000);
|
|
SetLocalInt(oPC, "hench_equipment", 9);
|
|
}
|
|
else
|
|
{
|
|
SetLocalInt(oPC, "hench_pay", 50000);
|
|
SetLocalInt(oPC, "hench_equipment", 10);
|
|
}
|
|
|
|
|
|
//Make the henchman cost always 2500 gold
|
|
SetLocalInt(oPC, "hench_pay", 2500);
|
|
|
|
//Convert the price to string and set custom token to allow PC to be informed of the price in the conversation
|
|
int price = GetLocalInt(oPC, "hench_pay");
|
|
SetCustomToken(969,IntToString(price));
|
|
|
|
}
|
|
|