//onenter item and charcheck
void main()
{
//making it onenter script
object oPC = GetEnteringObject();
/* Get's the first item in players inventory */
object oItem = GetFirstItemInInventory(oPC);
/* Players armor class */
int iAC = GetAC(oPC);
/* Players hit points */
int iHP = GetCurrentHitPoints(oPC);
/* Players ability scores */
int iStr = GetAbilityScore(oPC, ABILITY_STRENGTH);
int iDex = GetAbilityScore(oPC, ABILITY_DEXTERITY);
int iWis = GetAbilityScore(oPC, ABILITY_WISDOM);
int iInt = GetAbilityScore(oPC, ABILITY_INTELLIGENCE);
int iCon = GetAbilityScore(oPC, ABILITY_CONSTITUTION);
int iCha = GetAbilityScore(oPC, ABILITY_CHARISMA);
/* Players saving throws */
int iFort = GetFortitudeSavingThrow(oPC);
int iRefl = GetReflexSavingThrow(oPC);
int iWill = GetWillSavingThrow(oPC);
/* Players skills */
int iSkill_1 = GetSkillRank(SKILL_ANIMAL_EMPATHY, oPC);
int iSkill_2 = GetSkillRank(SKILL_APPRAISE, oPC);
int iSkill_3 = GetSkillRank(SKILL_BLUFF, oPC);
int iSkill_4 = GetSkillRank(SKILL_CONCENTRATION, oPC);
int iSkill_5 = GetSkillRank(SKILL_CRAFT_ARMOR, oPC);
int iSkill_6 = GetSkillRank(SKILL_CRAFT_TRAP, oPC);
int iSkill_7 = GetSkillRank(SKILL_CRAFT_WEAPON, oPC);
int iSkill_8 = GetSkillRank(SKILL_DISABLE_TRAP, oPC);
int iSkill_9 = GetSkillRank(SKILL_DISCIPLINE, oPC);
int iSkill_10 = GetSkillRank(SKILL_HEAL, oPC);
int iSkill_11 = GetSkillRank(SKILL_HIDE, oPC);
int iSkill_12 = GetSkillRank(SKILL_INTIMIDATE, oPC);
int iSkill_13 = GetSkillRank(SKILL_LISTEN, oPC);
int iSkill_14 = GetSkillRank(SKILL_LORE, oPC);
int iSkill_15 = GetSkillRank(SKILL_MOVE_SILENTLY, oPC);
int iSkill_16 = GetSkillRank(SKILL_OPEN_LOCK, oPC);
int iSkill_17 = GetSkillRank(SKILL_PARRY, oPC);
int iSkill_18 = GetSkillRank(SKILL_PERFORM, oPC);
int iSkill_19 = GetSkillRank(SKILL_PERSUADE, oPC);
int iSkill_20 = GetSkillRank(SKILL_PICK_POCKET, oPC);
int iSkill_21 = GetSkillRank(SKILL_SEARCH, oPC);
int iSkill_22 = GetSkillRank(SKILL_SET_TRAP, oPC);
int iSkill_23 = GetSkillRank(SKILL_SPELLCRAFT, oPC);
int iSkill_24 = GetSkillRank(SKILL_SPOT, oPC);
int iSkill_25 = GetSkillRank(SKILL_TAUNT, oPC);
int iSkill_26 = GetSkillRank(SKILL_TUMBLE, oPC);
int iSkill_27 = GetSkillRank(SKILL_USE_MAGIC_DEVICE, oPC);
/* Players and items flag states */
int iPCPlot = GetPlotFlag(oPC);
int iPCImmortal = GetImmortal(oPC);
int iStolenItems = GetStolenFlag(oItem);
int iPlotItems = GetPlotFlag(oItem);
/* Get's how many times an item is stacked in players inventory */
int iItemsNumStacked = GetNumStackedItems(oItem);
/* Check for unwanted properties on items when a player enters the area */
int iItemPropertyType_1 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_BONUS_FEAT);
int iItemPropertyType_2 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION);
int iItemPropertyType_3 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY);
int iItemPropertyType_4 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DARKVISION);
int iItemPropertyType_5 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE);
int iItemPropertyType_6 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS);
int iItemPropertyType_7 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL);
int iItemPropertyType_8 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL);
int iItemPropertyType_9 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL);
int iItemPropertyType_10 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION);
int iItemPropertyType_11 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_KEEN);
int iItemPropertyType_12 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_MIND_BLANK);
int iItemPropertyType_13 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_MONSTER_DAMAGE);
int iItemPropertyType_14 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_NO_DAMAGE);
int iItemPropertyType_15 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION);
int iItemPropertyType_16 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC);
int iItemPropertyType_17 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_SPECIAL_WALK);
int iItemPropertyType_18 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_TRAP);
int iItemPropertyType_19 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_TURN_RESISTANCE);
int iItemPropertyType_20 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP);
int iItemPropertyType_21 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE);
int iItemPropertyType_22 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP);
int iItemPropertyType_23 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT);
int iItemPropertyType_24 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE);
int iItemPropertyType_25 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ARCANE_SPELL_FAILURE);
int iItemPropertyType_26 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE);
int iItemPropertyType_27 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_AC);
int iItemPropertyType_28 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS);
int iItemPropertyType_29 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC);
int iItemPropertyType_30 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER);
//int iItemPropertyType_31 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ON_HIT_CAST_SPELL);
int iItemPropertyType_32 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_SPELL_RESISTANCE);
int iItemPropertyType_33 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP);
int iItemPropertyType_34 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP);
int iItemPropertyType_35 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT);
int iItemPropertyType_36 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP);
int iItemPropertyType_37 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP);
int iItemPropertyType_38 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_SPECIFIC_ALIGNMENT);
int iItemPropertyType_39 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP);
int iItemPropertyType_40 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_RACIAL_GROUP);
//int iItemPropertyType_41 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_SPECIFIC_ALIGNMENT);
//int iItemPropertyType_42 = GetItemHasItemProperty(oItem, ITEM_PROPERTY_NO_COMBAT_DAMAGE);
/* If it's a PC this script will fire, if it's a DM it ignores */
if(GetIsPC(oPC) == TRUE && GetIsDM(oPC) == FALSE ){
/* Determain the variables */
if(iAC > 140 || iHP > 1100 || iStr > 70 ||
iDex > 70 || iWis > 70 || iInt > 70 ||
iCon > 70 || iCha > 70 || iFort > 70 ||
//iWill > 70 || IRefl > 70 || iSkill_1 > 120 ||
iSkill_2 > 120 || iSkill_3 > 120 || iSkill_4 > 120 ||
iSkill_5 > 120 || iSkill_6 > 120 || iSkill_7 > 120 ||
iSkill_8 > 120 || iSkill_9 > 120 || iSkill_10 > 120 ||
iSkill_11 > 120 || iSkill_12 > 120 || iSkill_13 > 120 ||
iSkill_14 > 120 || iSkill_15 > 120 || iSkill_16 > 120 ||
iSkill_17 > 120 || iSkill_18 > 120 || iSkill_19 > 120 ||
iSkill_20 > 120 || iSkill_21 > 120 || iSkill_22 > 120 ||
iSkill_23 > 120 || iSkill_24 > 120 || iSkill_25 > 120 ||
iSkill_26 > 120 || iSkill_27 > 120 ||
iItemPropertyType_1 == 1 || iItemPropertyType_2 == 1 || iItemPropertyType_3 == 1 ||
iItemPropertyType_4 == 1 || iItemPropertyType_5 == 1 || iItemPropertyType_6 == 1 ||
iItemPropertyType_7 == 1 || iItemPropertyType_8 == 1 || iItemPropertyType_9 == 1 ||
iItemPropertyType_10 == 1 || iItemPropertyType_11 == 1 || iItemPropertyType_12 == 1 ||
iItemPropertyType_13 == 1 || iItemPropertyType_14 == 1 || iItemPropertyType_15 == 1 ||
iItemPropertyType_16 == 1 || iItemPropertyType_17 == 1 || iItemPropertyType_18 == 1 ||
iItemPropertyType_19 == 1 || iItemPropertyType_20 == 1 || iItemPropertyType_21 == 1 ||
iItemPropertyType_22 == 1 || iItemPropertyType_23 == 1 || iItemPropertyType_24 == 1 ||
iItemPropertyType_25 == 1 || iItemPropertyType_26 == 1 || iItemPropertyType_27 == 1 ||
iItemPropertyType_28 == 1 || iItemPropertyType_29 == 1 || iItemPropertyType_30 == 1 ||
//iItemPropertyType_31 == 1 || iItemPropertyType_32 == 1 || iItemPropertyType_33 == 1 ||
iItemPropertyType_34 == 1 || iItemPropertyType_35 == 1 || iItemPropertyType_36 == 1 ||
iItemPropertyType_37 == 1 || iItemPropertyType_38 == 1 || iItemPropertyType_39 == 1)// ||
//iItemPropertyType_40 == 1 || iItemPropertyType_41 == 1 || iItemPropertyType_42 == 1 )
{
/* Get's the next item in players inventory */
oItem = GetNextItemInInventory(oPC);
/* This part of script will only fire if above settings matches */
SendMessageToPC(oPC, "Scanning your character and items please wait.");
DelayCommand(15.0, SendMessageToPC(oPC, "You do not meet the requirements!"));
DelayCommand(20.0, SendMessageToPC(oPC, "Prepare to get booted in 5 seconds!"));
DelayCommand(25.0, BootPC(oPC)); }
}
}
Thats the scripts I made to check char and items.
There are just a few problems...
I putted some lines as comment cuz it gives an error if they are in the script.
If I run the script on my server nothing happens... (big problem
)
so if somwone can fix those things for me ...
thx for helping guys