Topic: Zoo
Instead of Mclew, Mcgrew Mcfew or w/e (zoo bank npcs) saying "I do not accept pets that are carrying items" when your zoo bank is full maybe it should tell you he can not hold anymore pets for you anymore because your at your limit.
You are not logged in. Please login or register.
Instead of Mclew, Mcgrew Mcfew or w/e (zoo bank npcs) saying "I do not accept pets that are carrying items" when your zoo bank is full maybe it should tell you he can not hold anymore pets for you anymore because your at your limit.
The server can only return two values when storing a pet, one that it was succesfull and one that it failed. If it fails it can be because either the zoo is full or the pet has items, there's no way to tell which it is. Though I am sure Zer could change this behaviour.
Can't the NPC, given the pet's mob-id, check its inventory via a script?
What would stop you from executing something like:
if(storageFailed){
if(mobId.inventory.length != 0){
"Couldn't story because pet had items"
}else{
"Couldn't store because storage is full"
}
}
Taming, leveling and handing pets was my favorite part of Faldon, no doubt...
Being able to tame and the possibility og being able to lvl ur pet was a great fun imo aswell.
However it was ruined by the server crash meaning u lost ur lvl 100 pet u spend 50 hours on raising or just some asshole who 1 hits it cuz he's bored.
When changing the pet system i dont Think u should only focus on zoo but on the overall picture of usage of pets in-game
Last edited by Judy (July 21st, 2010 1:24 PM)
Can't the NPC, given the pet's mob-id, check its inventory via a script?
What would stop you from executing something like:
if(storageFailed){ if(mobId.inventory.length != 0){ "Couldn't story because pet had items" }else{ "Couldn't store because storage is full" } }
If only the Faldon scripting was pretty like that hehe. As far as I know, the inventory manipulation functions do not work on monsters, and even if they did, there's no way to check if an inventory is empty (short of looping through all 400 some items and seeing if they have any of them).
Though I guess there's one way, granted its nasty, but it would be possible to iterate over the names of the monsters in zoo and then check if the length of any of the names == 0.
Right, I know that Faldon scripting is ugly, I was just throwing out some pseudo-code.
If I'm not mistaken, you can also check which item is in a given location inventory slot as well, so instead of looping through 400 items you could loop through the 20 (or however many) slots in the inventory.
The solution is not going to be pretty no matter how you do it, but since banking a pet isn't something that's going to be triggered that often, you can probably afford the extra complexity without adversely affecting the server.
Problem is that the pet needs a free inventory and not the player, so looping thru the 20 inv slots or w,e would have no purpose
I wasn't suggesting looping through the player's inventory, I was saying that mob inventory is probably modeled similarly to player's inventory, and therefore checking if an item exists in it could be done in the same way.
ah well i didnt know pets had similarly inv slots as players, however that would explain why certain pets stops picking up items after a while, guess it gets filled up
Honestly I'm not sure that they are implemented the same way. It would make sense if they are, assuming both player-characters and mobs are descended from an abstract parent that defines the inventory management logic, but I wouldn't be surprised if mob inventory was added on ex post facto.
Currently installed 5 official extensions. Copyright © 2003–2009 PunBB.