Jump to content
  • 0
iraciz

Help- Add item id range for Card Trader (Euphy's Script)

Question

Good day, dear community, 

I'm using a card trader script, and I want to add more card ids,  from 27120 to 27126 (new brasilis card id).

what should I edit? could you lendme a hand? I dont understand how to add a new item range...

The trick is in this line, but am not scripter, and poorly understand.
if (@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 4700) {

 

OnSellItem:
	mes "Cards to sell:";
	mes "-----------------------------------";
	for(set [email protected],0; [email protected]<getarraysize(@sold_nameid); set [email protected]i,[email protected]i+1)
		if (@sold_nameid[[email protected]i] > 4000 && @sold_nameid[[email protected]] < 4700) {
			if (.Level) {
				query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "[email protected]_nameid[[email protected]],[email protected]);
				if ([email protected] < .Level) {
					dispbottom getitemname(@sold_nameid[[email protected]])+" is under the minimum level.";
					continue;
				}
			}
			set [email protected]_id[getarraysize([email protected]_id)], @sold_nameid[[email protected]];
			set [email protected]_amt[getarraysize([email protected]_amt)], @sold_quantity[[email protected]];
			set [email protected], compare(.MVP$,""[email protected]_nameid[[email protected]]);
			mes (([email protected])?"  ^FF0000":"  ^777777")[email protected]_quantity[[email protected]]+"x "+getitemname(@sold_nameid[[email protected]])+"^000000";
			set [email protected]_total, [email protected]_total+(@sold_quantity[[email protected]]*(([email protected])?.Points[1]:.Points[0]));
		}
	deletearray @sold_nameid[0], getarraysize(@sold_nameid);
	deletearray @sold_quantity[0], getarraysize(@sold_quantity);
	if ([email protected]_id) {
		mes "  ^777777(none)^000000";
		emotion ET_SWEAT;
		close;
	}

I want to add more card ids,  from 27120 to 27126

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1
if (@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 4700) {

change to

if ((@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 4700) || (@sold_nameid[[email protected]] >= 27120 && @sold_nameid[[email protected]] <= 27126)) {

 

  • Love 1
Link to comment
Share on other sites

  • 1
1 minute ago, iraciz said:

 

I can't, those Id's are taken by the armor enchant runes and they will collide with the armor enchanter official script.

// Armor Enchant System
//===================================================================
4700,Strength1,STR+1,6,20,,10,,,,,,,,,,,,,{ bonus bStr,1; },{},{}
4701,Strength2,STR+2,6,20,,10,,,,,,,,,,,,,{ bonus bStr,2; },{},{}
4702,Strength3,STR+3,6,20,,10,,,,,,,,,,,,,{ bonus bStr,3; },{},{}
4703,Strength4,STR+4,6,20,,10,,,,,,,,,,,,,{ bonus bStr,4; },{},{}
4704,Strength5,STR+5,6,20,,10,,,,,,,,,,,,,{ bonus bStr,5; },{},{}
4705,Strength6,STR+6,6,20,,10,,,,,,,,,,,,,{ bonus bStr,6; },{},{}
4706,Strength7,STR+7,6,20,,10,,,,,,,,,,,,,{ bonus bStr,7; },{},{}

if this is a CARD ONLY exclusive NPC you can go 
 

if (@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 27126) {
Link to comment
Share on other sites

  • 0
18 minutes ago, iraciz said:

Good day, dear community, 

I'm using a card trader script, and I want to add more card ids,  from 27120 to 27126 (new brasilis card id).

what should I edit? could you lendme a hand? I dont understand how to add a new item range...

The trick is in this line, but am not scripter, and poorly understand.
if (@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 4700) {

 

OnSellItem:
	mes "Cards to sell:";
	mes "-----------------------------------";
	for(set [email protected],0; [email protected]<getarraysize(@sold_nameid); set [email protected]i,[email protected]i+1)
		if (@sold_nameid[[email protected]i] > 4000 && @sold_nameid[[email protected]] < 4700) {
			if (.Level) {
				query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "[email protected]_nameid[[email protected]],[email protected]);
				if ([email protected] < .Level) {
					dispbottom getitemname(@sold_nameid[[email protected]])+" is under the minimum level.";
					continue;
				}
			}
			set [email protected]_id[getarraysize([email protected]_id)], @sold_nameid[[email protected]];
			set [email protected]_amt[getarraysize([email protected]_amt)], @sold_quantity[[email protected]];
			set [email protected], compare(.MVP$,""[email protected]_nameid[[email protected]]);
			mes (([email protected])?"  ^FF0000":"  ^777777")[email protected]_quantity[[email protected]]+"x "+getitemname(@sold_nameid[[email protected]])+"^000000";
			set [email protected]_total, [email protected]_total+(@sold_quantity[[email protected]]*(([email protected])?.Points[1]:.Points[0]));
		}
	deletearray @sold_nameid[0], getarraysize(@sold_nameid);
	deletearray @sold_quantity[0], getarraysize(@sold_quantity);
	if ([email protected]_id) {
		mes "  ^777777(none)^000000";
		emotion ET_SWEAT;
		close;
	}

I want to add more card ids,  from 27120 to 27126

 

I have a stupid way but effective, why don't you swap the 4700-4706 to the ID of brasilis cards(27120 to 27126)
as your script says, change it via SQL.

in this case : 
 

if (@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 4700) {

to
 

if (@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 4706) {

 

Link to comment
Share on other sites

  • 0

 

7 minutes ago, pachupappy said:

I have a stupid way but effective, why don't you swap the 4700-4706 to the ID of brasilis cards(27120 to 27126)
as your script says, change it via SQL.

I can't, those Id's are taken by the armor enchant runes and they will collide with the armor enchanter official script.

// Armor Enchant System
//===================================================================
4700,Strength1,STR+1,6,20,,10,,,,,,,,,,,,,{ bonus bStr,1; },{},{}
4701,Strength2,STR+2,6,20,,10,,,,,,,,,,,,,{ bonus bStr,2; },{},{}
4702,Strength3,STR+3,6,20,,10,,,,,,,,,,,,,{ bonus bStr,3; },{},{}
4703,Strength4,STR+4,6,20,,10,,,,,,,,,,,,,{ bonus bStr,4; },{},{}
4704,Strength5,STR+5,6,20,,10,,,,,,,,,,,,,{ bonus bStr,5; },{},{}
4705,Strength6,STR+6,6,20,,10,,,,,,,,,,,,,{ bonus bStr,6; },{},{}
4706,Strength7,STR+7,6,20,,10,,,,,,,,,,,,,{ bonus bStr,7; },{},{}

Link to comment
Share on other sites

  • 0
4 minutes ago, pachupappy said:

if this is a CARD ONLY exclusive NPC you can go 
 

if (@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 27126) {

Is giving points for any stuff beside cards.

dwdw.png

Link to comment
Share on other sites

  • 0
9 minutes ago, Emistry said:
if (@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 4700) {

change to

if ((@sold_nameid[[email protected]] > 4000 && @sold_nameid[[email protected]] < 4700) || (@sold_nameid[[email protected]] >= 27120 && @sold_nameid[[email protected]] <= 27126)) {

 

Thankyou mr Emistry, this solved my request,

and now I can use this separator  ----->  ||  to add even more ranges.

 

Tested and working, this Euphy 2012 script still functional nowadays.

dwdw.png

Edited by iraciz
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...

Important Information

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