Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 01:35

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



How to make it after kill a Specific number of monster its drops item or giving money

Discussion on How to make it after kill a Specific number of monster its drops item or giving money within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
TQ-Challenger's Avatar
 
elite*gold: 0
Join Date: Apr 2012
Posts: 4
Received Thanks: 0
How to make it after kill a Specific number of monster its drops item or giving money

by the name of god



How to make it after kill a Specific number of monster its drops item or giving money or cps.



===============================



Open



MonsterTable.cs



Find this code



PHP Code:
            if (Owner.Name.Contains("Guard") || killer.Name.Contains("Guard"))

                return; 


add this under it



PHP Code:
            if (this.Name == "BirdMan")

            {

                
killer.BirdMan += 1;

                if (
killer.BirdMan == 20)

                {

                    
killer.ConquerPoints += 50000;

                    
killer.BirdMan 0;

                }

            } 
===========================



this code means the monster name is " BirdMan "



and it will add 1 to the current number of killed monsters.



then if total killed monsters was 20



it will add 50 k CPs.



if we wanna it drop item



we will replace this code :





PHP Code:
                    killer.ConquerPoints += 50000


with this


PHP Code:
                    var infos Database.ConquerItemInformation.BaseInformations[123456789];

                    
ushort X Owner.XOwner.Y;

                    
Game.Map Map ServerBase.Kernel.Maps[Owner.MapID];

                    if (
Map.SelectCoordonates(ref Xref Y))

                    {

                        
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);

                        
floorItem.Item = new Network.GamePackets.ConquerItem(true);

                        
floorItem.Item.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(48);

                        
floorItem.Item.ID = (uint)123456789;

                        
floorItem.Item.MaximDurability infos.Durability;

                        
floorItem.Item.MobDropped true;

                        
floorItem.ValueType Network.GamePackets.FloorItem.FloorValueType.Item;

                        
floorItem.ItemID = (uint)123456789;

                        
floorItem.MapID Owner.MapID;

                        
floorItem.MapObjType Game.MapObjectType.Item;

                        
floorItem.X;

                        
floorItem.Y;

                        
floorItem.Type Network.GamePackets.FloorItem.Drop;

                        
floorItem.OnFloor Time32.Now;

                        
floorItem.ItemColor floorItem.Item.Color;

                        
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;

                        while (
Map.Npcs.ContainsKey(floorItem.UID))

                            
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;

                        
Map.AddFloorItem(floorItem);

                        
SendScreenSpawn(floorItem);

                    } 




and it will looks like this.


PHP Code:
            if (this.Name == "BirdMan")

            {

                
killer.BirdMan += 1;

                if (
killer.BirdMan == 20)

                {

                    var 
infos Database.ConquerItemInformation.BaseInformations[123456789];

                    
ushort X Owner.XOwner.Y;

                    
Game.Map Map ServerBase.Kernel.Maps[Owner.MapID];

                    if (
Map.SelectCoordonates(ref Xref Y))

                    {

                        
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);

                        
floorItem.Item = new Network.GamePackets.ConquerItem(true);

                        
floorItem.Item.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(48);

                        
floorItem.Item.ID = (uint)123456789;

                        
floorItem.Item.MaximDurability infos.Durability;

                        
floorItem.Item.MobDropped true;

                        
floorItem.ValueType Network.GamePackets.FloorItem.FloorValueType.Item;

                        
floorItem.ItemID = (uint)123456789;

                        
floorItem.MapID Owner.MapID;

                        
floorItem.MapObjType Game.MapObjectType.Item;

                        
floorItem.X;

                        
floorItem.Y;

                        
floorItem.Type Network.GamePackets.FloorItem.Drop;

                        
floorItem.OnFloor Time32.Now;

                        
floorItem.ItemColor floorItem.Item.Color;

                        
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;

                        while (
Map.Npcs.ContainsKey(floorItem.UID))

                            
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;

                        
Map.AddFloorItem(floorItem);

                        
SendScreenSpawn(floorItem);

                    }

                }

            } 


to modify item ID, change this number "123456789" in 3 places with item ID.



if you want to change Monster to other, just rename " BirdMan " with the new Monster name , or create a new one with different Code in Entity.cs as we will see ....





if you wanna make it add money , so just replace this code :






PHP Code:
                    var infos Database.ConquerItemInformation.BaseInformations[123456789];

                    
ushort X Owner.XOwner.Y;

                    
Game.Map Map ServerBase.Kernel.Maps[Owner.MapID];

                    if (
Map.SelectCoordonates(ref Xref Y))

                    {

                        
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);

                        
floorItem.Item = new Network.GamePackets.ConquerItem(true);

                        
floorItem.Item.Color = (Conquer_Online_Server.Game.Enums.Color)ServerBase.Kernel.Random.Next(48);

                        
floorItem.Item.ID = (uint)123456789;

                        
floorItem.Item.MaximDurability infos.Durability;

                        
floorItem.Item.MobDropped true;

                        
floorItem.ValueType Network.GamePackets.FloorItem.FloorValueType.Item;

                        
floorItem.ItemID = (uint)123456789;

                        
floorItem.MapID Owner.MapID;

                        
floorItem.MapObjType Game.MapObjectType.Item;

                        
floorItem.X;

                        
floorItem.Y;

                        
floorItem.Type Network.GamePackets.FloorItem.Drop;

                        
floorItem.OnFloor Time32.Now;

                        
floorItem.ItemColor floorItem.Item.Color;

                        
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;

                        while (
Map.Npcs.ContainsKey(floorItem.UID))

                            
floorItem.UID Network.GamePackets.FloorItem.FloorUID.Next;

                        
Map.AddFloorItem(floorItem);

                        
SendScreenSpawn(floorItem);

                    } 


with this one :



PHP Code:
killer.Money += 50000


and it will add 50 k of gold.



==============================

now go to Entity.cs



search this code



PHP Code:
    public class Entity WriterInterfaces.IBaseEntityInterfaces.IMapObject

    



under it add this code :

==========================



PHP Code:
private uint  _birdman;

        public 
uint BirdMan

        
{

            
get

            
{

                return 
_birdman;

            }

            
set

            
{

                
_birdman value;

 

            }

        } 
==========================

now we have done , hit F5 and its will work with you.



here is download links :

Intity.Txt



CPs and Money.Txt





Drop item.Txt



TQ-Challenger is offline  
Old 04/14/2012, 21:18   #2
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
Just by looking at the first few lines of the code, you can tell it's going to be poor quality. What if you wanted to add another monster kill counter? You'd probably add a Pheasant field to the client/player class. This is partly why bad sources are bad.
nTL3fTy is offline  
Thanks
3 Users
Old 04/14/2012, 21:30   #3
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 918
I tried using this to implement CPs dropping for all monsters, but I gave up after about the 15000th line.
Lateralus is offline  
Thanks
5 Users
Old 04/14/2012, 21:43   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
This is why I'm entertained by epvp.

No one ever learns.

<edit>

let me clarify... When would you use something like this? Quests and events! As such, think of a generic way of handling ALL possible types of quests and event objectives (what do they all involve? Killing, delivering, etcetcetc). As such... what fields do you need

ActionType Type Target Value EffectType EffectValue

In this case something like...

ActionType 1 we will use to represent KillMonster (all defined by yourself obviously)
Type would represent the mobtype to be killed
Target would represent how many to kill
Value would represent current progress
EffectType would represent type of reward (exp, cp, gold, items, etc)
EffectValue would determine how much/id of specified reward type


Very basic/generic example but would make 'your' system infinitely more expandable and useful.

Keep in mind I spent all of 2 minutes brainstorming these fields and in practice you should be fully planning out these features MUCH more before implementing them. Program design is almost as important as the actually programming involved. Gotta plan things out to make sure your code is scalable and applicable to the needs of the application.
pro4never is offline  
Thanks
5 Users
Old 04/14/2012, 21:54   #5
 
TQ-Challenger's Avatar
 
elite*gold: 0
Join Date: Apr 2012
Posts: 4
Received Thanks: 0
but i think this is simple for people who don't know how to code it.
TQ-Challenger is offline  
Old 04/14/2012, 22:16   #6
 
Lateralus's Avatar
 
elite*gold: 0
Join Date: May 2005
Posts: 1,892
Received Thanks: 918
Of course it's simple for people who don't know how to code it, because they have NO IDEA what they're doing. Even so, as a programmer, you're supposed to implement the most generic design for something rather than bruteforce it like this. Furthermore, this "solution" is extremely source-specific and you never state what source this is for - not everyone's using the same source.
Lateralus is offline  
Old 04/15/2012, 00:08   #7
 
Angellinho's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
65 lines to drop 1 item after you kill 20 birdmans?! You`re serious?!
Even if I would make it to much monsters should I make 100,000 lines of codes?
Angellinho is offline  
Thanks
2 Users
Old 04/15/2012, 02:30   #8
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,652
Received Thanks: 701
He needs 1000 lines while you can use 2-3 lines lmao
turk55 is offline  
Old 04/16/2012, 02:50   #9
 
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
Quote:
Originally Posted by Angellinho View Post
65 lines to drop 1 item after you kill 20 birdmans?! You`re serious?!
Even if I would make it to much monsters should I make 100,000 lines of codes?
dego4ever is offline  
Old 04/16/2012, 03:27   #10
 
elite*gold: 0
Join Date: Apr 2012
Posts: 63
Received Thanks: 12
No offence but you lack of common sense.
~Zero~ is offline  
Old 04/16/2012, 13:09   #11
 
elite*gold: 0
Join Date: Apr 2012
Posts: 134
Received Thanks: 30
if (this.Name == "BirdMan") killer.ConquerPoints += 50000/20;

and a method for dropping item will be great -.-

why the hell u gives 50k each 20 , why dont u give 2.5k each monster ? o-0
DyjgK64J451Jhv0 is offline  
Thanks
2 Users
Old 04/17/2012, 04:29   #12
 
Sp!!ke's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 380
Received Thanks: 58
[CODE] uint cps_Drop =0;
switch(killer.MapID)
{
case 1002://asta e tc pica 1...
cps_Drop =1;
break;
case 1010://asta bird sau nustu ... pica saculeti ? da bun ..asta termin eo lasa asa ce s cu erorile alea?
cps_Drop =2;
break;
default:
cps_Drop =0;
break;


}
[CODE]
Sp!!ke is offline  
Old 04/17/2012, 13:15   #13
 
elite*gold: 0
Join Date: Apr 2012
Posts: 134
Received Thanks: 30
Quote:
Originally Posted by Sp!!ke View Post
[CODE] uint cps_Drop =0;
switch(killer.MapID)
{
case 1002://asta e tc pica 1...
cps_Drop =1;
break;
case 1010://asta bird sau nustu ... pica saculeti ? da bun ..asta termin eo lasa asa ce s cu erorile alea?
cps_Drop =2;
break;
default:
cps_Drop =0;
break;


}
[CODE]
or case the monsters ^^
DyjgK64J451Jhv0 is offline  
Reply


Similar Threads Similar Threads
[ACTOOL] How To Identify a Specific Monster?
07/31/2010 - Last Chaos - 2 Replies
Hello elitepvpers community. Now I explain my problem =) I did this macro with ACTool for autokill mobs in ProkyonTemple SetActiveWindow On/Off SetActiveWindow LastChaos - Gamigo (Window 1600x900) Loop 999999 delay 1500 LoadRGB 898, 65 //Check if the mob is dead or not if {RGBRed} < 100
GWCA - Any Item Specific Examples?
05/29/2010 - GW Bots - 5 Replies
Heya, trying to put together a nice little complete bot as a learning experiance. Are there any examples of looting/selling/breaking down specific items? Or any lists of model ID, rarity ect. Regards. *Edit* 61=White 63=Blue
How to add item to monster drops. I got confused.
01/15/2010 - Dekaron Private Server - 2 Replies
Hi I added a new row inside my itemset.csv which I put my items. Then inside monster.csv I put the index no. in the itemsetindex_x column. Now I got confuse of ItemSetDropRatio. What is the value for 100% drop rate? I tried to make it 5000 but when I play the game and kill the monster it won't drop anything.Why? And also can anyone link a guide about this?
Help AutoLooting Specific item
05/06/2008 - RF Online - 0 Replies
i got some codes in wpe Obs: i dont know why 1 inventor tool box change 4offset and for 2or more tool box only change 2 Int Hora sword: =======.yy yy yy yy xx xx yy yy 1pick up= 08 00 07 02 F7 00 FF FF 2pick up= 08 00 07 02 23 00 FF FF 3pick up= 08 00 07 02 DD 02 FF FF 4pick up= 08 00 07 02 13 00 FF FF 5pick up= 08 00 07 02 10 00 FF FF



All times are GMT +2. The time now is 01:35.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.