How do i make all Mobs drop an item?
I wanna make all mobs drop these items :
5220020 - gachapon for net cafe
4031895 - Piece of cheese
can u guys tell me how?
(v83,Source:HeliosMs)
bump.
Re: How do i make all Mobs drop an item?
Re: How do i make all Mobs drop an item?
There's multiple ways to do this. You can do it via source from the method dropFromMonster located in MapleMap.java. Or you can do it via MySQL. To do it through MySQL, I'd look through the MapleBlade repack and check to see how it's handled in there.
Re: How do i make all Mobs drop an item?
Do it via dropFromMonster in MapleMap, it is better in my opinion.
Re: How do i make all Mobs drop an item?
Quote:
Originally Posted by
Nmb1Gamer
There's multiple ways to do this. You can do it via source from the method dropFromMonster located in MapleMap.java. Or you can do it via MySQL. To do it through MySQL, I'd look through the MapleBlade repack and check to see how it's handled in there.
yeah i wanna do it via dropFromMonster but ih ave no idea how??
i just want all mobs to drop these items
5220020 - gachapon for net cafe
4031895 - Piece of cheese
but rarely ..
Re: How do i make all Mobs drop an item?
Re: How do i make all Mobs drop an item?
Quote:
Originally Posted by
hecari
it doesnt work
i added it and thats what it says :
http://i34.tinypic.com/28hhibr.png
Re: How do i make all Mobs drop an item?
Quote:
Originally Posted by
yarden
you didnt state what is dropOwner. and your toDrop also doesnt exist. Do you even know where to add this code? Show me where you added this code to.
Please provide a download link for your heliosms source, so I can take a look.
Re: How do i make all Mobs drop an item?
Quote:
Originally Posted by
hecari
you didnt state what is dropOwner. and your toDrop also doesnt exist. Do you even know where to add this code? Show me where you added this code to.
Please provide a download link for your heliosms source, so I can take a look.
k heliosms : HeliosMS_Source.rar
and i added it to MapleMap but im not sure i added it to the right place..
Re: How do i make all Mobs drop an item?
Quote:
Originally Posted by
yarden
k heliosms :
HeliosMS_Source.rar
and i added it to MapleMap but im not sure i added it to the right place..
Add it into the protected final void dropFromMonster(MapleCharacter dropOwner, MapleMonster monster) method.
Locate:
PHP Code:
List<Integer> toDrop = new ArrayList<Integer>();
for (int i = 0; i < maxDrops; i++) {
toDrop.add(monster.getDrop());
}
in protected final void dropFromMonster(MapleCharacter dropOwner, MapleMonster monster)
Add
PHP Code:
if (dropOwner.getEventInstance() == null) {
int chance = (int) (Math.random() * 1000); // chance for dropping gachapon for net cafe
int chance2 = (int) (Math.random() * 1000); // chance for dropping piece of cheese
if (chance < 10) { // 1% chance of dropping
toDrop.add(5220020);
}
if (chance2 < 10) { // 1%
toDrop.add(4031895);
}
}
under it.
so it become:
PHP Code:
List<Integer> toDrop = new ArrayList<Integer>();
for (int i = 0; i < maxDrops; i++) {
toDrop.add(monster.getDrop());
}
if (dropOwner.getEventInstance() == null) {
int chance = (int) (Math.random() * 1000); // chance for dropping gachapon for net cafe
int chance2 = (int) (Math.random() * 1000); // chance for dropping piece of cheese
if (chance < 10) { // 1% chance of dropping
toDrop.add(5220020);
}
if (chance2 < 10) { // 1%
toDrop.add(4031895);
}
}
Re: How do i make all Mobs drop an item?
drop_data_global? Do you have that?
Re: How do i make all Mobs drop an item?
Quote:
Originally Posted by
Reso
drop_data_global? Do you have that?
drop_data_global table is not in all of the v83 source if I'm not wrong.
Re: How do i make all Mobs drop an item?
Quote:
Originally Posted by
hecari
Add it into the protected final void dropFromMonster(MapleCharacter dropOwner, MapleMonster monster) method.
Locate:
PHP Code:
List<Integer> toDrop = new ArrayList<Integer>();
for (int i = 0; i < maxDrops; i++) {
toDrop.add(monster.getDrop());
}
in protected final void dropFromMonster(MapleCharacter dropOwner, MapleMonster monster)
Add
PHP Code:
if (dropOwner.getEventInstance() == null) {
int chance = (int) (Math.random() * 1000); // chance for dropping gachapon for net cafe
int chance2 = (int) (Math.random() * 1000); // chance for dropping piece of cheese
if (chance < 10) { // 1% chance of dropping
toDrop.add(5220020);
}
if (chance2 < 10) { // 1%
toDrop.add(4031895);
}
}
under it.
so it become:
PHP Code:
List<Integer> toDrop = new ArrayList<Integer>();
for (int i = 0; i < maxDrops; i++) {
toDrop.add(monster.getDrop());
}
if (dropOwner.getEventInstance() == null) {
int chance = (int) (Math.random() * 1000); // chance for dropping gachapon for net cafe
int chance2 = (int) (Math.random() * 1000); // chance for dropping piece of cheese
if (chance < 10) { // 1% chance of dropping
toDrop.add(5220020);
}
if (chance2 < 10) { // 1%
toDrop.add(4031895);
}
}
yay thanks