[Release]My source...

05/22/2010 18:30 pro4never#121
Ok... this is officially driving me insane... I cannot figure out why it would possibly be doing this.

I'm unable to do any output to console through player commands and I'm unable to add/test commands because of that.

It's as though that chat packet handling is never happening at all which really doesn't make sense as other commands that were already added do work.


I've A: tested adding a console command to make sure I wasn't doing something stupid and not writing it out correctly.

B: Written a function in the packet handler to do the writeline (incase it was only possible to do console output for some reason in the main cs file) and then called that using the console command. it works fine...

C: Removed all the existing commands so that there can't be any problem with switch statements or anything. I simply have it doing

Code:
  static bool CheckCommand(Message message, Client.GameState client)
        {            
            if (message.__Message.StartsWith("/"))
            {                
                Console.WriteLine("You used CheckCommand");
                return true;
            }
            return false;
        }
No success with that so I added a writeline directly into the chat handler (right before the checkcmd function is being called). No luck there either.

Note: I've tried using the stupidly simple function I wrote (that worked when being called from the main cs file) as well as the normal console.writeline format... I simply cannot think of a single reason why this won't work.. Personally I use commands for all my coding and debugging so this is really bothering me :S I'm sure it's something stupidly simple that I'm missing but it's just not making any sense to me.
05/22/2010 21:31 Kiyono#122
Quote:
Originally Posted by pro4never View Post
Ok... this is officially driving me insane... I cannot figure out why it would possibly be doing this.

I'm unable to do any output to console through player commands and I'm unable to add/test commands because of that.

It's as though that chat packet handling is never happening at all which really doesn't make sense as other commands that were already added do work.


I've A: tested adding a console command to make sure I wasn't doing something stupid and not writing it out correctly.

B: Written a function in the packet handler to do the writeline (incase it was only possible to do console output for some reason in the main cs file) and then called that using the console command. it works fine...

C: Removed all the existing commands so that there can't be any problem with switch statements or anything. I simply have it doing

Code:
  static bool CheckCommand(Message message, Client.GameState client)
        {            
            if (message.__Message.StartsWith("/"))
            {                
                Console.WriteLine("You used CheckCommand");
                return true;
            }
            return false;
        }
No success with that so I added a writeline directly into the chat handler (right before the checkcmd function is being called). No luck there either.

Note: I've tried using the stupidly simple function I wrote (that worked when being called from the main cs file) as well as the normal console.writeline format... I simply cannot think of a single reason why this won't work.. Personally I use commands for all my coding and debugging so this is really bothering me :S I'm sure it's something stupidly simple that I'm missing but it's just not making any sense to me.
So I tried to use this as an command
Code:
case "cmd":
                                        {
                                            Console.WriteLine("Console output");
                                            break;
                                        }
And that does exactly what it says it does, also tried this
if (message.__Message.StartsWith("/"))
{
Console.WriteLine("You used CheckCommand");
And it outputs on the console whenever I use a command. So what exactly is your problem?
05/22/2010 21:52 pro4never#123
Quote:
Originally Posted by Kiyono View Post
So I tried to use this as an command
Code:
case "cmd":
                                        {
                                            Console.WriteLine("Console output");
                                            break;
                                        }
And that does exactly what it says it does, also tried this
if (message.__Message.StartsWith("/"))
{
Console.WriteLine("You used CheckCommand");
And it outputs on the console whenever I use a command. So what exactly is your problem?
Yah... very strange cause it's refusing to work and i have the identical thing. I'll just start with a fresh source and see if that fixes it... it's a very strange problem though cause everything else works but it refuses to do console output
05/22/2010 21:56 Kiyono#124
Quote:
Originally Posted by pro4never View Post
Yah... very strange cause it's refusing to work and i have the identical thing. I'll just start with a fresh source and see if that fixes it... it's a very strange problem though cause everything else works but it refuses to do console output
Really strange that it doesn't work for you but it does for me but be glad that you just have that problem, my problem is worse >_<
05/22/2010 22:48 -impulse-#125
Hmm, just add my msn and message me. I'll try my best to help ya...it would be just a lot easier to talk over msn than doing it with PMs/this thread. Even if I'm not online, message me with your problem and also tell me your time zone...I've got GMT +2.
05/23/2010 00:23 MonstersAbroad#126
it is:
Code:
client.Entity.ConquerPoints
then the same for money on adding / taking away
Code:
client.Entity.ConquerPoints += 500;
client.Entity.ConquerPoints -= 500;
05/23/2010 00:25 xScott#127
Quote:
Originally Posted by ElectricZebra View Post
Ok I need a little help.
Instead of the code for silvers:

What is it for CPs?
I have tried:

But it don't work.
Any help?
client.Entity.ConquerPoints

EDIT: Beat me to it >.>
05/23/2010 01:35 BlueFlame11#128
#Edit Never mind fixed it
05/23/2010 07:49 chickmagnet#129
well i use this and it works its navicat lite 9 its premium full and thx 4 the source its perfect 4 me 2 start learnin

[Only registered and activated users can see links. Click Here To Register...]
05/23/2010 10:14 MonstersAbroad#130
Quote:
Originally Posted by ElectricZebra View Post
I need some help.
When I coded a npc I made the case ID what it said in the game, and I build and debugged, but when i login, it still says hi i havent been coded my id is blah.
Anyone know why?
left click NPCDialog->Build
05/23/2010 22:14 MonstersAbroad#131
Decker, figure it out -_- its a base
05/23/2010 23:43 -impulse-#132
Quote:
Originally Posted by ElectricZebra View Post
Why is it I can only make +9 gear and not +12?
Go where commands are and fin
Code:
item.Plus = Math.Min(Data[9], 9);
or something like that... do it.

Code:
item.Plus = Math.Min(Data[9], 12);
05/23/2010 23:54 Arcо#133
I think this just might bring people out of lotf.
05/23/2010 23:59 pro4never#134
Quote:
Originally Posted by .Arco View Post
I think this just might bring people out of lotf.
God I hope so...

Ooh and for the record I did get the console output working. I just needed to re-extract the source. Must have messed something up when I was messing around with the packets.. which is strange but w/e.
05/24/2010 00:04 Arcо#135
Quote:
Originally Posted by ElectricZebra View Post
How do we add mobs and guards?

#edit
item.Plus = Math.Min(Data[9], 9); is not in the source, I have searched, all I have found close to that is newItem.Plus = Math.Min((byte)9, plus);
Take other sources as examples.


"Math.Min((byte)9, plus)"
What do you think you're supposed to change if you're trying to raise the +9 limit?
:facepalm: