Files
myrzx_bot/analysis/as3/scripts/net/pixvi/myr/center/GameTools.as
T

57 lines
1.2 KiB
ActionScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package net.pixvi.myr.center
{
import net.pixvi.myrloader.center.MyrCenter;
public class GameTools
{
public static var words:Array;
public static var chars:String = "  ,<>.{}[]-_=+`~/?!@#$%^&*|\\/\"\';:";
public function GameTools()
{
super();
}
public static function checkWord(str:String) : String
{
var i:int = 0;
if(MyrCenter.lang == "JP")
{
return null;
}
var len:int = int(words.length);
for(i = 0; i < len; )
{
if(str.indexOf(words[i]) != -1)
{
return words[i];
}
i++;
}
return null;
}
public static function checkChar(str:String) : String
{
var i:int = 0;
if(chars == null || chars.length <= 1)
{
return null;
}
var len:int = str.length;
for(i = 0; i < len; )
{
if(chars.indexOf(str.charAt(i)) != -1)
{
return str.charAt(i);
}
i++;
}
return null;
}
}
}