Jump to content

Search the Community

Showing results for tags 'save'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 37 results

  1. Hi, I'm making some moddings to my RSPS but everytime i quit the server, my moddings are gone. So how can i save my moddings to my server (718 server) ? Hope you can help me soon Grtz
  2. Hi All I have problem When i just put my items in bank and log out and in,, they Disappear can you pleas tell me how to fix that? Instantix Sources! If they was on my INV they dont disappear Thanks!
  3. why my client is save password and account to players i need from client don't save it can anyone help about that ?
  4. Okey so my rfd minigame doesn't save atm. Once u relog u have to start over the minigame from wave 0. Any1 knows where the saving part is happening? Or why it wouldn't save? Let me know what files u wanna have a look at. PlayerSave.Java = [url]http://pastebin.com/zr07kKBF[/url]
  5. [URL="http://superhostingcoupons.com/"][CENTER][IMG]http://i.imgur.com/qCvonhX.png[/IMG][/CENTER][/URL] [B]About[/B] SuperHostingCoupons.com is an easy way to save a lot of money on webhosting and domains. We have a variety of different webhosting coupons to choose from and we add more coupons to our database everyday! [URL="http://superhostingcoupons.com"]Click here to go to our website[/URL]
  6. Dr Fawad

    Server Won't Save

    Okay so my server. When I log in, it works 100% normally and it lets me log in. Then when I log out and try to reconnect it says. Error Loading Your Profile. Please Contact Customer Service. If anybody can help me I would appreciate that, I don't understand why this is happening. The source & client I'm using is a custom one and its special and hasn't been published yet.
  7. need help with save game button. i have Save Game on the quest tab but when i click on it it doesnt save my progress and i dont have the code or know were to put the code. can someone please help me this once? really need help add me on skype: Marky7z
  8. Hi, while testing a source i had a problem with characters that don't save. If i log in and log out, there isn't been any file made in the source so nothing can be saved. Does anyone know a solution? Also, i can't find tutorials on how to change the positions of permanent npc's like shops and how to change what they have in the shop? I'm on a 317 server; TrisidiaX V3. Thanks! :cool:
  9. Project Insanity 317. I want to add a saving button because some of my players got rolled when I updated server. Also how do I add Countdown for Update? For example: "Update in: 0:10". Help me (: Thanks.
  10. players annoy me reset made me lost this blah blah pisses me /them off so can u guys please help me make it auto save? thanks :D
  11. Hi, I'm a new coder trying to code a PI server. The problem is that whenever I edit the donor points value in the character files, or use ::givedp, the person recieves the donor points, but as soon as he logs out, it shows that the character has 0 donor points in the quest tab, and is unable to purchase anything in the donor shop. Can anyone offer a solution? Thanks.
  12. Woot!!! Figured dat junk out on my own, so baws. :D
  13. BZB

    Save money my ass!

    Look at this shit [url]http://www.walmart.com/ip/Rubbermaid-Paper-Cone-Cups-in-White-Set-of-12/22444785[/url]
  14. title says all, if i log out it doesnt save my account.. any help? is it client sided or server sided?
  15. Can someone help me by telling me how I could add a "Save all" and a "save" command so that if server crashes/restarts people don't get rolled back?
  16. x5478

    Server Wont Save??

    K so im using insidiax V1 source and when you close your source it is supposed to save all accounts before they get logged off, and thats also how u use a auto restarter, it closes and reopens the source, which makes a restart. but when i close my source it doesnt save the players. it will just roll them back to the last time they logged in... so obviously when the source is closed by me or the auto restarter the source doesnt save the accounts. so how do i fix this, cause my server is 24/7 and i need a auto restarter or it will be crap.
  17. Is their a way to make it so when someone drops an item it saves them?
  18. I'm using Elysium 317 Source .I looked in my character files no accounts are in there. Here is my playersave: package server.model.players; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import server.Server; import server.util.Misc; public class PlayerSave { /** *Loading **/ public static int loadGame(Client p, String playerName, String playerPass) { String line = ""; String token = ""; String token2 = ""; String[] token3 = new String[3]; boolean EndOfFile = false; int ReadMode = 0; BufferedReader characterfile = null; boolean File1 = false; try { characterfile = new BufferedReader(new FileReader("./Source/Data/characters/"+playerName+".txt")); File1 = true; } catch(FileNotFoundException fileex1) { } if (File1) { //new File ("./Data/characters/"+playerName+".txt"); } else { Misc.println(playerName+": character file not found."); p.newPlayer = false; return 0; } try { line = characterfile.readLine(); } catch(IOException ioexception) { Misc.println(playerName+": error loading file."); return 3; } while(EndOfFile == false && line != null) { line = line.trim(); int spot = line.indexOf("="); if (spot > -1) { token = line.substring(0, spot); token = token.trim(); token2 = line.substring(spot + 1); token2 = token2.trim(); token3 = token2.split("\t"); switch (ReadMode) { case 1: if (token.equals("character-password")) { if (playerPass.equalsIgnoreCase(token2) || Misc.basicEncrypt(playerPass).equals(token2)) { playerPass = token2; } else { return 3; } } break; case 2: if (token.equals("character-height")) { p.heightLevel = Integer.parseInt(token2); } else if (token.equals("character-posx")) { p.teleportToX = (Integer.parseInt(token2) <= 0 ? 3210 : Integer.parseInt(token2)); } else if (token.equals("character-posy")) { p.teleportToY = (Integer.parseInt(token2) <= 0 ? 3424 : Integer.parseInt(token2)); } else if (token.equals("character-rights")) { p.playerRights = Integer.parseInt(token2); } else if (token.equals("Used-Puremaster")) { p.pure = Integer.parseInt(token2); } else if (token.equals("tutorial-progress")) { p.tutorial = Integer.parseInt(token2); } else if (token.equals("crystal-bow-shots")) { p.crystalBowArrowCount = Integer.parseInt(token2); } else if (token.equals("MoneyOrb")) { p.MoneyCash = Integer.parseInt(token2); } else if (token.equals("skull-timer")) { p.skullTimer = Integer.parseInt(token2); } else if (token.equals("EP")) { p.earningPotential = Integer.parseInt(token2); } else if (token.equals("magic-book")) { p.playerMagicBook = Integer.parseInt(token2); } else if (token.equals("xpLock")) { p.xpLock = Boolean.parseBoolean(token2); } else if (token.equals("Jailed")) { p.Jail = Boolean.parseBoolean(token2); } else if (token.equals("summonId")) { p.summonId = Integer.parseInt(token2); } else if (token.equals("slayerPoints")) { p.slayerPoints = Integer.parseInt(token2); } else if (token.equals("has-npc")) { p.hasNpc = Boolean.parseBoolean(token2); } else if (token.equals("Agrith")) { p.Agrith = Boolean.parseBoolean(token2); } else if (token.equals("vls-hits")) { p.degradeTime = Integer.parseInt(token2); } else if (token.equals("Flambeed")) { p.Flambeed = Boolean.parseBoolean(token2); } else if (token.equals("Karamel")) { p.Karamel = Boolean.parseBoolean(token2); } else if (token.equals("Dessourt")) { p.Dessourt = Boolean.parseBoolean(token2); } else if (token.equals("culin")) { p.Culin = Boolean.parseBoolean(token2); } else if (token.equals("Monkey-Kc")) { p.monkeyk0ed = Integer.parseInt(token2); } else if (token.equals("brother-info")) { p.barrowsNpcs[Integer.parseInt(token3[0])][1] = Integer.parseInt(token3[1]); } else if (token.equals("special-amount")) { p.specAmount = Double.parseDouble(token2); } else if (token.equals("selected-coffin")) { p.randomCoffin = Integer.parseInt(token2); } else if (token.equals("barrows-killcount")) { p.pkPoints = Integer.parseInt(token2); } else if (token.equals("teleblock-length")) { p.teleBlockDelay = System.currentTimeMillis(); p.teleBlockLength = Integer.parseInt(token2); } else if (token.equals("pc-points")) { p.pcPoints = Integer.parseInt(token2); } else if (token.equals("gwdelay")) { p.gwdelay = Integer.parseInt(token2); } else if (token.equals("Altar")) { p.altarPrayed = Integer.parseInt(token2); } else if (token.equals("Arma-KC")) { p.Arma = Integer.parseInt(token2); } else if (token.equals("Band-KC")) { p.Band = Integer.parseInt(token2); } else if (token.equals("Zammy-KC")) { p.Zammy = Integer.parseInt(token2); } else if (token.equals("Sara-KC")) { p.Sara = Integer.parseInt(token2); } else if (token.equals("pk-points")) { p.pkPoints = Integer.parseInt(token2); } else if (token.equals("Wheel")) { p.Wheel = Integer.parseInt(token2); } else if (token.equals("SPoints")) { p.SPoints = Integer.parseInt(token2); } else if (token.equals("isDonator")) { p.isDonator = Integer.parseInt(token2); } else if (token.equals("slayerTask")) { p.slayerTask = Integer.parseInt(token2); } else if (token.equals("taskAmount")) { p.taskAmount = Integer.parseInt(token2); } else if (token.equals("magePoints")) { p.magePoints = Integer.parseInt(token2); } else if (token.equals("character-title")) { p.playerTitle = Integer.parseInt(token2); } else if (line.startsWith("KC")) { p.KC = Integer.parseInt(token2); } else if (line.startsWith("DC")) { p.DC = Integer.parseInt(token2); } else if (token.equals("autoRet")) { p.autoRet = Integer.parseInt(token2); } else if (token.equals("trade11")) { p.trade11 = Integer.parseInt(token2); } else if (token.equals("SpeDelay")) { p.SpecialDelay = Integer.parseInt(token2); } else if (token.equals("barrowskillcount")) { p.barrowsKillCount = Integer.parseInt(token2); } else if (token.equals("flagged")) { p.accountFlagged = Boolean.parseBoolean(token2); } else if (token.equals("wave")) { p.waveId = Integer.parseInt(token2); } else if (token.equals("void")) { for (int j = 0; j < token3.length; j++) { p.voidStatus[j] = Integer.parseInt(token3[j]); } } else if (token.equals("fightMode")) { p.fightMode = Integer.parseInt(token2); } else if (token.equals("votingPoints")) { p.votingPoints = Integer.parseInt(token2); } break; case 3: if (token.equals("character-equip")) { p.playerEquipment[Integer.parseInt(token3[0])] = Integer.parseInt(token3[1]); p.playerEquipmentN[Integer.parseInt(token3[0])] = Integer.parseInt(token3[2]); } break; case 4: if (token.equals("character-look")) { p.playerAppearance[Integer.parseInt(token3[0])] = Integer.parseInt(token3[1]); } break; case 5: if (token.equals("character-skill")) { p.playerLevel[Integer.parseInt(token3[0])] = Integer.parseInt(token3[1]); p.playerXP[Integer.parseInt(token3[0])] = Integer.parseInt(token3[2]); } break; case 6: if (token.equals("character-item")) { p.playerItems[Integer.parseInt(token3[0])] = Integer.parseInt(token3[1]); p.playerItemsN[Integer.parseInt(token3[0])] = Integer.parseInt(token3[2]); } break; case 7: if (token.equals("character-bank")) { p.bankItems[Integer.parseInt(token3[0])] = Integer.parseInt(token3[1]); p.bankItemsN[Integer.parseInt(token3[0])] = Integer.parseInt(token3[2]); } break; case 8: if (token.equals("character-friend")) { p.friends[Integer.parseInt(token3[0])] = Long.parseLong(token3[1]); } break; case 9: /* if (token.equals("character-ignore")) { ignores[Integer.parseInt(token3[0])] = Long.parseLong(token3[1]); } */ break; } } else { if (line.equals("[ACCOUNT]")) { ReadMode = 1; } else if (line.equals("[CHARACTER]")) { ReadMode = 2; } else if (line.equals("[EQUIPMENT]")) { ReadMode = 3; } else if (line.equals("[LOOK]")) { ReadMode = 4; } else if (line.equals("[SKILLS]")) { ReadMode = 5; } else if (line.equals("[ITEMS]")) { ReadMode = 6; } else if (line.equals("[BANK]")) { ReadMode = 7; } else if (line.equals("[FRIENDS]")) { ReadMode = 8; } else if (line.equals("[IGNORES]")) { ReadMode = 9; } else if (line.equals("[EOF]")) { try { characterfile.close(); } catch(IOException ioexception) { } return 1; } } try { line = characterfile.readLine(); } catch(IOException ioexception1) { EndOfFile = true; } } try { characterfile.close(); } catch(IOException ioexception) { } return 13; } /** *Saving **/ public static boolean saveGame(Client p) { if(!p.saveFile || p.newPlayer || !p.saveCharacter) { //System.out.println("first"); return false; } if(p.playerName == null || Server.playerHandler.players[p.playerId] == null) { //System.out.println("second"); return false; } p.playerName = p.playerName2; int tbTime = (int)(p.teleBlockDelay - System.currentTimeMillis() + p.teleBlockLength); if(tbTime > 300000 || tbTime < 0){ tbTime = 0; } BufferedWriter characterfile = null; try { characterfile = new BufferedWriter(new FileWriter("./Data/characters/"+p.playerName+".txt")); /*ACCOUNT*/ characterfile.write("[ACCOUNT]", 0, 9); characterfile.newLine(); characterfile.write("character-username = ", 0, 21); characterfile.write(p.playerName, 0, p.playerName.length()); characterfile.newLine(); characterfile.write("character-password = ", 0, 21); characterfile.write(p.playerPass, 0, p.playerPass.length()); characterfile.newLine(); characterfile.newLine(); /*CHARACTER*/ characterfile.write("[CHARACTER]", 0, 11); characterfile.newLine(); characterfile.write("character-height = ", 0, 19); characterfile.write(Integer.toString(p.heightLevel), 0, Integer.toString(p.heightLevel).length()); characterfile.newLine(); characterfile.write("character-posx = ", 0, 17); characterfile.write(Integer.toString(p.absX), 0, Integer.toString(p.absX).length()); characterfile.newLine(); characterfile.write("character-posy = ", 0, 17); characterfile.write(Integer.toString(p.absY), 0, Integer.toString(p.absY).length()); characterfile.newLine(); characterfile.write("character-rights = ", 0, 19); characterfile.write(Integer.toString(p.playerRights), 0, Integer.toString(p.playerRights).length()); characterfile.newLine(); characterfile.write("crystal-bow-shots = ", 0, 20); characterfile.write(Integer.toString(p.crystalBowArrowCount), 0, Integer.toString(p.crystalBowArrowCount).length()); characterfile.newLine(); characterfile.write("character-title = ", 0, 18); characterfile.write(Integer.toString(p.playerTitle), 0, Integer .toString(p.playerTitle).length()); characterfile.newLine(); characterfile.write("VLS-hits = ", 0, 11); characterfile.write(Integer.toString(p.degradeTime), 0, Integer.toString(p.degradeTime).length()); characterfile.newLine(); characterfile.write("MoneyOrb = ", 0, 11); characterfile.write(Integer.toString(p.MoneyCash), 0, Integer.toString(p.MoneyCash).length()); characterfile.newLine(); characterfile.write("skull-timer = ", 0, 14); characterfile.write(Integer.toString(p.skullTimer), 0, Integer.toString(p.skullTimer).length()); characterfile.newLine(); characterfile.write("EP = ", 0, 5); characterfile.write(Integer.toString(p.earningPotential), 0, Integer.toString(p.earningPotential).length()); characterfile.newLine(); characterfile.write("magic-book = ", 0, 13); characterfile.write(Integer.toString(p.playerMagicBook), 0, Integer.toString(p.playerMagicBook).length()); characterfile.newLine(); for (int b = 0; b < p.barrowsNpcs.length; b++) { characterfile.write("brother-info = ", 0, 15); characterfile.write(Integer.toString(b), 0, Integer.toString(b).length()); characterfile.write(" ", 0, 1); characterfile.write(p.barrowsNpcs[b][1] <= 1 ? Integer.toString(0) : Integer.toString(p.barrowsNpcs[b][1]), 0, Integer.toString(p.barrowsNpcs[b][1]).length()); characterfile.newLine(); } characterfile.write("special-amount = ", 0, 17); characterfile.write(Double.toString(p.specAmount), 0, Double.toString(p.specAmount).length()); characterfile.newLine(); characterfile.write("selected-coffin = ", 0, 18); characterfile.write(Integer.toString(p.randomCoffin), 0, Integer.toString(p.randomCoffin).length()); characterfile.newLine(); characterfile.write("barrows-killcount = ", 0, 20); characterfile.write(Integer.toString(p.barrowsKillCount), 0, Integer.toString(p.barrowsKillCount).length()); characterfile.newLine(); characterfile.write("slayerPoints = ", 0, 15); characterfile.write(Integer.toString(p.slayerPoints), 0, Integer.toString(p.slayerPoints).length()); characterfile.newLine(); characterfile.write("teleblock-length = ", 0, 19); characterfile.write(Integer.toString(tbTime), 0, Integer.toString(tbTime).length()); characterfile.newLine(); characterfile.write("Wheel = ", 0, 8); characterfile.write(Integer.toString(p.Wheel), 0, Integer.toString(p.Wheel).length()); characterfile.newLine(); characterfile.write("pc-points = ", 0, 12); characterfile.write(Integer.toString(p.pcPoints), 0, Integer.toString(p.pcPoints).length()); characterfile.newLine(); characterfile.write("gwdelay = ", 0, 10); characterfile.write(Integer.toString(p.gwdelay), 0, Integer.toString(p.gwdelay).length()); characterfile.newLine(); characterfile.write("Altar = ", 0, 8); characterfile.write(Integer.toString(p.altarPrayed), 0, Integer.toString(p.altarPrayed).length()); characterfile.newLine(); characterfile.write("Arma-KC = ", 0, 10); characterfile.write(Integer.toString(p.Arma), 0, Integer.toString(p.Arma).length()); characterfile.newLine(); characterfile.write("Band-KC = ", 0, 10); characterfile.write(Integer.toString(p.Band), 0, Integer.toString(p.Band).length()); characterfile.newLine(); characterfile.write("Zammy-KC = ", 0, 11); characterfile.write(Integer.toString(p.Zammy), 0, Integer.toString(p.Zammy).length()); characterfile.newLine(); characterfile.write("Sara-KC = ", 0, 10); characterfile.write(Integer.toString(p.Sara), 0, Integer.toString(p.Sara).length()); characterfile.newLine(); characterfile.newLine(); characterfile.write("pk-points = ", 0, 12); characterfile.write(Integer.toString(p.pkPoints), 0, Integer.toString(p.pkPoints).length()); characterfile.newLine(); characterfile.newLine(); characterfile.write("isDonator = ", 0, 12); characterfile.write(Integer.toString(p.isDonator), 0, Integer.toString(p.isDonator).length()); characterfile.newLine(); characterfile.write("slayerTask = ", 0, 13); characterfile.write(Integer.toString(p.slayerTask), 0, Integer.toString(p.slayerTask).length()); characterfile.newLine(); characterfile.write("xpLock = ", 0, 9); characterfile.write(Boolean.toString(p.xpLock), 0, Boolean.toString(p.xpLock).length()); characterfile.newLine(); characterfile.write("Agrith = ", 0, 9); characterfile.write(Boolean.toString(p.Agrith), 0, Boolean.toString(p.Agrith).length()); characterfile.newLine(); characterfile.write("has-npc = ", 0, 10); characterfile.write(Boolean.toString(p.hasNpc), 0, Boolean.toString(p.hasNpc).length()); characterfile.newLine(); characterfile.write("summonId = ", 0, 11); characterfile.write(Integer.toString(p.summonId), 0, Integer.toString(p.summonId).length()); characterfile.newLine(); characterfile.write("Flambeed = ", 0, 11); characterfile.write(Boolean.toString(p.Flambeed), 0, Boolean.toString(p.Flambeed).length()); characterfile.newLine(); characterfile.write("Karamel = ", 0, 10); characterfile.write(Boolean.toString(p.Karamel), 0, Boolean.toString(p.Karamel).length()); characterfile.newLine(); characterfile.write("Dessourt = ", 0, 11); characterfile.write(Boolean.toString(p.Dessourt), 0, Boolean.toString(p.Dessourt).length()); characterfile.newLine(); characterfile.write("culin = ", 0, 8); characterfile.write(Boolean.toString(p.Culin), 0, Boolean.toString(p.Culin).length()); characterfile.newLine(); characterfile.write("taskAmount = ", 0, 13); characterfile.write(Integer.toString(p.taskAmount), 0, Integer.toString(p.taskAmount).length()); characterfile.newLine(); characterfile.write("magePoints = ", 0, 13); characterfile.write(Integer.toString(p.magePoints), 0, Integer.toString(p.magePoints).length()); characterfile.newLine(); characterfile.write("KC = ", 0, 4); characterfile.write(Integer.toString(p.KC), 0, Integer.toString(p.KC).length()); characterfile.newLine(); characterfile.write("DC = ", 0, 4); characterfile.write(Integer.toString(p.DC), 0, Integer.toString(p.DC).length()); characterfile.newLine(); characterfile.write("autoRet = ", 0, 10); characterfile.write(Integer.toString(p.autoRet), 0, Integer.toString(p.autoRet).length()); characterfile.newLine(); characterfile.write("trade11 = ", 0, 10); characterfile.write(Integer.toString(p.trade11), 0, Integer.toString(p.trade11).length()); characterfile.newLine(); characterfile.write("SpeDelay = ", 0, 11); characterfile.write(Long.toString(p.SpecialDelay), 0, Long.toString(p.SpecialDelay).length()); characterfile.newLine(); characterfile.write("barrowskillcount = ", 0, 19); characterfile.write(Integer.toString(p.barrowsKillCount), 0, Integer.toString(p.barrowsKillCount).length()); characterfile.newLine(); characterfile.write("flagged = ", 0, 10); characterfile.write(Boolean.toString(p.accountFlagged), 0, Boolean.toString(p.accountFlagged).length()); characterfile.newLine(); characterfile.write("Jailed = ", 0, 9); characterfile.write(Boolean.toString(p.Jail), 0, Boolean.toString(p.Jail).length()); characterfile.newLine(); characterfile.write("wave = ", 0, 7); characterfile.write(Integer.toString(p.waveId), 0, Integer.toString(p.waveId).length()); characterfile.newLine(); characterfile.write("fightMode = ", 0, 12); characterfile.write(Integer.toString(p.fightMode), 0, Integer.toString(p.fightMode).length()); characterfile.newLine(); characterfile.write("votingPoints = ", 0, 15); characterfile.write(Integer.toString(p.votingPoints), 0, Integer.toString(p.votingPoints).length()); characterfile.newLine(); characterfile.write("Monkey-Kc = ", 0, 12); characterfile.write(Integer.toString(p.monkeyk0ed), 0, Integer.toString(p.monkeyk0ed).length()); characterfile.newLine(); characterfile.write("void = ", 0, 7); String toWrite = p.voidStatus[0] + "\t" + p.voidStatus[1] + "\t" + p.voidStatus[2] + "\t" + p.voidStatus[3] + "\t" + p.voidStatus[4]; characterfile.write(toWrite); characterfile.newLine(); characterfile.newLine(); /*EQUIPMENT*/ characterfile.write("[EQUIPMENT]", 0, 11); characterfile.newLine(); for (int i = 0; i < p.playerEquipment.length; i++) { characterfile.write("character-equip = ", 0, 18); characterfile.write(Integer.toString(i), 0, Integer.toString(i).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.playerEquipment[i]), 0, Integer.toString(p.playerEquipment[i]).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.playerEquipmentN[i]), 0, Integer.toString(p.playerEquipmentN[i]).length()); characterfile.write(" ", 0, 1); characterfile.newLine(); } characterfile.newLine(); /*LOOK*/ characterfile.write("[LOOK]", 0, 6); characterfile.newLine(); for (int i = 0; i < p.playerAppearance.length; i++) { characterfile.write("character-look = ", 0, 17); characterfile.write(Integer.toString(i), 0, Integer.toString(i).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.playerAppearance[i]), 0, Integer.toString(p.playerAppearance[i]).length()); characterfile.newLine(); } characterfile.newLine(); /*SKILLS*/ characterfile.write("[SKILLS]", 0, 8); characterfile.newLine(); for (int i = 0; i < p.playerLevel.length; i++) { characterfile.write("character-skill = ", 0, 18); characterfile.write(Integer.toString(i), 0, Integer.toString(i).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.playerLevel[i]), 0, Integer.toString(p.playerLevel[i]).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.playerXP[i]), 0, Integer.toString(p.playerXP[i]).length()); characterfile.newLine(); } characterfile.newLine(); /*ITEMS*/ characterfile.write("[ITEMS]", 0, 7); characterfile.newLine(); for (int i = 0; i < p.playerItems.length; i++) { if (p.playerItems[i] > 0) { characterfile.write("character-item = ", 0, 17); characterfile.write(Integer.toString(i), 0, Integer.toString(i).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.playerItems[i]), 0, Integer.toString(p.playerItems[i]).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.playerItemsN[i]), 0, Integer.toString(p.playerItemsN[i]).length()); characterfile.newLine(); } } characterfile.newLine(); /*BANK*/ characterfile.write("[BANK]", 0, 6); characterfile.newLine(); for (int i = 0; i < p.bankItems.length; i++) { if (p.bankItems[i] > 0) { characterfile.write("character-bank = ", 0, 17); characterfile.write(Integer.toString(i), 0, Integer.toString(i).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.bankItems[i]), 0, Integer.toString(p.bankItems[i]).length()); characterfile.write(" ", 0, 1); characterfile.write(Integer.toString(p.bankItemsN[i]), 0, Integer.toString(p.bankItemsN[i]).length()); characterfile.newLine(); } } characterfile.newLine(); /*FRIENDS*/ characterfile.write("[FRIENDS]", 0, 9); characterfile.newLine(); for (int i = 0; i < p.friends.length; i++) { if (p.friends[i] > 0) { characterfile.write("character-friend = ", 0, 19); characterfile.write(Integer.toString(i), 0, Integer.toString(i).length()); characterfile.write(" ", 0, 1); characterfile.write("" + p.friends[i]); characterfile.newLine(); } } characterfile.newLine(); /*IGNORES*/ /*characterfile.write("[IGNORES]", 0, 9); characterfile.newLine(); for (int i = 0; i < ignores.length; i++) { if (ignores[i] > 0) { characterfile.write("character-ignore = ", 0, 19); characterfile.write(Integer.toString(i), 0, Integer.toString(i).length()); characterfile.write(" ", 0, 1); characterfile.write(Long.toString(ignores[i]), 0, Long.toString(ignores[i]).length()); characterfile.newLine(); } } characterfile.newLine();*/ /*EOF*/ characterfile.write("[EOF]", 0, 5); characterfile.newLine(); characterfile.newLine(); characterfile.close(); } catch(IOException ioexception) { Misc.println(p.playerName+": error writing file."); return false; } return true; } }
  19. hey guys, dose any one know how i can add a save game button into my server? im on a 317 pi but whenever i do an update or sumtin they always get rolled back unless they log out? so if u can tell me how or if u know a guide please post below thanks allot! And how do i get that server message that pops up that says "server update in : 5:00" then go's down to zero and when it hits zero it dose the update? thanks allot again [email protected]
  20. I'm using 637 dementhium and when I edit an NPC stats and anim, it doesn't compile into the server. It saves in the NpcDefEditor but not into the server, is there a way to compile it into the server?
  21. Whenever i give myself donor / boss points when i log in and out it just resets them to 0, even when i edit character file when i log in it just resets to 0. I dont have a problem with the pk points and even though i copied the code from the pk point giving method to a new boss point giving method it still wont save. I have edited the playersave in exactly the same way as pk points just change for boss points. Please help and id be very grateful for this :)
  22. Couldn't think of a title, so I put that. On FunnyJunk today, I saw a ridiculous post that has 70 thumbs up. It's stupid, ignorant, and downright idiotic. [url]http://funnyjunk.com/funny_pictures/3633062/Idiot+atheist+comp/[/url] I know this would seem to fall under the religion topic, but I'm going to try to steer this thread in a different direction. Instead of debating about how your religion is the best, or about how god is fake, please post things that relate to people trying to push their mentalities onto others.
  23. Today I wanted to play around with some coding on a RSPS base server. I'm using Standard Shards Revolutions source and client base. I wanted to edit my ingame character so I logged in at localhost and moved around and logged out, planning to create a save file. But, when I log back in with same username and password it restarts me as a new character everytime. What can be done to fix this? I'll give any additional details if needed.
  24. The character files won't save to the character folder but my account isn't getting reset. So is it saving somewhere else, how do I fix?
  25. Hello, So I am making my server have a mysql high scores, login system, auto donation system, etc... All my codes compile perfect, but for some reason nothing ever saves into mysql. And yes, I do have the connection running in server.java. There in my savegame void: [code] public void SaveGame() { synchronized (this) { PlayerSave.saveGame(this); MysqlManager.saveuser(this); } } [/code] My MYSQLMANAGER: [code] package server.util; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import server.model.players.Client; import java.sql.DriverManager; /** * MySQL Class * @author Ryan / Lmctruck30 * */ public class MysqlManager { /** MySQL Connection */ public static Connection conn = null; public static Statement statement = null; public static ResultSet results = null; public static String MySQLDataBase = "rsps"; public static String MySQLURL = "localhost"; public static String MySQLUser = "root"; public static String MySQLPassword = "tsm123"; /** * Creates a Connection to the MySQL Database */ public static boolean isDonator(Client clientToSave) { try { if (clientToSave.playerName != null) { query("SELECT FROM `status` WHERE Donator = 0;"); clientToSave.isDonator = 0; } else if (clientToSave.playerName != null) { query("SELECT FROM `status` WHERE Donator = 1;"); clientToSave.isDonator = 1; } } catch (Exception e) { e.printStackTrace(); return false; } return true; } public static boolean saveStatus(Client c) { try{ query("DELETE FROM `status` WHERE playerName = '" + c.playerName + "';"); query("INSERT INTO `status` (`playerName`,`Donator`) VALUES ('" + c.playerName +"'," + c.isDonator + ");"); // "';"); } catch (Exception e) { return false; } return true; } public synchronized static void createConnection() { try { Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection("jdbc:mysql://localhost/rsps", "root", "letmein1"); Misc.println("MySQL Connected"); } catch(Exception e) { e.printStackTrace(); } } public synchronized static void destroyConnection() { try { statement.close(); conn.close(); } catch (Exception e) { //e.printStackTrace(); } } public synchronized static ResultSet query(String s) throws SQLException { try { if (s.toLowerCase().startsWith("select")) { ResultSet rs = statement.executeQuery(s); return rs; } else { statement.executeUpdate(s); } return null; } catch (Exception e) { destroyConnection(); createConnection(); //e.printStackTrace(); } return null; } /** * Save Sessions HighScores * @param clientToSave The session that saves their stats * @return The flag true if successful */ public synchronized static boolean saveHighScore(Client clientToSave) { try { query("DELETE FROM `skills` WHERE playerName = '"+clientToSave.playerName+"';"); query("DELETE FROM `skillsoverall` WHERE playerName = '"+clientToSave.playerName+"';"); query("INSERT INTO `skills` (`playerName`,`Attacklvl`,`Attackxp`,`Defencelvl`,`Defencexp`,`Strengthlvl`,`Strengthxp`,`Hitpointslvl`,`Hitpointsxp`,`Rangelvl`,`Rangexp`,`Prayerlvl`,`Prayerxp`,`Magiclvl`,`Magicxp`,`Cookinglvl`,`Cookingxp`,`Woodcuttinglvl`,`Woodcuttingxp`,`Fletchinglvl`,`Fletchingxp`,`Fishinglvl`,`Fishingxp`,`Firemakinglvl`,`Firemakingxp`,`Craftinglvl`,`Craftingxp`,`Smithinglvl`,`Smithingxp`,`Mininglvl`,`Miningxp`,`Herblorelvl`,`Herblorexp`,`Agilitylvl`,`Agilityxp`,`Thievinglvl`,`Thievingxp`,`Slayerlvl`,`Slayerxp`,`Farminglvl`,`Farmingxp`,`Runecraftlvl`,`Runecraftxp`) VALUES ('"+clientToSave.playerName+"',"+clientToSave.playerLevel[0]+","+clientToSave.playerXP[0]+","+clientToSave.playerLevel[1]+","+clientToSave.playerXP[1]+","+clientToSave.playerLevel[2]+","+clientToSave.playerXP[2]+","+clientToSave.playerLevel[3]+","+clientToSave.playerXP[3]+","+clientToSave.playerLevel[4]+","+clientToSave.playerXP[4]+","+clientToSave.playerLevel[5]+","+clientToSave.playerXP[5]+","+clientToSave.playerLevel[6]+","+clientToSave.playerXP[6]+","+clientToSave.playerLevel[7]+","+clientToSave.playerXP[7]+","+clientToSave.playerLevel[8]+","+clientToSave.playerXP[8]+","+clientToSave.playerLevel[9]+","+clientToSave.playerXP[9]+","+clientToSave.playerLevel[10]+","+clientToSave.playerXP[10]+","+clientToSave.playerLevel[11]+","+clientToSave.playerXP[11]+","+clientToSave.playerLevel[12]+","+clientToSave.playerXP[12]+","+clientToSave.playerLevel[13]+","+clientToSave.playerXP[13]+","+clientToSave.playerLevel[14]+","+clientToSave.playerXP[14]+","+clientToSave.playerLevel[15]+","+clientToSave.playerXP[15]+","+clientToSave.playerLevel[16]+","+clientToSave.playerXP[16]+","+clientToSave.playerLevel[17]+","+clientToSave.playerXP[17]+","+clientToSave.playerLevel[18]+","+clientToSave.playerXP[18]+","+clientToSave.playerLevel[19]+","+clientToSave.playerXP[19]+","+clientToSave.playerLevel[20]+","+clientToSave.playerXP[20]+");"); query("INSERT INTO `skillsoverall` (`playerName`,`lvl`,`xp`) VALUES ('"+clientToSave.playerName+"',"+(clientToSave.getLevelForXP(clientToSave.playerXP[0]) + clientToSave.getLevelForXP(clientToSave.playerXP[1]) + clientToSave.getLevelForXP(clientToSave.playerXP[2]) + clientToSave.getLevelForXP(clientToSave.playerXP[3]) + clientToSave.getLevelForXP(clientToSave.playerXP[4]) + clientToSave.getLevelForXP(clientToSave.playerXP[5]) + clientToSave.getLevelForXP(clientToSave.playerXP[6]) + clientToSave.getLevelForXP(clientToSave.playerXP[7]) + clientToSave.getLevelForXP(clientToSave.playerXP[8]) + clientToSave.getLevelForXP(clientToSave.playerXP[9]) + clientToSave.getLevelForXP(clientToSave.playerXP[10]) + clientToSave.getLevelForXP(clientToSave.playerXP[11]) + clientToSave.getLevelForXP(clientToSave.playerXP[12]) + clientToSave.getLevelForXP(clientToSave.playerXP[13]) + clientToSave.getLevelForXP(clientToSave.playerXP[14]) + clientToSave.getLevelForXP(clientToSave.playerXP[15]) + clientToSave.getLevelForXP(clientToSave.playerXP[16]) + clientToSave.getLevelForXP(clientToSave.playerXP[17]) + clientToSave.getLevelForXP(clientToSave.playerXP[18]) + clientToSave.getLevelForXP(clientToSave.playerXP[19]) + clientToSave.getLevelForXP(clientToSave.playerXP[20]))+","+((clientToSave.playerXP[0]) + (clientToSave.playerXP[1]) + (clientToSave.playerXP[2]) + (clientToSave.playerXP[3]) + (clientToSave.playerXP[4]) + (clientToSave.playerXP[5]) + (clientToSave.playerXP[6]) + (clientToSave.playerXP[7]) + (clientToSave.playerXP[8]) + (clientToSave.playerXP[9]) + (clientToSave.playerXP[10]) + (clientToSave.playerXP[11]) + (clientToSave.playerXP[12]) + (clientToSave.playerXP[13]) + (clientToSave.playerXP[14]) + (clientToSave.playerXP[15]) + (clientToSave.playerXP[16]) + (clientToSave.playerXP[17]) + (clientToSave.playerXP[18]) + (clientToSave.playerXP[19]) + (clientToSave.playerXP[20]))+");"); } catch (Exception e) { //e.printStackTrace(); return false; } return true; } /** * Save Voting Point Info * @param c The session's client * @return The flag if true was successful */ public static boolean saveuser(Client c) { try { query("INSERT INTO `status` (`playerName`,`playerPass') VALUES ('"+c.playerName+"',"+c.playerPass+");"); } catch(Exception e) { //e.printStackTrace(); return false; } return true; } public static int loadVotingPoints(Client c) { try { ResultSet group = statement.executeQuery("SELECT * FROM user WHERE username = '"+c.playerName+"'"); while(group.next()) { String groupp = group.getString("usergroupid"); int mgroup = Integer.parseInt(groupp); if(mgroup > 0) { return mgroup; } return 0; } } catch(Exception e) { return -1; } return -1; } public static int loadDonationPoints(Client c) { try { ResultSet group = statement.executeQuery("SELECT * FROM user WHERE username = '"+c.playerName+"'"); while(group.next()) { String groupp = group.getString("usergroupid"); int mgroup = Integer.parseInt(groupp); if(mgroup > 0) { return mgroup; } return 0; } } catch(Exception e) { return -1; } return -1; } } [/code] I will gift $2 paypal to whoever can help me. Thanks, Dragonslyfe
×