221 lines
7.3 KiB
Plaintext
221 lines
7.3 KiB
Plaintext
|
|
|
|
|
|
void main()
|
|
{
|
|
|
|
// initialise objects
|
|
|
|
object oPC = GetLastUsedBy();
|
|
object oMod = GetModule();
|
|
|
|
// initialise variables
|
|
|
|
int iSwitch;
|
|
int iTotalDealt;
|
|
int iTotalTaken;
|
|
int iAv1, iAv2, iAv3, iAv4, iAv5, iAv6, iAv7, iAv8, iAv9, iAv10;
|
|
|
|
float fPerc1, fPerc2, fPerc3, fPerc4, fPerc5, fPerc6, fPerc7, fPerc8,
|
|
fPerc9, fPerc10;
|
|
|
|
string sTotalDealt;
|
|
string sTotalTaken;
|
|
string SpeakText;
|
|
|
|
if (GetLocalInt(oMod, "mod_mode")==1)
|
|
{
|
|
PlaySound("sim_cntresist");
|
|
FloatingTextStringOnCreature
|
|
("*** Not used in campaign manager mode ***", oPC);
|
|
return;
|
|
}
|
|
// calculate monster hit %
|
|
|
|
if (GetLocalInt(oMod, "notime2_ss")!=0)
|
|
{fPerc1 = (IntToFloat(GetLocalInt(oMod, "notime2_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "notime2_ss"))) * 100.0;
|
|
iAv1 = FloatToInt(fPerc1);}
|
|
else
|
|
{iAv1 = 0;}
|
|
if (GetLocalInt(oMod, "notime1_ss")!=0)
|
|
{fPerc2 = (IntToFloat(GetLocalInt(oMod, "notime1_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "notime1_ss"))) * 100.0;
|
|
iAv2 = FloatToInt(fPerc2);}
|
|
else
|
|
{iAv2 = 0;}
|
|
if (GetLocalInt(oMod, "boss002_ss")!=0)
|
|
{fPerc3 = (IntToFloat(GetLocalInt(oMod, "boss002_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "boss002_ss"))) * 100.0;
|
|
iAv3 = FloatToInt(fPerc3);}
|
|
else
|
|
{iAv3 = 0;}
|
|
if (GetLocalInt(oMod, "beli2_ss")!=0)
|
|
{fPerc4 = (IntToFloat(GetLocalInt(oMod, "beli2_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "beli2_ss"))) * 100.0;
|
|
iAv4 = FloatToInt(fPerc4);}
|
|
else
|
|
{iAv4 = 0;}
|
|
if (GetLocalInt(oMod, "pwar3_ss")!=0)
|
|
{fPerc5 = (IntToFloat(GetLocalInt(oMod, "pwar3_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "pwar3_ss"))) * 100.0;
|
|
iAv5 = FloatToInt(fPerc5);}
|
|
else
|
|
{iAv5 = 0;}
|
|
if (GetLocalInt(oMod, "hdrag2_ss")!=0)
|
|
{fPerc6 = (IntToFloat(GetLocalInt(oMod, "hdrag2_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "hdrag2_ss"))) * 100.0;
|
|
iAv6 = FloatToInt(fPerc6);}
|
|
else
|
|
{iAv6 = 0;}
|
|
if (GetLocalInt(oMod, "pfiend2_ss")!=0)
|
|
{fPerc7 = (IntToFloat(GetLocalInt(oMod, "pfiend2_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "pfiend2_ss"))) * 100.0;
|
|
iAv7 = FloatToInt(fPerc7);}
|
|
else
|
|
{iAv7 = 0;}
|
|
if (GetLocalInt(oMod, "horod2_ss")!=0)
|
|
{fPerc8 = (IntToFloat(GetLocalInt(oMod, "horod2_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "horod2_ss"))) * 100.0;
|
|
iAv8 = FloatToInt(fPerc8);}
|
|
else
|
|
{iAv8 = 0;}
|
|
if (GetLocalInt(oMod, "div2_ss")!=0)
|
|
{fPerc9 = (IntToFloat(GetLocalInt(oMod, "div2_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "div2_ss"))) * 100.0;
|
|
iAv9 = FloatToInt(fPerc9);}
|
|
else
|
|
{iAv9 = 0;}
|
|
if (GetLocalInt(oMod, "dragon2_ss")!=0)
|
|
{fPerc10 = (IntToFloat(GetLocalInt(oMod, "dragon2_hh")) /
|
|
IntToFloat(GetLocalInt(oMod, "dragon2_ss"))) * 100.0;
|
|
iAv10 = FloatToInt(fPerc10);}
|
|
else
|
|
{iAv10 = 0;}
|
|
|
|
// generate monster stat strings
|
|
|
|
string sDam1 = IntToString(GetLocalInt(oMod, "notime2_dd"));
|
|
string sTak1 = IntToString(GetLocalInt(oMod, "notime2_dt"))+" / "+IntToString(iAv1)+"% / "+IntToString(GetLocalInt(oMod, "notime2_k"))+GetLocalString(oMod, "notime2_x");
|
|
string sDam2 = IntToString(GetLocalInt(oMod, "notime1_dd"));
|
|
string sTak2 = IntToString(GetLocalInt(oMod, "notime1_dt"))+" / "+IntToString(iAv2)+"% / "+IntToString(GetLocalInt(oMod, "notime1_k"))+GetLocalString(oMod, "notime1_x");
|
|
string sDam3 = IntToString(GetLocalInt(oMod, "boss002_dd"));
|
|
string sTak3 = IntToString(GetLocalInt(oMod, "boss002_dt"))+" / "+IntToString(iAv3)+"% / "+IntToString(GetLocalInt(oMod, "boss002_k"))+GetLocalString(oMod, "boss002_x");
|
|
string sDam4 = IntToString(GetLocalInt(oMod, "beli2_dd"));
|
|
string sTak4 = IntToString(GetLocalInt(oMod, "beli2_dt"))+" / "+IntToString(iAv4)+"% / "+IntToString(GetLocalInt(oMod, "beli2_k"))+GetLocalString(oMod, "beli2_x");
|
|
string sDam5 = IntToString(GetLocalInt(oMod, "pwar3_dd"));
|
|
string sTak5 = IntToString(GetLocalInt(oMod, "pwar3_dt"))+" / "+IntToString(iAv5)+"% / "+IntToString(GetLocalInt(oMod, "pwar3_k"))+GetLocalString(oMod, "pwar3_x");
|
|
string sDam6 = IntToString(GetLocalInt(oMod, "hdrag2_dd"));
|
|
string sTak6 = IntToString(GetLocalInt(oMod, "hdrag2_dt"))+" / "+IntToString(iAv6)+"% / "+IntToString(GetLocalInt(oMod, "hdrag2_k"))+GetLocalString(oMod, "hdrag2_x");
|
|
string sDam7 = IntToString(GetLocalInt(oMod, "pfiend2_dd"));
|
|
string sTak7 = IntToString(GetLocalInt(oMod, "pfiend2_dt"))+" / "+IntToString(iAv7)+"% / "+IntToString(GetLocalInt(oMod, "pfiend2_k"))+GetLocalString(oMod, "pfiend2_x");
|
|
string sDam8 = IntToString(GetLocalInt(oMod, "horod2_dd"));
|
|
string sTak8 = IntToString(GetLocalInt(oMod, "horod2_dt"))+" / "+IntToString(iAv8)+"% / "+IntToString(GetLocalInt(oMod, "horod2_k"))+GetLocalString(oMod, "horod2_x");
|
|
string sDam9 = IntToString(GetLocalInt(oMod, "div2_dd"));
|
|
string sTak9 = IntToString(GetLocalInt(oMod, "div2_dt"))+" / "+IntToString(iAv9)+"% / "+IntToString(GetLocalInt(oMod, "div2_k"))+GetLocalString(oMod, "div2_x");
|
|
string sDam10 =IntToString(GetLocalInt(oMod, "dragon2_dd"));
|
|
string sTak10 =IntToString(GetLocalInt(oMod, "dragon2_dt"))+" / "+IntToString(iAv10)+"% / "+IntToString(GetLocalInt(oMod, "dragon2_k"))+GetLocalString(oMod, "dragon2_x");
|
|
|
|
|
|
|
|
PlaySound("gui_select");
|
|
|
|
iTotalDealt = GetLocalInt(oMod, "div2_dd")+
|
|
GetLocalInt(oMod, "dragon2_dd")+
|
|
GetLocalInt(oMod, "horod2_dd")+
|
|
GetLocalInt(oMod, "pfiend2_dd")+
|
|
GetLocalInt(oMod, "hdrag2_dd")+
|
|
GetLocalInt(oMod, "pwar3_dd")+
|
|
GetLocalInt(oMod, "beli2_dd")+
|
|
GetLocalInt(oMod, "boss002_dd")+
|
|
GetLocalInt(oMod, "notime1_dd")+
|
|
GetLocalInt(oMod, "notime2_dd");
|
|
|
|
iTotalTaken = GetLocalInt(oMod, "div2_dd")+
|
|
GetLocalInt(oMod, "dragon2_dt")+
|
|
GetLocalInt(oMod, "horod2_dt")+
|
|
GetLocalInt(oMod, "pfiend2_dt")+
|
|
GetLocalInt(oMod, "hdrag2_dt")+
|
|
GetLocalInt(oMod, "pwar3_dt")+
|
|
GetLocalInt(oMod, "beli2_dt")+
|
|
GetLocalInt(oMod, "boss002_dt")+
|
|
GetLocalInt(oMod, "notime1_dt")+
|
|
GetLocalInt(oMod, "notime2_dt");
|
|
|
|
sTotalDealt = IntToString(iTotalDealt);
|
|
sTotalTaken = IntToString(iTotalTaken);
|
|
|
|
SpeakText;
|
|
iSwitch = GetLocalInt(oPC, "luciferdead");
|
|
|
|
if (iSwitch==1)
|
|
{
|
|
|
|
SpeakText = "\nDamage: Dealt/Taken / Accuracy / Kills\n ";
|
|
SpeakText += "---------------------------\n";
|
|
SpeakText += "Tyriel ";
|
|
SpeakText += sDam1;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak1;
|
|
SpeakText += "\n";
|
|
SpeakText += "Thor ";
|
|
SpeakText += sDam2;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak2;
|
|
SpeakText += "\n";
|
|
SpeakText += "Elk King ";
|
|
SpeakText += sDam3;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak3;
|
|
SpeakText += "\n";
|
|
SpeakText += "Shiva ";
|
|
SpeakText += sDam4;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak4;
|
|
SpeakText += "\n";
|
|
SpeakText += "Shogun Lord ";
|
|
SpeakText += sDam5;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak5;
|
|
SpeakText += "\n";
|
|
SpeakText += "Soul Warrior ";
|
|
SpeakText += sDam6;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak6;
|
|
SpeakText += "\n";
|
|
SpeakText += "Guardian Angel ";
|
|
SpeakText += sDam7;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak7;
|
|
SpeakText += "\n";
|
|
SpeakText += "Horodrim Archmage ";
|
|
SpeakText += sDam8;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak8;
|
|
SpeakText += "\n";
|
|
SpeakText += "Divine Archer ";
|
|
SpeakText += sDam9;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak9;
|
|
SpeakText += "\n";
|
|
SpeakText += "Gold Dragon ";
|
|
SpeakText += sDam10;
|
|
SpeakText += " / ";
|
|
SpeakText += sTak10;
|
|
//SpeakText += "\n---------------------------\n";
|
|
SpeakText += "\nTOTAL DAMAGE: ";
|
|
SpeakText += sTotalDealt;
|
|
SpeakText += " / ";
|
|
SpeakText += sTotalTaken;
|
|
|
|
|
|
SpeakString(SpeakText);
|
|
}
|
|
else
|
|
{
|
|
PlaySound("sim_cntresist");
|
|
FloatingTextStringOnCreature
|
|
("*** Not activated until the [Holy War] feature is unlocked ***", oPC);
|
|
}
|
|
}
|