Register for your free account! | Forgot your password?

You last visited: Today at 18:24

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

Advertisement



[Coemu]Dis City map..

Discussion on [Coemu]Dis City map.. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
[Coemu]Dis City map..

Im adding DisCity.. but i need soul stones to ONLY drop in the 2021 Map.. or need sertain monsters to drop items... can someone give me a code.. so i can make it by map.. or monster name



Would this be correct?

Code:
                if (Calculation.PercentSuccess(20))
                {
                    Struct.ItemGround IG = new Struct.ItemGround();
                    if (Calculation.PercentSuccess(20))
                        IG.ItemID = 723085;
                    else
                        IG.ItemID = 729911;
                    [COLOR="Red"]IG.Map = 2021;[/COLOR]
                    IG.X = (X - Nano.Rand.Next(4) + Nano.Rand.Next(4));
                    IG.Y = (Y - Nano.Rand.Next(4) + Nano.Rand.Next(4));
                    if (Nano.Maps.ContainsKey(IG.Map))
                    {
                        Struct.DmapData Mapping = Nano.Maps[IG.Map];
                        byte tries = 0;
                        while (!Mapping.CheckLoc((ushort)IG.X, (ushort)IG.Y))
                        {
                            IG.X = (X - Nano.Rand.Next(4) + Nano.Rand.Next(4));
                            IG.Y = (Y - Nano.Rand.Next(4) + Nano.Rand.Next(4));
                            tries++;
                            if (tries > 8)
                                break;
                        }
                    }
                    IG.OwnerOnly = new System.Timers.Timer();
                    IG.OwnerOnly.Interval = 10000;
                    IG.OwnerOnly.AutoReset = false;
                    IG.OwnerID = Killer;
                    IG.UID = Nano.Rand.Next(1000, 9999999);
                    while (Nano.ItemFloor.ContainsKey(IG.UID))
                    {
                        IG.UID = Nano.Rand.Next(1000, 9999999);
                    }
                    //TODO: UID generation that is better.
                    IG.Dispose = new System.Timers.Timer();
                    IG.Dispose.Interval = 60000;
                    IG.Dispose.AutoReset = false;
                    IG.Dispose.Elapsed += delegate { IG.Disappear(); };
                    IG.Dispose.Start();
                    IG.OwnerOnly.Start();
                    //lock(Nano.ItemFloor)
                    //{
                    try
                    {
                        Monitor.Enter(Nano.ItemFloor);
                        Nano.ItemFloor.Add(IG.UID, IG);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine(e.ToString());
                    }
                    finally
                    {
                        Monitor.Exit(Nano.ItemFloor);
                    }
                    //}
                    ConquerPacket.ToLocal(ConquerPacket.DropItem(IG.UID, IG.ItemID, IG.X, IG.Y, IG.Color), IG.X, IG.Y, IG.Map, 0, 0);
                }
1supertao is offline  
Old 09/03/2009, 19:55   #2
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
all that for adrop?
PeTe Ninja is offline  
Old 09/03/2009, 19:58   #3
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
haha i know... Im not sure how to make a sertain monster.. or map.. drop sertain things.. lmao.. thats just the normal drop.. for dbs.. but i changed it to a cp drop... and SoulStone... simple.. but idk how to do the map
1supertao is offline  
Old 09/03/2009, 20:03   #4
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
lol you could make it so much easiser to create drops that it will be like 1 line or less of codes ( and not a long line )
PeTe Ninja is offline  
Old 09/03/2009, 20:33   #5
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
>.< I know that.. but I have no CLUE how to do it
lol

Something like?

Quote:
if(CSocket.Client.Monster.ID == IDMONSTER)
{
Struct.ItemGround IG = new Struct.ItemGround();
if (Calculation.PercentSuccess(20))
IG.ItemID = 723085;
1supertao is offline  
Old 09/03/2009, 20:42   #6
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
Quote:
Originally Posted by PeTe Ninja View Post
lol you could make it so much easiser to create drops that it will be like 1 line or less of codes ( and not a long line )
he is using Coemu so no he can't

and i think anyother source wont be that easy neither coz he wanna do some special drops for certain maps or certain events ,so here is how i dd it , may be u have another easiest way (if so i would appreciate f u let me know about it) but that is my way anyhow

1-Find

Code:
if(Calculation.PercentSuccess(27)) //Drop an item
you will c after it

Code:
                                        int Quality = Nano.Rand.Next(3, 6);
					int Soc1 = 0;
					int Soc2 = 0;
					int Bless = 0;
					int Plus = 0;
2-Add after them this line

Code:
int ItemID = 0; int Quality = 0;
u will find 2 errors saying that the ItemId and Quality can't be declared at the next positions , if this happens then remove the word int from both of them (not from the line i put up there but from the lines will have errors)

3-now r8 after that line add this

Code:
if (SpecialDrop())//For Quests
                    {
                        ItemID = SpecialDrop(1);
                    }
and the check quality lines after that put them between else { statements } like this

Code:
else
                    {
                        Quality = Nano.Rand.Next(3, 6);
                        if (Calculation.PercentSuccess(2))
                            Plus = 1;
                        if (Calculation.PercentSuccess(2))
                            Quality = 7;
                        if (Calculation.PercentSuccess(1))
                            Quality = 8;
                        if (Calculation.PercentSuccess(.578))
                            Quality = 9;
                        ItemID = Calculation.Item(Level, Quality);
                    }
4-add this 2 functions at the bottom of same class

A-this one to check if it is a special drops , u can add here all maps,mobs and events u want
Code:
public bool SpecialDrop()
        {
            if (Map == 2021 || Map == 2022 || Map == 2023 || Map == 2024) return true;
            else return false;
        }
B-here u determine what item should drop u can also add what u want at some maps or events as u wish , i made the Type as 0=Drop Money and 1=Drop an item
Code:
public int SpecialDrop(byte Type)
        {
            int ItemId = 0;
            if (Type == 0)//Money
            {
                if (Map == 2021) ItemId = Nano.Rand.Next(1000, 10000);
                else if (Map == 2022) ItemId = Nano.Rand.Next(2000, 50000);
            }
            else //Item
            {
                switch (Map)
                {
                    case 2021://DisCity Stage1
                        {
                            byte Chances = (byte)Nano.Rand.Next(100);
                            if (Chances < 10) ItemId = 723085;//SoulStone
                            else if (Chances < 40) ItemId = 1002050;
                            else if (Chances < 70) ItemId = 1002040;
                            else ItemId = 1050002;
                            break;
                        }
                    case 2022://DisCity Stage2
                        {
                            byte Chances = (byte)Nano.Rand.Next(100);
                            if (Chances < 33) ItemId = 1002050;
                            else if (Chances < 66) ItemId = 1002040;
                            else ItemId = 1050002;
                            break;
                        }
                    case 2023://DisCity Stage3
                        {
                            byte Chances = (byte)Nano.Rand.Next(250);
                            if (Chances < 3) ItemId = 725016;//NightDevil
                            break;
                        }
                }
            }
            return ItemId;
        }
samehvan is offline  
Thanks
1 User
Old 09/03/2009, 21:34   #7
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
You never seize to amaze me samehvan... ^.^ .. one more things..

Quote:
Error 1 A local variable named 'Quality' is already defined in this scope C:\Documents and Settings\M@tt0\Desktop\CoEmu v2\CoEmu v2 GameServer\Entities\Monster.cs 204 25 CoEmu v2 GameServer
1supertao is offline  
Old 09/03/2009, 21:54   #8
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Actually samehvan he could if he just recoded it a tiny bit =]
PeTe Ninja is offline  
Old 09/03/2009, 22:02   #9
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
I did it.. already... ty samehvan.. im working on Exppot.. pm me if u want wat i have.. and we can put are brains togethor
1supertao is offline  
Old 09/04/2009, 05:09   #10
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
Quote:
Originally Posted by 1supertao View Post
I did it.. already... ty samehvan.. im working on Exppot.. pm me if u want wat i have.. and we can put are brains togethor
i have the Exp Potions already it is not so hard tho , it's one variable , 2 lines at useitem.cs , 1 line at GiveExp void and 1 line at Global timer we made be4 , the more important than this is the skills we don't know about yet , like PoisonStar ,Fatal strike and other new skills ,u can also try ur best at Ranks (flowers and nobilities) the Honor system we already dd it be4 ,and if u had any luck with any of them just make me happy by telling me your progress
samehvan is offline  
Old 09/04/2009, 05:58   #11
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
Soul Stones? are they the uhh, little green things that drop?

(Curiosity)
© Haydz is offline  
Old 09/04/2009, 06:19   #12
 
elite*gold: 0
Join Date: Aug 2009
Posts: 104
Received Thanks: 7
Umm.. i did the exppotion.. expect can u send me the timer? and the Top left icon? My timer.. is all tweaked
1supertao is offline  
Reply


Similar Threads Similar Threads
Suche City of Heroes/City of Villains Account`s
12/13/2011 - Trading - 1 Replies
Hallo wie der titel schon sagt suche ich Accounts für COX gibt ja viele die mitlerweile aufgehört haben auf den europäische Server und Mindestens einem Rentner(lvl50) drauf
[Release]CoEmu Dis City Full
01/10/2010 - CO2 PServer Guides & Releases - 3 Replies
Go To NpcTalk and Add That ! Character.cs search for Above it add now go to dmonsterplayer.cs and search
pheonix city or desert city mine?
12/07/2006 - Conquer Online 2 - 15 Replies
which mine cave is better for minning gems, since only mine in pc now i dunno which mine cave is better for getting gems so can someone tell me which mine cave is better out of them all. by the way, has anyone tried minning in jail? and do u get ores easy?ty :D



All times are GMT +1. The time now is 18:24.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.