Skip to content

Instantly share code, notes, and snippets.

@g0ldPRO

g0ldPRO/DSSocks.cs

Created Apr 19, 2016
Embed
What would you like to do?
using PROAC;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
using UnityEngine;
public class DSSock : MonoBehaviour
{
private class ReadBufferData
{
public string sData;
}
public class cItem
{
public string ItemName;
public int QTY;
public int Scope;
public int ID;
}
public struct PlayerStruct
{
public string pname;
public int money;
public int Coins;
public int X;
public int Y;
public double rep;
public int wins;
public int loses;
public int fishing;
public int disc;
public int tcaught;
public int tseen;
public int tevolve;
public int phours;
public int pmins;
public int member;
public string sprite;
public string Join;
public string Total;
public string Guild;
public string MS;
public string GuildID;
}
public class NPCMessage
{
public string Message;
}
public class ScriptClass
{
public string ID;
public int Status;
public string Message;
public List<DSSock.NPCMessage> Options;
}
public class SavedChats
{
public string Channel;
public string Text;
}
public class SavedChannels
{
public string Name;
public string ID;
}
private const int READ_BUFFER_SIZE = 65536;
public GameObject[] Hazards;
public bool isGirl;
public GameObject MoveGUIs;
public bool SwearHighlight;
public UISlider BTimer;
public MasterSprites MS;
public ManageCDs CDs;
public ManageGuildLogo GLM;
public ShopHandler HandleShop;
public MoveRelearn MR;
public MoveRelearn ER;
public KeyToLabel KeyManager;
public Encoding enc = Encoding.GetEncoding(1252);
public UILabel RankedRating;
public UILabel RankedWins;
public UILabel RankedLosses;
public RankedHandler RankedHandle;
public UILabel GMOTD;
public UILabel GINFO;
public UITexture GLog;
public GuildLogo GLogo;
public float SaySpeed = 70f;
public UISprite MapUpdate;
[HideInInspector]
public float lastEmote;
public MapHandler MH;
public GameObject ShinySparkle;
public GameObject XmasSparkle;
public UILabel OnStatus;
public showEmote PlayerEmote;
public HairColours ColourHairs;
public UITexture[] Parts;
private int serverPort = 800;
private int ConnectionTimeOut = 20000;
public UITexture[] Wearables;
public cPokedex Pokedex;
public PokemonInfo Info;
public GameObject PokemonSlots;
public GameObject SelectPoke;
public GameObject SelectMove;
public GameObject StartScreen;
public GameObject TownButtons;
private int StartStage;
public UILabel StartText;
public MusicPlayer musicPlayer;
public GameObject ItemSlots;
public AudioClip treeSound;
public AudioClip SmashSound;
public ScreenFadeInOut ScreenFade;
public List<cPokemon> Pokemons = new List<cPokemon>();
public List<DSSock.cItem> Items = new List<DSSock.cItem>();
public List<GameObject> PlayerObjects = new List<GameObject>();
[HideInInspector]
public long bytesReceived;
[HideInInspector]
public long bytesSend;
protected static TcpClient tcpClient;
public static DSSock instance;
[HideInInspector]
public bool toDiscon;
[HideInInspector]
public bool isConnected;
private byte[] readBuffer = new byte[65536];
private List<DSSock.ReadBufferData> readBuffers = new List<DSSock.ReadBufferData>();
private string serverIP;
private int storedLength;
[HideInInspector]
public string strMessage = string.Empty;
[HideInInspector]
public string res = string.Empty;
[HideInInspector]
public bool LoggedIn;
[HideInInspector]
public string Message;
[HideInInspector]
public float MessageTime;
[HideInInspector]
public string messageText;
[HideInInspector]
public float messageTimer;
private Vector3 namePlatePos;
[HideInInspector]
public bool isMovable = true;
[HideInInspector]
public byte pDirection = 1;
private byte thisPosition;
[HideInInspector]
public Vector3 newPos;
private string PokeTime;
public int OutSideLight;
[HideInInspector]
public bool bSync;
private bool firstLog = true;
[HideInInspector]
public string currentMap;
[HideInInspector]
public MapCreator mapCreator;
[HideInInspector]
public bool loadingMap;
public UILabel TrainerStats;
public UILabel TrainerStats2;
[HideInInspector]
public bool Leader;
[HideInInspector]
public string gender = "m";
[HideInInspector]
public string hair = "0";
[HideInInspector]
public bool OnGround = true;
public FPoke FollowPoke;
public DSSock.PlayerStruct Players = default(DSSock.PlayerStruct);
public jumpPlayer PlayerJump;
public Transform Player;
public GameObject PlayerObject;
public FPoke PFollowObject;
public UILabel TimeLabel;
public string[] MonsterName = new string[780];
public bool CanMove = true;
public GameObject LoginQueue;
public UILabel QueueLabel;
private bool IDC;
private string Vers = "0.94.1";
public UIPopupList ServerSelect;
private bool NonBlock;
private bool logging;
public UIInput user;
public UIInput pass;
[HideInInspector]
public bool IceUp;
[HideInInspector]
public bool IceDown;
[HideInInspector]
public bool IceLeft;
[HideInInspector]
public bool IceRight;
[HideInInspector]
public int Slide;
[HideInInspector]
private float lastBump;
private bool dontChange;
private bool showDiscon;
public Attacks Atks;
public ItemDes Itms;
public Language Lang;
public UILabel[] TranslateLabels;
public ShowTip[] TranslateTips;
public UITexture FlagFist;
public Texture2D[] FistTexture;
public TileInfo TI;
private SwearFilter TextFiler;
private bool ssh;
private int stepCount;
private int stepCount2;
public Light LightSource;
public Color WhiteColor;
public Color MorningColor;
public Color NightColor;
public Color AfternoonColor;
public Color AfternoonColor2;
public UILabel MText;
[HideInInspector]
public bool moveLeft;
[HideInInspector]
public bool moveRight;
[HideInInspector]
public bool moveUp;
[HideInInspector]
public bool moveDown;
[HideInInspector]
public bool smoveLeft;
[HideInInspector]
public bool smoveRight;
[HideInInspector]
public bool smoveUp;
[HideInInspector]
public bool smoveDown;
public AnimationFramePickerSystem AF;
private float AniTimer;
private int AniNumber;
private int LAniNumber;
private float AniSpeed = 60f;
private string movetomap;
private int movetox;
private int movetoy;
private int movetosurf;
public GameObject GrassObject;
public AudioClip GrassSound;
private float lastMoved;
private float lastPing;
[HideInInspector]
public bool MessageStuck;
[HideInInspector]
public bool Surf;
[HideInInspector]
public bool Bike;
private float LastTimeTextUpdate = -10f;
private KeyCode toggleKey = KeyCode.F2;
public GameObject Console;
public UIInput ConText;
public UITextList con;
public GameObject Darkness;
public bool CanPressKey = true;
private float lastInteracted;
private bool TouchedNext;
private cNPC stopNPC;
public GameObject[] ChoiceButtons;
public UILabel[] ChoiceText;
public GameObject NPCTObject;
public UILabel NPCText;
public AudioClip TextSound;
private bool select;
private float scrollCount;
private int ScrollTo;
private bool Scrolling;
private string tosay;
private bool UpdateBox;
private List<DSSock.NPCMessage> Messages = new List<DSSock.NPCMessage>();
public List<DSSock.ScriptClass> Scripts = new List<DSSock.ScriptClass>();
private List<DSSock.ScriptClass> QuedScripts = new List<DSSock.ScriptClass>();
[HideInInspector]
public bool ScriptPause;
[HideInInspector]
public int doMessages;
[HideInInspector]
public bool NPCLock = true;
private bool FlashOn;
private bool keyLock;
public UITexture[] Badge;
[HideInInspector]
public bool DestroyPacket;
public GameObject Day;
public GameObject Night;
public GameObject Morning;
public GameObject Afternoon;
public UILabel Money;
private float MoveSpeed = 4f;
private int lastBox;
private int lastPMBox;
public GameObject MessageBox;
public GameObject PMObject;
public List<GameObject> PMs = new List<GameObject>();
public List<string> MovePos = new List<string>();
private string NPCMoveID = string.Empty;
private int EvoItemID;
private int PEIDNum;
private int PEID2;
private int PEUID;
private int PEID;
public bool Evolving;
public GameObject EvoScreen;
private Evolution Evos;
public TradeManager Trade;
private string OldSprite;
public List<GameObject> NPCS = new List<GameObject>();
public GameObject NPCObject;
[HideInInspector]
public Vector3 NPCVect;
public GUISkin LoginSkin;
public UITextList ChatText;
private bool canMove = true;
private Rect window;
private float wantedX;
private float wantedY;
private string whatsleft = string.Empty;
public GameObject GUIObjects;
public GameObject loginGUI;
public GameObject optionsGUI;
public GameObject menuGUI;
public UIToggle rememberPass;
public UIInput chatBox;
[HideInInspector]
public bool chatOpen;
public UIWidget[] OptionsWindows;
public UIPopupList ResList;
public UIToggle FullscreenCheck;
public UIToggle VSyncCheck;
public Light Lighting;
[HideInInspector]
public bool WeatherOns;
public UISlider ViewSize;
public UISlider VolumeScroll;
public UISlider MusicScroll;
public GameObject Rain;
public GameObject Draught;
public GameObject Snow;
public UIToggle WeatherOn;
private float currentLight = 0.5f;
private bool Lightning;
private float LightningTimer;
private byte currentWeather;
public AudioClip lightningSound;
[HideInInspector]
public float SFXVolume = 1f;
public UIToggle LightingToggle;
public UIToggle LimitToggle;
public UIToggle LightQuality;
public UIToggle EnableBattleReq;
public UIToggle NPCNames;
public UIToggle ControllerOn;
public UIToggle AnimationsOn;
public UIToggle PlayerNames;
public UISlider DialogueSpeed;
public GameObject bagGUI;
public GameObject creditsGUI;
public GameObject PCBox;
public GameObject BoxPokemon;
public Transform BoxPokemonParent;
private int PokeBoxPage;
public UITexture[] ShortcutTextue;
private int[] ShortcutIDs = new int[4];
private float LastItemUse;
public InventoryButton ItemObject;
public InventoryButton ItemObject2;
public GameObject UseOn;
public UILabel BagLabel;
public UIButton[] BagButtons;
public Transform InventoryParent;
public GameObject trainerGUI;
public GameObject friendsGUI;
public GameObject FriendsScroll;
public UITextList FriendsList;
public UITextList RosterList;
public GameObject ChatPrefab;
public List<GameObject> ChannelButtons;
public Transform TabParent;
public GameObject ChannelPrefab;
public GameObject ChannelManagerObject;
public GameObject ChannelManagerPanel;
public HandleChannels ChannelHandler;
public List<DSSock.SavedChats> SavedChat;
public ChatInput CI;
public List<DSSock.SavedChannels> SavedChan;
public FootStep FSObject;
public FootStep BikeStepObject;
public GameObject BattleScreen;
[HideInInspector]
public bool inBattle;
[HideInInspector]
public bool inTrade;
public ShopManager SM;
public UILabel BattleName;
public UILabel BattleFoe;
public UILabel BattleLog;
private string BattleSay;
private bool BattleScroll;
[HideInInspector]
public int SelPoke;
private int TotalPokes;
public UISprite BattleEXP;
public UISprite[] BattleHP;
private int BattleType;
private int OtherPoke;
private int OtherHP;
private int OtherHPLeft;
private string OtherGender;
private string OtherShiny;
private int HPTO;
private int OTHERHPTO;
public GameObject FoePoke;
public GameObject UserPoke;
private string noBattler = string.Empty;
public UITexture BattleBack;
public Texture2D[] Backgrounds;
private bool resumeMusic;
public string OtherForm = string.Empty;
private bool isPVPBattle;
public float lastPVPMove;
public bool SelectedMove;
private bool throwBall;
private bool throwDown;
public GameObject[] ThrowObject;
private bool throwSound;
private bool showFoe;
private bool BattleIdle;
private int mapMusic;
private int scriptMusic;
public GameObject[] PokeBalls;
public GameObject CaughtBall;
private int BScrollTo;
private float BScrollCount;
public UIPanel BattlePanel;
public UISprite BattleBlanker;
public UIPanel[] UserStats;
public UILabel[] BattlePokeNames;
public GameObject OutOfBall;
public GameObject InTheBall;
public AudioClip BallSound;
private float BAT;
public UIButton[] BattleButtons;
public UIButton[] AttackButtons;
public GameObject LockText;
[HideInInspector]
private bool BatonPass;
private bool FlashFoe;
private bool FlashUser;
private float FlashCounter;
private bool scrollhealth;
private float scrollCounter;
private bool doHealth;
private bool lineTrigger;
public UISprite BLog;
private float hbs;
public int CatchPoke;
private float lastCaught;
private bool CatchPokemon;
private int CatchShakes;
private bool FaintUser;
private bool FaintFoe;
private bool endingBattle;
private int deadPokes;
public UISprite[] PokeStatus;
private string OtherStatus;
public UISprite WeatherSprite;
public AudioClip HitSound;
[HideInInspector]
public bool processingBattle;
private bool restoreUser;
public UISprite CatchBall;
public GameObject AttackObject;
public GameObject PokemonObject;
public GameObject BattleItemObject;
public Transform BattleItemParent;
private bool outrage;
[HideInInspector]
public bool BLock;
private bool lockBattle;
public UILabel[] AttackNames;
public UISprite[] AttackElement;
public UISprite[] AttackType;
public UITexture[] PokemonNames;
public UILabel[] AttackPP;
private int BatonID;
public GameObject MoveGUI;
public GameObject MoveEffect;
public bool ShowLevel = true;
public AudioClip LevelUp;
public UILabel FriendOnline;
public UISprite FriendSprite;
public AudioClip onlineSound;
private static string dLink = "http://pokemon-revolution-online.net";
private static string BugLink = "http://pokemon-revolution-online.net/Forum/viewforum.php?f=6";
private float lastSync;
private float LastQueue;
public void UnlockPlayer()
{
this.CanMove = true;
}
public void LockPlayer()
{
this.CanMove = false;
}
public void SafeDisconnect()
{
this.toDiscon = true;
}
private void Awake()
{
Application.targetFrameRate = 0;
Screen.sleepTimeout = -1;
DSSock.instance = this;
UnityEngine.Object.DontDestroyOnLoad(this);
this.mapCreator = GameObject.Find("Map").GetComponent<MapCreator>();
if (PlayerPrefs.GetInt("width", 0) == 0)
{
Resolution currentResolution = Screen.currentResolution;
Screen.SetResolution(currentResolution.width, currentResolution.height, true);
}
else
{
bool fullscreen = false;
if (PlayerPrefs.GetInt("fs", 0) == 1)
{
fullscreen = true;
}
Screen.SetResolution(PlayerPrefs.GetInt("width", 800), PlayerPrefs.GetInt("height", 600), fullscreen);
}
this.loadOptions();
this.IDC = false;
PROiD.PROSD();
}
[DebuggerHidden]
private IEnumerator ConnectToServer()
{
DSSock.<ConnectToServer>c__IteratorB <ConnectToServer>c__IteratorB = new DSSock.<ConnectToServer>c__IteratorB();
<ConnectToServer>c__IteratorB.<>f__this = this;
return <ConnectToServer>c__IteratorB;
}
[DebuggerHidden]
public IEnumerator ConnectToServerOveride()
{
DSSock.<ConnectToServerOveride>c__IteratorC <ConnectToServerOveride>c__IteratorC = new DSSock.<ConnectToServerOveride>c__IteratorC();
<ConnectToServerOveride>c__IteratorC.<>f__this = this;
return <ConnectToServerOveride>c__IteratorC;
}
protected void BeginConnect()
{
try
{
DSSock.tcpClient = new TcpClient();
DSSock.tcpClient.Connect(this.serverIP, this.serverPort);
DSSock.tcpClient.GetStream().BeginRead(DSSock.instance.readBuffer, 0, 65536, new AsyncCallback(DSSock.instance.doRead), null);
this.isConnected = DSSock.tcpClient.Connected;
if (!this.isConnected)
{
DSSock.tcpClient = null;
}
}
catch (Exception ex)
{
this.isConnected = false;
UnityEngine.Debug.Log(ex.ToString());
}
}
public void Login()
{
float orthographicSize = (float)Screen.height / 64f / 2f;
Camera.main.orthographicSize = orthographicSize;
if (this.LoggedIn || this.isConnected || this.logging)
{
return;
}
this.readBuffers = new List<DSSock.ReadBufferData>();
if (!this.logging)
{
this.user.value = this.user.value.Replace(" ", string.Empty);
if ((!(this.user.value.ToLower() == "red") && this.user.value.Length <= 3) || this.pass.value.Length <= 3 || !(this.user.value != "Username") || !(this.pass.value != "Password"))
{
this.res = this.Lang.GetString("UPShort");
GUI.enabled = true;
return;
}
this.logging = true;
this.con.Add("PRO> Connecting to Server.");
this.res = this.Lang.GetString("Connect");
base.StartCoroutine("ConnectToServer");
}
}
[HideInInspector]
private void PlayBump()
{
}
public bool GetIce(int x, int y)
{
return this.TI.Ice[this.mapCreator.Tiles[x, y]] != 0 || this.TI.Ice[this.mapCreator.Tiles2[x, y]] != 0 || this.TI.Ice[this.mapCreator.Tiles3[x, y]] != 0;
}
public int GetSlide(int x, int y)
{
if (this.TI.MoveUp[this.mapCreator.Tiles[x, y]] != 0 || this.TI.MoveUp[this.mapCreator.Tiles2[x, y]] != 0 || this.TI.MoveUp[this.mapCreator.Tiles3[x, y]] != 0)
{
return 1;
}
if (this.TI.MoveDown[this.mapCreator.Tiles[x, y]] != 0 || this.TI.MoveDown[this.mapCreator.Tiles2[x, y]] != 0 || this.TI.MoveDown[this.mapCreator.Tiles3[x, y]] != 0)
{
return 2;
}
if (this.TI.MoveLeft[this.mapCreator.Tiles[x, y]] != 0 || this.TI.MoveLeft[this.mapCreator.Tiles2[x, y]] != 0 || this.TI.MoveLeft[this.mapCreator.Tiles3[x, y]] != 0)
{
return 3;
}
if (this.TI.MoveRight[this.mapCreator.Tiles[x, y]] != 0 || this.TI.MoveRight[this.mapCreator.Tiles2[x, y]] != 0 || this.TI.MoveRight[this.mapCreator.Tiles3[x, y]] != 0)
{
return 4;
}
if (this.TI.Stop[this.mapCreator.Tiles[x, y]] != 0 || this.TI.Stop[this.mapCreator.Tiles2[x, y]] != 0 || this.TI.Stop[this.mapCreator.Tiles3[x, y]] != 0)
{
return 5;
}
return 0;
}
public void HidePokeInfo()
{
this.Info.gameObject.SetActive(false);
}
public void Disconnect()
{
this.LoginQueue.SetActive(false);
this.SavedChat = new List<DSSock.SavedChats>();
this.Leader = false;
this.MH.DestroyView();
this.CDs.Reset();
this.OnStatus.text = "[ON] Appear Online";
this.trainerGUI.SetActive(false);
this.Info.gameObject.SetActive(false);
this.Pokedex.DestroyDex();
this.ChannelHandler.No();
this.ChannelManagerPanel.GetComponent<UIPanel>().alpha = 0f;
this.Slide = 0;
this.IceUp = false;
this.IceDown = false;
this.IceLeft = false;
this.IceRight = false;
this.select = false;
this.noBattler = string.Empty;
this.SM.Close_Shop();
this.SelectPoke.SetActive(false);
this.PCBox.SetActive(false);
this.MoveGUI.GetComponent<LearnMove>().StoredMoves.Clear();
this.MoveGUI.GetComponent<LearnMove>().PauseLearn = false;
this.MR.ClosePanel();
this.ER.ClosePanel();
this.Pokemons = new List<cPokemon>();
this.PlayerObjects = new List<GameObject>();
this.Items = new List<DSSock.cItem>();
this.friendsGUI.SetActive(false);
this.Trade.Hide_Trade();
this.StartScreen.SetActive(false);
this.StartStage = 0;
this.MovePos.Clear();
this.FlashOn = false;
this.EvoItemID = 0;
this.PEIDNum = 0;
this.PEID2 = 0;
this.PEUID = 0;
this.PEID = 0;
this.Evolving = false;
this.EvoScreen.SetActive(false);
this.DestroyPMS();
this.DestroyNPC();
if (this.isConnected && DSSock.tcpClient != null)
{
DSSock.tcpClient.Close();
}
this.HideBattle();
this.doMessages = 0;
this.CanMove = true;
this.Bike = false;
this.Surf = false;
this.MoveSpeed = 4f;
this.FollowPoke.MoveSpeed = 4f;
this.MessageStuck = false;
this.Scripts = new List<DSSock.ScriptClass>();
this.QuedScripts = new List<DSSock.ScriptClass>();
this.ScriptPause = false;
this.SelPoke = 0;
this.NPCLock = true;
this.OnGround = true;
this.toDiscon = false;
DSSock.tcpClient = null;
this.isConnected = false;
this.LoggedIn = false;
this.logging = false;
this.Players = default(DSSock.PlayerStruct);
this.currentMap = string.Empty;
this.Rain.SetActive(false);
this.Snow.SetActive(false);
this.RosterList.Clear();
this.Draught.SetActive(false);
this.ChatText.Clear();
this.mapCreator.DestroyMap();
this.optionsGUI.SetActive(false);
this.GUIObjects.SetActive(false);
this.menuGUI.SetActive(false);
this.loginGUI.SetActive(true);
this.ScreenFade.ResetScene();
this.FollowPoke.PokeID(0, 0, 0);
this.FollowPoke.LastPostion = Vector3.zero;
this.bytesReceived = 0L;
this.NPCTObject.SetActive(false);
this.NPCText.text = string.Empty;
this.PlayMusic(0);
this.MessageTime = 0f;
this.Message = string.Empty;
for (int i = 0; i < 24; i++)
{
this.Badge[i].color = new Color(0f, 0f, 0f, 0.7f);
}
this.mapCreator.DestroyTotalMap();
Resources.UnloadUnusedAssets();
this.loginGUI.GetComponent<GrabNews>().ReloadOnline();
}
private void loadTiles()
{
this.MonsterName[0] = "???";
this.MonsterName[1] = "Bulbasaur";
this.MonsterName[2] = "Ivysaur";
this.MonsterName[3] = "Venusaur";
this.MonsterName[4] = "Charmander";
this.MonsterName[5] = "Charmeleon";
this.MonsterName[6] = "Charizard";
this.MonsterName[7] = "Squirtle";
this.MonsterName[8] = "Wartortle";
this.MonsterName[9] = "Blastoise";
this.MonsterName[10] = "Caterpie";
this.MonsterName[11] = "Metapod";
this.MonsterName[12] = "Butterfree";
this.MonsterName[13] = "Weedle";
this.MonsterName[14] = "Kakuna";
this.MonsterName[15] = "Beedrill";
this.MonsterName[16] = "Pidgey";
this.MonsterName[17] = "Pidgeotto";
this.MonsterName[18] = "Pidgeot";
this.MonsterName[19] = "Rattata";
this.MonsterName[20] = "Raticate";
this.MonsterName[21] = "Spearow";
this.MonsterName[22] = "Fearow";
this.MonsterName[23] = "Ekans";
this.MonsterName[24] = "Arbok";
this.MonsterName[25] = "Pikachu";
this.MonsterName[26] = "Raichu";
this.MonsterName[27] = "Sandshrew";
this.MonsterName[28] = "Sandslash";
this.MonsterName[29] = "Nidoran F";
this.MonsterName[30] = "Nidorina";
this.MonsterName[31] = "Nidoqueen";
this.MonsterName[32] = "Nidoran M";
this.MonsterName[33] = "Nidorino";
this.MonsterName[34] = "Nidoking";
this.MonsterName[35] = "Clefairy";
this.MonsterName[36] = "Clefable";
this.MonsterName[37] = "Vulpix";
this.MonsterName[38] = "Ninetales";
this.MonsterName[39] = "Jigglypuff";
this.MonsterName[40] = "Wigglytuff";
this.MonsterName[41] = "Zubat";
this.MonsterName[42] = "Golbat";
this.MonsterName[43] = "Oddish";
this.MonsterName[44] = "Gloom";
this.MonsterName[45] = "Vileplume";
this.MonsterName[46] = "Paras";
this.MonsterName[47] = "Parasect";
this.MonsterName[48] = "Venonat";
this.MonsterName[49] = "Venomoth";
this.MonsterName[50] = "Diglett";
this.MonsterName[51] = "Dugtrio";
this.MonsterName[52] = "Meowth";
this.MonsterName[53] = "Persian";
this.MonsterName[54] = "Psyduck";
this.MonsterName[55] = "Golduck";
this.MonsterName[56] = "Mankey";
this.MonsterName[57] = "Primeape";
this.MonsterName[58] = "Growlithe";
this.MonsterName[59] = "Arcanine";
this.MonsterName[60] = "Poliwag";
this.MonsterName[61] = "Poliwhirl";
this.MonsterName[62] = "Poliwrath";
this.MonsterName[63] = "Abra";
this.MonsterName[64] = "Kadabra";
this.MonsterName[65] = "Alakazam";
this.MonsterName[66] = "Machop";
this.MonsterName[67] = "Machoke";
this.MonsterName[68] = "Machamp";
this.MonsterName[69] = "Bellsprout";
this.MonsterName[70] = "Weepinbell";
this.MonsterName[71] = "Victreebel";
this.MonsterName[72] = "Tentacool";
this.MonsterName[73] = "Tentacruel";
this.MonsterName[74] = "Geodude";
this.MonsterName[75] = "Graveler";
this.MonsterName[76] = "Golem";
this.MonsterName[77] = "Ponyta";
this.MonsterName[78] = "Rapidash";
this.MonsterName[79] = "Slowpoke";
this.MonsterName[80] = "Slowbro";
this.MonsterName[81] = "Magnemite";
this.MonsterName[82] = "Magneton";
this.MonsterName[83] = "Farfetch 'd";
this.MonsterName[84] = "Doduo";
this.MonsterName[85] = "Dodrio";
this.MonsterName[86] = "Seel";
this.MonsterName[87] = "Dewgong";
this.MonsterName[88] = "Grimer";
this.MonsterName[89] = "Muk";
this.MonsterName[90] = "Shellder";
this.MonsterName[91] = "Cloyster";
this.MonsterName[92] = "Gastly";
this.MonsterName[93] = "Haunter";
this.MonsterName[94] = "Gengar";
this.MonsterName[95] = "Onix";
this.MonsterName[96] = "Drowzee";
this.MonsterName[97] = "Hypno";
this.MonsterName[98] = "Krabby";
this.MonsterName[99] = "Kingler";
this.MonsterName[100] = "Voltorb";
this.MonsterName[101] = "Electrode";
this.MonsterName[102] = "Exeggcute";
this.MonsterName[103] = "Exeggutor";
this.MonsterName[104] = "Cubone";
this.MonsterName[105] = "Marowak";
this.MonsterName[106] = "Hitmonlee";
this.MonsterName[107] = "Hitmonchan";
this.MonsterName[108] = "Lickitung";
this.MonsterName[109] = "Koffing";
this.MonsterName[110] = "Weezing";
this.MonsterName[111] = "Rhyhorn";
this.MonsterName[112] = "Rhydon";
this.MonsterName[113] = "Chansey";
this.MonsterName[114] = "Tangela";
this.MonsterName[115] = "Kangaskhan";
this.MonsterName[116] = "Horsea";
this.MonsterName[117] = "Seadra";
this.MonsterName[118] = "Goldeen";
this.MonsterName[119] = "Seaking";
this.MonsterName[120] = "Staryu";
this.MonsterName[121] = "Starmie";
this.MonsterName[122] = "Mr. Mime";
this.MonsterName[123] = "Scyther";
this.MonsterName[124] = "Jynx";
this.MonsterName[125] = "Electabuzz";
this.MonsterName[126] = "Magmar";
this.MonsterName[127] = "Pinsir";
this.MonsterName[128] = "Tauros";
this.MonsterName[129] = "Magikarp";
this.MonsterName[130] = "Gyarados";
this.MonsterName[131] = "Lapras";
this.MonsterName[132] = "Ditto";
this.MonsterName[133] = "Eevee";
this.MonsterName[134] = "Vaporeon";
this.MonsterName[135] = "Jolteon";
this.MonsterName[136] = "Flareon";
this.MonsterName[137] = "Porygon";
this.MonsterName[138] = "Omanyte";
this.MonsterName[139] = "Omastar";
this.MonsterName[140] = "Kabuto";
this.MonsterName[141] = "Kabutops";
this.MonsterName[142] = "Aerodactyl";
this.MonsterName[143] = "Snorlax";
this.MonsterName[144] = "Articuno";
this.MonsterName[145] = "Zapdos";
this.MonsterName[146] = "Moltres";
this.MonsterName[147] = "Dratini";
this.MonsterName[148] = "Dragonair";
this.MonsterName[149] = "Dragonite";
this.MonsterName[150] = "Mewtwo";
this.MonsterName[151] = "Mew";
this.MonsterName[152] = "Chikorita";
this.MonsterName[153] = "Bayleef";
this.MonsterName[154] = "Meganium";
this.MonsterName[155] = "Cyndaquil";
this.MonsterName[156] = "Quilava";
this.MonsterName[157] = "Typhlosion";
this.MonsterName[158] = "Totodile";
this.MonsterName[159] = "Croconaw";
this.MonsterName[160] = "Feraligatr";
this.MonsterName[161] = "Sentret";
this.MonsterName[162] = "Furret";
this.MonsterName[163] = "Hoothoot";
this.MonsterName[164] = "Noctowl";
this.MonsterName[165] = "Ledyba";
this.MonsterName[166] = "Ledian";
this.MonsterName[167] = "Spinarak";
this.MonsterName[168] = "Ariados";
this.MonsterName[169] = "Crobat";
this.MonsterName[170] = "Chinchou";
this.MonsterName[171] = "Lanturn";
this.MonsterName[172] = "Pichu";
this.MonsterName[173] = "Cleffa";
this.MonsterName[174] = "Igglybuff";
this.MonsterName[175] = "Togepi";
this.MonsterName[176] = "Togetic";
this.MonsterName[177] = "Natu";
this.MonsterName[178] = "Xatu";
this.MonsterName[179] = "Mareep";
this.MonsterName[180] = "Flaaffy";
this.MonsterName[181] = "Ampharos";
this.MonsterName[182] = "Bellossom";
this.MonsterName[183] = "Marill";
this.MonsterName[184] = "Azumarill";
this.MonsterName[185] = "Sudowoodo";
this.MonsterName[186] = "Politoed";
this.MonsterName[187] = "Hoppip";
this.MonsterName[188] = "Skiploom";
this.MonsterName[189] = "Jumpluff";
this.MonsterName[190] = "Aipom";
this.MonsterName[191] = "Sunkern";
this.MonsterName[192] = "Sunflora";
this.MonsterName[193] = "Yanma";
this.MonsterName[194] = "Wooper";
this.MonsterName[195] = "Quagsire";
this.MonsterName[196] = "Espeon";
this.MonsterName[197] = "Umbreon";
this.MonsterName[198] = "Murkrow";
this.MonsterName[199] = "Slowking";
this.MonsterName[200] = "Misdreavus";
this.MonsterName[201] = "Unown";
this.MonsterName[202] = "Wobbuffet";
this.MonsterName[203] = "Girafarig";
this.MonsterName[204] = "Pineco";
this.MonsterName[205] = "Forretress";
this.MonsterName[206] = "Dunsparce";
this.MonsterName[207] = "Gligar";
this.MonsterName[208] = "Steelix";
this.MonsterName[209] = "Snubbull";
this.MonsterName[210] = "Granbull";
this.MonsterName[211] = "Qwilfish";
this.MonsterName[212] = "Scizor";
this.MonsterName[213] = "Shuckle";
this.MonsterName[214] = "Heracross";
this.MonsterName[215] = "Sneasel";
this.MonsterName[216] = "Teddiursa";
this.MonsterName[217] = "Ursaring";
this.MonsterName[218] = "Slugma";
this.MonsterName[219] = "Magcargo";
this.MonsterName[220] = "Swinub";
this.MonsterName[221] = "Piloswine";
this.MonsterName[222] = "Corsola";
this.MonsterName[223] = "Remoraid";
this.MonsterName[224] = "Octillery";
this.MonsterName[225] = "Delibird";
this.MonsterName[226] = "Mantine";
this.MonsterName[227] = "Skarmory";
this.MonsterName[228] = "Houndour";
this.MonsterName[229] = "Houndoom";
this.MonsterName[230] = "Kingdra";
this.MonsterName[231] = "Phanpy";
this.MonsterName[232] = "Donphan";
this.MonsterName[233] = "Porygon2";
this.MonsterName[234] = "Stantler";
this.MonsterName[235] = "Smeargle";
this.MonsterName[236] = "Tyrogue";
this.MonsterName[237] = "Hitmontop";
this.MonsterName[238] = "Smoochum";
this.MonsterName[239] = "Elekid";
this.MonsterName[240] = "Magby";
this.MonsterName[241] = "Miltank";
this.MonsterName[242] = "Blissey";
this.MonsterName[243] = "Raikou";
this.MonsterName[244] = "Entei";
this.MonsterName[245] = "Suicune";
this.MonsterName[246] = "Larvitar";
this.MonsterName[247] = "Pupitar";
this.MonsterName[248] = "Tyranitar";
this.MonsterName[249] = "Lugia";
this.MonsterName[250] = "Ho-oh";
this.MonsterName[251] = "Celebi";
this.MonsterName[252] = "Treecko";
this.MonsterName[253] = "Grovyle";
this.MonsterName[254] = "Sceptile";
this.MonsterName[255] = "Torchic";
this.MonsterName[256] = "Combusken";
this.MonsterName[257] = "Blaziken";
this.MonsterName[258] = "Mudkip";
this.MonsterName[259] = "Marshtomp";
this.MonsterName[260] = "Swampert";
this.MonsterName[261] = "Poochyena";
this.MonsterName[262] = "Mightyena";
this.MonsterName[263] = "Zigzagoon";
this.MonsterName[264] = "Linoone";
this.MonsterName[265] = "Wurmple";
this.MonsterName[266] = "Silcoon";
this.MonsterName[267] = "Beautifly";
this.MonsterName[268] = "Cascoon";
this.MonsterName[269] = "Dustox";
this.MonsterName[270] = "Lotad";
this.MonsterName[271] = "Lombre";
this.MonsterName[272] = "Ludicolo";
this.MonsterName[273] = "Seedot";
this.MonsterName[274] = "Nuzleaf";
this.MonsterName[275] = "Shiftry";
this.MonsterName[276] = "Taillow";
this.MonsterName[277] = "Swellow";
this.MonsterName[278] = "Wingull";
this.MonsterName[279] = "Pelipper";
this.MonsterName[280] = "Ralts";
this.MonsterName[281] = "Kirlia";
this.MonsterName[282] = "Gardevoir";
this.MonsterName[283] = "Surskit";
this.MonsterName[284] = "Masquerain";
this.MonsterName[285] = "Shroomish";
this.MonsterName[286] = "Breloom";
this.MonsterName[287] = "Slakoth";
this.MonsterName[288] = "Vigoroth";
this.MonsterName[289] = "Slaking";
this.MonsterName[290] = "Nincada";
this.MonsterName[291] = "Ninjask";
this.MonsterName[292] = "Shedinja";
this.MonsterName[293] = "Whismur";
this.MonsterName[294] = "Loudred";
this.MonsterName[295] = "Exploud";
this.MonsterName[296] = "Makuhita";
this.MonsterName[297] = "Hariyama";
this.MonsterName[298] = "Azurill";
this.MonsterName[299] = "Nosepass";
this.MonsterName[300] = "Skitty";
this.MonsterName[301] = "Delcatty";
this.MonsterName[302] = "Sableye";
this.MonsterName[303] = "Mawile";
this.MonsterName[304] = "Aron";
this.MonsterName[305] = "Lairon";
this.MonsterName[306] = "Aggron";
this.MonsterName[307] = "Meditite";
this.MonsterName[308] = "Medicham";
this.MonsterName[309] = "Electrike";
this.MonsterName[310] = "Manectric";
this.MonsterName[311] = "Plusle";
this.MonsterName[312] = "Minun";
this.MonsterName[313] = "Volbeat";
this.MonsterName[314] = "Illumise";
this.MonsterName[315] = "Roselia";
this.MonsterName[316] = "Gulpin";
this.MonsterName[317] = "Swalot";
this.MonsterName[318] = "Carvanha";
this.MonsterName[319] = "Sharpedo";
this.MonsterName[320] = "Wailmer";
this.MonsterName[321] = "Wailord";
this.MonsterName[322] = "Numel";
this.MonsterName[323] = "Camerupt";
this.MonsterName[324] = "Torkoal";
this.MonsterName[325] = "Spoink";
this.MonsterName[326] = "Grumpig";
this.MonsterName[327] = "Spinda";
this.MonsterName[328] = "Trapinch";
this.MonsterName[329] = "Vibrava";
this.MonsterName[330] = "Flygon";
this.MonsterName[331] = "Cacnea";
this.MonsterName[332] = "Cacturne";
this.MonsterName[333] = "Swablu";
this.MonsterName[334] = "Altaria";
this.MonsterName[335] = "Zangoose";
this.MonsterName[336] = "Seviper";
this.MonsterName[337] = "Lunatone";
this.MonsterName[338] = "Solrock";
this.MonsterName[339] = "Barboach";
this.MonsterName[340] = "Whiscash";
this.MonsterName[341] = "Corphish";
this.MonsterName[342] = "Crawdaunt";
this.MonsterName[343] = "Baltoy";
this.MonsterName[344] = "Claydol";
this.MonsterName[345] = "Lileep";
this.MonsterName[346] = "Cradily";
this.MonsterName[347] = "Anorith";
this.MonsterName[348] = "Armaldo";
this.MonsterName[349] = "Feebas";
this.MonsterName[350] = "Milotic";
this.MonsterName[351] = "Castform";
this.MonsterName[352] = "Kecleon";
this.MonsterName[353] = "Shuppet";
this.MonsterName[354] = "Banette";
this.MonsterName[355] = "Duskull";
this.MonsterName[356] = "Dusclops";
this.MonsterName[357] = "Tropius";
this.MonsterName[358] = "Chimecho";
this.MonsterName[359] = "Absol";
this.MonsterName[360] = "Wynaut";
this.MonsterName[361] = "Snorunt";
this.MonsterName[362] = "Glalie";
this.MonsterName[363] = "Spheal";
this.MonsterName[364] = "Sealeo";
this.MonsterName[365] = "Walrein";
this.MonsterName[366] = "Clamperl";
this.MonsterName[367] = "Huntail";
this.MonsterName[368] = "Gorebyss";
this.MonsterName[369] = "Relicanth";
this.MonsterName[370] = "Luvdisc";
this.MonsterName[371] = "Bagon";
this.MonsterName[372] = "Shelgon";
this.MonsterName[373] = "Salamence";
this.MonsterName[374] = "Beldum";
this.MonsterName[375] = "Metang";
this.MonsterName[376] = "Metagross";
this.MonsterName[377] = "Regirock";
this.MonsterName[378] = "Regice";
this.MonsterName[379] = "Registeel";
this.MonsterName[380] = "Latias";
this.MonsterName[381] = "Latios";
this.MonsterName[382] = "Kyogre";
this.MonsterName[383] = "Groudon";
this.MonsterName[384] = "Rayquaza";
this.MonsterName[385] = "Jirachi";
this.MonsterName[386] = "Deoxys";
this.MonsterName[387] = "Turtwig";
this.MonsterName[388] = "Grotle";
this.MonsterName[389] = "Torterra";
this.MonsterName[390] = "Chimchar";
this.MonsterName[391] = "Monferno";
this.MonsterName[392] = "Infernape";
this.MonsterName[393] = "Piplup";
this.MonsterName[394] = "Prinplup";
this.MonsterName[395] = "Empoleon";
this.MonsterName[396] = "Starly";
this.MonsterName[397] = "Staravia";
this.MonsterName[398] = "Staraptor";
this.MonsterName[399] = "Bidoof";
this.MonsterName[400] = "Bibarel";
this.MonsterName[401] = "Kricketot";
this.MonsterName[402] = "Kricketune";
this.MonsterName[403] = "Shinx";
this.MonsterName[404] = "Luxio";
this.MonsterName[405] = "Luxray";
this.MonsterName[406] = "Budew";
this.MonsterName[407] = "Roserade";
this.MonsterName[408] = "Cranidos";
this.MonsterName[409] = "Rampardos";
this.MonsterName[410] = "Shieldon";
this.MonsterName[411] = "Bastiodon";
this.MonsterName[412] = "Burmy";
this.MonsterName[413] = "Wormadam";
this.MonsterName[414] = "Mothim";
this.MonsterName[415] = "Combee";
this.MonsterName[416] = "Vespiquen";
this.MonsterName[417] = "Pachirisu";
this.MonsterName[418] = "Buizel";
this.MonsterName[419] = "Floatzel";
this.MonsterName[420] = "Cherubi";
this.MonsterName[421] = "Cherrim";
this.MonsterName[422] = "Shellos";
this.MonsterName[423] = "Gastrodon";
this.MonsterName[424] = "Ambipom";
this.MonsterName[425] = "Drifloon";
this.MonsterName[426] = "Drifblim";
this.MonsterName[427] = "Buneary";
this.MonsterName[428] = "Lopunny";
this.MonsterName[429] = "Mismagius";
this.MonsterName[430] = "Honchkrow";
this.MonsterName[431] = "Glameow";
this.MonsterName[432] = "Purugly";
this.MonsterName[433] = "Chingling";
this.MonsterName[434] = "Stunky";
this.MonsterName[435] = "Skuntank";
this.MonsterName[436] = "Bronzor";
this.MonsterName[437] = "Bronzong";
this.MonsterName[438] = "Bonsly";
this.MonsterName[439] = "Mime Jr.";
this.MonsterName[440] = "Happiny";
this.MonsterName[441] = "Chatot";
this.MonsterName[442] = "Spiritomb";
this.MonsterName[443] = "Gible";
this.MonsterName[444] = "Gabite";
this.MonsterName[445] = "Garchomp";
this.MonsterName[446] = "Munchlax";
this.MonsterName[447] = "Riolu";
this.MonsterName[448] = "Lucario";
this.MonsterName[449] = "Hippopotas";
this.MonsterName[450] = "Hippowdon";
this.MonsterName[451] = "Skorupi";
this.MonsterName[452] = "Drapion";
this.MonsterName[453] = "Croagunk";
this.MonsterName[454] = "Toxicroak";
this.MonsterName[455] = "Carnivine";
this.MonsterName[456] = "Finneon";
this.MonsterName[457] = "Lumineon";
this.MonsterName[458] = "Mantyke";
this.MonsterName[459] = "Snover";
this.MonsterName[460] = "Abomasnow";
this.MonsterName[461] = "Weavile";
this.MonsterName[462] = "Magnezone";
this.MonsterName[463] = "Lickilicky";
this.MonsterName[464] = "Rhyperior";
this.MonsterName[465] = "Tangrowth";
this.MonsterName[466] = "Electivire";
this.MonsterName[467] = "Magmortar";
this.MonsterName[468] = "Togekiss";
this.MonsterName[469] = "Yanmega";
this.MonsterName[470] = "Leafeon";
this.MonsterName[471] = "Glaceon";
this.MonsterName[472] = "Gliscor";
this.MonsterName[473] = "Mamoswine";
this.MonsterName[474] = "Porygon-Z";
this.MonsterName[475] = "Gallade";
this.MonsterName[476] = "Probopass";
this.MonsterName[477] = "Dusknoir";
this.MonsterName[478] = "Froslass";
this.MonsterName[479] = "Rotom";
this.MonsterName[480] = "Uxie";
this.MonsterName[481] = "Mesprit";
this.MonsterName[482] = "Azelf";
this.MonsterName[483] = "Dialga";
this.MonsterName[484] = "Palkia";
this.MonsterName[485] = "Heatran";
this.MonsterName[486] = "Regigigas";
this.MonsterName[487] = "Giratina";
this.MonsterName[488] = "Cresselia";
this.MonsterName[489] = "Phione";
this.MonsterName[490] = "Manaphy";
this.MonsterName[491] = "Darkrai";
this.MonsterName[492] = "Shaymin";
this.MonsterName[493] = "Arceus";
this.MonsterName[494] = "Victini";
this.MonsterName[495] = "Snivy";
this.MonsterName[496] = "Servine";
this.MonsterName[497] = "Serperior";
this.MonsterName[498] = "Tepig";
this.MonsterName[499] = "Pignite";
this.MonsterName[500] = "Emboar";
this.MonsterName[501] = "Oshawott";
this.MonsterName[502] = "Dewott";
this.MonsterName[503] = "Samurott";
this.MonsterName[504] = "Patrat";
this.MonsterName[505] = "Watchog";
this.MonsterName[506] = "Lillipup";
this.MonsterName[507] = "Herdier";
this.MonsterName[508] = "Stoutland";
this.MonsterName[509] = "Purrloin";
this.MonsterName[510] = "Liepard";
this.MonsterName[511] = "Pansage";
this.MonsterName[512] = "Simisage";
this.MonsterName[513] = "Pansear";
this.MonsterName[514] = "Simisear";
this.MonsterName[515] = "Panpour";
this.MonsterName[516] = "Simipour";
this.MonsterName[517] = "Munna";
this.MonsterName[518] = "Musharna";
this.MonsterName[519] = "Pidove";
this.MonsterName[520] = "Tranquill";
this.MonsterName[521] = "Unfezant";
this.MonsterName[522] = "Blitzle";
this.MonsterName[523] = "Zebstrika";
this.MonsterName[524] = "Roggenrola";
this.MonsterName[525] = "Boldore";
this.MonsterName[526] = "Gigalith";
this.MonsterName[527] = "Woobat";
this.MonsterName[528] = "Swoobat";
this.MonsterName[529] = "Drilbur";
this.MonsterName[530] = "Excadrill";
this.MonsterName[531] = "Audino";
this.MonsterName[532] = "Timburr";
this.MonsterName[533] = "Gurdurr";
this.MonsterName[534] = "Conkeldurr";
this.MonsterName[535] = "Tympole";
this.MonsterName[536] = "Palpitoad";
this.MonsterName[537] = "Seismitoad";
this.MonsterName[538] = "Throh";
this.MonsterName[539] = "Sawk";
this.MonsterName[540] = "Sewaddle";
this.MonsterName[541] = "Swadloon";
this.MonsterName[542] = "Leavanny";
this.MonsterName[543] = "Venipede";
this.MonsterName[544] = "Whirlipede";
this.MonsterName[545] = "Scolipede";
this.MonsterName[546] = "Cottonee";
this.MonsterName[547] = "Whimsicott";
this.MonsterName[548] = "Petilil";
this.MonsterName[549] = "Lilligant";
this.MonsterName[550] = "Basculin";
this.MonsterName[551] = "Sandile";
this.MonsterName[552] = "Krokorok";
this.MonsterName[553] = "Krookodile";
this.MonsterName[554] = "Darumaka";
this.MonsterName[555] = "Darmanitan";
this.MonsterName[556] = "Maractus";
this.MonsterName[557] = "Dwebble";
this.MonsterName[558] = "Crustle";
this.MonsterName[559] = "Scraggy";
this.MonsterName[560] = "Scrafty";
this.MonsterName[561] = "Sigilyph";
this.MonsterName[562] = "Yamask";
this.MonsterName[563] = "Cofagrigus";
this.MonsterName[564] = "Tirtouga";
this.MonsterName[565] = "Carracosta";
this.MonsterName[566] = "Archen";
this.MonsterName[567] = "Archeops";
this.MonsterName[568] = "Trubbish";
this.MonsterName[569] = "Garbodor";
this.MonsterName[570] = "Zorua";
this.MonsterName[571] = "Zoroark";
this.MonsterName[572] = "Minccino";
this.MonsterName[573] = "Cinccino";
this.MonsterName[574] = "Gothita";
this.MonsterName[575] = "Gothorita";
this.MonsterName[576] = "Gothitelle";
this.MonsterName[577] = "Solosis";
this.MonsterName[578] = "Duosion";
this.MonsterName[579] = "Reuniclus";
this.MonsterName[580] = "Ducklett";
this.MonsterName[581] = "Swanna";
this.MonsterName[582] = "Vanillite";
this.MonsterName[583] = "Vanillish";
this.MonsterName[584] = "Vanilluxe";
this.MonsterName[585] = "Deerling";
this.MonsterName[586] = "Sawsbuck";
this.MonsterName[587] = "Emolga";
this.MonsterName[588] = "Karrablast";
this.MonsterName[589] = "Escavalier";
this.MonsterName[590] = "Foongus";
this.MonsterName[591] = "Amoonguss";
this.MonsterName[592] = "Frillish";
this.MonsterName[593] = "Jellicent";
this.MonsterName[594] = "Alomomola";
this.MonsterName[595] = "Joltik";
this.MonsterName[596] = "Galvantula";
this.MonsterName[597] = "Ferroseed";
this.MonsterName[598] = "Ferrothorn";
this.MonsterName[599] = "Klink";
this.MonsterName[600] = "Klang";
this.MonsterName[601] = "Klinklang";
this.MonsterName[602] = "Tynamo";
this.MonsterName[603] = "Eelektrik";
this.MonsterName[604] = "Eelektross";
this.MonsterName[605] = "Elgyem";
this.MonsterName[606] = "Beheeyem";
this.MonsterName[607] = "Litwick";
this.MonsterName[608] = "Lampent";
this.MonsterName[609] = "Chandelure";
this.MonsterName[610] = "Axew";
this.MonsterName[611] = "Fraxure";
this.MonsterName[612] = "Haxorus";
this.MonsterName[613] = "Cubchoo";
this.MonsterName[614] = "Beartic";
this.MonsterName[615] = "Cryogonal";
this.MonsterName[616] = "Shelmet";
this.MonsterName[617] = "Accelgor";
this.MonsterName[618] = "Stunfisk";
this.MonsterName[619] = "Mienfoo";
this.MonsterName[620] = "Mienshao";
this.MonsterName[621] = "Druddigon";
this.MonsterName[622] = "Golett";
this.MonsterName[623] = "Golurk";
this.MonsterName[624] = "Pawniard";
this.MonsterName[625] = "Bisharp";
this.MonsterName[626] = "Bouffalant";
this.MonsterName[627] = "Rufflet";
this.MonsterName[628] = "Braviary";
this.MonsterName[629] = "Vullaby";
this.MonsterName[630] = "Mandibuzz";
this.MonsterName[631] = "Heatmor";
this.MonsterName[632] = "Durant";
this.MonsterName[633] = "Deino";
this.MonsterName[634] = "Zweilous";
this.MonsterName[635] = "Hydreigon";
this.MonsterName[636] = "Larvesta";
this.MonsterName[637] = "Volcarona";
this.MonsterName[638] = "Cobalion";
this.MonsterName[639] = "Terrakion";
this.MonsterName[640] = "Virizion";
this.MonsterName[641] = "Tornadus";
this.MonsterName[642] = "Thundurus";
this.MonsterName[643] = "Reshiram";
this.MonsterName[644] = "Zekrom";
this.MonsterName[645] = "Landorus";
this.MonsterName[646] = "Kyurem";
this.MonsterName[647] = "Keldeo";
this.MonsterName[648] = "Meloetta";
this.MonsterName[649] = "Genesect";
this.MonsterName[650] = "Chespin";
this.MonsterName[651] = "Quilladin";
this.MonsterName[652] = "Chesnaught";
this.MonsterName[653] = "Fennekin";
this.MonsterName[654] = "Braixen";
this.MonsterName[655] = "Delphox";
this.MonsterName[656] = "Froakie";
this.MonsterName[657] = "Frogadier";
this.MonsterName[658] = "Greninja";
this.MonsterName[659] = "Bunnelby";
this.MonsterName[660] = "Diggersby";
this.MonsterName[661] = "Fletchling";
this.MonsterName[662] = "Fletchinder";
this.MonsterName[663] = "Talonflame";
this.MonsterName[664] = "Scatterbug";
this.MonsterName[665] = "Spewpa";
this.MonsterName[666] = "Vivillon";
this.MonsterName[667] = "Litleo";
this.MonsterName[668] = "Pyroar";
this.MonsterName[669] = "Flabebe";
this.MonsterName[670] = "Floette";
this.MonsterName[671] = "Florges";
this.MonsterName[672] = "Skiddo";
this.MonsterName[673] = "Gogoat";
this.MonsterName[674] = "Pancham";
this.MonsterName[675] = "Pangoro";
this.MonsterName[676] = "Furfrou";
this.MonsterName[677] = "Espurr";
this.MonsterName[678] = "Meowstic";
this.MonsterName[679] = "Honedge";
this.MonsterName[680] = "Doublade";
this.MonsterName[681] = "Aegislash";
this.MonsterName[682] = "Spritzee";
this.MonsterName[683] = "Aromatisse";
this.MonsterName[684] = "Swirlix";
this.MonsterName[685] = "Slurpuff";
this.MonsterName[686] = "Inkay";
this.MonsterName[687] = "Malamar";
this.MonsterName[688] = "Binacle";
this.MonsterName[689] = "Barbaracle";
this.MonsterName[690] = "Skrelp";
this.MonsterName[691] = "Dragalge";
this.MonsterName[692] = "Clauncher";
this.MonsterName[693] = "Clawitzer";
this.MonsterName[694] = "Helioptile";
this.MonsterName[695] = "Heliolisk";
this.MonsterName[696] = "Tyrunt";
this.MonsterName[697] = "Tyrantrum";
this.MonsterName[698] = "Amaura";
this.MonsterName[699] = "Aurorus";
this.MonsterName[700] = "Sylveon";
this.MonsterName[701] = "Hawlucha";
this.MonsterName[702] = "Dedenne";
this.MonsterName[703] = "Carbink";
this.MonsterName[704] = "Goomy";
this.MonsterName[705] = "Sliggoo";
this.MonsterName[706] = "Goodra";
this.MonsterName[707] = "Klefki";
this.MonsterName[708] = "Phantump";
this.MonsterName[709] = "Trevenant";
this.MonsterName[710] = "Pumpkaboo";
this.MonsterName[711] = "Gourgeist";
this.MonsterName[712] = "Bergmite";
this.MonsterName[713] = "Avalugg";
this.MonsterName[714] = "Noibat";
this.MonsterName[715] = "Noivern";
this.MonsterName[716] = "Xerneas";
this.MonsterName[717] = "Yveltal";
this.MonsterName[718] = "Zygarde";
this.MonsterName[719] = "Diancie";
this.MonsterName[720] = "Hoopa";
this.MonsterName[721] = "Volcanion";
this.MonsterName[722] = "Mega Fushigibana";
this.MonsterName[723] = "Mega Charizard X";
this.MonsterName[724] = "Mega Charizard Y";
this.MonsterName[725] = "Mega Blastoise";
this.MonsterName[726] = "Mega Alakazam";
this.MonsterName[727] = "Mega Gengar";
this.MonsterName[728] = "Mega Kangaskhan";
this.MonsterName[729] = "Mega Pinsir";
this.MonsterName[730] = "Mega Gyarados";
this.MonsterName[731] = "Mega Aerodactyl";
this.MonsterName[732] = "Mega Mewtwo X";
this.MonsterName[733] = "Mega Mewtwo Y";
this.MonsterName[734] = "Mega Ampharos";
this.MonsterName[735] = "Mega Scizor";
this.MonsterName[736] = "Mega Heracross";
this.MonsterName[737] = "Mega Houndoom";
this.MonsterName[738] = "Mega Tyranitar";
this.MonsterName[739] = "Mega Blaziken";
this.MonsterName[740] = "Mega Gardevoir";
this.MonsterName[741] = "Mega Mawile";
this.MonsterName[742] = "Mega Aggron";
this.MonsterName[743] = "Mega Medicham";
this.MonsterName[744] = "Mega Manectric";
this.MonsterName[745] = "Mega Banette";
this.MonsterName[746] = "Mega Absol";
this.MonsterName[747] = "Mega Garchomp";
this.MonsterName[748] = "Mega Lucario";
this.MonsterName[749] = "Mega Abomasnow";
this.MonsterName[750] = "Mega Beedrill";
this.MonsterName[751] = "Mega Pidgeot";
this.MonsterName[752] = "Mega Slowbro";
this.MonsterName[753] = "Mega Steelix";
this.MonsterName[754] = "Mega Sceptile";
this.MonsterName[755] = "Mega Swampert";
this.MonsterName[756] = "Mega Sableye";
this.MonsterName[757] = "Mega Sharpedo";
this.MonsterName[758] = "Mega Camerrupt";
this.MonsterName[759] = "Mega Altaria";
this.MonsterName[760] = "Mega Glalie";
this.MonsterName[761] = "Mega Salamence";
this.MonsterName[762] = "Mega Metagross";
this.MonsterName[763] = "Mega Latias";
this.MonsterName[764] = "Mega Latios";
this.MonsterName[765] = "Mega Rayquaza";
this.MonsterName[766] = "Mega Lopunny";
this.MonsterName[767] = "Mega Gallade";
this.MonsterName[768] = "Mega Audino";
this.MonsterName[769] = "Mega Diancie";
this.MonsterName[770] = "Primal Kyogre";
this.MonsterName[771] = "Primal Groudon";
this.MonsterName[772] = "SomePoke";
this.MonsterName[773] = "Mewtwo";
this.MonsterName[774] = "Crystal Onix";
this.MonsterName[775] = "XD001";
}
private void SetLang(string Language)
{
Language = "English";
this.Lang.setLanguage(Language);
PlayerPrefs.SetString("Lang", Language);
this.TranslateLabels[0].text = this.Lang.GetString("Copyright");
this.TranslateLabels[0].text = this.TranslateLabels[0].text.Replace("[N]", "\n");
this.TranslateLabels[1].text = this.Lang.GetString("Credits");
this.TranslateLabels[2].text = this.Lang.GetString("Login");
this.TranslateLabels[3].text = this.Lang.GetString("Login");
this.TranslateLabels[4].text = this.Lang.GetString("Remember_Pass");
this.TranslateLabels[7].text = this.Lang.GetString("Options");
this.TranslateLabels[8].text = this.Lang.GetString("Quit");
this.TranslateLabels[9].text = this.Lang.GetString("Resolution");
this.TranslateLabels[10].text = this.Lang.GetString("Options");
this.TranslateLabels[11].text = this.Lang.GetString("Apply");
this.TranslateLabels[12].text = this.Lang.GetString("Cancel");
this.TranslateLabels[13].text = this.Lang.GetString("Fullscreen");
this.TranslateLabels[14].text = this.Lang.GetString("View_Size");
this.TranslateLabels[16].text = this.Lang.GetString("Okay");
this.TranslateLabels[21].text = this.Lang.GetString("Main_Menu");
this.TranslateLabels[22].text = this.Lang.GetString("Return");
this.TranslateLabels[23].text = this.Lang.GetString("Options");
this.TranslateLabels[24].text = this.Lang.GetString("Logout");
this.TranslateLabels[25].text = this.Lang.GetString("FList");
this.TranslateLabels[26].text = this.Lang.GetString("Battle");
this.TranslateLabels[27].text = this.Lang.GetString("Trade");
this.TranslateLabels[28].text = this.Lang.GetString("Message");
this.TranslateLabels[29].text = this.Lang.GetString("Friend");
this.TranslateLabels[30].text = this.Lang.GetString("Weather");
this.TranslateLabels[31].text = this.Lang.GetString("Fight");
this.TranslateLabels[32].text = this.Lang.GetString("Run");
this.TranslateLabels[33].text = this.Lang.GetString("Items");
this.TranslateLabels[34].text = this.Lang.GetString("GUIScale");
this.TranslateLabels[35].text = this.Lang.GetString("Lighting");
this.chatBox.defaultText = this.Lang.GetString("EnterToChat");
this.TranslateTips[1].ToSay = "[33CCFF]" + this.Lang.GetString("Main_Menu") + "[-]";
this.TranslateTips[2].ToSay = "[33CCFF]" + this.Lang.GetString("PMoney") + "[-]";
this.TranslateTips[3].ToSay = "[33CCFF]" + this.Lang.GetString("HSChat") + "[-]";
this.TranslateTips[4].ToSay = "[33CCFF]" + this.Lang.GetString("UItems") + "[-]";
this.TranslateTips[5].ToSay = "[33CCFF]" + this.Lang.GetString("Potions") + "[-]";
this.TranslateTips[6].ToSay = "[33CCFF]" + this.Lang.GetString("Key_Items") + "[-]";
this.TranslateTips[7].ToSay = "[33CCFF]" + this.Lang.GetString("Trash") + "[-] - " + this.Lang.GetString("TrashDesc");
if (Language == "English")
{
this.FlagFist.mainTexture = this.FistTexture[0];
}
else if (Language == "German")
{
this.FlagFist.mainTexture = this.FistTexture[1];
}
else if (Language == "Croatian")
{
this.FlagFist.mainTexture = this.FistTexture[2];
}
else if (Language == "Russian")
{
this.FlagFist.mainTexture = this.FistTexture[3];
}
else if (Language == "Spanish")
{
this.FlagFist.mainTexture = this.FistTexture[4];
}
else if (Language == "Italian")
{
this.FlagFist.mainTexture = this.FistTexture[5];
}
else if (Language == "Portuguese-BR")
{
this.FlagFist.mainTexture = this.FistTexture[6];
}
else if (Language == "Hungary")
{
this.FlagFist.mainTexture = this.FistTexture[7];
}
else if (Language == "Portuguese")
{
this.FlagFist.mainTexture = this.FistTexture[8];
}
else if (Language == "French")
{
this.FlagFist.mainTexture = this.FistTexture[9];
}
}
private void Start()
{
SHDE.PROSD();
this.SavedChat = new List<DSSock.SavedChats>();
this.TextFiler = base.GetComponent<SwearFilter>();
this.TI = new TileInfo();
this.TI.LoadInfo();
this.Lang = new Language();
this.Lang.SetEnglish();
this.SetLang(PlayerPrefs.GetString("Lang", "English"));
this.con.Add("PRO> PRO Starting Up.");
this.Atks = new Attacks();
this.Atks.LoadMoves();
this.Itms = new ItemDes();
this.Itms.LoadItems(PlayerPrefs.GetString("Lang", "English"));
this.loadTiles();
this.ClearVaribles();
this.PlayMusic(0);
if (PlayerPrefs.GetInt("remember") == 1)
{
this.rememberPass.value = true;
}
else
{
this.rememberPass.value = false;
}
if (this.rememberPass.value)
{
this.user.value = PlayerPrefs.GetString("UserName", string.Empty);
this.pass.value = PlayerPrefs.GetString("PassWord", string.Empty);
}
this.Players.sprite = "11000000000";
this.AF.MS = this.MS;
this.setSheet();
Camera.main.orthographicSize = 5f;
}
private void PlayMusic(int ID)
{
this.musicPlayer.PlayMusic(ID);
}
private void ClearVaribles()
{
this.ChatText.Clear();
}
private void sendMove(string dir)
{
this.sendPacket("}|.|" + dir);
this.lastMoved = Time.time;
this.dontChange = false;
this.FollowPoke.LastPostion = this.Player.position;
if (this.mapCreator.Colliders[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)] == 5)
{
return;
}
if (this.mapCreator.Tiles4[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)] == 25105 || this.mapCreator.Tiles4[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)] == 25106 || this.mapCreator.Tiles4[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)] == 25107)
{
return;
}
if (!this.Bike && (this.CanFootStep(this.mapCreator.Tiles[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)]) || this.CanFootStep(this.mapCreator.Tiles2[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)]) || this.CanFootStep(this.mapCreator.Tiles3[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)])))
{
FootStep footStep = UnityEngine.Object.Instantiate(this.FSObject, this.Player.position + new Vector3(0f, 0.5f, 0.01f), Quaternion.identity) as FootStep;
this.stepCount++;
if (this.stepCount > 3)
{
this.stepCount = 0;
}
if (this.stepCount == 0)
{
this.stepCount2 = 0;
}
if (this.stepCount == 1)
{
this.stepCount2 = 1;
}
if (this.stepCount == 2)
{
this.stepCount2 = 2;
}
if (this.stepCount == 3)
{
this.stepCount2 = 1;
}
switch (this.pDirection)
{
case 1:
footStep.ChangeSprite(0 + this.stepCount2);
break;
case 2:
footStep.ChangeSprite(6 + this.stepCount2);
break;
case 3:
footStep.ChangeSprite(9 + this.stepCount2);
break;
case 4:
footStep.ChangeSprite(3 + this.stepCount2);
break;
}
}
else if (this.Bike && !this.AF.Mount && (this.CanFootStep(this.mapCreator.Tiles[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)]) || this.CanFootStep(this.mapCreator.Tiles2[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)]) || this.CanFootStep(this.mapCreator.Tiles3[(int)this.Player.position.x, (int)(-(int)this.Player.position.y)])))
{
FootStep footStep2 = UnityEngine.Object.Instantiate(this.BikeStepObject, this.Player.position + new Vector3(0f, 0f, 0.01f), Quaternion.identity) as FootStep;
switch (this.pDirection)
{
case 1:
if (dir == "u")
{
footStep2.ChangeSprite(3);
}
if (dir == "d")
{
footStep2.ChangeSprite(3);
}
if (dir == "l")
{
footStep2.ChangeSprite(2);
}
if (dir == "r")
{
footStep2.ChangeSprite(0);
}
break;
case 2:
if (dir == "u")
{
footStep2.ChangeSprite(3);
}
if (dir == "d")
{
footStep2.ChangeSprite(3);
}
if (dir == "l")
{
footStep2.ChangeSprite(7);
}
if (dir == "r")
{
footStep2.ChangeSprite(5);
}
break;
case 3:
if (dir == "u")
{
footStep2.ChangeSprite(5);
}
if (dir == "d")
{
footStep2.ChangeSprite(0);
}
if (dir == "l")
{
footStep2.ChangeSprite(1);
}
if (dir == "r")
{
footStep2.ChangeSprite(1);
}
break;
case 4:
if (dir == "u")
{
footStep2.ChangeSprite(7);
}
if (dir == "d")
{
footStep2.ChangeSprite(2);
}
if (dir == "l")
{
footStep2.ChangeSprite(1);
}
if (dir == "r")
{
footStep2.ChangeSprite(1);
}
break;
}
}
}
public void createFootStep(int x, int y, float z, int ani, int dir)
{
if (this.mapCreator.Colliders[x, y] == 5)
{
return;
}
if (this.mapCreator.Tiles4[x, y] == 25105 || this.mapCreator.Tiles4[x, y] == 25106 || this.mapCreator.Tiles4[x, y] == 25107)
{
return;
}
if (this.CanFootStep(this.mapCreator.Tiles[x, y]) || this.CanFootStep(this.mapCreator.Tiles2[x, y]) || this.CanFootStep(this.mapCreator.Tiles3[x, y]))
{
FootStep footStep = UnityEngine.Object.Instantiate(this.FSObject, new Vector3((float)x, (float)(-(float)y) + 0.5f, z), Quaternion.identity) as FootStep;
footStep.ChangeSprite(dir + ani);
}
}
public void createBikeStep(int x, int y, float z, int ani, string dir, int newdir)
{
if (this.mapCreator.Colliders[x, y] == 5)
{
return;
}
if (this.CanFootStep(this.mapCreator.Tiles[x, y]) || this.CanFootStep(this.mapCreator.Tiles2[x, y]) || this.CanFootStep(this.mapCreator.Tiles3[x, y]))
{
FootStep footStep = UnityEngine.Object.Instantiate(this.BikeStepObject, new Vector3((float)x, (float)(-(float)y), z), Quaternion.identity) as FootStep;
switch (newdir)
{
case 1:
if (dir == "u")
{
footStep.ChangeSprite(3);
}
if (dir == "d")
{
footStep.ChangeSprite(3);
}
if (dir == "l")
{
footStep.ChangeSprite(2);
}
if (dir == "r")
{
footStep.ChangeSprite(0);
}
break;
case 2:
if (dir == "u")
{
footStep.ChangeSprite(3);
}
if (dir == "d")
{
footStep.ChangeSprite(3);
}
if (dir == "l")
{
footStep.ChangeSprite(7);
}
if (dir == "r")
{
footStep.ChangeSprite(5);
}
break;
case 3:
if (dir == "u")
{
footStep.ChangeSprite(5);
}
if (dir == "d")
{
footStep.ChangeSprite(0);
}
if (dir == "l")
{
footStep.ChangeSprite(1);
}
if (dir == "r")
{
footStep.ChangeSprite(1);
}
break;
case 4:
if (dir == "u")
{
footStep.ChangeSprite(7);
}
if (dir == "d")
{
footStep.ChangeSprite(2);
}
if (dir == "l")
{
footStep.ChangeSprite(1);
}
if (dir == "r")
{
footStep.ChangeSprite(1);
}
break;
}
}
}
private bool CanFootStep(int Tile)
{
switch (Tile)
{
case 1403:
case 1404:
case 1411:
case 1412:
case 1419:
case 1420:
case 1427:
case 1428:
case 1432:
case 1433:
case 1434:
case 1435:
case 1436:
case 1437:
case 1440:
case 1441:
case 1442:
case 1443:
case 1444:
case 1445:
case 1448:
case 1449:
case 1450:
case 1451:
case 1452:
case 1453:
return true;
case 1405:
case 1406:
case 1407:
case 1408:
case 1409:
case 1410:
case 1413:
case 1414:
case 1415:
case 1416:
case 1417:
case 1418:
case 1421:
case 1422:
case 1423:
case 1424:
case 1425:
case 1426:
case 1429:
case 1430:
case 1431:
case 1438:
case 1439:
case 1446:
case 1447:
IL_DA:
switch (Tile)
{
case 1912:
case 1913:
case 1914:
case 1920:
case 1921:
case 1922:
case 1923:
case 1924:
case 1928:
case 1929:
case 1930:
case 1936:
case 1937:
case 1938:
case 1939:
case 1940:
case 1944:
case 1945:
case 1946:
case 1947:
case 1948:
case 1952:
case 1953:
case 1954:
return true;
case 1915:
case 1916:
case 1917:
case 1918:
case 1919:
case 1925:
case 1926:
case 1927:
case 1931:
case 1932:
case 1933:
case 1934:
case 1935:
case 1941:
case 1942:
case 1943:
case 1949:
case 1950:
case 1951:
IL_192:
switch (Tile)
{
case 1478:
case 1479:
case 1483:
case 1484:
case 1485:
case 1491:
case 1492:
case 1493:
return true;
case 1480:
case 1481:
case 1482:
case 1486:
case 1487:
case 1488:
case 1489:
case 1490:
IL_1DE:
switch (Tile)
{
case 6309:
case 6310:
case 6311:
case 6317:
case 6318:
case 6319:
return true;
case 6312:
case 6313:
case 6314:
case 6315:
case 6316:
IL_216:
switch (Tile)
{
case 6325:
case 6326:
case 6327:
case 6333:
case 6334:
case 6335:
return true;
case 6328:
case 6329:
case 6330:
case 6331:
case 6332:
IL_24E:
switch (Tile)
{
case 8280:
case 8281:
case 8282:
case 8288:
case 8289:
case 8290:
return true;
case 8283:
case 8284:
case 8285:
case 8286:
case 8287:
IL_286:
switch (Tile)
{
case 1499:
case 1500:
case 1501:
return true;
default:
switch (Tile)
{
case 8272:
case 8274:
return true;
case 8273:
IL_2B6:
switch (Tile)
{
case 8296:
case 8297:
case 8298:
return true;
default:
switch (Tile)
{
case 8304:
case 8306:
return true;
case 8305:
IL_2E6:
if (Tile != 1470 && Tile != 1471 && Tile != 6301 && Tile != 6302 && Tile != 2313)
{
return false;
}
return true;
}
goto IL_2E6;
}
break;
}
goto IL_2B6;
}
break;
}
goto IL_286;
}
goto IL_24E;
}
goto IL_216;
}
goto IL_1DE;
}
goto IL_192;
}
goto IL_DA;
}
public void sendMSG(string text)
{
this.sendPacket("{|.|" + text);
}
public string AsciiToUNI(string text)
{
byte[] bytes = Encoding.ASCII.GetBytes(text);
for (int i = 0; i < bytes.Length; i++)
{
if (bytes[i] == 1)
{
bytes[i] = 0;
}
}
text = Encoding.Unicode.GetString(bytes);
return text;
}
private void DirectionToSprite()
{
if (this.pDirection == 0)
{
this.pDirection = 1;
}
switch (this.pDirection)
{
case 1:
this.AF.ChangeSprite(0 + this.LAniNumber);
break;
case 2:
this.AF.ChangeSprite(6 + this.LAniNumber);
break;
case 3:
this.AF.ChangeSprite(9 + this.LAniNumber);
break;
case 4:
this.AF.ChangeSprite(3 + this.LAniNumber);
break;
}
}
private void setSheet()
{
string ext = string.Empty;
if (this.Surf)
{
ext = "sf";
}
if (this.Bike)
{
ext = "b";
}
if (this.Bike || this.Surf)
{
this.FollowPoke.gameObject.SetActive(false);
}
else if (!this.FollowPoke.gameObject.activeSelf)
{
this.FollowPoke.gameObject.SetActive(true);
this.FollowPoke.transform.position = this.Player.position + new Vector3(0f, 1f, 0f);
this.FollowPoke.LastPostion = this.Player.position + new Vector3(0f, 1f, 0f);
}
this.AF.ChangeSheet(this.Players.sprite, ext);
}
private void createAni()
{
int num = this.mapCreator.Tiles2[(int)this.Player.position.x, -(int)this.Player.position.y];
int num2 = this.mapCreator.Tiles3[(int)this.Player.position.x, -(int)this.Player.position.y];
if (num == 6 || num == 14 || num == 55 || num == 15 || num == 248 || num == 249 || num == 250 || num2 == 6 || num2 == 14 || num2 == 55 || num2 == 15 || num2 == 248 || num2 == 249 || num2 == 250)
{
UnityEngine.Object.Instantiate(this.GrassObject, this.Player.position, Quaternion.identity);
AudioSource.PlayClipAtPoint(this.GrassSound, Camera.main.transform.position, this.SFXVolume);
}
}
public void createNetworkAni(int x, int y, float z)
{
if (y < 1)
{
return;
}
if (y > this.mapCreator.Height - 1)
{
return;
}
if (x > this.mapCreator.Width - 1)
{
return;
}
if (x < 1)
{
return;
}
int num = this.mapCreator.Tiles2[x, y + 1];
int num2 = this.mapCreator.Tiles3[x, y + 1];
if (num == 6 || num == 14 || num == 55 || num == 15 || num == 248 || num == 249 || num == 250 || num2 == 6 || num2 == 14 || num2 == 55 || num2 == 15 || num2 == 248 || num2 == 249 || num2 == 250)
{
UnityEngine.Object.Instantiate(this.GrassObject, new Vector3((float)x, (float)(-(float)(y + 1)), z), Quaternion.identity);
}
}
private void FixedUpdate()
{
if (this.LoggedIn && Time.time > this.LastTimeTextUpdate + 10f)
{
this.LastTimeTextUpdate = Time.time;
this.TimeLabel.text = DateTime.Now.ToString("HH:mm") + "\n" + this.PokeTime;
}
}
public void RemoveHat()
{
if (this.Wearables[1].mainTexture != null)
{
this.sendMSG("/takehat");
}
}
public void RemoveClothe()
{
if (this.Wearables[2].mainTexture != null)
{
this.sendMSG("/takecloth");
}
}
public void SetChar(string Hair, string Colour, string Tone, string Clothe, string Eyes)
{
this.sendMSG(string.Concat(new string[]
{
"/setchar ",
Hair,
",",
Colour,
",",
Tone,
",",
Clothe,
",",
Eyes
}));
this.StartStage++;
this.UpdateBox = true;
this.TownButtons.SetActive(false);
}
private void Update()
{
if (Input.GetKeyUp(this.toggleKey))
{
this.Console.SetActive(!this.Console.activeSelf);
if (this.Console.activeSelf)
{
this.ConText.isSelected = true;
}
}
if (this.toDiscon)
{
this.Disconnect();
return;
}
this.processReadBuffers();
if (this.loadingMap)
{
return;
}
if (!this.LoggedIn)
{
if (this.Message != this.res)
{
this.Message = this.res;
this.MessageTime = 5f;
}
this.MessageTime += -1f * Time.deltaTime;
if (this.MessageTime < 0f)
{
this.MessageTime = 0f;
this.Message = string.Empty;
this.res = string.Empty;
}
}
if (this.LoggedIn)
{
if (!this.isConnected)
{
this.toDiscon = true;
return;
}
if (this.StartScreen.activeSelf && this.tosay != string.Empty)
{
if (this.CanPressKey && !this.TownButtons.activeSelf && (Input.GetKeyUp(this.KeyManager.InteractButton) || Input.GetKeyUp(this.KeyManager.InteractButtonS) || Input.GetMouseButtonDown(0)))
{
this.UpdateBox = true;
}
if (this.Scrolling && this.tosay != string.Empty)
{
this.StartText.text = this.tosay.Substring(0, this.ScrollTo) + " ";
this.scrollCount += this.SaySpeed * Time.deltaTime;
if (this.scrollCount > 1f)
{
this.ScrollTo++;
this.scrollCount = 0f;
}
if (this.ScrollTo > this.tosay.Length)
{
AudioSource.PlayClipAtPoint(this.TextSound, Camera.main.transform.position, this.SFXVolume);
this.ScrollTo = this.tosay.Length;
this.Scrolling = false;
this.StartText.text = this.tosay;
this.scrollCount = 0f;
}
else if (this.UpdateBox)
{
this.UpdateBox = false;
this.ScrollTo = this.tosay.Length;
return;
}
}
if (this.UpdateBox)
{
this.UpdateBox = false;
this.Scrolling = true;
this.ScrollTo = 0;
if (this.StartStage == 0)
{
this.StartStage++;
this.StartText.text = string.Empty;
this.tosay = "But everyone calls me the Pokemon\nProfessor.";
return;
}
if (this.StartStage == 1)
{
this.StartStage++;
this.StartText.text = string.Empty;
this.tosay = "Before we go any further, I'd like to tell\nyou a few things you should know about\nthis world!";
return;
}
if (this.StartStage == 2)
{
this.StartStage++;
this.StartText.text = string.Empty;
this.tosay = "This world is widely inhabited by\ncreatures known as Pokemon.\n\nWe humans live alongside Pokemon\nas friends.\n";
return;
}
if (this.StartStage == 3)
{
this.StartStage++;
this.StartText.text = string.Empty;
this.tosay = "At times we play together, and at other\ntimes we work together.\n\nSome people use their Pokemon to\nbattle and develop closer bonds with\nthem..\n";
return;
}
if (this.StartStage == 4)
{
this.StartStage++;
this.StartText.text = string.Empty;
this.tosay = "Now, why don't you tell me a little bit\nabout yourself?";
return;
}
if (this.StartStage == 5)
{
this.StartStage++;
this.StartText.text = string.Empty;
this.tosay = "Are you a Boy or Girl?";
this.TownButtons.SetActive(true);
return;
}
if (this.StartStage == 6)
{
this.StartStage++;
this.StartText.text = string.Empty;
this.tosay = "Are you ready?\n\nYour very own tale of grand adventure is\nabout to unfold.\n";
return;
}
if (this.StartStage == 7)
{
this.StartStage++;
this.StartText.text = string.Empty;
this.tosay = "Fun experiences, difficult experiences,\nthere's so much waiting for you!\n\nDreams! Adventure!\n\nLet's go to the world of Pokemon!";
return;
}
if (this.StartStage == 8)
{
this.StartStage = 0;
this.StartText.text = string.Empty;
this.tosay = string.Empty;
this.StartScreen.SetActive(false);
this.PlayMusic(this.mapMusic);
return;
}
}
return;
}
if (this.CanPressKey && Input.GetKeyUp(KeyCode.Escape))
{
this.chatBox.RemoveFocus();
this.openMenu();
}
if (this.inBattle)
{
this.BattleLoop();
}
else if (this.movetomap != string.Empty)
{
this.MoveUser(this.movetomap, this.movetox, this.movetoy, this.movetosurf);
this.movetomap = string.Empty;
this.movetox = 0;
this.movetoy = 0;
this.movetosurf = 0;
}
if (this.FriendSprite.alpha > 0f)
{
this.FriendSprite.alpha += -0.8f * Time.deltaTime;
}
this.HandleQue();
this.FadeLight();
this.chatOpen = this.chatBox.isSelected;
if (!this.chatOpen)
{
if (UICamera.selectedObject)
{
if (UICamera.selectedObject.name == "PMInput")
{
this.chatOpen = true;
}
else if (UICamera.selectedObject.name == "ChannelText")
{
this.chatOpen = true;
}
else