Party Bear Effect

Joined
Jul 13, 2008
Messages
419
Reaction score
217
My brother told me that everybody in the map gets Party Bear Buff if somebody uses Happy Party Bear Weather, a small release but at least a step closer to GMS.

UseCashItemHandler.java
Add
Code:
if (itemId == 5122000) { //Happy Party Bear Weather
                            for (MapleCharacter chr : player.getMap().getCharacters())
                                chr.giveItemBuff(2022302); //Party Bear Buff
                        }
Under
Code:
player.getMap().startMapEffect(ii.getMsg(itemId).replaceFirst("%s", player.getName()).replaceFirst("%s", slea.readMapleAsciiString()), itemId);
                        MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.CASH, slot, (short) 1, false);
 
My brother told me that everybody in the map gets Party Bear Buff if somebody uses Happy Party Bear Weather, a small release but at least a step closer to GMS.
UseCashItemHandler
Add
Code:
if (itemId == 5122000) { //Happy Party Bear Weather
                            for (MapleCharacter chr : player.getMap().getCharacters())
                                chr.giveItemBuff(2022302); //Party Bear Buff
                        }
Under
Code:
player.getMap().startMapEffect(ii.getMsg(itemId).replaceFirst("%s", player.getName()).replaceFirst("%s", slea.readMapleAsciiString()), itemId);
                        MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.CASH, slot, (short) 1, false);

gud relese
 
i get error?
init:
deps-jar:
Compiling 2 source files to C:\Users\Dave.DAVE.002\Desktop\Chatoic Fork\build\classes
C:\Users\Dave.DAVE.002\Desktop\Chatoic Fork\Chatoic Fork\src\net\sf\odinms\net\channel\handler\UseCashItemHandler.java:431: unreachable statement
if (itemId == 5122000) { //Happy Party Bear Weather
1 error
BUILD FAILED (total time: 1 second)
 
Add this in your MapleCharacter.java, then it should work for BubblesDev as well.
Code:
public void giveItemBuff(int itemID) {
        MapleItemInformationProvider mii = MapleItemInformationProvider.getInstance();
        MapleStatEffect statEffect = mii.getItemEffect(itemID);
        statEffect.applyTo(this);
    }
 
You can either do this for all items which give buffs
or you be smart and look in the wz files where it says:
PHP:
<int name="stateChangeItem" value="2022302"/>

So you can also add a variable called stateChangeItem, and if it is not 0 it gives you a buff
isn't that genious?
 
Back