[Tutorial] Client Editing

Forum for alternative clients, mods & discussions on the same.

Re: [Tutorial] Client Editing

Postby borka » Mon Oct 07, 2019 8:52 am

to keep the cmd window open edit in a new line containing

Code: Select all
pause


to the .bat file
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: [Tutorial] Client Editing

Postby TurtleHermit » Fri Dec 20, 2019 3:31 pm

How does one merge latest and non-latest changes with loftar's code?
User avatar
TurtleHermit
 
Posts: 88
Joined: Mon Sep 16, 2013 1:37 am

Re: [Tutorial] Client Editing

Postby vatas » Sun Jan 19, 2020 11:12 am

Ardennesss wrote:Client still discontinued but I made the source public again, will require some recent merges from loftar to function. Enjoy, and stuff.

https://github.com/Ardenneslol/ArdClient
The most actively maintained Haven and Hearth Wiki (Not guaranteed to be up-to-date with all w14 changes.)

Basic Claim Safety (And what you’re doing wrong) (I recommend you read it in it's entirety, but TL:;DR: Build a Palisade.)

Combat Guide (Overview, PVE, PVP) (Includes how to escape/minimize risk of getting killed.)
User avatar
vatas
 
Posts: 4540
Joined: Fri Apr 05, 2013 8:34 am
Location: Suomi Finland Perkele

Re: [Tutorial] Client Editing

Postby LostJustice » Mon Jan 27, 2020 9:11 pm

TurtleHermit wrote:How does one merge latest and non-latest changes with loftar's code?


In IntelliJ there is an option with source control to create a pull request. So assuming you followed the tutorial and cloned the repository and haven’t redirected it to your own private one then all you would need to do is Click the menu options VCS -> GIT -> Fetch and then VCS -> GIT -> PULL. Note if there is merge conflicts then you must resolve them and then pull again. If you are using ardennes source for instance then you must reset the branch to master to amber or loftar’s source and go through the lovely pain of trying to figure out what to merge and what might break and won’t break which I highly recommend you do not even attempt to do if you want to save your valuable time on client maintenance.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: [Tutorial] Client Editing

Postby LostJustice » Mon Mar 02, 2020 8:26 pm

I noticed some people not getting auto ranked in discord. If this happens please feel free to message me if you are not auto ranked after 5 minutes. This rarely happens and mainly has to do with lag that the bots run into with discord. Updated main post for this as well.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: [Tutorial] Client Editing

Postby ladygrey » Fri Oct 16, 2020 1:38 pm

I followed the tutorial and tried to run the client from build folder and all it showed me is blank black screen... what should i do? :|

+or, is there any other way that i can build that client source? im trying to find way how to build in eclipse, but im completely new with this thing, and its kind of hard to figure out... x.x wish i could find simple and easy way
ladygrey
 
Posts: 10
Joined: Wed Dec 01, 2010 8:31 pm

Re: [Tutorial] Client Editing

Postby LostJustice » Sun Oct 18, 2020 5:45 am

ladygrey wrote:I followed the tutorial and tried to run the client from build folder and all it showed me is blank black screen... what should i do? :|

+or, is there any other way that i can build that client source? im trying to find way how to build in eclipse, but im completely new with this thing, and its kind of hard to figure out... x.x wish i could find simple and easy way


Go into MainFrame.java and replace the main method with this code:

Code: Select all
public static void main(final String[] args) {
      String[] a = argCheck(args);
      /* Set up the error handler as early as humanly possible. */
      ThreadGroup g = new ThreadGroup("Haven main group");
      String ed;
      if(!(ed = Utils.getprop("haven.errorurl", "")).equals("")) {
         try {
            final haven.error.ErrorHandler hg = new haven.error.ErrorHandler(new java.net.URL(ed));
            hg.sethandler(new haven.error.ErrorGui(null) {
               public void errorsent() {
                  hg.interrupt();
               }
            });
            g = hg;
            new DeadlockWatchdog(hg).start();
         } catch(java.net.MalformedURLException e) {
         }
      }
      Thread main = new HackThread(g, new Runnable() {
         public void run() {
            main2(a);
         }
      }, "Haven main thread");
      main.start();
   }


Then add these methods as well (I added mine at the end of the class):
Code: Select all
//LJ
   public static String[] argCheck(String[] args)
   {
      System.out.println("Running client!");
      ArrayList<String> list = new ArrayList<>();
      if(!contains("-U", args))
      {
         list.add("-U");
         list.add("https://game.havenandhearth.com/res/");
         list.add("game.havenandhearth.com");
      }
      else
      {
         Arrays.stream(args).forEach(x -> list.add(x));
      }
      //Arrays.stream(args).forEach(x -> list.add(x));
      String[] a = list.toArray(new String[0]);
      return a;
   }

   private static boolean contains(String s, String[] a)
   {
      for(int i = 0; i < a.length; i++)
      {
         if(a[i].equals(s))
            return true;
      }
      return false;
   }


Then try running the code with that. If it still black or white screen, keep restarting till it isn't. It is a bug that is still being worked out.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: [Tutorial] Client Editing

Postby ladygrey » Sun Oct 18, 2020 8:51 pm

it works! :D tyvm
ladygrey
 
Posts: 10
Joined: Wed Dec 01, 2010 8:31 pm

Re: [Tutorial] Client Editing

Postby Aoyama » Mon Oct 19, 2020 11:28 am

I suggest you edit the build.xml file instead of changing client code

example, edit the run command to your liking
Code: Select all
  <target name="run" depends="jars">
    <java fork="true" jar="build/hafen.jar">
      <sysproperty key="haven.defserv" value="game.havenandhearth.com" />
      <sysproperty key="haven.resurl" value="http://game.havenandhearth.com/render/res/" />
      <sysproperty key="haven.cachebase" value="http://game.havenandhearth.com/render/" />
    </java>
  </target>
 
Aoyama
 
Posts: 12
Joined: Sat May 25, 2019 9:46 am

Re: [Tutorial] Client Editing

Postby LostJustice » Mon Oct 19, 2020 12:55 pm

Aoyama wrote:I suggest you edit the build.xml file instead of changing client code

example, edit the run command to your liking
Code: Select all
  <target name="run" depends="jars">
    <java fork="true" jar="build/hafen.jar">
      <sysproperty key="haven.defserv" value="game.havenandhearth.com" />
      <sysproperty key="haven.resurl" value="http://game.havenandhearth.com/render/res/" />
      <sysproperty key="haven.cachebase" value="http://game.havenandhearth.com/render/" />
    </java>
  </target>
 


You can do this too but it nice for when after it is built that you can just double click the jar and run it without the need for a run.bat.
Last edited by LostJustice on Thu Nov 19, 2020 6:57 pm, edited 1 time in total.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 1 guest