Well I got Andy's DMap's to work with LOTF , I started off with walking but It doesnt seem to work fine since I still can jump on few walls and so on...? A little help? Thats what I got so far.
public void Walk(byte Dir)
{
sbyte x = 0, y = 0;
if (Dir == 0 || Dir == 1 || Dir == 5 || Dir == 7)
x = 1;
if (Dir >= 1 && Dir <= 3)
x = -1;
if (Dir == 1 || Dir == 6 || Dir == 7)
y = 1;
if (Dir >= 3 && Dir <= 5)
y = -1;
X = (ushort)(X + x); Y = (ushort)(Y + y);
}
Hybrid's tip on his method
Quote:
Originally Posted by Hybrid
Fyi the *lotf* one will run faster than yours. You also forget that the client does not send a pre-modulated direction, so unless the caller mods it in the argument, you've missed this as well.
Further more you can see several what I'd assume vital things done;
his code
Code:
// notify other people to move? your function fails to do this
World.PlayerMoves(MyChar, Data);
// update the old location, your function fails to do this
MyChar.PrevX = MyChar.LocX;
MyChar.PrevY = MyChar.LocY;
// update the current location, your function *does* do this
MyChar.LocX = (ushort)(MyChar.LocX + AddX);
MyChar.LocY = (ushort)(MyChar.LocY + AddY);
funny thing the original walk method has that what hybrid said his doesnt.
public void Walk(byte Dir)
{
sbyte x = 0, y = 0;
if (Dir == 0 || Dir == 1 || Dir == 5 || Dir == 7)
x = 1;
if (Dir >= 1 && Dir <= 3)
x = -1;
if (Dir == 1 || Dir == 6 || Dir == 7)
y = 1;
if (Dir >= 3 && Dir <= 5)
y = -1;
X = (ushort)(X + x); Y = (ushort)(Y + y);
}
Hybrid's tip on his method
his code
Code:
// notify other people to move? your function fails to do this
World.PlayerMoves(MyChar, Data);
// update the old location, your function fails to do this
MyChar.PrevX = MyChar.LocX;
MyChar.PrevY = MyChar.LocY;
// update the current location, your function *does* do this
MyChar.LocX = (ushort)(MyChar.LocX + AddX);
MyChar.LocY = (ushort)(MyChar.LocY + AddY);
funny thing the original walk method has that what hybrid said his doesnt.
Well it wont help cause its up to the DMap's Im waiting for someone experienced now to tell me what is wrong cause im not getting any errors, nor warnings
Well, what I meant was, is DMaps loaded in the map you could still jump walls on?
Yep , may I just add you Cause Im having issues with something else as well?
Well the second problem is that I messed up some packet , because I got Hybrid's NPC's (INI ones) to work with my LOTF Source and they all loading fine and It says that they are spawned , im not getting any errors on it.So I bet that I didnt get the NPC's Spawn Packet to work.Any help?
#Bump , bump , bump!!
Bump!!! Is there nobody that is actually willing to help?