Thread: Release: WalkTo(absX, absY);

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1 Release: WalkTo(absX, absY); 
    Registered Member
    Wiffles's Avatar
    Join Date
    Dec 2007
    Posts
    1,168
    Thanks given
    100
    Thanks received
    198
    Rep Power
    493
    Here you are.


    Do not post errors.

    Code:
    public void WalkTo(int x, int y) 
    	{
            newWalkCmdSteps = (Math.abs((x+y)));
            if(newWalkCmdSteps % 2 != 0)
                newWalkCmdSteps /= 2;
            if(++newWalkCmdSteps > walkingQueueSize) {
            	println("Warning: WalkTo("+packetType+") command contains too many steps ("+newWalkCmdSteps+").");
                newWalkCmdSteps = 0;
            }	
            int firstStepX = absX;
            int tmpFSX = firstStepX;
            firstStepX -= mapRegionX*8;
            for(i = 1; i < newWalkCmdSteps; i++) {
                newWalkCmdX[i] = x;
                newWalkCmdY[i] = y;
                tmpNWCX[i] = newWalkCmdX[i];
                tmpNWCY[i] = newWalkCmdY[i];
            }
            newWalkCmdX[0] = newWalkCmdY[0] = tmpNWCX[0] = tmpNWCY[0] = 0;
            int firstStepY = absY;
            int tmpFSY = firstStepY;
            firstStepY -= mapRegionY*8;
            newWalkCmdIsRunning = ((inStream.readSignedByteC() == 1));
            for(i = 0; i < newWalkCmdSteps; i++) {
                newWalkCmdX[i] += firstStepX;
                newWalkCmdY[i] += firstStepY;
            }
        }
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Jun 2008
    Posts
    734
    Thanks given
    8
    Thanks received
    14
    Rep Power
    148
    Almost all server does already have this?...
    Also it should be this(Better Conventions):
    Code:
    	public void WalkTo(int x, int y) {
    		newWalkCmdSteps = (Math.abs((x + y)));
    		if (newWalkCmdSteps % 2 != 0)
    			print("Warning: WalkTo(" + packetType + ") Command malformed: "
    					+ Misc.Hex(inStream.buffer, 0, packetSize));
    		newWalkCmdSteps /= 2;
    		if (++newWalkCmdSteps > walkingQueueSize) {
    			print("Warning: WalkTo(" + packetType
    					+ ") Command contains too many steps (" + newWalkCmdSteps
    					+ ").");
    			newWalkCmdSteps = 0;
    		}
    		int firstStepX = absX;
    		firstStepX -= mapRegionX * 8;
    		for (i = 1; i < newWalkCmdSteps; i++) {
    			newWalkCmdX[i] = x;
    			newWalkCmdY[i] = y;
    			tmpNWCX[i] = newWalkCmdX[i];
    			tmpNWCY[i] = newWalkCmdY[i];
    		}
    		newWalkCmdX[0] = newWalkCmdY[0] = tmpNWCX[0] = tmpNWCY[0] = 0;
    		int firstStepY = absY;
    		firstStepY -= mapRegionY * 8;
    		newWalkCmdIsRunning = ((inStream.readSignedByteC() == 1) && PlayerEnergy > 0);
    		for (i = 0; i < newWalkCmdSteps; i++) {
    			newWalkCmdX[i] += firstStepX;
    			newWalkCmdY[i] += firstStepY;
    		}
    	}
    S Quare Quxx: Raul > paladin end of the story
    Reply With Quote  
     

  3. #3  
    Registered Member
    Wiffles's Avatar
    Join Date
    Dec 2007
    Posts
    1,168
    Thanks given
    100
    Thanks received
    198
    Rep Power
    493
    No.....lol?
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2007
    Age
    28
    Posts
    2,396
    Thanks given
    5
    Thanks received
    434
    Rep Power
    902
    eh yeah lol delta dodian loads lol
    Hyperion V2 Martin's Updates.
    [Only registered and activated users can see links. ]

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Jun 2008
    Posts
    734
    Thanks given
    8
    Thanks received
    14
    Rep Power
    148
    Quote Originally Posted by NightzRealm View Post
    No.....lol?
    Go check it
    I bet that like 85% of all server you check has that method...

    Edit:
    Quote Originally Posted by NightzRealm View Post
    Do not post errors.
    Because you cant fix them?...
    S Quare Quxx: Raul > paladin end of the story
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Aug 2007
    Posts
    2,395
    Thanks given
    2
    Thanks received
    63
    Rep Power
    558
    lool released ages ago, and btw if u know what it does, then u would know that u don't even need the half of that **** ..
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Mar 2008
    Posts
    2,595
    Thanks given
    128
    Thanks received
    191
    Rep Power
    0
    My server came with this already... Devolution v7
    Reply With Quote  
     

  8. #8  
    Registered Member
    Unborn's Avatar
    Join Date
    Dec 2007
    Age
    26
    Posts
    516
    Thanks given
    1
    Thanks received
    3
    Rep Power
    317
    Rofl, you've just copied that junk from the walking packet...

    And UltimateG, please don't say you've edited out the unused things unless you actually have.
    You've left all packettype/inStream related junk when the method isn't related to incoming packets at all.


    Reply With Quote  
     

  9. #9  
    Registered Member Silentone's Avatar
    Join Date
    Sep 2006
    Age
    28
    Posts
    139
    Thanks given
    0
    Thanks received
    1
    Rep Power
    44
    At least hes trying to contribute

    Nice work NightzRealm!

    For the noobs who flamed; Go to hell Write your own source
    Have a look at my project [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #10  
    Luke
    Guest
    I see you fail at conventions, also at ripping code!


    Quote Originally Posted by Silentone View Post
    At least hes trying to contribute

    Nice work NightzRealm!

    For the noobs who flamed; Go to hell Write your own source
    pls no i dun dat already.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •