include library.skill; trigger OnHearSpeech(obj_id objSpeaker, string strText) { if(objSpeaker!=self) { return SCRIPT_CONTINUE; } /* int intSetDifficulty = 0; string strCommand = ""; if(strText.indexOf(" ")>-1) { string level = strText.substring( strText.indexOf(" ")+1, strText.length() ); strCommand= strText.substring(0, strText.indexOf(" ")); debugServerConsoleMsg(self, "level is "+level); debugServerConsoleMsg(self, "strCommand is "+strCommand); Integer intCastDifficulty; try { intCastDifficulty = new Integer(level); } // try with error handling catch (NumberFormatException err) { debugServerConsoleMsg(self, "Long Conversion Failed, Continuing to next onArrivedAtLocation"); return SCRIPT_CONTINUE; } intSetDifficulty = intCastDifficulty.intValue(); debugServerConsoleMsg(self, "intSetDifficulty is "+intSetDifficulty); } if(intSetDifficulty<5) { intSetDifficulty = 5; } if(objSpeaker!=self) { return SCRIPT_CONTINUE; } if(strCommand=="setDifficulty") { deltadictionary dctPlayerDifficulty = self.getScriptVars(); dctPlayerDifficulty.put("intDifficulty", intSetDifficulty); sendSystemMessageTestingOnly(self, "setDifficulty to "+intSetDifficulty); debugServerConsoleMsg(self, "setDifficulty to "+intSetDifficulty); } */ if(strText=="getDifficulty") { int intLevel = getLevel(self); sendSystemMessageTestingOnly(self, "My level is "+intLevel); debugServerConsoleMsg(self, "my level is "+intLevel); } if(strText=="reloadDifficulty") { sendSystemMessageTestingOnly(self, "Reloaded skill level"); recalculateLevel(self); } if(strText=="getGroupDifficulty") { int intLevel = skill.getGroupLevel(self); sendSystemMessageTestingOnly(self, "My Group level is "+intLevel); } if(strText=="scriptVars") { deltadictionary dctScriptVars = self.getScriptVars(); if(dctScriptVars==null) { debugSpeakMsg(self, "null scriptvar"); } debugSpeakMsg(self, "scriptvars are "+dctScriptVars.toString()); } // profession_marksman_advanced // profession_marksman_expert // profession_marksman_master // profession_marksman_novice //counter_expert //evade_expert //block_expert //stealth_expert //strategy_expert //ranged_accuracy_expert //ranged_speed_expert return SCRIPT_CONTINUE; }