1 simple request

02/01/2010 19:59 [GM]#1
#request delete

i figured it out thx pro4never

i gave u thanks
02/01/2010 22:23 gahanabobo#2
i wish i can help u but i don't know how :(

when u release ur server i will join it :D
02/01/2010 22:36 pro4never#3
I have a release in my siggy for CoEmu. You could convert it quite easily to work with the new lotf (or w/e source you are using) assuming it's not binaries.

Good luck.
02/02/2010 09:09 [GM]#4
Quote:
Originally Posted by pro4never View Post
I have a release in my siggy for CoEmu. You could convert it quite easily to work with the new lotf (or w/e source you are using) assuming it's not binaries.

Good luck.
iam useing 5165 source
02/02/2010 09:26 pro4never#5
Source doesn't matter, just convert it as the principle behind it is exactly the same. All you will have to do is find in your source where monster death is handled and then write something nearly identical to what I just posted.
02/02/2010 09:40 [GM]#6
Quote:
Originally Posted by pro4never View Post
Source doesn't matter, just convert it as the principle behind it is exactly the same. All you will have to do is find in your source where monster death is handled and then write something nearly identical to what I just posted.

i did that after following a guide but it works for only 1 mob for me
02/02/2010 09:55 pro4never#7
as in 1 monster name? are you sure you didn't indent your code under a specific mob/map check?
02/02/2010 10:13 [GM]#8
Quote:
Originally Posted by pro4never View Post
as in 1 monster name? are you sure you didn't indent your code under a specific mob/map check?
no i didn't here is the code check it out

if (MyMath.ChanceSuccess(100))
{
DI2.Silvers = (uint)(Rnd.Next(MinSilvers, MaxSilvers) * DropRates.Silver);
if(Char != null)

if (MyMath.ChanceSuccess(100))
{
if (MobID == 52)

Char.CPs += 1000;
{
Char.Silvers += 1000000;

return;
}
}



that works for birdmen


when i add it for Pheasant

i make it like this

if (MyMath.ChanceSuccess(100))
{
DI2.Silvers = (uint)(Rnd.Next(MinSilvers, MaxSilvers) * DropRates.Silver);
if(Char != null)

if (MyMath.ChanceSuccess(100))
{
if (MobID == 52)
if (MobID == 1)

Char.CPs += 1000;
{
Char.Silvers += 1000000;

return;
}
}

but this don't work for bird men or Pheasant so what iam doing wrong
02/02/2010 11:02 pro4never#9
Why put the mob id at all?

Also reason why it's not working properly is you are using 2 if checks. They can't be BOTH therefor it wont work. Try using the or operator (||) in the same if statement.

Eg

if (MOBID == 1 || MobID == 500)

You could also do a range such as

if (MobId >= 1 && MobId < = 500)

That would work for any mob between 1-500

Also make sure you contain any drop code for the if statement in {}. If not it only applies to the line directly beneath the if statement.

Note: You can still add random chance to it by using calculation percent success (rate of cps being awarded) and then random number generator determining how many cp is given out. Adding monster/player level calculations takes a bit more work but still rather simple to do.
02/02/2010 11:43 [GM]#10
thx dude here is the code i made

if (MyMath.ChanceSuccess(100))
{
if (MobID >= 1 && MobID <= 11169)
Char.CPs += 1000;
Char.Silvers += 1000000;

return;

}


and its not working what is wrong in it?