Jump to content
  • 0

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


iraciz

Question


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

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[.@i] > 4000 && @sold_nameid[.@i] < 4700) {

 

OnSellItem:
	mes "Cards to sell:";
	mes "-----------------------------------";
	for(set .@i,0; .@i<getarraysize(@sold_nameid); set .@i,.@i+1)
		if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) {
			if (.Level) {
				query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "+@sold_nameid[.@i],.@lv);
				if (.@lv < .Level) {
					dispbottom getitemname(@sold_nameid[.@i])+" is under the minimum level.";
					continue;
				}
			}
			set .@card_id[getarraysize(.@card_id)], @sold_nameid[.@i];
			set .@card_amt[getarraysize(.@card_amt)], @sold_quantity[.@i];
			set .@mvp, compare(.MVP$,""+@sold_nameid[.@i]);
			mes ((.@mvp)?"  ^FF0000":"  ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000";
			set .@card_total, .@card_total+(@sold_quantity[.@i]*((.@mvp)?.Points[1]:.Points[0]));
		}
	deletearray @sold_nameid[0], getarraysize(@sold_nameid);
	deletearray @sold_quantity[0], getarraysize(@sold_quantity);
	if (!.@card_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

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) {

change to

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

 

  • Love 1
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  145
  • Reputation:   14
  • Joined:  04/28/12
  • Last Seen:  

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[.@i] > 4000 && @sold_nameid[.@i] < 27126) {
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  145
  • Reputation:   14
  • Joined:  04/28/12
  • Last Seen:  

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[.@i] > 4000 && @sold_nameid[.@i] < 4700) {

 


OnSellItem:
	mes "Cards to sell:";
	mes "-----------------------------------";
	for(set .@i,0; .@i<getarraysize(@sold_nameid); set .@i,.@i+1)
		if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) {
			if (.Level) {
				query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "+@sold_nameid[.@i],.@lv);
				if (.@lv < .Level) {
					dispbottom getitemname(@sold_nameid[.@i])+" is under the minimum level.";
					continue;
				}
			}
			set .@card_id[getarraysize(.@card_id)], @sold_nameid[.@i];
			set .@card_amt[getarraysize(.@card_amt)], @sold_quantity[.@i];
			set .@mvp, compare(.MVP$,""+@sold_nameid[.@i]);
			mes ((.@mvp)?"  ^FF0000":"  ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000";
			set .@card_total, .@card_total+(@sold_quantity[.@i]*((.@mvp)?.Points[1]:.Points[0]));
		}
	deletearray @sold_nameid[0], getarraysize(@sold_nameid);
	deletearray @sold_quantity[0], getarraysize(@sold_quantity);
	if (!.@card_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[.@i] > 4000 && @sold_nameid[.@i] < 4700) {

to
 

if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4706) {

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

 

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

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

4 minutes ago, pachupappy said:

if this is a CARD ONLY exclusive NPC you can go 
 


if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 27126) {

Is giving points for any stuff beside cards.

dwdw.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

9 minutes ago, Emistry said:

if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) {

change to


if ((@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) || (@sold_nameid[.@i] >= 27120 && @sold_nameid[.@i] <= 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...