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
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.
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.
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 . . .
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.
#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
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
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 .
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.
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.
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
[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;