Quote:
Originally Posted by C#Storm
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..