Thanks will try it out you should work on player clipping next
|
|
First off this isnt mine nor do i claim rights to it. original tutorial is here. [Only registered and activated users can see links. ]
I will gladly remove this if i need too.
To start off download these 2 files. / easier cuz i have alot of clippings and wont fit >.<
[Only registered and activated users can see links. ]
put them in ./src/server/world
Open server.java and add this importthen find " void main " and add this under itCode:import server.world.WalkingCheck;save it.Code:WalkingCheck.check(); WalkingCheck.check2();
Open npc.java and find " void getnextwalkingdirection() { "
replace that whole method withat the top add the importsCode:private Tile currentTile; public int getNextWalkingDirection() { currentTile = new Tile(absX + moveX, absY + moveY, heightLevel); if(!WalkingCheck.tiles.containsKey(currentTile.getH() << 28 | currentTile.getX() << 14 | currentTile.getY())){ int dir; dir = Misc.direction(absX, absY, (absX + moveX), (absY + moveY)); if (dir == -1) return -1; dir >>= 1; absX += moveX; absY += moveY; return dir; } else if(WalkingCheck.tiles.get(currentTile.getH() << 28 | currentTile.getX() << 14 | currentTile.getY()) == true) { return -1; } else { return -1; } }Now open commands.java and put this in there somewhereCode:import server.world.Tile; import server.world.WalkingCheck;What this does is u walk over a tile u want to clip and type ::clip and it will write out the clipping to a file and you just copy out of the file and add to walkingcheck.java - open the file with notepad or notepad++.Code:if (playerCommand.startsWith("clip")) { String filePath = "./src/server/world/WalkingCheck/"; BufferedWriter bw = null; try { bw = new BufferedWriter(new FileWriter(filePath, true)); bw.write("tiles.put("+c.heightLevel+" << 28 | "+c.absX+" << 14 | "+c.absY+", true);"); bw.newLine(); bw.flush(); } catch (IOException ioe) { ioe.printStackTrace(); } finally { if (bw != null) { try { bw.close(); } catch (IOException ioe2) { } } } }
Any errors just post.
coder alex has player clipping available in his tragedy pking server which i ripped but its not perfect. lots of methods involved. and i need his permission before i can post it




Last release of his that I checked it was client sided and looked like he ripped it from battlescape.
There is absolutely no need to ask any permission at all from him.
Edit:: Also it wasn't a hard rip, I ripped it into an Runeful (emulous based) a few months back, it was no big deal. If i recall it was 2 voids server sided, updating the packet, and then just changing the old code to follow a player to
follow(int,int,int);
it was on of the easiest rips that I ever did.
Client sided it was just a few voids and then an obvious block of code in the client processing method.
src\server\model\players\packets\Commands.java:538 : cannot find symbol
symbol : class BufferedWriter
location: class server.model.players.packets.Commands
BufferedWriter bw = null;
^
src\server\model\players\packets\Commands.java:541 : cannot find symbol
symbol : class BufferedWriter
location: class server.model.players.packets.Commands
bw = new BufferedWriter(new FileWriter(filePath, true));
^
src\server\model\players\packets\Commands.java:541 : cannot find symbol
symbol : class FileWriter
location: class server.model.players.packets.Commands
bw = new BufferedWriter(new FileWriter(filePath, true));
^
src\server\model\players\packets\Commands.java:546 : cannot find symbol
symbol : class IOException
location: class server.model.players.packets.Commands
catch (IOException ioe)
^
src\server\model\players\packets\Commands.java:558 : cannot find symbol
symbol : class IOException
location: class server.model.players.packets.Commands
catch (IOException ioe2)
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors
Prima qualquer tecla para continuar . . .
Can you help me?
Confused how this works...
It fails to write out anything anywhere....
Lol?

Thanks a lot! I really need this! (I don't think I have it yet... >.<)
| « [All Bases]How to Setup Server Without Portforwarding [Working][Video] | [PI] Christmas crackers + ItemOnPlayer [PI] » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |