ParseChatMessageCommand.as

package kabam.rotmg.chat.control { import com.company.assembleegameclient.game.events.ReconnectEvent; import com.company.assembleegameclient.map.AbstractMap; import com.company.assembleegameclient.objects.GameObject; import com.company.assembleegameclient.objects.ObjectLibrary; import com.company.assembleegameclient.objects.Player; import com.company.assembleegameclient.parameters.Parameters; import com.company.assembleegameclient.ui.board.HelpBoard; import com.company.assembleegameclient.ui.menu.FindMenu; import com.company.assembleegameclient.ui.options.Options; import com.company.assembleegameclient.util.AssetLoader; import com.company.assembleegameclient.util.CJDateUtil; import flash.display.BitmapData; import flash.display.DisplayObject; import flash.display.StageScaleMode; import flash.events.Event; import flash.geom.Point; import flash.net.URLRequest; import flash.net.navigateToURL; import flash.utils.ByteArray; import flash.utils.getTimer; import kabam.rotmg.assets.EmbeddedData; import kabam.rotmg.chat.model.ChatMessage; import kabam.rotmg.dialogs.control.OpenDialogSignal; import kabam.rotmg.friends.view.FriendListView; import kabam.rotmg.game.commands.PlayGameCommand; import kabam.rotmg.game.model.PotionInventoryModel; import kabam.rotmg.game.signals.AddTextLineSignal; import kabam.rotmg.game.signals.UseBuyPotionSignal; import kabam.rotmg.messaging.impl.GameServerConnection; import kabam.rotmg.messaging.impl.GameServerConnectionConcrete; import kabam.rotmg.servers.api.Server; import kabam.rotmg.text.model.TextKey; import kabam.rotmg.ui.model.HUDModel; public class ParseChatMessageCommand { private static var lastMsg:String = ""; private static var lastTell:String = ""; private static var lastTellTo:String = ""; private static var slot:int = -1; public static var mmap:BitmapData; private static var needed:String; public static var switch_:Boolean = false; private static var afkStart:CJDateUtil; [Inject] public var data:String; [Inject] public var hudModel:HUDModel; [Inject] public var addTextLine:AddTextLineSignal; [Inject] public var openDialog:OpenDialogSignal; private var potionInventoryModel:PotionInventoryModel; private var useBuyPotionSignal:UseBuyPotionSignal; public function ParseChatMessageCommand() { super(); } private function fsCommands(param1:String) : Boolean { param1 = param1.toLowerCase(); var _loc2_:DisplayObject = Parameters.root; if(param1 == "/fs") { if(_loc2_.stage.scaleMode == StageScaleMode.EXACT_FIT) { _loc2_.stage.scaleMode = StageScaleMode.NO_SCALE; Parameters.data_.stageScale = StageScaleMode.NO_SCALE; this.addTextLine.dispatch(ChatMessage.make("*Help*","Fullscreen: On")); } else { _loc2_.stage.scaleMode = StageScaleMode.EXACT_FIT; Parameters.data_.stageScale = StageScaleMode.EXACT_FIT; this.addTextLine.dispatch(ChatMessage.make("*Help*","Fullscreen: Off")); } Parameters.save(); _loc2_.dispatchEvent(new Event(Event.RESIZE)); return true; } if(param1 == "/mscale") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Map Scale: " + Parameters.data_.mscale + " - Usage: /mscale <any decimal number>.")); return true; } var _loc3_:Array = param1.match("^/mscale (\\d*\\.*\\d+)$"); if(_loc3_ != null) { Parameters.data_.mscale = _loc3_[1]; Parameters.save(); _loc2_.dispatchEvent(new Event(Event.RESIZE)); this.addTextLine.dispatch(ChatMessage.make("*Help*","Map Scale: " + _loc3_[1])); return true; } if(param1 == "/scaleui") { Parameters.data_.uiscale = !Parameters.data_.uiscale; Parameters.save(); _loc2_.dispatchEvent(new Event(Event.RESIZE)); this.addTextLine.dispatch(ChatMessage.make("*Help*","Scale UI: " + Parameters.data_.uiscale)); return true; } return false; } private function listCommands() : Boolean { var _loc1_:String = this.data.toLowerCase(); return this.addCommands(_loc1_) || this.remCommands(_loc1_) || this.lstCommands(_loc1_) || this.defCommands(_loc1_) || this.clrCommands(_loc1_); } private function addCommands(param1:String) : Boolean { var _loc2_:Array = null; var _loc3_:int = 0; var _loc4_:Boolean = false; var _loc5_:int = 0; _loc2_ = param1.match("^/aex (\\d+)$"); if(_loc2_ != null) { _loc4_ = false; for each(_loc5_ in Parameters.data_.AAException) { if(_loc5_ == _loc2_[1]) { _loc4_ = true; this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + (ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined?ObjectLibrary.xmlLibrary_[_loc2_[1]].@id:"") + ") already exists in exception list.")); break; } } if(_loc4_ == false) { if(ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined) { Parameters.data_.AAException.push(_loc2_[1]); this.addTextLine.dispatch(ChatMessage.make("*Help*","Added " + _loc2_[1] + " (" + ObjectLibrary.xmlLibrary_[_loc2_[1]].@id + ") to exception list.")); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*","No mob has the type " + _loc2_[1] + ".")); } } Parameters.save(); return true; } _loc2_ = param1.match("^/aig (\\d+)$"); if(_loc2_ != null) { _loc4_ = false; for each(_loc5_ in Parameters.data_.AAIgnore) { if(_loc5_ == _loc2_[1]) { _loc4_ = true; this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + (ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined?ObjectLibrary.xmlLibrary_[_loc2_[1]].@id:"") + ") already exists in ignore list.")); break; } } if(_loc4_ == false) { if(ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined) { Parameters.data_.AAIgnore.push(_loc2_[1]); this.addTextLine.dispatch(ChatMessage.make("*Help*","Added " + _loc2_[1] + " (" + ObjectLibrary.xmlLibrary_[_loc2_[1]].@id + ") to ignore list.")); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*","No mob has the type " + _loc2_[1] + ".")); } } Parameters.save(); return true; } _loc2_ = param1.match("^/asp (.+)$"); if(_loc2_ != null) { _loc4_ = false; for each(_loc5_ in Parameters.data_.spamFilter) { if(_loc5_ == _loc2_[1]) { _loc4_ = true; this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" already being filtered out.")); break; } } if(_loc4_ == false) { Parameters.data_.spamFilter.push(_loc2_[1]); this.addTextLine.dispatch(ChatMessage.make("*Help*","Added \"" + _loc2_[1] + "\" to spamfilter list.")); } Parameters.save(); return true; } _loc2_ = param1.match("^/afr (\\w+)$"); if(_loc2_ != null) { _loc4_ = false; for each(_loc5_ in Parameters.data_.friendList2) { if(_loc5_ == _loc2_[1]) { _loc4_ = true; this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" already exists in friend list.")); break; } } if(_loc4_ == false) { Parameters.data_.friendList2.push(_loc2_[1]); this.addTextLine.dispatch(ChatMessage.make("*Help*","Added \"" + _loc2_[1] + "\" to friend list.")); } Parameters.save(); return true; } _loc2_ = param1.match("^/atp (\\w+)$"); if(_loc2_ != null) { _loc4_ = false; for each(_loc5_ in Parameters.data_.tptoList) { if(_loc5_ == _loc2_[1]) { _loc4_ = true; this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" already exists in teleport keyword list.")); break; } } if(_loc4_ == false) { Parameters.data_.tptoList.push(_loc2_[1]); this.addTextLine.dispatch(ChatMessage.make("*Help*","Added \"" + _loc2_[1] + "\" to teleport keyword list.")); } Parameters.save(); return true; } _loc2_ = param1.match("^/apr (\\d+)$"); if(_loc2_ != null) { _loc4_ = false; for each(_loc5_ in Parameters.data_.AAPriority) { if(_loc5_ == _loc2_[1]) { _loc4_ = true; this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + (ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined?ObjectLibrary.xmlLibrary_[_loc2_[1]].@id:"") + ") already exists in auto aim priority list.")); break; } } if(_loc4_ == false) { if(ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined) { Parameters.data_.AAPriority.push(_loc2_[1]); this.addTextLine.dispatch(ChatMessage.make("*Help*","Added " + _loc2_[1] + " (" + ObjectLibrary.xmlLibrary_[_loc2_[1]].@id + ") to auto aim priority list.")); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*","No mob has the type " + _loc2_[1] + ".")); } } Parameters.save(); return true; } _loc2_ = param1.match("^/ali (.+)$"); if(_loc2_ != null) { _loc3_ = this.findMatch2(_loc2_[1]); for each(_loc5_ in Parameters.data_.lootIgnore) { if(_loc5_ == _loc3_) { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc3_ + " (" + ObjectLibrary.getIdFromType(_loc3_) + ") already exists in loot ignore list.")); return true; } } if(_loc3_ != 2581) { Parameters.data_.lootIgnore.push(_loc3_); this.addTextLine.dispatch(ChatMessage.make("*Help*","Added " + _loc3_ + " (" + ObjectLibrary.getIdFromType(_loc3_) + ") to loot ignore list.")); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*","No item matched the query.")); } Parameters.save(); return true; } return false; } private function remCommands(param1:String) : Boolean { var _loc2_:Array = null; var _loc3_:Boolean = false; var _loc4_:int = 0; var _loc5_:int = 0; _loc2_ = param1.match("^/rig (\\d+)$"); if(_loc2_ != null) { _loc3_ = false; _loc4_ = 0; while(_loc4_ < Parameters.data_.AAIgnore.length) { if(Parameters.data_.AAIgnore[_loc4_] == _loc2_[1]) { _loc3_ = true; Parameters.data_.AAIgnore.splice(_loc4_,1); this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + (ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined?ObjectLibrary.xmlLibrary_[_loc2_[1]].@id:"") + ") removed from ignore list.")); break; } _loc4_++; } if(_loc3_ == false) { if(ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined) { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + ObjectLibrary.xmlLibrary_[_loc2_[1]].@id + ") not found in ignore list.")); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " not found in ignore list.")); } } Parameters.save(); return true; } _loc2_ = param1.match("^/rex (\\d+)$"); if(_loc2_ != null) { _loc3_ = false; _loc4_ = 0; while(_loc4_ < Parameters.data_.AAException.length) { if(Parameters.data_.AAException[_loc4_] == _loc2_[1]) { _loc3_ = true; Parameters.data_.AAException.splice(_loc4_,1); this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + (ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined?ObjectLibrary.xmlLibrary_[_loc2_[1]].@id:"") + ") removed from exception list.")); break; } _loc4_++; } if(_loc3_ == false) { if(ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined) { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + ObjectLibrary.xmlLibrary_[_loc2_[1]].@id + ") not found in exception list.")); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " not found in exception list.")); } } Parameters.save(); return true; } _loc2_ = param1.match("^/rsp (.+)$"); if(_loc2_ != null) { _loc3_ = false; _loc4_ = 0; while(_loc4_ < Parameters.data_.spamFilter.length) { if(Parameters.data_.spamFilter[_loc4_] == _loc2_[1]) { _loc3_ = true; Parameters.data_.spamFilter.splice(_loc4_,1); this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" removed from spamfilter list.")); break; } _loc4_++; } if(_loc3_ == false) { this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" not found in spamfilter list.")); } Parameters.save(); return true; } _loc2_ = param1.match("^/rfr (\\w+)$"); if(_loc2_ != null) { _loc3_ = false; _loc4_ = 0; while(_loc4_ < Parameters.data_.friendList2.length) { if(Parameters.data_.friendList2[_loc4_] == _loc2_[1]) { _loc3_ = true; Parameters.data_.friendList2.splice(_loc4_,1); this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" removed from friend list.")); break; } _loc4_++; } if(_loc3_ == false) { this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" not found in friend list.")); } Parameters.save(); return true; } _loc2_ = param1.match("^/rtp (\\w+)$"); if(_loc2_ != null) { _loc3_ = false; _loc4_ = 0; while(_loc4_ < Parameters.data_.tptoList.length) { if(Parameters.data_.tptoList[_loc4_] == _loc2_[1]) { _loc3_ = true; Parameters.data_.tptoList.splice(_loc4_,1); this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" removed from teleport keyword list.")); break; } _loc4_++; } if(_loc3_ == false) { this.addTextLine.dispatch(ChatMessage.make("*Help*","\"" + _loc2_[1] + "\" not found in teleport keyword list.")); } Parameters.save(); return true; } _loc2_ = param1.match("^/rpr (\\d+)$"); if(_loc2_ != null) { _loc3_ = false; _loc4_ = 0; while(_loc4_ < Parameters.data_.AAPriority.length) { if(Parameters.data_.AAPriority[_loc4_] == _loc2_[1]) { _loc3_ = true; Parameters.data_.AAPriority.splice(_loc4_,1); this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + (ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined?ObjectLibrary.xmlLibrary_[_loc2_[1]].@id:"") + ") removed from auto aim priority list.")); break; } _loc4_++; } if(_loc3_ == false) { if(ObjectLibrary.xmlLibrary_[_loc2_[1]] != undefined) { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " (" + ObjectLibrary.xmlLibrary_[_loc2_[1]].@id + ") not found in auto aim priority list.")); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc2_[1] + " not found in auto aim priority list.")); } } Parameters.save(); return true; } _loc2_ = param1.match("^/rli (.+)$"); if(_loc2_ != null) { _loc5_ = this.findMatch2(_loc2_[1]); _loc4_ = 0; while(_loc4_ < Parameters.data_.lootIgnore.length) { if(Parameters.data_.lootIgnore[_loc4_] == _loc5_) { Parameters.data_.lootIgnore.splice(_loc4_,1); this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc5_ + " (" + ObjectLibrary.getIdFromType(_loc5_) + ") removed from loot ignore list.")); return true; } _loc4_++; } if(_loc5_ != 2581) { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc5_ + " (" + ObjectLibrary.getIdFromType(_loc5_) + ") not found in loot ignore list.")); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*","No item matched the query.")); } Parameters.save(); return true; } return false; } private function lstCommands(param1:String) : Boolean { var _loc2_:int = 0; if(param1 == "/exlist") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto aim exception list (" + Parameters.data_.AAException.length + " mobs):")); _loc2_ = 0; while(_loc2_ < Parameters.data_.AAException.length) { this.addTextLine.dispatch(ChatMessage.make("*Help*",Parameters.data_.AAException[_loc2_] + " - " + (ObjectLibrary.xmlLibrary_[Parameters.data_.AAException[_loc2_]] != undefined?ObjectLibrary.xmlLibrary_[Parameters.data_.AAException[_loc2_]].@id:""))); _loc2_++; } return true; } if(param1 == "/iglist") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto aim ignore list (" + Parameters.data_.AAIgnore.length + " mobs):")); _loc2_ = 0; while(_loc2_ < Parameters.data_.AAIgnore.length) { this.addTextLine.dispatch(ChatMessage.make("*Help*",Parameters.data_.AAIgnore[_loc2_] + " - " + (ObjectLibrary.xmlLibrary_[Parameters.data_.AAIgnore[_loc2_]] != undefined?ObjectLibrary.xmlLibrary_[Parameters.data_.AAIgnore[_loc2_]].@id:""))); _loc2_++; } return true; } if(param1 == "/splist") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Spamfilter list (" + Parameters.data_.spamFilter.length + " filtered words):")); _loc2_ = 0; while(_loc2_ < Parameters.data_.spamFilter.length) { this.addTextLine.dispatch(ChatMessage.make("*Help*",Parameters.data_.spamFilter[_loc2_])); _loc2_++; } return true; } if(param1 == "/frlist") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Friend list (" + Parameters.data_.friendList2.length + " friends):")); _loc2_ = 0; while(_loc2_ < Parameters.data_.friendList2.length) { this.addTextLine.dispatch(ChatMessage.make("*Help*",Parameters.data_.friendList2[_loc2_])); _loc2_++; } return true; } if(param1 == "/tplist") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Teleport keyword list (" + Parameters.data_.tptoList.length + " keywords):")); _loc2_ = 0; while(_loc2_ < Parameters.data_.tptoList.length) { this.addTextLine.dispatch(ChatMessage.make("*Help*",Parameters.data_.tptoList[_loc2_])); _loc2_++; } return true; } if(param1 == "/prlist") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto aim priority list (" + Parameters.data_.AAPriority.length + " mobs):")); _loc2_ = 0; while(_loc2_ < Parameters.data_.AAPriority.length) { this.addTextLine.dispatch(ChatMessage.make("*Help*",Parameters.data_.AAPriority[_loc2_] + " - " + (ObjectLibrary.xmlLibrary_[Parameters.data_.AAPriority[_loc2_]] != undefined?ObjectLibrary.xmlLibrary_[Parameters.data_.AAPriority[_loc2_]].@id:""))); _loc2_++; } return true; } if(param1 == "/lilist") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Loot ignore list (" + Parameters.data_.lootIgnore.length + " items):")); _loc2_ = 0; while(_loc2_ < Parameters.data_.lootIgnore.length) { this.addTextLine.dispatch(ChatMessage.make("*Help*",Parameters.data_.lootIgnore[_loc2_] + " - " + ObjectLibrary.getIdFromType(Parameters.data_.lootIgnore[_loc2_]))); _loc2_++; } return true; } return false; } private function clrCommands(param1:String) : Boolean { if(param1 == "/igclear") { Parameters.data_.AAIgnore = new Array(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto aim ignore list cleared.")); Parameters.save(); return true; } if(param1 == "/exclear") { Parameters.data_.AAException = new Array(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto aim exception list cleared.")); Parameters.save(); return true; } if(param1 == "/spclear") { Parameters.data_.spamFilter = new Array(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Spamfilter list cleared.")); Parameters.save(); return true; } if(param1 == "/frclear") { Parameters.data_.friendList2 = new Array(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Friend list cleared.")); Parameters.save(); return true; } if(param1 == "/tpclear") { Parameters.data_.tptoList = new Array(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Teleport keyword list cleared.")); Parameters.save(); return true; } if(param1 == "/prclear") { Parameters.data_.AAPriority = new Array(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto aim priority list cleared.")); Parameters.save(); return true; } if(param1 == "/liclear") { Parameters.data_.lootIgnore = new Array(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Loot ignore list cleared.")); Parameters.save(); return true; } return false; } private function defCommands(param1:String) : Boolean { if(param1 == "/igdefault") { Parameters.data_.AAIgnore = [1550,1551,1552,1619,1715,2309,2310,2311,2371,3441,2312,2313,2370,2392,2393,2400,2401,3335,3336,3337,3338,3413,3418,3419,3420,3421,3427,3454,3638,3645,6157,28715,28716,28717,28718,28719,28730,28731,28732,28733,28734,29306,29568,29594,29597,29710,29711,29742,29743,29746,29748,30001,29752,43702,43708,43709,43710,3389,3390,3391,24223,2304,2305,2306,1536,1537,1538,1539,1540]; this.addTextLine.dispatch(ChatMessage.make("*Help*","Default ignore list restored.")); Parameters.save(); return true; } if(param1 == "/exdefault") { Parameters.data_.AAException = [3414,3417,3448,3449,3472,3334,5952,2354,2369,3368,3366,3367,3391,3389,3390,5920,2314,3412,3639,3634,2327,1755,24582,24351,24363,24135,24133,24134,24132,24136,3356,3357,3358,3359,3360,3361,3362,3363,3364,2352,28780,28781,28795,28942,28957,28988,28938,29291,29018,29517,24338,29580,29712,6282,29054,29308,29309,29550,29551,29258,29259,29260,29261,29262]; this.addTextLine.dispatch(ChatMessage.make("*Help*","Default exception list restored.")); Parameters.save(); return true; } if(param1 == "/spdefault") { Parameters.data_.spamFilter = ["realmk!ngs","oryx.ln","realmpower.net","oryxsh0p.net","lifepot. org"]; this.addTextLine.dispatch(ChatMessage.make("*Help*","Default spamfilter list restored.")); Parameters.save(); return true; } if(param1 == "/tpdefault") { Parameters.data_.tptoList = ["lab","manor","sew"]; this.addTextLine.dispatch(ChatMessage.make("*Help*","Default teleport keyword list restored.")); Parameters.save(); return true; } if(param1 == "/prdefault") { Parameters.data_.AAPriority = [29054,29308,29309,29550,29551,29258,29259,29260,29261,29262,6282,1646]; this.addTextLine.dispatch(ChatMessage.make("*Help*","Default auto aim priority list restored.")); Parameters.save(); return true; } if(param1 == "/lidefault") { Parameters.data_.lootIgnore = [9018,9019,9020,9021,9022,9023,9024,9025,3861,2635]; this.addTextLine.dispatch(ChatMessage.make("*Help*","Default loot ignore list restored.")); Parameters.save(); return true; } return false; } private function cjCommands() : Boolean { var _loc1_:String = null; var _loc2_:int = 0; var _loc3_:String = null; var _loc4_:String = null; var _loc5_:GameObject = null; var _loc6_:Player = null; var _loc7_:Array = null; var _loc8_:Array = null; var _loc9_:int = 0; var _loc10_:int = 0; var _loc11_:int = 0; var _loc12_:Player = null; var _loc13_:Boolean = false; var _loc14_:Array = null; var _loc15_:Array = null; var _loc16_:int = 0; var _loc18_:int = 0; var _loc19_:Vector.<int> = null; var _loc20_:ChatMessage = null; var _loc21_:int = 0; var _loc22_:String = null; var _loc23_:Vector.<Boolean> = null; var _loc24_:GameObject = null; var _loc25_:GameObject = null; var _loc17_:Number = NaN; _loc12_ = this.hudModel.gameSprite.map.player_; var _loc26_:GameServerConnection = this.hudModel.gameSprite.gsc_; switch(this.data.toLowerCase()) { case "/serv": _loc26_.playerText("/server"); return true; case "/hide": _loc26_.playerText("/tell mreyeball hide me"); return true; case "/friends": case "/fr": _loc26_.playerText("/tell mreyeball friends"); return true; case "/l2m": case "/left2max": case "/lefttomax": needed = "You need "; _loc13_ = true; _loc14_ = new Array(int((_loc12_.maxHPMax_ - _loc12_.maxHP_ + _loc12_.maxHPBoost_) / 5 + ((_loc12_.maxHPMax_ - _loc12_.maxHP_ + _loc12_.maxHPBoost_) % 5 > 0?1:0)),int((_loc12_.maxMPMax_ - _loc12_.maxMP_ + _loc12_.maxMPBoost_) / 5 + ((_loc12_.maxMPMax_ - _loc12_.maxMP_ + _loc12_.maxMPBoost_) % 5 > 0?1:0)),_loc12_.attackMax_ - _loc12_.attack_ + _loc12_.attackBoost_,_loc12_.defenseMax_ - _loc12_.defense_ + _loc12_.defenseBoost_,_loc12_.speedMax_ - _loc12_.speed_ + _loc12_.speedBoost_,_loc12_.dexterityMax_ - _loc12_.dexterity_ + _loc12_.dexterityBoost_,_loc12_.vitalityMax_ - _loc12_.vitality_ + _loc12_.vitalityBoost_,_loc12_.wisdomMax_ - _loc12_.wisdom_ + _loc12_.wisdomBoost_); _loc15_ = new Array("Life","Mana","ATT","DEF","SPD","DEX","VIT","WIS"); _loc10_ = 0; while(_loc10_ < _loc14_.length) { if(_loc14_[_loc10_] > 0) { needed = needed + (_loc14_[_loc10_] + " " + _loc15_[_loc10_] + ", "); _loc13_ = false; } _loc10_++; } needed = !_loc13_?needed.substr(0,needed.length - 2) + " to be maxed":"You\'re maxed"; this.addTextLine.dispatch(ChatMessage.make("*Help*",needed)); return true; case "/stats": case "/roll": _loc26_.playerText("/tell mreyeball stats"); return true; case "/mates": _loc26_.playerText("/tell mreyeball mates"); return true; case "/tut": _loc26_.playerText("/nexustutorial"); return true; case "/tr": _loc26_.playerText("/trade " + lastTellTo); return true; case "/fame": _loc16_ = getTimer() - PlayGameCommand.startTime; _loc17_ = Math.round(GameServerConnectionConcrete.totalfamegain / _loc16_ * 60000 * 100) / 100; _loc12_.notifyPlayer(GameServerConnectionConcrete.totalfamegain + " fame\n" + Math.floor(_loc16_ / 60000 * 10) / 10 + " minutes\n" + _loc17_ + " fame/min",14835456,3000); return true; case "/fameclear": PlayGameCommand.startTime = getTimer(); GameServerConnectionConcrete.totalfamegain = 0; return true; case "/pos": this.addTextLine.dispatch(ChatMessage.make("*Help*","X: " + _loc12_.x_ + " Y: " + _loc12_.y_)); return true; case "/s": case "/switch": case "/swap": if(_loc12_.hasBackpack_) { switch_ = true; } else { this.addTextLine.dispatch(ChatMessage.make("*Help*","Whoa, that was close! Your items almost disappeared.")); } return true; case "/unname": case "/name": Parameters.data_.fakeName = null; Parameters.save(); this.hudModel.gameSprite.hudView.characterDetails.setName(_loc12_.name_); return true; case "/flist": this.openDialog.dispatch(new FriendListView()); return true; case "/nexus": _loc26_.escapeUnsafe(); return true; case "/follow": _loc12_.followTarget = null; _loc12_.notifyPlayer("Stopped following"); return true; case "/cchelp": this.openDialog.dispatch(new HelpBoard()); return true; case "/afk": TextHandler.afk =FFF !TextHandler.afk; if(!TextHandler.afk) { this.addTextLine.dispatch(ChatMessage.make("*Help*",TextHandler.afkTells.length + " messages since " + afkStart.getFormattedTime())); for each(_loc20_ in TextHandler.afkTells) { this.addTextLine.dispatch(_loc20_); } TextHandler.afkTells.length = 0; TextHandler.sendBacks.length = 0; } else { afkStart = new CJDateUtil(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Your messages will be saved, have fun.")); } TextHandler.afkMsg = ""; return true; case "/re": _loc26_.playerText(lastMsg); return true; case "/record": _loc26_.recorded = new Vector.<Point>(); _loc26_.record = 1; this.addTextLine.dispatch(ChatMessage.make("*Help*","Recording your movements.")); return true; case "/save": _loc26_.record = 0; _loc11_ = _loc26_.recorded.length; _loc9_ = 0; while(_loc9_ < _loc26_.recorded.length) { _loc10_ = _loc9_ + 1; while(_loc10_ < _loc26_.recorded.length) { if(_loc26_.recorded[_loc9_].x == _loc26_.recorded[_loc10_].x && _loc26_.recorded[_loc9_].y == _loc26_.recorded[_loc10_].y) { _loc26_.recorded.splice(_loc10_,1); if(_loc9_ != 0) { _loc9_--; } } _loc10_++; } _loc9_++; } this.addTextLine.dispatch(ChatMessage.make("*Help*","Save completed. Movement data compressed from " + _loc11_ + " steps to " + _loc26_.recorded.length)); return true; case "/play": _loc26_.record = 2; this.addTextLine.dispatch(ChatMessage.make("*Help*","Playing the record.")); return true; case "/stop": _loc26_.record = 0; _loc12_.recordPointer = 0; this.addTextLine.dispatch(ChatMessage.make("*Help*","Playback stopped.")); return true; case "/myid": this.addTextLine.dispatch(ChatMessage.make("*Help*","Id #" + _loc12_.objectId_)); return true; case "/constructs": case "/const": _loc19_ = new Vector.<int>(0); _loc9_ = 0; while(_loc9_ < Parameters.data_.AAIgnore.length) { _loc18_ = Parameters.data_.AAIgnore[_loc9_]; if(_loc18_ == 2309 || _loc18_ == 2310 || _loc18_ == 2311) { _loc19_.push(_loc9_); if(_loc19_.length == 3) { break; } } _loc9_++; } if(_loc19_.length == 0) { Parameters.data_.AAIgnore.push(2309); Parameters.data_.AAIgnore.push(2310); Parameters.data_.AAIgnore.push(2311); this.addTextLine.dispatch(ChatMessage.make("*Help*","Constructs added to ignore list.")); } else { _loc9_ = 0; while(_loc9_ < _loc19_.length) { Parameters.data_.AAIgnore.splice(_loc19_[_loc9_] - _loc9_,1); _loc9_++; } this.addTextLine.dispatch(ChatMessage.make("*Help*","Constructs removed from ignore list.")); } Parameters.save(); return true; default: _loc7_ = this.data.toLowerCase().match("^/afk (.+)$"); if(_loc7_ != null) { TextHandler.afk = true; TextHandler.afkMsg = _loc7_[1]; afkStart = new CJDateUtil(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Your messages will be saved, have fun.")); return true; } _loc7_ = this.data.toLowerCase().match("^/load (\\d{1,2})$"); if(_loc7_ != null) { this.hudModel.gameSprite.hudView.miniMap.miniMapData_ = AssetLoader.maps[parseInt(_loc7_[1]) - 1]; this.addTextLine.dispatch(ChatMessage.make("*Help*","Loaded from file.")); return true; } _loc7_ = this.data.toLowerCase().match("^/player (\\w+)$"); if(_loc7_ != null) { navigateToURL(new URLRequest("https://www.realmeye.com/player/" + _loc7_[1]),"_blank"); return true; } _loc7_ = this.data.toLowerCase().match("^/sell (\\d{1,2})$"); if(_loc7_ != null) { _loc21_ = int(_loc7_[1]) + 3; navigateToURL(new URLRequest("https://www.realmeye.com/offers-to/buy/" + _loc12_.equipment_[_loc21_] + "/2793"),"_blank"); return true; } _loc7_ = this.data.toLowerCase().match("^/re (\\w+)$"); if(_loc7_ != null) { _loc22_ = "/tell " + _loc7_[1] + " " + lastTell; _loc26_.playerText(_loc22_); lastTellTo = _loc7_[1]; lastMsg = _loc22_; return true; } _loc7_ = this.data.match("^/name (.+)$"); if(_loc7_ != null) { Parameters.data_.fakeName = _loc7_[1]; Parameters.save(); this.hudModel.gameSprite.hudView.characterDetails.setName(""); return true; } _loc7_ = this.data.toLowerCase().match("^/timer (\\d+) ?(\\d*)$"); if(_loc7_ != null) { if(_loc7_[2] == "") { _loc12_.startTimer(_loc7_[1],1000); } else { _loc12_.startTimer(_loc7_[1],_loc7_[2]); } return true; } _loc7_ = this.data.toLowerCase().match("^/autopot (\\d+)$"); if(_loc7_ != null) { Parameters.data_.autoPot = _loc7_[1]; Parameters.save(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto pot percentage set to " + _loc7_[1])); return true; } _loc7_ = this.data.toLowerCase().match("^/automana (\\d+)$"); if(_loc7_ != null) { Parameters.data_.autoMana = _loc7_[1]; Parameters.save(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto mana percentage set to " + _loc7_[1])); return true; } _loc7_ = this.data.toLowerCase().match("^/autonex (\\d+)$"); if(_loc7_ != null) { Parameters.data_.AutoNexus = _loc7_[1]; Parameters.save(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto nexus percentage set to " + _loc7_[1])); return true; } _loc7_ = this.data.toLowerCase().match("^/autoheal (\\d+)$"); if(_loc7_ != null) { Parameters.data_.autoHealP = _loc7_[1]; Parameters.save(); this.addTextLine.dispatch(ChatMessage.make("*Help*","Auto heal percentage set to " + _loc7_[1])); return true; } _loc7_ = this.data.toLowerCase().match("^/give (\\w+) (\\d{1,8})$"); if(_loc7_ != null) { _loc26_.playerText("/tell " + _loc7_[1] + " g=" + _loc7_[2]); _loc26_.requestTrade(_loc7_[1]); _loc23_ = new <Boolean>[false,false,false,false,false,false,false,false,false,false,false,false]; _loc9_ = 4; while(_loc9_ < 12) { if(_loc7_[2].substr(_loc9_ - 4,1) == "1") { _loc23_[_loc9_] = true; } _loc9_++; } GameServerConnectionConcrete.sendingGift = _loc23_; return true; } _loc7_ = this.data.toLowerCase().match("^/find (.+)$"); if(_loc7_ != null) { this.findItem(this.findMatch2(_loc7_[1])); return true; } _loc7_ = this.data.toLowerCase().match("^/setfinder (.+)$"); if(_loc7_ != null) { Parameters.data_.keyFinderid = this.findMatch2(_loc7_[1]); _loc1_ = ObjectLibrary.getIdFromType(Parameters.data_.keyFinderid); this.addTextLine.dispatch(ChatMessage.make("*Help*","Finder set to " + _loc1_)); return true; } _loc7_ = this.data.toLowerCase().match("^/take (.+)$"); if(_loc7_ != null) { if(this.hudModel.gameSprite.map.name_ != "Vault") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Use the command in vault and run over the chest you wish to interact with.")); return true; } if(_loc7_[1] == "pots") { _loc12_.collect = int.MAX_VALUE; this.addTextLine.dispatch(ChatMessage.make("*Help*","Taking Potion(s) from vault chests")); return true; } _loc12_.collect = this.findMatch2(_loc7_[1]); this.addTextLine.dispatch(ChatMessage.make("*Help*","Taking " + ObjectLibrary.getIdFromType(_loc12_.collect) + "(s) from vault chests")); return true; } _loc7_ = this.data.toLowerCase().match("^/put (.+)$"); if(_loc7_ != null) { if(this.hudModel.gameSprite.map.name_ != "Vault") { this.addTextLine.dispatch(ChatMessage.make("*Help*","Use the command in vault and run over the chest you wish to interact with.")); return true; } if(_loc7_[1] == "pots") { _loc12_.collect = int.MIN_VALUE; this.addTextLine.dispatch(ChatMessage.make("*Help*","Putting Potion(s) to vault chests")); return true; } _loc12_.collect = 0 - this.findMatch2(_loc7_[1]); this.addTextLine.dispatch(ChatMessage.make("*Help*","Putting " + ObjectLibrary.getIdFromType(0 - _loc12_.collect) + "(s) to vault chests")); return true; } _loc7_ = this.data.toLowerCase().match("^/buy (\\w+) ?(\\w*)$"); if(_loc7_ != null) { if(_loc7_[2] == "") { navigateToURL(new URLRequest("https://www.realmeye.com/offers-to/sell/" + this.findMatch2(_loc7_[1]) + "/2793"),"_blank"); } else { navigateToURL(new URLRequest("https://www.realmeye.com/offers-to/sell/" + this.findMatch2(_loc7_[1]) + "/" + this.findMatch2(_loc7_[2])),"_blank"); } return true; } _loc7_ = this.data.toLowerCase().match("^/sell (\\w+) ?(\\w*)$"); if(_loc7_ != null) { if(_loc7_[2] == "") { navigateToURL(new URLRequest("https://www.realmeye.com/offers-to/buy/" + this.findMatch2(_loc7_[1]) + "/2793"),"_blank"); } else { navigateToURL(new URLRequest("https://www.realmeye.com/offers-to/buy/" + this.findMatch2(_loc7_[1]) + "/" + this.findMatch2(_loc7_[2])),"_blank"); } return true; } _loc7_ = this.data.toLowerCase().match("^/dye1 (.+)$"); if(_loc7_ != null) { if(_loc7_[1] == "none") { Parameters.data_.setTex1 = 0; Parameters.save(); _loc12_.setTex1(0); } else { Parameters.data_.setTex1 = this.getTex1(this.findMatch2(_loc7_[1] + " cloth")); Parameters.save(); _loc12_.setTex1(Parameters.data_.setTex1); } return true; } _loc7_ = this.data.toLowerCase().match("^/dye2 (.+)$"); if(_loc7_ != null) { if(_loc7_[1] == "none") { Parameters.data_.setTex2 = 0; Parameters.save(); _loc12_.setTex2(0); } else { Parameters.data_.setTex2 = this.getTex1(this.findMatch2(_loc7_[1] + " cloth")); Parameters.save(); _loc12_.setTex2(Parameters.data_.setTex2); } return true; } _loc7_ = this.data.toLowerCase().match("^/dye (.+)$"); if(_loc7_ != null) { if(_loc7_[1] == "none") { Parameters.data_.setTex1 = 0; Parameters.data_.setTex2 = 0; Parameters.save(); _loc12_.setTex1(0); _loc12_.setTex2(0); } else { _loc7_[1] = this.getTex1(this.findMatch2(_loc7_[1] + " cloth")); Parameters.data_.setTex1 = _loc7_[1]; Parameters.data_.setTex2 = _loc7_[1]; Parameters.save(); _loc12_.setTex1(Parameters.data_.setTex1); _loc12_.setTex2(Parameters.data_.setTex2); } return true; } _loc7_ = this.data.toLowerCase().match("^/skin (.+)$"); if(_loc7_ != null) { if(_loc7_[1] == "none") { Parameters.data_.nsetSkin[0] = ""; Parameters.data_.nsetSkin[1] = -1; Parameters.save(); _loc12_.size_ = 100; _loc26_.setPlayerSkinTemplate(_loc12_,0); } else { Parameters.data_.nsetSkin = this.findSkinIndex(_loc7_[1]); Parameters.save(); } return true; } _loc7_ = this.data.toLowerCase().match("^/tp (\\w+)$"); if(_loc7_ != null) { _loc26_.teleport(this.fixedName(_loc7_[1]).name_); return true; } _loc7_ = this.data.toLowerCase().match("^/follow (\\w+)$"); if(_loc7_ != null) { _loc24_ = this.fixedName(_loc7_[1]); _loc12_.notifyPlayer("Following " + _loc24_.name_); _loc26_.teleport(_loc24_.name_); _loc12_.followTarget = _loc24_; return true; } _loc7_ = this.data.toLowerCase().match("^/setspd (-?\\d+)$"); if(_loc7_ != null) { _loc12_.speed_ = parseInt(_loc7_[1]); return true; } _loc7_ = this.data.match("^/getid (\\w+)"); if(_loc7_ != null) { for each(_loc25_ in _loc12_.map_.goDict_) { if(_loc25_ is Player) { if(_loc7_[1] == _loc25_.name_.toLowerCase()) { this.addTextLine.dispatch(ChatMessage.make("*Help*",_loc25_.name_ + " has id " + _loc25_.objectId_)); } } } return true; } _loc7_ = this.data.toLowerCase().match("^/connect ([0-9.]+)$"); if(_loc7_ != null) { this.addTextLine.dispatch(ChatMessage.make("*Help*","Connecting to " + _loc7_[1])); this.hudModel.gameSprite.dispatchEvent(new ReconnectEvent(new Server().setName("Custom").setAddress(_loc7_[1]).setPort(2050),-2,false,this.hudModel.gameSprite.gsc_.charId_,getTimer(),new ByteArray(),false)); return true; } return false; } } private function findSkinIndex(param1:String) : Array { var _loc2_:Array = null; var _loc3_:XML = null; var _loc4_:int = 0; var _loc5_:String = null; var _loc6_:String = null; var _loc7_:XML = null; var _loc8_:XMLList = null; var _loc9_:Array = param1.split(" "); var _loc10_:int = int.MAX_VALUE; _loc7_ = EmbeddedData.skinsXML; _loc8_ = _loc7_.children(); for each(_loc3_ in _loc8_) { _loc2_ = _loc3_.@id.toLowerCase().split(" "); _loc4_ = this.scoredMatch(_loc3_.@id.toString().length,_loc9_,_loc2_); if(_loc4_ < _loc10_) { _loc10_ = _loc4_; _loc5_ = _loc3_.AnimatedTexture.File; _loc6_ = _loc3_.AnimatedTexture.Index; } } return new Array(_loc5_,_loc6_); } private function getTex1(param1:int) : uint { var _loc2_:XML = ObjectLibrary.xmlLibrary_[param1]; return _loc2_.Tex1; } private function fixedName(param1:String) : GameObject { var _loc2_:int = 0; var _loc3_:GameObject = null; var _loc4_:GameObject = null; var _loc5_:int = int.MAX_VALUE; for each(_loc3_ in this.hudModel.gameSprite.map.goDict_) { if(_loc3_ is Player) { _loc2_ = this.levenshtein(param1,_loc3_.name_.toLowerCase().substr(0,param1.length)); if(_loc2_ < _loc5_) { _loc5_ = _loc2_; _loc4_ = _loc3_; } if(_loc5_ == 0) { break; } } } return _loc4_; } private function findMatch2(param1:String) : int { var _loc2_:Array = null; var _loc3_:String = null; var _loc4_:int = 0; var _loc5_:String = null; var _loc8_:int = 0; var _loc6_:Vector.<String> = new <String>["def","att","spd","dex","vit","wis","ubhp"]; var _loc7_:Vector.<int> = new <int>[2592,2591,2593,2636,2612,2613,2985]; while(_loc8_ < _loc6_.length) { if(param1 == _loc6_[_loc8_]) { return _loc7_[_loc8_]; } _loc8_++; } var _loc9_:Array = param1.split(" "); var _loc10_:int = int.MAX_VALUE; for each(_loc3_ in ObjectLibrary.itemLib) { _loc2_ = _loc3_.toLowerCase().split(" "); _loc4_ = this.scoredMatch(_loc3_.length,_loc9_,_loc2_); if(_loc4_ < _loc10_) { _loc10_ = _loc4_; _loc5_ = _loc3_; } } return ObjectLibrary.idToType_[_loc5_]; } private function scoredMatch(param1:int, param2:Array, param3:Array) : int { var _loc4_:String = null; var _loc5_:String = null; for each(_loc4_ in param3) { for each(_loc5_ in param2) { if(_loc4_.substr(0,_loc5_.length) == _loc5_) { param1 = param1 - _loc5_.length * 10; } } } return param1; } private function levenshtein(param1:String, param2:String) : int { var _loc3_:int = 0; var _loc4_:int = 0; var _loc6_:int = 0; var _loc5_:Array = new Array(); while(_loc6_ <= param1.length) { _loc5_[_loc6_] = new Array(); _loc4_ = 0; while(_loc4_ <= param2.length) { if(_loc6_ != 0) { _loc5_[_loc6_].push(0); } else { _loc5_[_loc6_].push(_loc4_); } _loc4_++; } _loc5_[_loc6_][0] = _loc6_; _loc6_++; } _loc6_ = 1; while(_loc6_ <= param1.length) { _loc4_ = 1; while(_loc4_ <= param2.length) { if(param1.charAt(_loc6_ - 1) == param2.charAt(_loc4_ - 1)) { _loc3_ = 0; } else { _loc3_ = 1; } _loc5_[_loc6_][_loc4_] = Math.min(_loc5_[_loc6_ - 1][_loc4_] + 1,_loc5_[_loc6_][_loc4_ - 1] + 1,_loc5_[_loc6_ - 1][_loc4_ - 1] + _loc3_); _loc4_++; } _loc6_++; } return _loc5_[param1.length][param2.length]; } private function findItem(param1:int) : void { var _loc2_:Vector.<int> = null; var _loc3_:GameObject = null; var _loc4_:int = 0; var _loc5_:Player = null; var _loc8_:int = 0; if(param1 == 2581) { this.addTextLine.dispatch(ChatMessage.make("*Help*","No item matched the query")); } var _loc6_:Vector.<Player> = new Vector.<Player>(0); var _loc7_:AbstractMap = this.hudModel.gameSprite.map; var _loc9_:Player = this.hudModel.gameSprite.map.player_; for each(_loc3_ in _loc7_.goDict_) { if(_loc3_ is Player) { _loc5_ = _loc3_ as Player; if(!(_loc5_ == _loc7_.player_ || !_loc5_.nameChosen_)) { _loc2_ = _loc5_.equipment_; _loc4_ = 4; while(_loc4_ < 20) { if(_loc2_[_loc4_] == param1) { _loc8_++; } _loc4_++; } if(_loc8_ > 0) { _loc6_.push(_loc5_); _loc5_.lastAltAttack_ = _loc8_; _loc8_ = 0; } } } } if(_loc6_.length > 0) { this.openDialog.dispatch(new FindMenu(this.hudModel.gameSprite,_loc6_,ObjectLibrary.getIdFromType(param1))); } else { this.addTextLine.dispatch(ChatMessage.make("*Help*","No one has " + ObjectLibrary.getIdFromType(param1))); } } private function custMessages() : Boolean { var _loc1_:Array = this.data.match("^/setmsg (\\d) (.+)$"); if(_loc1_ == null) { return false; } if(_loc1_[1] == "1") { Parameters.data_.msg1 = _loc1_[2]; } else if(_loc1_[1] == "2") { Parameters.data_.msg2 = _loc1_[2]; } else if(_loc1_[1] == "3") { Parameters.data_.msg3 = _loc1_[2]; } this.addTextLine.dispatch(ChatMessage.make("*Help*","Message #" + _loc1_[1] + " set to \"" + _loc1_[2] + "\"")); Parameters.save(); return true; } private function effCom() : Boolean { var _loc1_:Array = this.data.match("^/eff (\\d) (\\d+) (.+)$"); if(_loc1_ == null) { return false; } if(_loc1_[1] == "1") { Parameters.data_.dbPre1[0] = _loc1_[3]; Parameters.data_.dbPre1[1] = parseInt(_loc1_[2]); Parameters.data_.dbPre1[2] = false; } else if(_loc1_[1] == "2") { Parameters.data_.dbPre2[0] = _loc1_[3]; Parameters.data_.dbPre2[1] = parseInt(_loc1_[2]); Parameters.data_.dbPre2[2] = false; } else if(_loc1_[1] == "3") { Parameters.data_.dbPre3[0] = _loc1_[3]; Parameters.data_.dbPre3[1] = parseInt(_loc1_[2]); Parameters.data_.dbPre3[2] = false; } this.addTextLine.dispatch(ChatMessage.make("*Help*","A new preset was created for effect ID " + _loc1_[2])); Parameters.save(); return true; } private function tellHandle() : Boolean { var _loc1_:Array = null; var _loc2_:* = ""; if(this.data.substr(0,3) == "/t " || this.data.substr(0,3) == "/w ") { _loc2_ = this.data.substr(3); } else if(this.data.substr(0,6) == "/tell ") { _loc2_ = this.data.substr(6); } else if(this.data.substr(0,9) == "/whisper ") { _loc2_ = this.data.substr(9); } if(_loc2_ != "") { _loc1_ = _loc2_.match("(\\w+) (.+)"); if(_loc1_ != null) { lastTellTo = _loc1_[1]; lastTell = _loc1_[2]; lastMsg = this.data; this.hudModel.gameSprite.gsc_.playerText(this.data); return true; } } return false; } public function execute() : void { var _loc1_:Object = null; var _loc2_:uint = 0; var _loc3_:GameObject = null; var _loc4_:String = null; var _loc5_:* = undefined; if(Parameters.data_.customcommands) { if(this.data == "/hideops") { Options.toggleHax(); return; } if(this.tellHandle()) { return; } if(this.listCommands()) { return; } if(this.cjCommands()) { return; } if(this.custMessages()) { return; } if(this.effCom()) { return; } if(this.fsCommands(this.data)) { return; } } if(this.data == "/help") { this.addTextLine.dispatch(ChatMessage.make(Parameters.HELP_CHAT_NAME,TextKey.HELP_COMMAND)); } else if(this.data == "/c" || this.data == "/class" || this.data == "/classes") { _loc1_ = null; _loc2_ = 0; _loc3_ = null; _loc4_ = null; _loc5_ = undefined; _loc1_ = {}; _loc2_ = 0; for each(_loc3_ in this.hudModel.gameSprite.map.goDict_) { if(_loc3_.props_.isPlayer_) { _loc1_[_loc3_.objectType_] = _loc1_[_loc3_.objectType_] != undefined?_loc1_[_loc3_.objectType_] + 1:uint(1); _loc2_++; } } _loc4_ = ""; for(_loc5_ in _loc1_) { _loc4_ = _loc4_ + (" " + ObjectLibrary.typeToDisplayId_[_loc5_] + ": " + _loc1_[_loc5_]); } this.addTextLine.dispatch(ChatMessage.make("","Classes online (" + _loc2_ + "):" + _loc4_)); } else if(this.data == "/lockfilter" || this.data == "/lf") { Parameters.data_.hideLockList = !Parameters.data_.hideLockList; this.addTextLine.dispatch(ChatMessage.make("",!Parameters.data_.hideLockList?"Showing all players":"Only showing locked players")); } else { lastMsg = this.data; this.hudModel.gameSprite.gsc_.playerText(this.data); } } } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.