_loc1.onContratsList = function (sExtraData) { var _loc3 = sExtraData.split("|"); this.api.datacenter.Player.Mercenair = new Array(); var _loc4 = 0; while (++_loc4, _loc4 < _loc3.length) { var _loc5 = this.getMercenairObjectFromData(_loc3[_loc4]); if (_loc5 != undefined) { this.api.datacenter.Player.Mercenair.push(_loc5); } // end if } // end while var _loc6 = this.api.ui.getUIComponent("Cmercenair"); var _loc7 = this.api.datacenter.Player.Mercenair; if (_loc6 != undefined) { _loc6.friendsList = _loc7; } else { var _loc8 = new String(); if (_loc7.length != 0) { this.api.kernel.showMessage(undefined, "" + this.api.lang.getText("YOUR_FRIEND_LIST") + " :", "INFO_CHAT"); var _loc9 = 0; while (++_loc9, _loc9 < _loc7.length) { _loc8 = " - " + _loc7[_loc9].account; if (_loc7[_loc9].state != "DISCONNECT") { _loc8 = _loc8 + (" (" + _loc7[_loc9].name + ") " + this.api.lang.getText("LEVEL") + ":" + _loc7[_loc9].level + ", " + this.api.lang.getText(_loc7[_loc9].state)); } // end if this.api.kernel.showMessage(undefined, _loc8, "INFO_CHAT"); } // end while } else { this.api.kernel.showMessage(undefined, this.api.lang.getText("EMPTY_FRIEND_LIST"), "INFO_CHAT"); } // end else if } // end else if };