Battledale_PRC8/_module/nss/sc_checkgroup.nss
Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

38 lines
816 B
Plaintext

void main()
{
int checknum;
int checkmod;
int result;
int mod;
string resulttext;
string name;
checknum=GetLocalInt(GetModule(),"SKILL_TYPE");
checkmod=GetLocalInt(GetModule(),"ABIL_MOD");
// Do checks
object pc = GetFirstPC();
while (GetIsObjectValid(pc))
{
name=GetPCPlayerName(pc);
if (GetIsDM(pc)== TRUE)
{
name=name;
}
else
{
if (GetSkillRank(checknum, pc) == -1)
{
SendMessageToAllDMs(name + " does not have this skill.");
}
else
{
result=(GetAbilityModifier(checkmod,pc)+ GetSkillRank(checknum,pc)+ d20(1));
resulttext=IntToString(result);
SendMessageToAllDMs(name + " has rolled a " + resulttext + ".");
}
}
pc = GetNextPC();
}
}