[QUESTION] Coding Portals

06/29/2009 02:09 Pete1990#1
Can someone like give me a hint how to code Portals into the source?
06/29/2009 02:45 Zanzibar#2
What source, zawmg.

If lotf, add a portal in mySQL
06/29/2009 03:32 _Emme_#3
Well, as Zanzibar say basically. If it's a source that does not have portals at all, if you have no idea how you would do it you can try using other sources as reference's. If still not, you can edit your first post on this thread and specify source, what you've done so far on portals and that stuff.

Emme
06/29/2009 03:37 Pete1990#4
Well its Lotf source and im trying to code them into the source im thinking that will fix the portal problem. with people get stuck.
06/29/2009 04:05 Zanzibar#5
Quote:
Originally Posted by Pete1990 View Post
Well its Lotf source and im trying to code them into the source im thinking that will fix the portal problem. with people get stuck.
Have you ever thought that the problem wasn't the portals, but it's you :D
06/29/2009 04:17 Pete1990#6
Lmao its portals becuse everone get stuck in some portals i even checked make sure they go right spots they do.
06/29/2009 04:24 _Emme_#7
Recode how the portal works and try find out what's causing it to freeze the client while it's 'teleporting' the character.
06/29/2009 04:43 n0mansland#8
I get what hes trying to say... It was a common bug with LOTF sources but I forgot the fix or if there even was one IDK..

Quote:
Have you ever thought that the problem wasn't the portals, but it's you :D
So its 100% not him just LOTF
06/29/2009 04:52 Singah#9
Well the bug only occurs when the server lags, if I'm correct.
06/29/2009 05:16 Zanzibar#10
Quote:
Originally Posted by Singah View Post
Well the bug only occurs when the server lags, if I'm correct.
And thus making my statement true.
06/29/2009 06:02 _tao4229_#11
Server lag has nothing to do with it, it doesn't even make sense that it would be `lag`
06/29/2009 06:07 Pete1990#12
Lmao i dont know what the probllem is
06/29/2009 06:34 _tao4229_#13
I'm pretty sure(I haven't looked at it in a while, maybe i will) LOTF handles teleporting wrong.

My source:
Code:
static class DataIDs
    {
        public const ushort RequestEntity = 102;
        public const ushort SetLocation = 0x4A;
        public const ushort ChangeMap = 0x56;
        public const ushort SetMapColor = 0x68;
        public const ushort Jump = 0x85;
        public const ushort RequestSurroundings = 0x72;
        public const ushort RemoveEntity = 0x84;
        public const ushort ChangePKMode = 0x60;
        public const ushort RequestRevive = 0x5E;
        public const ushort ChangeAction = 0x51;
        public const ushort Hotkeys = 0x4B;
        public const ushort ConfirmFriends = 0x4C;
        public const ushort ConfirmProfs = 0x4D;
        public const ushort ConfirmSpells = 0x4E;
        public const ushort ConfirmGuild = 0x61;
        public const ushort CompleteLogin = 0x82;
        public const ushort ChangeAvatar = 0x8E;
        public const ushort EnterPortal = 0x55;
        public const ushort DeletePlayer = 0x5F;
        public const ushort ViewEquips = 117;
    }
NOTE: ALL OF THOSE ARE HEXADECIMALS EXCEPT VIEWEQUIPS


LOTFs teleport:
Code:
public void Teleport(ushort map, ushort x, ushort y)
        {
            Attacking = false;
            PTarget = null;
            MobTarget = null;
            TGTarget = null;
            if (LocMap != 700&&LocMap != 1036)
            PrevMap = LocMap;
            Ready = false;
            World.RemoveEntity(this);
            LocMap = map;
            LocX = x;
            LocY = y;
            MyClient.SendPacket(General.MyPackets.GeneralData((long)UID, LocMap, LocX, LocY, 74));
            World.SpawnMeToOthers(this, false);
            World.SpawnOthersToMe(this, false);
            World.SurroundNPCs(this, false);
            World.SurroundMobs(this, false);

            if (LocMap == 1038)            
                SendGuildWar();           

            Ready = true;
        }
The correct number should be ChangeMap, not the 74. Have fun.
06/29/2009 06:35 Singah#14
Lotf handles almost everything incorrectly.
06/29/2009 07:12 Pete1990#15
when i did it i come up with this
Error 1 The best overloaded method match for 'COServer_Project.Packets.GeneralData(long, long, ushort, ushort, short)' has some invalid arguments C:\Documents and Settings\David\Desktop\COServerProjectv1\COServerP roject\Character.cs 8465 33 COServerProject