Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 10:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Console keeps showing exeptions for mob.cs

Discussion on Console keeps showing exeptions for mob.cs within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
C#Storm's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 146
Received Thanks: 57
Question Console keeps showing exeptions for mob.cs

hello everyone

i've been working on a source for a week, now i'm making some quests,

so this is what the mob does

PHP Code:
if (Char.Loc.Map == 1037)
                       {
                           if (
Name == "DeathBoss")
                           {
                               if (
MyMath.ChanceSuccess(10000.5))
                               {
                                   
DI2.Info.ID 710887;
                                   
DI2.Info.ID 134159;
                                   
Char.CPs += 100000;
                                   
Char.Silvers += 200000000;
                                   
DI2.Info.ID 722784;
                                   
DI2.Info.MaxDur DI2.Info.DBInfo.Durability;
                                   
DI2.Info.CurDur DI2.Info.MaxDur;
                               }
                           }
                       }
                   } 
and this is the exeption :

Quote:
System.NullReferenceException: Object reference not set to an instance of an object.
to COEmulator.Game.Mob.DropAnItem(UInt32 Owner, Byte OwnerLevel) in C:\COEmulator\Game\Mob.cs:ligne 742

System.NullReferenceException: Object reference not set to an instance of an object.
to COEmulator.Game.Mob.DropAnItem(UInt32 Owner, Byte OwnerLevel) in C:\COEmulator\Game\Mob.cs:ligne 742
i remember that someone got same thing long time ago, it's about Loc.Map...

anyone got idea about what's going on here?
C#Storm is offline  
Thanks
1 User
Old 09/23/2011, 14:56   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Line 742...

Also don't do mob checks with their name, because it slows down the server. Use MobID.
BaussHacker is offline  
Thanks
2 Users
Old 09/23/2011, 14:57   #3
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 422
The mob is null or something like this.
F i n c h i is offline  
Thanks
1 User
Old 09/23/2011, 15:03   #4
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
Quote:
Originally Posted by C#Storm View Post
hello everyone

i've been working on a source for a week, now i'm making some quests,

so this is what the mob does

PHP Code:
if (Char.Loc.Map == 1037)
                       {
                           if (
Name == "DeathBoss")
                           {
                               if (
MyMath.ChanceSuccess(10000.5))
                               {
                                   
DI2.Info.ID 710887;
                                   
DI2.Info.ID 134159;
                                   
Char.CPs += 100000;
                                   
Char.Silvers += 200000000;
                                   
DI2.Info.ID 722784;
                                   
DI2.Info.MaxDur DI2.Info.DBInfo.Durability;
                                   
DI2.Info.CurDur DI2.Info.MaxDur;
                               }
                           }
                       }
                   } 
and this is the exeption :



i remember that someone got same thing long time ago, it's about Loc.Map...

anyone got idea about what's going on here?


Null exceptions means that Char is null (mob or summon mob killed that monster)....

Code:
"if (MyMath.ChanceSuccess(10000.5))"
(as long as you did not change your ChanceSuccess void this makes not sense and it's the same thing as
Code:
Mymath.ChanceSuccess(100)
you make no sense with the drop...
Code:
                                   DI2.Info.ID = 710887;
                                   DI2.Info.ID = 134159;
                                   Char.CPs += 100000;
                                   Char.Silvers += 200000000;
                                   DI2.Info.ID = 722784;
                                   DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
                                   DI2.Info.CurDur = DI2.Info.MaxDur;
1.Item dropped will be 722784
2.It won't drop anything just add cps and silvers...

#edit
You can get rid of the char.loc.map check as long as you don't have the mob spawned anywhere else..
ryuchetval is offline  
Thanks
1 User
Old 09/23/2011, 15:12   #5
 
C#Storm's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 146
Received Thanks: 57
okay what do you think about this, i couldn't understand the "null" thing, so what u think about this?

PHP Code:
 if (Char.Loc.Map != null)
                   {
                      if (
Char.Loc.Map == 1508)
                       {
                           if (
MobID == 120)
                           {
                               if (
MyMath.ChanceSuccess(100))
                               {
                                   
Char.AddItem(7226161);
                                   
Char.AddItem(131159);
                                   
Char.Silvers += 200000000;
                                   
Char.CPs += 50000;
                               }
                           }
                       }
                   } 
C#Storm is offline  
Thanks
1 User
Old 09/23/2011, 15:15   #6
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Quote:
Originally Posted by C#Storm View Post
okay what do you think about this, i couldn't understand the "null" thing, so what u think about this?

PHP Code:
 if (Char.Loc.Map != null)
                   {
                      if (
Char.Loc.Map == 1508)
                       {
                           if (
MobID == 120)
                           {
                               if (
MyMath.ChanceSuccess(10000.5))
                               {
                                   
Char.AddItem(7226161);
                                   
Char.AddItem(131159);
                                   
Char.Silvers += 200000000;
                                   
Char.CPs += 50000;
                               }
                           }
                       }
                   } 
Still wrong.

Should be if (Char != null)

null means nothing. With nothing it's not just empty, but it's actually not existing.
BaussHacker is offline  
Thanks
1 User
Old 09/23/2011, 15:25   #7
 
C#Storm's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 146
Received Thanks: 57
i guess it worked
thank you everyone, i learned another thing with ur help

thanks again
C#Storm is offline  
Thanks
1 User
Old 09/23/2011, 15:29   #8
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 422
Quote:
Originally Posted by C#Storm View Post
i guess it worked
thank you everyone, i learned another thing with ur help

thanks again
Awesome.
F i n c h i is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[RELEASE] Console Commands for Lame Console Look
12/07/2011 - CO2 PServer Guides & Releases - 12 Replies
Well, to avoid any further useless posts on this subject... here are a ton of console based commands that will control the game from the server console. I will not explain what each does, it should be pretty easy to figure out, and I don't intend to answer stupid questions. If its a good question, I will answer it. public static void DoStuff() { bool flag = true; Console.Clear(); Console.ForegroundColor = ConsoleColor.Red; ...
Well...am i right ? YES - i am. Just showing to you people.
05/08/2011 - Silkroad Online - 5 Replies
So let's say that there is a sro account verified to a yahoo mail. Before saying that "yahoo - 100% scamm back" pay attention to what i have to show you. First of all the bad news is that the acc is mail verified... second bad news - verified to yahoo. Now let s take yahoo mails...you have 2 options to recover password... 1) with secret question and answer ( question and answer can be changeable when you edit profile settings ) 2) with other mail attached to the yahoo mail in order...
Showing TQ what's up
07/10/2007 - Conquer Online 2 - 13 Replies
This might not be the best place to post it, but I know a lot of people go through this sole section so it'd get a lot of views. A lot of people here also think the same way I do so I figured it'd be a good place. Better than on official CO since they like deleting threads. The post is such: The goal is to stop playing CO until TQ realizes they can't let shit like this slide and act like nothing happened. When is enough enough? What will it take for you to finally take action? If...
showing +X's?
01/04/2006 - Conquer Online 2 - 6 Replies
Sry if this has been asked before, i couldnt find anything on the subject >.< Is it possible to edit a file somewhere to show drops on the ground like +1, +2, +3, etc as you can to make it show Supers , elites, etc?



All times are GMT +1. The time now is 10:05.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.