How to make birdman drop auto cps in inventory
i'm working on 5530 version
can any coder tell me how to do it?
i'm working on 5530 version
can any coder tell me how to do it?
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;
}
Wrong sir. Each mob does have its own unique ID.Quote:
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:
Do something like that in your drop handler, if it doesn't already exist.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; }
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 . . . :DQuote:
Most mob's don't have an ID specific to their type if I remember correctly.
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:
Wrong sir. Each mob does have its own unique ID.
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.Quote:
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 . . . :D
#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
You misunderstood what I said. Each TYPE of monster has an ID.Quote:
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.
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 .Quote:
You misunderstood what I said. Each TYPE of monster has an ID.
Pheasant = 1
Turtledove = 2
Birdman = 18
Etc.
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.Quote:
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 .
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.Quote:
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.
:D :D :D 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 ;)Quote:
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.