Snow Posted October 2, 2012 Posted October 2, 2012 (edited) I added this to make the npc check for rental items, and it all worked as intended. getinventorylist; if (@inventorylist_expire[0]) { mes "You have rental items in your inventory. Please come back with non rental ones."; close; } But after the server restart, it doesn't work anymore o_o No error at start up or anything. The Script is just going on now, instead of closing.. First i thought it's because of some src files, but no changes to them. Tested different stuff for more than 4 hours now.. Anyone knowing a reason for this? Edited October 2, 2012 by Snow Quote
EvilPuncker Posted October 2, 2012 Posted October 2, 2012 add deletearray @inventorylist_expire; before getinventorylist; Quote
Snow Posted October 2, 2012 Author Posted October 2, 2012 i tried this, but the script still continues instead of closing Quote
Emistry Posted October 2, 2012 Posted October 2, 2012 try this.. http://www.eathena.ws/board/index.php?s=&showtopic=241313&view=findpost&p=1318374 Quote
QQfoolsorellina Posted October 2, 2012 Posted October 2, 2012 try this to check all item in array getinventorylist; for ( set .@i, 0; .@i < @inventorylist_count; set .@i, .@i +1 ){ if (@inventorylist_expire[.@i]) { mes "You have rental items in your inventory. Please come back with non rental ones."; close; } } Quote
Snow Posted October 2, 2012 Author Posted October 2, 2012 (edited) hay emistry. yeah i tried this as well (like you mentioned in the pm) but this only checking for equipped rentals, not for quest related in the inventory (in my current case, it's a quest to exchange Sunglasses[1] to another slotted mid. I use getequipexpiretick in the item signer, but as i said it won't work for this :/ Most confusing is, like i said, the script in the 1st post worked already.. till the restart. edit: thank you QQfoolsorellina, it works now again Edited October 2, 2012 by Snow Quote
Emistry Posted October 2, 2012 Posted October 2, 2012 (edited) after review back your 1st post .... the script is actually working ....just checked the wrong items.. @inventorylist_expire[0] you only checked for the very first items in the array ...but not the rest ~ so you have to add a loop like what QQfoolsorellina did.... if you need to check for certain item with rental....it would be like this.. getinventorylist; for ( set .@i, 0; .@i < @inventorylist_count; set .@i, .@i +1 ) if(@inventorylist_expire[.@i] && @inventorylist_id[.@i] == <itemID>){ mes "Please make sure you dont have "+getitemname(@inventorylist_id[.@i])+" as rental items."; close; } Edited October 2, 2012 by Emistry Quote
Snow Posted October 2, 2012 Author Posted October 2, 2012 alright, thank you for the fast response @ll :> Quote
Question
Snow
I added this to make the npc check for rental items, and it all worked as intended.
But after the server restart, it doesn't work anymore o_o No error at start up or anything. The Script is just going on now, instead of closing..
First i thought it's because of some src files, but no changes to them. Tested different stuff for more than 4 hours now..
Anyone knowing a reason for this?
Edited by Snow7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.