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(); } }