Kill Monsters Add Cps and Money

01/11/2010 20:03 cazzon717#1
I have noticed this on some other private servers so if you want to use it. It is pretty simple the way it works.(Source 5165)
What it is,
If you put the mobID as 1 (Pheasant) then everytime you kill a pheasant you can make it add 100cps or the amount you want same with red devils if you wanted to make them drop 700cps, This is not dropping but going straight into the character inventory.

Right Im going to take mobid 1 which is a pheasant,
Now open NewestCoServer.Game > Mob.cs
after you have opened that go to the void
Code:
void DropAnItem(uint Owner, byte OwnerLevel)
And search for this block
Code:
 if (MyMath.ChanceSuccess(30))
                {
                    DI2.Silvers = (uint)(Rnd.Next(MinSilvers, MaxSilvers) * DropRates.Silver);
Now above that add,

Code:
    
  if (MyMath.ChanceSuccess(100))
 {
  if (MobID == 1) 
  {
 Char.Silvers += 1;
  Char.CPs += 100;

return;
    }
                }
So, the lines :
if (MyMath.ChanceSucess(100)), means how often does it drop in this case it is 100% chance of dropping so every time the MobID it will drop all the time, you can lower this.
if (MobID == 1) this is where the mob ID goes you can get this from MobInfo's
Char.Silvers +=1 is how many silvers you want it to drop change this if you want to
Char.Cps += 100 is how many cps you want it to drop again change it if you want
return; shows it to the player

---
Hope this helps anyone who was wanting it,
If anyone knows if you can improve this code then please tell me i dont mind learning new ways.

Thanks
01/11/2010 20:51 ~*NewDuuDe*~#2
Youre the guy I talked to on MSN aren't you?
Exactly what did you acchieve by releasing what I helped you to code?
This has been released many times before.

Search around before you post.
01/11/2010 22:34 .Ryu#3
Quote:
Originally Posted by ~*NewDuuDe*~ View Post
Youre the guy I talked to on MSN aren't you?
Exactly what did you acchieve by releasing what I helped you to code?
This has been released many times before.

Search around before you post.
Well the only reason he did it cause he wants poeple to think he can code ^^
01/12/2010 01:59 pro4never#4
yah this has been posted a ton of times for different sources.

Ps: am i the only one who finds it odd that no one seems to have released a GOOD system for this (random rates of cp based on monster level combined with player level) just seems odd to me as it would be a fairly simple thing to do.

Maybe if I'm bored later I'll code one for coEmu and release it...

<edit> released. Not trying to pick on your thread... just putting it out there for ppl.
01/13/2010 22:33 [GM]#5
that was helpful to me ty
07/05/2011 01:51 Sythen#6
didn't work for me. lol. I get 100 cps after i kill alot. but rarely.
07/05/2011 02:46 zTek#7
@Sythen

Arco released a Automatic CP's system which is a better way than doing this.

[Only registered and activated users can see links. Click Here To Register...]
07/08/2011 12:36 Sphinxy93#8
This helped me out, thanks. I'm glad you re-posted, i'm too lazy to search ;)
07/08/2011 12:52 Sphinxy93#9
well i didn't see that date, i just saw that it was recent, i looked at it, and it helped me.

So saying thanks to the guy and helping him acknoledge that it helped me isn;t a reason?

I'm sure he would be glad to know that it helped me and i appreciate him posting the thread. k.thx.bai
07/08/2011 13:12 Spirited#10
Quote:
Originally Posted by Sphinxy93 View Post
well i didn't see that date, i just saw that it was recent, i looked at it, and it helped me.

So saying thanks to the guy and helping him acknoledge that it helped me isn;t a reason?

I'm sure he would be glad to know that it helped me and i appreciate him posting the thread. k.thx.bai


<EDIT>

Loser, read the date in the comment above mine, that's not over a year old. I Agree the START of the thread is. But i don;t see you having a go at Syphen for bumping it after 6+ months of no comments..
He wasn't talking to you.
07/08/2011 13:31 Sphinxy93#11
Quote:
Originally Posted by Fаng View Post
He wasn't talking to you.
Seems like it as he poasted just after i posted, and not after the other guy posted....
07/08/2011 13:35 Spirited#12
Quote:
Originally Posted by Sphinxy93 View Post
Seems like it as he poasted just after i posted, and not after the other guy posted....
It takes a while for people to respond because of the time zones. Like now i'm going to bed... so you won't hear from me for at least another 8 hours.
07/08/2011 13:41 Sphinxy93#13
Quote:
Originally Posted by Fаng View Post
It takes a while for people to respond because of the time zones. Like now i'm going to bed... so you won't hear from me for at least another 8 hours.
Good, this saves me an argument. Your saying about timezones? the other guy's post was a week beforehand...

/last of my comments in this thread. i'm not arguing with someone who is wrong and gives wrong facts... :L