Automatic Cps In Inventory

06/18/2012 19:30 Moro20100#1
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 romeoromeo#2
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 Zeroxelli#3
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 .Kinshi#4
Quote:
Originally Posted by Zeroxelli View Post
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 romeoromeo#5
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 . . . :D
06/19/2012 02:16 Zeroxelli#6
Quote:
Originally Posted by .Kinshi View Post
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 View Post
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
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 matthew 2010#7
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 .Kinshi#8
Quote:
Originally Posted by Zeroxelli View Post
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 Zeroxelli#9
Quote:
Originally Posted by .Kinshi View Post
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 .Kinshi#10
Quote:
Originally Posted by Zeroxelli View Post
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 Zeroxelli#11
Quote:
Originally Posted by .Kinshi View Post
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 badguy4you#12
Quote:
Originally Posted by Zeroxelli View Post
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.
: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 ;)

@Topic Name is an Automatic very funny :) :)
06/26/2012 21:45 Moro20100#13
Problem Solved

Thanks to everybody who helped me
06/26/2012 21:48 Zeroxelli#14
Quote:
Originally Posted by Moro20100 View Post
Problem Solved

Thanks to everybody who helped me
No problem, glad we could be of some help to you. :)