Official 5165 FAQ/Question thread

02/17/2011 22:44 kyle191#1861
Thanks for your reply.
Ok I have the Client and I have the DB. Do I put my IP in them both?
02/17/2011 22:50 kyle191#1862
Coming to think of it, I have my real IP address in the client that my friend is trying to login with. But they cannot connect, So my guess its the ports rejecting but they are set to Allow Allways. I have a Netgear that a service called Sky uses.
02/17/2011 23:04 denominator#1863
Need that IP in OldCODB and the clients server.dat, also you need your computers IP for the router which will be something like 192.168.*.***
02/17/2011 23:17 kyle191#1864
I have the IP in my OldCODB and the clients server.dat, also I have used my IP from ipconfig for the router to create the ports. by the way I create these ports in the "Inbound Services" right? if so I've done this. All I get now is "Failed to connect to the game server. Please try again later"
Have anymore ideas lol?
02/17/2011 23:26 denominator#1865
I`m having real problems with my internet because of the solar storm so I`m having difficulty accessing this site >.< I use Virtual Server rather than Port Forwarding on my D-Link router and it seems to work. Inbound filter is set to allow all. Protocol is set to both UDP and TCP
02/17/2011 23:51 kyle191#1866
Yeah I did all that, I think the trouble is that my router renews my IP everytime. Can I use this Virtual Server ?
02/18/2011 00:18 denominator#1867
I`m not sure about netgear routers so I can`t really help to much :( If you have virtual server in the router then yes use it.


Ok I got it so that you can only use DoubleExp once, I need to add more stuff so that it saves the info etc. The other thing is I want it to tell the player that they have already had double exp but I am a little stuck on this?

Code:
else if (Control == 30)
                                    {
                                        if (GC.MyChar.DoubleexpUsed == 0)
                                        {

                                            GC.MyChar.DoubleEXPUsed = DateTime.Now;
                                            GC.MyChar.DoubleexpUsed++;
                                            GC.MyChar.DoubleExp = true;
                                            GC.MyChar.DoubleExpLeft = 3600;
                                            GC.AddSend(Packets.Status(GC.MyChar.EntityID, Status.DoubleExpTime, (ulong)GC.MyChar.DoubleExpLeft));
                                            
                                        }
                                    }
                                    else 
                                    {
                                        if (GC.MyChar.DoubleexpUsed == 1)
                                        {
                                            
                                            GC.AddSend(Packets.NPCLink("You`ve already had double exp today!", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
02/19/2011 01:22 pro4never#1868
Quote:
Originally Posted by denominator View Post
I`m not sure about netgear routers so I can`t really help to much :( If you have virtual server in the router then yes use it.


Ok I got it so that you can only use DoubleExp once, I need to add more stuff so that it saves the info etc. The other thing is I want it to tell the player that they have already had double exp but I am a little stuck on this?

Code:
else if (Control == 30)
                                    {
                                        if (GC.MyChar.DoubleexpUsed == 0)
                                        {

                                            GC.MyChar.DoubleEXPUsed = DateTime.Now;
                                            GC.MyChar.DoubleexpUsed++;
                                            GC.MyChar.DoubleExp = true;
                                            GC.MyChar.DoubleExpLeft = 3600;
                                            GC.AddSend(Packets.Status(GC.MyChar.EntityID, Status.DoubleExpTime, (ulong)GC.MyChar.DoubleExpLeft));
                                            
                                        }
                                    }
                                    else 
                                    {
                                        if (GC.MyChar.DoubleexpUsed == 1)
                                        {
                                            
                                            GC.AddSend(Packets.NPCLink("You`ve already had double exp today!", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
Your indentation is all wrong...

That code is saying...

if(LinkBack == 30)
{
//do this
}
else
{
//you have double exp already!
}

Change your indentation and it will work just fine I assume.


Code:
else if (Control == 30)
                                    
                                        if (GC.MyChar.DoubleexpUsed == 0)
                                        {

                                            GC.MyChar.DoubleEXPUsed = DateTime.Now;
                                            GC.MyChar.DoubleexpUsed++;
                                            GC.MyChar.DoubleExp = true;
                                            GC.MyChar.DoubleExpLeft = 3600;
                                            GC.AddSend(Packets.Status(GC.MyChar.EntityID, Status.DoubleExpTime, (ulong)GC.MyChar.DoubleExpLeft));
                                            
                                        }
else//why do another else if? you just wanna know if it's > 0
                                        {
                                            
                                            GC.AddSend(Packets.NPCLink("You`ve already had double exp today!", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }                                    
                                    break;

<edit>

the text is saying per day so I assume you want this to be usable once per day? Make sure you are saving to character database on use and loading on character login. if not it will only require a login and you'll be able to use the npc again.

Personally I'd use a bitfield of "DailyActions" or something... then just assign flags to each thing so like...

0x1 = used daily double exp
0x2 = used up lotto tries
0x4 = done monster hunting quests

etc. Then just turn it into a [Flag] so you can do all sorts of handy things with it... It would be the 'best' way of doing things but would require a bit of actual work.
02/19/2011 02:08 denominator#1869
Thank you p4n and yup wanted it to happen daily lol. I will have a good look over it I figured out how to actually stop characters from using double exp over and over again and am slowly working on an if char is blessed or not as well, slow but will be satisfying if or when I get it actually working near perfect lol. Thanks for the advice I appreciate it very much :)
02/19/2011 05:47 kyle191#1870
Hello, I was wondering if anyone could be of help to me. This is about Port Forwarding so I can play my Private Server Hamachi Free. The problem is that my Router is always changing it's IP, so I have no static IP. I do not have a Static IP option in the Routers Settings. How can I get around this, is there anyway I can download a program that works like Port Forwarding.

Extra Information: My Router is a NetGear DG834GT running with Internet Service Provider "SKY Broadband" (UK)

Would be much appreciated if you could help, thanks.
02/19/2011 13:24 .Beatz#1871
Quote:
Originally Posted by kyle191 View Post
Hello, I was wondering if anyone could be of help to me. This is about Port Forwarding so I can play my Private Server Hamachi Free. The problem is that my Router is always changing it's IP, so I have no static IP. I do not have a Static IP option in the Routers Settings. How can I get around this, is there anyway I can download a program that works like Port Forwarding.

Extra Information: My Router is a NetGear DG834GT running with Internet Service Provider "SKY Broadband" (UK)

Would be much appreciated if you could help, thanks.
What IP keeps changing?

Your GlobalIP (85.174.276.274) < Example
Or your InternalIP (192.168.1.101)

If it is the first one there is nothing to be done (as far as I am aware)
You could phone Sky and talk to them about it see what they say.

If it is your "InternalIP" then simply set an IP reservation in your routers settings this should sort out your problem
02/19/2011 19:04 kyle191#1872
Quote:
Originally Posted by .Beatz View Post
What IP keeps changing?

Your GlobalIP (85.174.276.274) < Example
Or your InternalIP (192.168.1.101)

If it is the first one there is nothing to be done (as far as I am aware)
You could phone Sky and talk to them about it see what they say.

If it is your "InternalIP" then simply set an IP reservation in your routers settings this should sort out your problem
Thanks for your reply.

I'm sure it's my Internal IP that changes. For example (192.168.1.101) then changes to (192.168.1.102)

I'm pretty sure my External IP doesn't change.

I managed to reserve my IP and I port forwarded but it seems to not work still.

I tried Port Forwarding the other day and I followed video tutorials and did it correctly but I couldn't get my client to work, nor could my friend.

So let's just say PortForward worked, would I put my External IP into server.dat in the Client and Config in my Source?
OR
Is it different for me, do I have to put 127.0.0.1.

Thanks.
02/19/2011 20:01 .Beatz#1873
If youadd127.0.0.1 it wont work

I think the problem is with Sky because they block most ports for security so your best bet would be to phone them and ask them if they can unblock the ports you need

You would need to put your ExternalIP into everywhere that you need to put an IP
02/19/2011 20:19 kyle191#1874
Quote:
Originally Posted by .Beatz View Post
If youadd127.0.0.1 it wont work

I think the problem is with Sky because they block most ports for security so your best bet would be to phone them and ask them if they can unblock the ports you need

You would need to put your ExternalIP into everywhere that you need to put an IP
My girlfriend has just logged into my game server but I can't and I'm using the same server.dat also the same client.

what is goin on lol.
02/19/2011 21:54 .Beatz#1875
Quote:
Originally Posted by kyle191 View Post
My girlfriend has just logged into my game server but I can't and I'm using the same server.dat also the same client.

what is goin on lol.
Hmm is your girlfriend accessing the server from a different network?

If so your router may A) Not support NAT routing or B) NAT Routing might not be set up right

If you search google you should be able to find an answer