Jump to content
  • 0

Card Trader Script needed!


flea

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  07/04/19
  • Last Seen:  

Hello, my friends!

I'm in need of a Card Trader NPC (for a low/mid rate server), simple and precise, that will identify and trade 10 DIFFERENT cards (10 points) in my inventory for an Old Card Album. I've seen many scripts that have a shop included, not ideal for me though.

The script I have in mind would be much more simple, with no shop at all, just the chat windows and the automatic identification of the cards. It's very importante that the NPC would accept only DIFFERENT cards at a time, so the player must carry only 10 different cards in his inventory every time he would make an exchange.

No need to worry at all about mini-boss and boss cards, as those will be very difficult to obtain, and no one would ever trade them. Only normal monster cards.

 

Can anyone help me with that, please? Thanks!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

-	script	Card Trader	-1,{
	getinventorylist;
	for(.@i = 0; .@i < @inventorylist_count; .@i++) {
		// check if this item type in inventory list is card
		if (getiteminfo(@inventorylist_id[.@i], 2) == 6) {
			// if it a card put in the list
			.@card_list[.@card_size] = @inventorylist_id[.@i];
			.@card_size++;
		}
	}
	mes .@npc_name$ = "[Card Trader]";
	mes "I can exchange 10 card to an Old Card Album";
	mes "Each card need to be different from each other";
	mes "Not accepting more than one of same card";
	if (.@card_size < 9) close; // don't have 9 different card close. don't continue
	next;
	for (.@i = 0; .@i < 9; .@i++) // 10 cards from the list.
		delitem .@card_list[.@i], 1; // delete a card from each card 
	getitem 616, 1; // 1x Old_Card_Album
	mes .@npc_name$;
	mes "Thanks for the exchange";
	close;
}

Hope this can help you.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  07/04/19
  • Last Seen:  

Wow! Thank you very much! I will test it right away!

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...