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.
This commit is contained in:
37
_module/nss/sc_checkgroup.nss
Normal file
37
_module/nss/sc_checkgroup.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user