Issue information

Issue ID
#3479
Status
Invalid
Severity
None
Started
Hercules Elf Bot
Aug 8, 2009 19:35
Last Post
Hercules Elf Bot
Apr 4, 2012 8:34
Confirmation
N/A

Hercules Elf Bot - Aug 8, 2009 19:35

Originally posted by [b]NoH[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3479

(I post in this section because I assume if this is a bug, it should be fixed in the source code, and not in every single NPC file.)

Currently in eAthena, if the inventory of a player is full, using getitem will trigger a cliff_display_message saying the player can't get the item, and the script will continue. If the item is a quest item, the player will be screwed: he won't get the item needed to complete the quest (or the reward), yet he will still have the quest var set, so most likely he won't be able to get the item back.

Most of the scripts, including official scripts, don't check how many items you have before every single getitem (I was screwed again yesterday while testing a quest of Moscovia). The same problem may occur with overweighted chars (not sure - do they get the item in this case or not?), but official scripts use to check that.

This bug brings a few question:

1) How does getitem work on Aegis? Is this bug an official bug?
2) If it's an official bug, does eA really have to reproduce them? (IMG:style_emoticons/default/ani_swt3.gif)

Here are a few options to fix it:

* Stopping the current script if getitem fail - but that wouldn't work for every scripts, since the quest var is often set before the getitem, so players could still be screwed.

* (my personnal favourite) Make a "floating" limit instead of MAX_INVENTORY (or whatever the var is called), or set a second limit: MAX_INVENTORY should refers to the max number of items the player can have to be able to pick or buy an item (or @autoloot it or...?) but there should also be a second "MAX_INVENTORY" (let's call it MAX_INVENTORY2) refering to the real inventory limit. So in this case, if a script triggers a getitem and if the number of items in the inventory is inferior to MAX_INVENTORY2, the player will still get the item (or, to make it clear: getitem should be allowed to give you items, even if your inventory is full).

* Something else?

This post has been edited by NoHealing: Aug 8 2009, 12:40 PM

Hercules Elf Bot - Dec 9, 2011 3:28

Originally posted by [b]Ind[/b]
there are many official npcs that say 'you are carrying too much stuff come back when you get whatever', some rAthena npcs do it too, its the use of the checkweight() script function.