Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/06/2020 in all areas

  1. 1 point
    Hello all, This is a program I wrote in java to check the client files for for gem descriptions. import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; public class StringArraySearch { public static void main(String[] args) throws IOException{ //Creation of File Descriptor for input file File readFile = new File("src/stonehint.txt"); //Intialize the word Array String[] fileWords=null; //Creation of File Reader object FileReader fr = new FileReader(readFile); //Creation of BufferedReader object BufferedReader br = new BufferedReader(fr); String stringCheck; String[] input={ "ItemHint_LieYanS", "ItemHint_ZhiYanS", "ItemHint_HuoYaoS", "ItemHint_MaNaoS", "ItemHint_HanYu", "ItemHint_YueZhiX", "ItemHint_ShuiLingS", "ItemHint_ShengGuangS", "ItemHint_FengLingS", "ItemHint_YingYanS", "ItemHint_YanVitS", "ItemHint_YanStrS", "ItemHint_LongZhiTong", "ItemHint_LongZhiHun", "ItemHint_LongZhiXin", "ItemHint_GaNaZhiShen", "ItemHint_HuangYu", "ItemHint_ChiYu", "ItemHint_QingYu", "ItemHint_XTLingGuang", "ItemHint_LKBiZhong", "ItemHint_BBDuoShan", "ItemHint_FFDiYu", "ItemHint_XKQiangHua", "ItemHint_SShuiyao", "ItemHint_SSbusi", "ItemHint_SSguangmang", "ItemHint_SSningju", "ItemHint_SSxuanwu", "ItemHint_HLS", "ItemHint_HYS", "ItemHint_HJS", "ItemHint_BLS", "ItemHint_BYS", "ItemHint_BJS", "ItemHint_CLS", "ItemHint_CYS", "ItemHint_CJS", "ItemHint_ZLS", "ItemHint_ZYS", "ItemHint_ZJS", "ItemHint_QLS", "ItemHint_QYS", "ItemHint_QJS", "ItemHint_GGR", "ItemHint_GGS", "ItemHint_GGOS", "ItemHint_GGC", "ItemHint_GGW", "ItemHint_JinYanS", "ItemHint_MuYanS", "ItemHint_ShuiYanS", "ItemHint_HuoYanS", "ItemHint_TuYanS" }; //Variable to check increments int count=0; //Reading Content from the file while((stringCheck = br.readLine())!=null){ //Split the word using space fileWords = stringCheck.split(" "); for (String word : fileWords){ for (int i = 0; i < input.length; i++){ //Search for the given word if (word.equals(input[i])){ System.out.println(input[i] + " is present in the file"); count++; } } } } System.out.println(""); System.out.println("There are "+count+" gem descriptions in the file"); fr.close(); }//close main method }//class How useful is it? Not very lol.
  2. 1 point
    hey !~ you can use this only tho ------------ get guild leader id -- function GuildLeaderID(Player) local Guild_ID = GetChaGuildID(Player) local String = "SELECT leader_id FROM GameDB.dbo.guild WHERE guild_id = '"..Guild_ID.."'" local Connect, ConnectID = LuaSQL("connect", SQL.GameDB.Host, SQL.GameDB.User, SQL.GameDB.Password) if Connect == SQL_SUCCESS_WITH_INFO then local Success, Query = LuaSQL("query", ConnectID, String) if Success == SQL_SUCCESS_WITH_INFO then local Data = LuaSQL("fetch", ConnectID, Query) LuaSQL("freehandle", ConnectID, Query) LuaSQL("close", ConnectID) return Data["leader_id"] end end end -- example -- function getgleaderids(player) local leaderid = GuildLeaderID(player) local guildid = GetChaGuildID(player) local guildname = GetGuildName(guildid) Notice("Guild id["..guildid..'] Guild Name['..guildname..'] leader is['..leaderid.."]") end
  3. 1 point
    К чему ты это написал ? Твоя самооценка мне понятна, твоего варианта реализации я к сожалению не увидел! А теперь держи мой, и впредь веди себя по проще, а то залетел тут с наездом, "разработчик от бога" блин. cha_timer в самое начало. CoolDown(role) function в самый конец. function CoolDown(role) local servertime = os.time() local cha_name = GetChaDefaultName(role) if COOL_DOWNS[cha_name] < servertime then COOL_DOWNS[cha_name] = 0 end end varieble в самое начало. COOL_DOWNS = {} ItemEffect в самый конец. --Свиток Баффа function ItemUse_Buff(role) local server_time = os.time() + 100 -- Время в секундах local cha_name = GetChaDefaultName(role) if COOL_DOWNS[cha_name] == nil then COOL_DOWNS[cha_name] = 0 return end if (COOL_DOWNS[cha_name] >= 1) then finish = COOL_DOWNS[cha_name] - os.time() UseItemFailed ( role ) datetime = os.date("!*t", finish ) SystemNotice(role, "Что бы использовать предмет, нужно подожать: осталось подождать ".. tostring(datetime.min) .. " минут(а, ы), ".. tostring(datetime.sec) .. " секунд(ы, у). ") elseif (COOL_DOWNS[cha_name] == 0) then AddState (role, role, STATE_XLZH, 10, 1800) AddState (role, role, STATE_SHPF, 10, 1800) AddState (role, role, STATE_MLCH, 10, 1800) AddState (role, role, STATE_FZLZ, 10, 1800) AddState (role, role, STATE_TSHD, 10, 1800) SystemNotice (role, "Вам предоставлены все бафы 10 уровня на 30 минут , приятного фарма! ") COOL_DOWNS[cha_name] = server_time end end Вот и всё, и не нужно тут никого унижать, ты тут не основной тип, просто не каждому это барахло надо, что бы время на него тратить, Лев Толстой ...
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...