|
You last visited: Today at 15:38
Advertisement
Automatic Cps In Inventory
Discussion on Automatic Cps In Inventory within the CO2 Private Server forum part of the Conquer Online 2 category.
06/18/2012, 19:30
|
#1
|
elite*gold: 0
Join Date: Mar 2009
Posts: 37
Received Thanks: 2
|
Automatic Cps In Inventory
How to make birdman drop auto cps in inventory
i'm working on 5530 version
can any coder tell me how to do it?
|
|
|
06/18/2012, 21:08
|
#2
|
elite*gold: 0
Join Date: Aug 2008
Posts: 94
Received Thanks: 19
|
im not that good to help but ... that may helps you .
go to your drop function and make something like that .... .
if ( mob.id = birdmanid ) client.cps += 20 ;
i do not have ur source but i think u understand what i mean by this
|
|
|
06/18/2012, 22:30
|
#3
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Most mob's don't have an ID specific to their type if I remember correctly. Anyway, for mob specific drops I use a switch statement. For example, something like this:
Code:
switch (Mob.Name.ToLower())
{
case "birdman":
{
Client.Char.CPs += 20;
}
break;
case "pheasant":
{
Client.Char.CPs += 5;
}
break;
default: // All other monsters
{
// Do something
}
break;
}
Do something like that in your drop handler, if it doesn't already exist.
|
|
|
06/19/2012, 01:17
|
#4
|
elite*gold: 0
Join Date: Dec 2010
Posts: 341
Received Thanks: 255
|
Quote:
Originally Posted by Zeroxelli
Most mob's don't have an ID specific to their type if I remember correctly. Anyway, for mob specific drops I use a switch statement. For example, something like this:
Code:
switch (Mob.Name.ToLower())
{
case "birdman":
{
Client.Char.CPs += 20;
}
break;
case "pheasant":
{
Client.Char.CPs += 5;
}
break;
default: // All other monsters
{
// Do something
}
break;
}
Do something like that in your drop handler, if it doesn't already exist.
|
Wrong sir. Each mob does have its own unique ID.
|
|
|
06/19/2012, 01:21
|
#5
|
elite*gold: 0
Join Date: Aug 2008
Posts: 94
Received Thanks: 19
|
Quote:
|
Most mob's don't have an ID specific to their type if I remember correctly.
|
i havnt work with any sources for about 6 months but as i remember there is a specific ID for each mob something like Mob.basedID or something like that . depends . anyway im trying to understand alot of things b4 i back to code ... and when i back .. i will be more useful than i am xD .... now im in the stage of ... annoying others with my stupid questions . . .
|
|
|
06/19/2012, 02:16
|
#6
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Quote:
Originally Posted by .Kinshi
Wrong sir. Each mob does have its own unique ID.
|
I didn't say the uniqueID. That's obvious, all entities have a unique identifier. I'm talking about a static ID, which is what it looked like he was trying to use. (Hence, "birdmanid") That's why I said type of monster.
Quote:
Originally Posted by romeoromeo
i havnt work with any sources for about 6 months but as i remember there is a specific ID for each mob something like Mob.basedID or something like that . depends . anyway im trying to understand alot of things b4 i back to code ... and when i back .. i will be more useful than i am xD .... now im in the stage of ... annoying others with my stupid questions . . . 
|
If there is, I'm not aware of it. I always do checks based on the name, since the name itself should always be unique to that type of monster.
|
|
|
06/19/2012, 05:36
|
#7
|
elite*gold: 0
Join Date: Jan 2010
Posts: 23
Received Thanks: 4
|
Code:
#region Birdman Cps Drop
if (Name == "Birdman")
{
if (killer.Name.Contains("Guard"))//this is so u dont get errors in the //console when a guard kills the monster
{
return;
}
killer.ConquerPoints += xxxx;//xxxx = amount u want
killer.SubClasses.StudyPoints += xxxx;//xxxx = amount of study points u //want if u want study points to be droped if not remove this line
killer.Owner.Send(new Network.GamePackets.Message("Birdman Gave you xxxx cps and xxxx StudyPoints", System.Drawing.Color.Yellow, 2005));
}
#endregion
|
|
|
06/19/2012, 11:05
|
#8
|
elite*gold: 0
Join Date: Dec 2010
Posts: 341
Received Thanks: 255
|
Quote:
Originally Posted by Zeroxelli
I didn't say the uniqueID. That's obvious, all entities have a unique identifier. I'm talking about a static ID, which is what it looked like he was trying to use. (Hence, "birdmanid") That's why I said type of monster.
If there is, I'm not aware of it. I always do checks based on the name, since the name itself should always be unique to that type of monster.
|
You misunderstood what I said. Each TYPE of monster has an ID.
Pheasant = 1
Turtledove = 2
Birdman = 18
Etc.
|
|
|
06/19/2012, 15:08
|
#9
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Quote:
Originally Posted by .Kinshi
You misunderstood what I said. Each TYPE of monster has an ID.
Pheasant = 1
Turtledove = 2
Birdman = 18
Etc.
|
Pretty sure that was only for linking with the data in the database.. I've never even loaded that into the server, as it seemed useless. I guess if you do happen to load it, that's one way to go about it .
|
|
|
06/19/2012, 22:47
|
#10
|
elite*gold: 0
Join Date: Dec 2010
Posts: 341
Received Thanks: 255
|
Quote:
Originally Posted by Zeroxelli
Pretty sure that was only for linking with the data in the database.. I've never even loaded that into the server, as it seemed useless. I guess if you do happen to load it, that's one way to go about it .
|
One thing its used for is Monster Hunter. You send the Mob ID for which target, its also easier to get which mob to hunt for this, you can do some simple math to get even the aides and such to count.
Also I like comparing numbers more than strings.
|
|
|
06/19/2012, 23:46
|
#11
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Quote:
Originally Posted by .Kinshi
One thing its used for is Monster Hunter. You send the Mob ID for which target, its also easier to get which mob to hunt for this, you can do some simple math to get even the aides and such to count.
Also I like comparing numbers more than strings.
|
Numbers are indeed more efficient than strings, and faster when comparing. Also, I used sources that are way before jars, so I have no idea haha.
|
|
|
06/21/2012, 23:45
|
#12
|
elite*gold: 0
Join Date: May 2008
Posts: 477
Received Thanks: 178
|
Quote:
Originally Posted by Zeroxelli
Numbers are indeed more efficient than strings, and faster when comparing. Also, I used sources that are way before jars, so I have no idea haha.
|
 if he have any mob that already drops cps in his source he may search and look how source maker did it and just COPY&Paste the code at the region that have the mobs he want to drop cps its the most simple way for him
@Topic Name is an Automatic very funny
|
|
|
06/26/2012, 21:45
|
#13
|
elite*gold: 0
Join Date: Mar 2009
Posts: 37
Received Thanks: 2
|
Problem Solved
Thanks to everybody who helped me
|
|
|
06/26/2012, 21:48
|
#14
|
elite*gold: 0
Join Date: May 2008
Posts: 1,769
Received Thanks: 1,143
|
Quote:
Originally Posted by Moro20100
Problem Solved
Thanks to everybody who helped me
|
No problem, glad we could be of some help to you.
|
|
|
Similar Threads
|
[Release]Automatic Cps in Inventory
08/29/2012 - CO2 PServer Guides & Releases - 95 Replies
This is for 5165!
Go to Mob.cs and search for this.
else if (MyMath.ChanceSuccess(DropRates.CPBag))
Under that void put this.
if (MyMath.ChanceSuccess(DropRates.CPs))
{
if (Char != null)
{
Char.CPs += CPS AMOUNT YOU WANT;
|
All times are GMT +1. The time now is 15:38.
|
|