Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Add-On][v75+] Custom Fishing System

Newbie Spellweaver
Joined
Apr 6, 2009
Messages
13
Reaction score
0
Re: [v75+] Custom Fishing System

sorry

wait quick question

where is ?


@Override
public void run(){
for(MapleCharacter chr : getPlayerStorage().getAllCharacters()){
if(chr.isFishing && chr.getMapId() == 251000100){
server.Events.Fishing.doFishing(chr);
}
}
}
}, 30000);


ChannelServer.java
 
Junior Spellweaver
Joined
Oct 12, 2010
Messages
152
Reaction score
39
Re: [v75+] Custom Fishing System

The thread display v75++ fishing system
But , i can't find the fishing npc in v75
Npc name : Kedrick
 
Legendary Battlemage
Loyal Member
Joined
Sep 28, 2008
Messages
600
Reaction score
291
Re: [v75+] Custom Fishing System

You're supposed to code the NPC yourself.

Umm, are you referring to packets?.. o_O Whenever that NPC is spawned on any specific map, it'll just disconnect you and shows the -2147..... error.

-AuroX
 
Newbie Spellweaver
Joined
Aug 20, 2008
Messages
12
Reaction score
0
Re: [v75+] Custom Fishing System

i added the fishing system but how use it?
 
Junior Spellweaver
Joined
Oct 12, 2010
Messages
152
Reaction score
39
Re: [v75+] Custom Fishing System

Hey guy can help me this ? i'm nub at here :?:
I get this error it say : }.30000); error

FateJiki - [Add-On][v75+] Custom Fishing System - RaGEZONE Forums


And this it say can't find symbol I fixed the MaplePacketCreator already another one i donno ? Can help me fixed it ?

FateJiki - [Add-On][v75+] Custom Fishing System - RaGEZONE Forums
 
Custom Title Activated
Loyal Member
Joined
Apr 8, 2008
Messages
1,125
Reaction score
330
Re: [v75+] Custom Fishing System

@Wingx: for one, did you even include the lib of jars? (located in the dist directory)

and secondly, the indentations are completely off. Learn some basic programming (you could look at any two-bit java site and learn this) and then try implementing the code.
 
Joined
Feb 23, 2008
Messages
507
Reaction score
361
Re: [v75+] Custom Fishing System

@Wingx: for one, did you even include the lib of jars? (located in the dist directory)

and secondly, the indentations are completely off. Learn some basic programming (you could look at any two-bit java site and learn this) and then try implementing the code.
Haha, like I don't know basic java. I just hurried myself up.

Sorry about the indentations xD.
 
Experienced Elementalist
Joined
Aug 20, 2009
Messages
272
Reaction score
49
Re: [v75+] Custom Fishing System

Nice job this is very cool.
 
Banned
Banned
Joined
Aug 10, 2009
Messages
95
Reaction score
8
Re: [v75+] Custom Fishing System

Im not really sure what this does 0.o any screenies?
 
Newbie Spellweaver
Joined
Dec 22, 2010
Messages
74
Reaction score
7
Re: [v75+] Custom Fishing System

Somethings wrong with your code for channel server. should i jsut put this under tMan.register.
Code:
for(MapleCharacter chr : getPlayerStorage().getAllCharacters()){
                    if(chr.isFishing && chr.getMapId() == 251000100){
                        server.Events.Fishing.doFishing(chr);
                    }
                }
 
Initiate Mage
Joined
Dec 26, 2010
Messages
3
Reaction score
0
Re: [v75+] Custom Fishing System

where it says player.gainItem(getRandomItem(), (short)1, true); in fishing.jav, i dont seem to have the "gainItem(int,short,boolean)" method in maplecharacter. Can anyone hook me up with it?
 
Newbie Spellweaver
Joined
Jun 10, 2008
Messages
36
Reaction score
0
Re: [v75+] Custom Fishing System

where it says player.gainItem(getRandomItem(), (short)1, true); in fishing.jav, i dont seem to have the "gainItem(int,short,boolean)" method in maplecharacter. Can anyone hook me up with it?

Same here i tried to add this to MapleCharacter.java it with
Code:
    public void gainItem(int id, short quantity) {
        gainItem(id, quantity, false);
    }

    public void gainItem(int id) {
        gainItem(id, (short) 1, false);
    }
     public void gainItem(int id, short quantity, boolean randomStats) {
        if (id >= 5000000 && id <= 5000100) {
            MapleInventoryManipulator.addById(c, id, (short) 1, null, MaplePet.createPet(id));
        }
        if (quantity >= 0) {
            MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
            IItem item = ii.getEquipById(id);
            if (!MapleInventoryManipulator.checkSpace(c, id, quantity, "")) {
                c.getPlayer().dropMessage(1, "Your inventory is full. Please remove an item from your " + ii.getInventoryType(id).name() + " inventory.");
                return;
            }
            if (ii.getInventoryType(id).equals(MapleInventoryType.EQUIP) && !InventoryConstants.isRechargable(item.getItemId())) {
                if (randomStats) {
                    MapleInventoryManipulator.addFromDrop(c, ii.randomizeStats((Equip) item), false);
                } else {
                    MapleInventoryManipulator.addFromDrop(c, (Equip) item, false);
                }
            } else {
                MapleInventoryManipulator.addById(c, id, quantity);
            }
        } else {
            MapleInventoryManipulator.removeById(c, MapleItemInformationProvider.getInstance().getInventoryType(id), id, -quantity, true, false);
        }
        c.getSession().write(MaplePacketCreator.getShowItemGain(id, quantity, true));
    }
    public boolean haveMeso(int mesos) {
        return meso.get() > mesos;
    }

But failed :(:
 
Legendary Battlemage
Loyal Member
Joined
Sep 28, 2008
Messages
600
Reaction score
291
Nice job, but anyway, I'll still suggest Celino's method where a schedule task is started in MapleCharacter whenever a player sits on a chair and not running it through ChannelServer. This might reduce the usage on channel server. My suggestions though =X
 
Joined
May 23, 2010
Messages
528
Reaction score
23
Same here i tried to add this to MapleCharacter.java it with
Code:
    public void gainItem(int id, short quantity) {
        gainItem(id, quantity, false);
    }

    public void gainItem(int id) {
        gainItem(id, (short) 1, false);
    }
     public void gainItem(int id, short quantity, boolean randomStats) {
        if (id >= 5000000 && id <= 5000100) {
            MapleInventoryManipulator.addById(c, id, (short) 1, null, MaplePet.createPet(id));
        }
        if (quantity >= 0) {
            MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
            IItem item = ii.getEquipById(id);
            if (!MapleInventoryManipulator.checkSpace(c, id, quantity, "")) {
                c.getPlayer().dropMessage(1, "Your inventory is full. Please remove an item from your " + ii.getInventoryType(id).name() + " inventory.");
                return;
            }
            if (ii.getInventoryType(id).equals(MapleInventoryType.EQUIP) && !InventoryConstants.isRechargable(item.getItemId())) {
                if (randomStats) {
                    MapleInventoryManipulator.addFromDrop(c, ii.randomizeStats((Equip) item), false);
                } else {
                    MapleInventoryManipulator.addFromDrop(c, (Equip) item, false);
                }
            } else {
                MapleInventoryManipulator.addById(c, id, quantity);
            }
        } else {
            MapleInventoryManipulator.removeById(c, MapleItemInformationProvider.getInstance().getInventoryType(id), id, -quantity, true, false);
        }
        c.getSession().write(MaplePacketCreator.getShowItemGain(id, quantity, true));
    }
    public boolean haveMeso(int mesos) {
        return meso.get() > mesos;
    }

But failed :(:

still no one can fix it?

Try this one
PHP:
    public boolean gainItem(int id, short quantity, boolean show) {
        if (quantity >= 0) {
            MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
            IItem item = ii.getEquipById(id);
            MapleInventoryType type = ii.getInventoryType(id);
            if (type.equals(MapleInventoryType.EQUIP) && !ItemConstants.isThrowingStar(item.getItemId()) && !ItemConstants.isBullet(item.getItemId())) {
                if (!getInventory(type).isFull()) 
                    MapleInventoryManipulator.addFromDrop(getClient(), (Equip) item, false);
                else
                    dropMessage(1, "Your inventory is full. Please remove an item from your " + type.name().toLowerCase() + " inventory."); 
                return false;
            } else if (MapleInventoryManipulator.checkSpace(getClient(), id, quantity, "")) {
                if (id >= 5000000 && id <= 5000100) {
                    if (quantity > 1) 
                        quantity = 1;
                    int petId = MaplePet.createPet(id);
                    MapleInventoryManipulator.addById(getClient(), id, (short) 1, null, petId);
                    if (show) 
                        this.getClient().getSession().write(MaplePacketCreator.getShowItemGain(id, quantity));
                } else
                    MapleInventoryManipulator.addById(getClient(), id, quantity);
            } else {
                dropMessage(1, "Your inventory is full. Please remove an item from your " + type.name().toLowerCase() + " inventory.");
                return false;
            }
            if (show) 
                this.getClient().getSession().write(MaplePacketCreator.getShowItemGain(id, quantity, true));
        } else
            MapleInventoryManipulator.removeById(getClient(), MapleItemInformationProvider.getInstance().getInventoryType(id), id, -quantity, false, false);
        return true;
    }
 
Back
Top