Re: V83 Item Vac Question
It's very possible but I don't recall the class name to modify. Doing this will make things a bit laggy for the user, though.
Re: V83 Item Vac Question
I don't recall what server it was or where Iv'e seen it (I have seen it many times roflbbqsauce). I had it once and didn't lag me 1 bit. I would rape the map with MSI's and I would vac the drops while wearing the item and would get filthy rich with no lag. If you do happen to remember I would really appreciate it.
Re: V83 Item Vac Question
U could find where the monster drops meso/item n add a check.
Re: V83 Item Vac Question
It is possible. Though you will need to 'loot' one item. It will go through ItemPickupHandler.java. Just check if the player wears the required item, if so, loop through all items in the map, pick them up, return;.
Re: V83 Item Vac Question
Quote:
Originally Posted by
kevintjuh93
It is possible. Though you will need to 'loot' one item. It will go through ItemPickupHandler.java. Just check if the player wears the required item, if so, loop through all items in the map, pick them up, return;.
Ah thanks for your help. Now this is definitely interesting and can see how I might be able to do this. I don't know if i might need to make another help thread for this but is it possible to make an expiration date command? I.E:!item 4000252 expire 2/24/2012 and it expires a day later and is removed out of your inventory?
Re: V83 Item Vac Question
check if the player has the item equipped when an item is added to the map and when the player first enters the map
Quote:
Originally Posted by
kevintjuh93
It is possible. Though you will need to 'loot' one item. It will go through ItemPickupHandler.java. Just check if the player wears the required item, if so, loop through all items in the map, pick them up, return;.
0/10 troll harder
Quote:
Originally Posted by
TacoBell
Ah thanks for your help. Now this is definitely interesting and can see how I might be able to do this. I don't know if i might need to make another help thread for this but is it possible to make an expiration date command? I.E:!item 4000252 expire 2/24/2012 and it expires a day later and is removed out of your inventory?
set the expiration date flag as 2/24/2012 parsed into whatever your expiration data type is. it should be a long though, anything else is full retard.
Re: V83 Item Vac Question
Quote:
Originally Posted by
rice
check if the player has the item equipped when an item is added to the map and when the player first enters the map
0/10 troll harder
set the expiration date flag as 2/24/2012 parsed into whatever your expiration data type is. it should be a long though, anything else is full retard.
LMAO. I didn't even know he was trolling. I really thought I was unto something :(. Thought I was actually pretty close was just missing the player function.
PHP Code:
if (c.getPlayer().haveItemEquipped(1812006)) {
List<MapleMapObject> items = player.getMap().getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.ITEM));
for (MapleMapObject item : items) {
MapleMapItem mapItem = (MapleMapItem) item;
if (mapItem.getMeso() > 0) {
player.gainMeso(mapItem.getMeso(), true);
} else if (mapItem.getItem().getItemId() >= 5000000 && mapItem.getItem().getItemId() <= 5000100) {
int petId = MaplePet.createPet(mapItem.getItem().getItemId());
if (petId == -1) {
return;
}
MapleInventoryManipulator.addById(c, mapItem.getItem().getItemId(), mapItem.getItem().getQuantity(), null, petId);
} else {
MapleInventoryManipulator.addFromDrop(c, mapItem.getItem(), true);
}
mapItem.setPickedUp(true);
player.getMap().removeMapObject(item); // just incase ?
player.getMap().broadcastMessage(MaplePacketCreator.removeItemFromMap(mapItem.getObjectId(), 2, player.getId()), mapItem.getPosition());
}
}
As for the expiration command I really don't understand the flag or how to make the command overall like that.
Re: V83 Item Vac Question
Quote:
Originally Posted by
TacoBell
LMAO. I didn't even know he was trolling. I really thought I was unto something :(. Thought I was actually pretty close was just missing the player function.
PHP Code:
if (c.getPlayer().haveItemEquipped(1812006)) {
List<MapleMapObject> items = player.getMap().getMapObjectsInRange(player.getPosition(), Double.POSITIVE_INFINITY, Arrays.asList(MapleMapObjectType.ITEM));
for (MapleMapObject item : items) {
MapleMapItem mapItem = (MapleMapItem) item;
if (mapItem.getMeso() > 0) {
player.gainMeso(mapItem.getMeso(), true);
} else if (mapItem.getItem().getItemId() >= 5000000 && mapItem.getItem().getItemId() <= 5000100) {
int petId = MaplePet.createPet(mapItem.getItem().getItemId());
if (petId == -1) {
return;
}
MapleInventoryManipulator.addById(c, mapItem.getItem().getItemId(), mapItem.getItem().getQuantity(), null, petId);
} else {
MapleInventoryManipulator.addFromDrop(c, mapItem.getItem(), true);
}
mapItem.setPickedUp(true);
player.getMap().removeMapObject(item); // just incase ?
player.getMap().broadcastMessage(MaplePacketCreator.removeItemFromMap(mapItem.getObjectId(), 2, player.getId()), mapItem.getPosition());
}
}
As for the expiration command I really don't understand the flag or how to make the command overall like that.
nonono. there should be some AddMapItem (something along the lines of that) function in MapleMap that handles when an item is added to the map. at the end of then function add that if equipped check in.
You will also want to loot every item when the player activates the command, and when he transfers to a new map(should be AddPlayer in MapleMap)
Re: V83 Item Vac Question
Quote:
Originally Posted by
rice
nonono. there should be some AddMapItem (something along the lines of that) function in MapleMap that handles when an item is added to the map. at the end of then function add that if equipped check in.
You will also want to loot every item when the player activates the command, and when he transfers to a new map(should be AddPlayer in MapleMap)
Thank you very much for your help. Don't really like being spoon fed so I'll try to figure it out myself ;). As for the expire command how would someone go about doing that? (Last question).
Re: V83 Item Vac Question
Quote:
Originally Posted by
TacoBell
Thank you very much for your help. Don't really like being spoon fed so I'll try to figure it out myself ;). As for the expire command how would someone go about doing that? (Last question).
copy/paste the original drop or item command and work off that
Re: V83 Item Vac Question
Quote:
Originally Posted by
rice
0/10 troll harder
I really thought you knew what trolling is. I wasn't trolling at all.
Your method will also work, I just though of 'item vac' as in you press 'z' (to loot) and every item is picked up by you.
@TacoBell
You can use different ways, you can also make a new command like /expire or so.
Just set the date in Calendar. Then get the time in milliseconds.
Re: V83 Item Vac Question
Quote:
Originally Posted by
kevintjuh93
I really thought you knew what trolling is. I wasn't trolling at all.
Your method will also work, I just though of 'item vac' as in you press 'z' (to loot) and every item is picked up by you.
@TacoBell
You can use different ways, you can also make a new command like /expire or so.
Just set the date in Calendar. Then get the time in milliseconds.
oh so you're not trolling? i guess i thought you were smarter than that. having to loot to vac every item is really stupid.
Re: V83 Item Vac Question
Quote:
Originally Posted by
rice
nonono. there should be some AddMapItem (something along the lines of that) function in MapleMap that handles when an item is added to the map. at the end of then function add that if equipped check in.
You will also want to loot every item when the player activates the command, and when he transfers to a new map(should be AddPlayer in MapleMap)
Well its not really a command o.o. its just an equip if the player is wearing it auto vacs the drop and i think you might be talking about addmapobject maybe? i also tried adding the function at the end of the function and had no luck! even went far enough into old v55 repacks and was told it was somewhere in there lol. so just to be clear its JUST DONE in MapleMap.java right? as in the vaccing part and so on?
Re: V83 Item Vac Question
Quote:
Originally Posted by
TacoBell
Well its not really a command o.o. its just an equip if the player is wearing it auto vacs the drop and i think you might be talking about addmapobject maybe? i also tried adding the function at the end of the function and had no luck! even went far enough into old v55 repacks and was told it was somewhere in there lol. so just to be clear its JUST DONE in MapleMap.java right? as in the vaccing part and so on?
maplemap should be processing map items so yes