[Help]Making CertainMobs dropo certain things

07/13/2009 09:11 JustChillin#1
Using CoEmu Im trying to get the TombBats to drop certain items. I have no clue how to do this. Any help would be excellant.
07/13/2009 09:15 Arcotemple:)#2
Quote:
Originally Posted by JustChillin View Post
Using CoEmu Im trying to get the TombBats to drop certain items. I have no clue how to do this. Any help would be excellant.
heres how you would do it in lotf
idk if you can try your best to convert it to fit CoEmu
Code:
                        if (Name == "TombBat")
                            if (Other.ChanceSuccess(10))
                            {
                                string Item = "ITEMID-0-0-0-0-0";
                                if (Other.ChanceSuccess(10))
                                    Item = "ITEMID-0-0-0-0-0";
                                DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops);
                                World.ItemDrops(item);
                            }
hope this helps ya
07/13/2009 09:49 xellios#3
guys that doesnt work in CoEmu :P... it works with actions somehow.
07/13/2009 09:52 Arcotemple:)#4
Quote:
Originally Posted by xellios View Post
guys that doesnt work in CoEmu :P... it works with actions somehow.
i didnt say it would work for CoEmu
i said see if you can try your best to mayeb convert it for coemu
07/13/2009 10:40 pro4never#5
Quote:
Originally Posted by xellios View Post
guys that doesnt work in CoEmu :P... it works with actions somehow.
You can edit it in monster.cs but it's very roughly done.


search for
if(Calculation.PercentSuccess(3.7) && Level > 22)

The section under that has the drop calculations for mets/db's.


To have specific monsters drop something you can use

Code:
if(Info.Name == "MonsterName")
{
                        IG.ItemID = itemid;
}
You could add more items I believe through
Code:
if(Info.Name == "MonsterName")
{if(Calculation.PercentSuccess(20))
                        IG.ItemID = itemid;
else if(Calculation.PercentSuccess(20))
IG.ItemID = otheritemid;
}

Just testing the code currently and we tested it for TombBats and it's having 2 of the items added drop... so it seems to be working.

I'm sure there are much better ways to do it but this seems to be working :S, next I need to get that working with a variable to check if player has a certain quest activated or not... Not tried that yet :P
07/13/2009 10:41 Arcotemple:)#6
Quote:
Originally Posted by pro4never View Post
You can edit it in monster.cs but it's very roughly done.


search for
if(Calculation.PercentSuccess(3.7) && Level > 22)

The section under that has the drop calculations for mets/db's.


To have specific monsters drop something you can use

Code:
if(Info.Name == "MonsterName")
{
                        IG.ItemID = itemid;
}
You could add more items I believe through
Code:
if(Info.Name == "MonsterName")
{if(Calculation.PercentSuccess(20))
                        IG.ItemID = itemid;
else if(Calculation.PercentSuccess(20))
IG.ItemID = otheritemid;
}

Just testing the code currently and we tested it for TombBats and it's having 2 of the items added drop... so it seems to be working.

I'm sure there are much better ways to do it but this seems to be working :S, next I need to get that working with a variable to check if player has a certain quest activated or not... Not tried that yet :P
ooh nice job pro
07/13/2009 11:01 pro4never#7
Quote:
Originally Posted by Arcotemple:) View Post
ooh nice job pro
Thanks, I try :P


For reference: all I did was looked up guard names and how they distinguish them from normal mobs... I noticed it uses the if(Info.Name == "MonsterName")
cmd so I used it where the drop rates were. Not complicated lol.
07/13/2009 11:04 Arcotemple:)#8
Quote:
Originally Posted by pro4never View Post
Thanks, I try :P


For reference: all I did was looked up guard names and how they distinguish them from normal mobs... I noticed it uses the if(Info.Name == "MonsterName")
cmd so I used it where the drop rates were. Not complicated lol.
are you good at coding
if so add my msn
[Only registered and activated users can see links. Click Here To Register...]
07/13/2009 11:06 pro4never#9
Quote:
Originally Posted by Arcotemple:) View Post
are you good at coding
if so add my msn
[Only registered and activated users can see links. Click Here To Register...]
I am just learning coding as a project. I'll add your msn but don't expect a huge amount of help. I'm very very busy with my server lol.
07/14/2009 02:08 JustChillin#10
Quote:
Originally Posted by pro4never View Post
You can edit it in monster.cs but it's very roughly done.


search for
if(Calculation.PercentSuccess(3.7) && Level > 22)

The section under that has the drop calculations for mets/db's.


To have specific monsters drop something you can use

Code:
if(Info.Name == "MonsterName")
{
                        IG.ItemID = itemid;
}
You could add more items I believe through
Code:
if(Info.Name == "MonsterName")
{if(Calculation.PercentSuccess(20))
                        IG.ItemID = itemid;
else if(Calculation.PercentSuccess(20))
IG.ItemID = otheritemid;
}

Just testing the code currently and we tested it for TombBats and it's having 2 of the items added drop... so it seems to be working.

I'm sure there are much better ways to do it but this seems to be working :S, next I need to get that working with a variable to check if player has a certain quest activated or not... Not tried that yet :P
LOL Why did you have to release this :(. Now there gonna take out ideas. Now if they take it I BLAME You. I think i got it to drop only when the quest if activated..
07/14/2009 03:11 rblazed12601#11
pro4never do u think u can help me wit some problems cause im also trying to create a server xD. im using Qonquer as my client for ip and crap, i did everything from this guide:[Only registered and activated users can see links. Click Here To Register...] l but when i log on it says log in succesfull and then just exits the game on me do u or any1 know why??
07/14/2009 03:12 rblazed12601#12
[Only registered and activated users can see links. Click Here To Register...] thats the link srry for error and if u can email me at [Only registered and activated users can see links. Click Here To Register...]
07/14/2009 03:44 pro4never#13
Quote:
Originally Posted by JustChillin View Post
LOL Why did you have to release this :(. Now there gonna take out ideas. Now if they take it I BLAME You. I think i got it to drop only when the quest if activated..
Awww srry ^^

It's just a basic example. Most of the nubs here couldn't code a quest to save their life even with this so it's no big deal ^^

It took me what? like 5 minutes to find how to do it after I looked? I'm sure anyone who was capable of coding a half decent quest would have found the same thing.

Besides... I like to help people, is that such a crime? ^^
07/14/2009 05:27 hunterman01#14
Quote:
Originally Posted by pro4never View Post
Awww srry ^^

It's just a basic example. Most of the nubs here couldn't code a quest to save their life even with this so it's no big deal ^^

It took me what? like 5 minutes to find how to do it after I looked? I'm sure anyone who was capable of coding a half decent quest would have found the same thing.

Besides... I like to help people, is that such a crime? ^^
Maybe?
Let people try to help themselves before you help them if you get what im saying ^^
07/14/2009 06:07 pro4never#15
Quote:
Originally Posted by hunterman01 View Post
Maybe?
Let people try to help themselves before you help them if you get what im saying ^^
Ooh I fully agree, I always do that with my bigger stuff. I'll provide an example or w/e but they gotta code the stuff themselves. I've stooped releasing any full npcs or systems I add.


Then again not like I've coded anything all that impressive in last week :(... unless my cash lotto/cp shop counts, but that coding SUCKS... it's just shitloads of lines and possible prizes :P I should put it in a db but I don't wanna have to re-code all that stuff and for now it's working.