Jump to content
  • 0

Allowing untradeable item to be tradeable but requires another item


Jayzy

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   0
  • Joined:  12/08/11
  • Last Seen:  

Hello,

Ok so here it is. I am trying to code in src/map/trade.c allowing you to trade an item which isn't tradeable in the server settings but will allow it to be tradeable but it will require you another item like trade card or what you want to name it to allow the untradeable item to be tradeable. but the trade pass itself can't be tradeable at all. Thank you

:)

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

Hi!

There are several considerations you have to make:

* All of the participants of the trade needs to have the trade card?

* Are there specific trade cards for specific items, or only one trade card that makes it possible to trade other items?

Anyways if only one of the participants do need to have a trade card, you can implement similar functionality without any source edit.

An npc can add a player to a group, which have the permission to trade those items, while the normal group of playerd don't.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   0
  • Joined:  12/08/11
  • Last Seen:  

Just the person who's putting the untradeable item on the trade window. Actually I tried to put the command on this line inside the trade.c

if( !itemdb_cantrade(item, src_lv, dst_lv) && //Can't trade

(pc_get_partner(sd) != target_sd || !itemdb_canpartnertrade(item, src_lv, dst_lv)) ) //Can't partner-trade

{

clif_displaymessage (sd->fd, msg_txt(260));

clif_tradeitemok(sd, index+2, 1);

return;

}

I tried checking the item but it always do check the item even the item is already tradeable. I cant make it work that it would only check the item if its not tradeable then it will require you the item if the player doesn't have the item then you can't add the item. So after they add the item with the use of the trade card. It will be deleted once the deal is successful(this is also one of my problem on deleting the item).

EDIT: So if a player has 10 trade pass, he/she can put 10 untradeable items on the trade window and will be deleted if the deal has been success.

Yes but doing the group thing will allow player to add a lot of items. So what I want to happen is one trade pass per one untradeable item.

Thank you sir for your help :)

Edited by Jayzy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

I was bored so I did this stuff.

Bypass_TradeRestriction_via_Ticket.diff

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   0
  • Joined:  12/08/11
  • Last Seen:  

Thank you so much! :D

Well I have a problem. It doesn't return the Trade Pass back if the deal has been canceled.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Can you give a scenario how it doesn't return the ticket? The ticket returns when the deal is cancelled, or one of the players force quit the client. Well, that's based on my test.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   0
  • Joined:  12/08/11
  • Last Seen:  

Yup if I cancelled the deal then it wouldn't return the items back. Let me try if they're the one who cancel's the deal.

EDIT: Actually your script really works fine. It's my fault. Forgot to put the script in cancel function.

EDIT2: In your script with this content "if(itemdb_cantrade(&item, 0, 0) == 0)", shouldn't it suppose to be "if(itemdb_cantrade(&item, src_lv, dst_lv) == 0)" because if it's both 0 how about if a gm with group lvl is allowed to trade the item without requiring the item. I think that the GM would also get the trade pass item even if he/she doesn't use one. Am not sure. Because that's what is happening to my server right now. I get a trade pass item without even using one.

Edited by Jayzy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  62
  • Reputation:   0
  • Joined:  12/08/11
  • Last Seen:  

how can I set that only those equipments will be allowable to be trade by this item?

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...