Jump to content
  • 0
Svanhild

problem/quick question with rentals & cards

Question

  1. Okay, so I've made these cards to be rentals and it's working. But the problem is, when i compound the card and decard it from a card remover npc, the expiration date seems to be gone. I just wanna confirm if the card will still disappear or not.

     

  2. Second problem is, rental items (headgears,armors,etc) don't give back the card that is compounded on the equipment when it expires, it eats any compounded card along with the expired rental item.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Okay, so I've made these cards to be rentals and it's working. But the problem is, when i compound the card and decard it from a card remover npc, the expiration date seems to be gone. I just wanna confirm if the card will still disappear or not.

 

That may be because card remover (at least, the one from Malangdo Island) deletes the equipment and then creates new items. That means that previous card was deleted from players inventory and was created a new one. That is the reason you have your card without rental.

 

Before the deletion, npc should check if attached card has rental state. I don't figure a way to do that check, but maybe with getinventorylist() command, but it would be something weird thing.

 

 

Second problem is, rental items (headgears,armors,etc) don't give back the card that is compounded on the equipment when it expires, it eats any compounded card along with the expired rental item.

 

I guess that is the behaviour it should have. However, there is a topic on Github about implement an OnRentalExpireEvent that may fit to your needs: Added 'OnRentalExpireEvent' trigger (related to Bug #7418 / Rental End). You could try to do the merge of that in your server and then recompile, or, maybe request to convert it to plugin in Plugin Requests forum. It would be nice to have it as plugin.

Share this post


Link to post
Share on other sites
  • 0

 

Okay, so I've made these cards to be rentals and it's working. But the problem is, when i compound the card and decard it from a card remover npc, the expiration date seems to be gone. I just wanna confirm if the card will still disappear or not.

 

That may be because card remover (at least, the one from Malangdo Island) deletes the equipment and then creates new items. That means that previous card was deleted from players inventory and was created a new one. That is the reason you have your card without rental.

 

Before the deletion, npc should check if attached card has rental state. I don't figure a way to do that check, but maybe with getinventorylist() command, but it would be something weird thing.

 

Yeah I noticed about that, thats how the card remover works by nature. Maybe is there a way to block rental cards from card remover npc?

 

And about the cards not being returned after rental item expiration..I'll take a look on the link you've provided. Thanks.

 

Edit:

I took a look on the link you gave me and I think it isn't recommended by now. Sad though. :(

Edited by Svanhild

Share this post


Link to post
Share on other sites
  • 0

I'm raising this topic again. Is there any way to detect if the item is a rental so it can just be easily denied?

Share this post


Link to post
Share on other sites
  • 0
*getinventorylist()


This command sets a bunch of arrays with a complete list of whatever the 
invoking character has in its inventory, including all the data needed to 
recreate these items perfectly if they are destroyed. Here's what you get:


@inventorylist_expire[]    - expire time (Unix time stamp). 0 means never  

 

getinventorylist();
for(.@i = 0; .@i < @inventorylist_count; .@i++)
	if (@inventorylist_expire[.@i] != 0) {
		mes("Sorry, I don't accept rental items!");
		emotion(e_hmm);
		close();
	}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.