Release - C# 4267 Source

02/15/2012 10:13 I don't have a username#61
Quote:
Originally Posted by PretendTime View Post
Has no one had a problem with the sql file? Here is mine
[code]
[Err] 2006 - MySQL server has gone away
[Err] -- MySQL Administrator dump 1.4
Read your error and lookup the MySQL Error code, in this case 2006.

[Only registered and activated users can see links. Click Here To Register...]
02/15/2012 21:22 killersub#62
this source is extremely great.

However, I cant seem to fix the jump spawn bug.

for example, once I jump I get pulled-back and everything around me dissapears and then re-appears after I jump/walk again.

All-in-all this is a great source.
03/02/2012 07:28 djneo31#63
hey need help pls this source work in navicat 9 premium?? or am forced to use another program?? :handsdown: :handsdown:

This problem solved. =D
03/02/2012 09:31 I don't have a username#64
Quote:
Originally Posted by killersub View Post
this source is extremely great.

However, I cant seem to fix the jump spawn bug.

for example, once I jump I get pulled-back and everything around me dissapears and then re-appears after I jump/walk again.

All-in-all this is a great source.
Tried sending the spawnpacket after, not only players, but all objects in screen?
03/02/2012 18:36 killersub#65
Quote:
Originally Posted by I don't have a username View Post
Tried sending the spawnpacket after, not only players, but all objects in screen?
that "might" provide a temporary solution, but the problem still somehow exists. I don't know if it's the jump packet messing up with the spawns or something else.
03/06/2012 03:06 LetterX#66
Quote:
Originally Posted by killersub View Post
this source is extremely great.

However, I cant seem to fix the jump spawn bug.

for example, once I jump I get pulled-back and everything around me dissapears and then re-appears after I jump/walk again.

All-in-all this is a great source.
I remember that bug when I worked on this source; I'm amazed my fix isn't in this source...anyways, you become "de-synced" with the server.
Try some Console or In-Game messages (displaying where the servers thinks you're at) and you'll see. The server will report one set of coordinates, which are different than what the client is showing. Eventually, you'll de-sync so much the Pull Back mechanism kicks in.

It's an easy fix.
03/08/2012 10:10 djneo31#67
Hey pls, need little help, the portals in this source dont work, what is this?? :confused: :handsdown:
03/08/2012 19:37 Spirited#68
Quote:
Originally Posted by djneo31 View Post
Hey pls, need little help, the portals in this source dont work, what is this?? :confused: :handsdown:
Code:
// PORTAL USE:
Packet 4 -- TQClient -- Length: 38 | 46 -- Type: 10010
26 00 1A 27 2F 86 15 00 62 02 6A 03 00 00 00 00 ;   & '/† bj    
CF 0A E4 06 55 00 07 00 62 02 6A 03 00 00 00 00 ;   Ï äU  bj    
FF FF FF FF 00 00 54 51 43 6C 69 65 6E 74       ;   ÿÿÿÿ  TQClient

//TELEPORT:
Packet 6 -- TQServer -- Length: 38 | 46 -- Type: 10010
26 00 1A 27 2F 86 15 00 33 04 00 00 00 00 00 00 ;   & '/† 3      
00 00 00 00 56 00 00 00 68 01 0A 00 00 00 00 00 ;       V   h     
00 00 00 00 00 00 54 51 53 65 72 76 65 72       ;         TQServer
You could always look at other sources for examples too.
03/09/2012 10:30 djneo31#69
Quote:
Originally Posted by Fаng View Post
Code:
// PORTAL USE:
Packet 4 -- TQClient -- Length: 38 | 46 -- Type: 10010
26 00 1A 27 2F 86 15 00 62 02 6A 03 00 00 00 00 ;   & '/† bj    
CF 0A E4 06 55 00 07 00 62 02 6A 03 00 00 00 00 ;   Ï äU  bj    
FF FF FF FF 00 00 54 51 43 6C 69 65 6E 74       ;   ÿÿÿÿ  TQClient

//TELEPORT:
Packet 6 -- TQServer -- Length: 38 | 46 -- Type: 10010
26 00 1A 27 2F 86 15 00 33 04 00 00 00 00 00 00 ;   & '/† 3      
00 00 00 00 56 00 00 00 68 01 0A 00 00 00 00 00 ;       V   h     
00 00 00 00 00 00 54 51 53 65 72 76 65 72       ;         TQServer
You could always look at other sources for examples too.

Hum ok, but no have this code in this source =/ Where do I add this??


I think the error may be here!
private void AppendPortal(GameClient Client, DataPacket* DPacket, byte[] Packet)
{
ushort X = 0, Y = 0;
fixed (byte* Buffer = Packet)
{
X = *(ushort*)(Buffer + 12);
Y = *(ushort*)(Buffer + 14);
}
if (Database.LoadPortal(Client, X, Y))
Client.Teleport(Client.Entity.MapID, Client.Entity.X, Client.Entity.Y);
else
{
Client.Speak(Color.Turquoise, ChatType.TopLeft, "Invalid Portal MapID: " + Client.Entity.MapID + " X: " + Client.Entity.X + " Y: " + Client.Entity.Y + " Please report this.");
Client.Teleport(1002, 430, 380);
}
}
03/09/2012 16:30 Spirited#70
Quote:
Originally Posted by djneo31 View Post
Hum ok, but no have this code in this source =/ Where do I add this??


I think the error may be here!
private void AppendPortal(GameClient Client, DataPacket* DPacket, byte[] Packet)
{
ushort X = 0, Y = 0;
fixed (byte* Buffer = Packet)
{
X = *(ushort*)(Buffer + 12);
Y = *(ushort*)(Buffer + 14);
}
if (Database.LoadPortal(Client, X, Y))
Client.Teleport(Client.Entity.MapID, Client.Entity.X, Client.Entity.Y);
else
{
Client.Speak(Color.Turquoise, ChatType.TopLeft, "Invalid Portal MapID: " + Client.Entity.MapID + " X: " + Client.Entity.X + " Y: " + Client.Entity.Y + " Please report this.");
Client.Teleport(1002, 430, 380);
}
}
You already have it. ^
Are you loading the portal info from the database?
03/10/2012 05:17 djneo31#71
Quote:
Originally Posted by Fаng View Post
You already have it. ^
Are you loading the portal info from the database?
a detail I forgot to mention, sometimes the portal works when you jump in on this exact cordenada portal.text

Yes this is loud in database

public static bool LoadPortal(GameClient Client, ushort X, ushort Y)
{
string[] Contents = File.ReadAllLines(Location + "Portals.txt");
foreach (string Content in Contents)
{
string[] HArray = Content.Split(' ');
if (HArray[0] == Client.Entity.MapID.ToString() && Kernel.GetDistance(Client.Entity.X,
Client.Entity.Y, ushort.Parse(HArray[1]), ushort.Parse(HArray[2])) <= 3)
{
Client.Entity.MapID = new Map(Convert.ToUInt16(HArray[3]));
Client.Entity.X = Convert.ToUInt16(HArray[4]);
Client.Entity.Y = Convert.ToUInt16(HArray[5]);
return true;
}
}
return false;
}
03/20/2012 17:33 snipetime#72
Hmm i want to fix the teleport system but thinking about taking it from an other source ... allot of rewriting to do then.
Maybe there is an easy fix for it ?

Sure i can add every coordinats to the Portals.txt but thats just nuts i think

example : In Portal.txt says 1002 200 200 1500 200 200

So if you jump perfect on the coords 200 200 you will tele to 1500 200 200
if you don't jump on 200 200 the portal don't work.
There is an piece of code that is missing something like if you jump close to 200 200 that it will tele you to 1500 200 200

but i'm a bit clue less how to start to code that piece
If some can push me in the right derection what i need to do / change.

just a push i want to fix it on my own but i'm a bit clue less.

+

that de-syc with the server is an hate full bugg -_- need to look at that to but first want to fix the portals...
03/22/2012 06:49 lostsolder05#73
Code:
        public static bool LoadPortal(GameClient Client, ushort X, ushort Y)
        {
            string[] Contents = File.ReadAllLines(Location + "Portals.txt");
            foreach (string Content in Contents)
            {
                string[] HArray = Content.Split(' ');
                if (HArray[0] == Client.Entity.MapID.ToString() && Kernel.GetDistance(Client.Entity.X,
                    Client.Entity.Y, ushort.Parse(HArray[1]), ushort.Parse(HArray[2])) <= 20)
                {
                    Client.Entity.MapID = new Map(Convert.ToUInt16(HArray[3]));
                    Client.Entity.X = Convert.ToUInt16(HArray[4]);
                    Client.Entity.Y = Convert.ToUInt16(HArray[5]);
                    return true;
                }
            }
            return false;
        }
Fixed Portal code for anybody that wants it.
03/22/2012 13:26 snipetime#74
Quote:
Originally Posted by lostsolder05 View Post
Code:
        public static bool LoadPortal(GameClient Client, ushort X, ushort Y)
        {
            string[] Contents = File.ReadAllLines(Location + "Portals.txt");
            foreach (string Content in Contents)
            {
                string[] HArray = Content.Split(' ');
                if (HArray[0] == Client.Hero.MapID.ToString() && Kernel.GetDistance(Client.Hero.X,
                    Client.Hero.Y, ushort.Parse(HArray[1]), ushort.Parse(HArray[2])) <= 20)
                {
                    Client.Hero.MapID = new Map(Convert.ToUInt16(HArray[3]));
                    Client.Hero.X = Convert.ToUInt16(HArray[4]);
                    Client.Hero.Y = Convert.ToUInt16(HArray[5]);
                    return true;
                }
            }
            return false;
        }
Fixed Portal code for anybody that wants it.
Thanks lostsolder05

If you get errors at Client.Hero use Client.Entity so you get this :

PHP Code:
public static bool LoadPortal(GameClient Clientushort Xushort Y)
        {
            
string[] Contents File.ReadAllLines(Location "Portals.txt");
            foreach (
string Content in Contents)
            {
                
string[] HArray Content.Split(' ');
                if (
HArray[0] == Client.Entity.MapID.ToString() && Kernel.GetDistance(Client.Entity.X,
                    
Client.Entity.Yushort.Parse(HArray[1]), ushort.Parse(HArray[2])) <= 20)
                {
                    
Client.Entity.MapID = new Map(Convert.ToUInt16(HArray[3]));
                    
Client.Entity.Convert.ToUInt16(HArray[4]);
                    
Client.Entity.Convert.ToUInt16(HArray[5]);
                    return 
true;
                }
            }
            return 
false;
        } 
03/22/2012 17:19 djneo31#75
Thank you for the attention it really works now = D, now I have another question, when you walking or jumping with the char, it goes nowhere or goes back to the previous position, tell me what may be causing that?? :confused: :handsdown: