Jump to content

Question

7 answers to this question

Recommended Posts

Posted

For eAthena you could do something like this...

 

setarray .@eqid, 7,6;
for(set(.@i,0);.@i<getarraysize(.@eqid);set(.@i,.@i+1)) {
	setarray .@temp, getequipcardid(.@eqid[.@i],0), getequipcardid(.@eqid[.@i],1);
	for(set(.@b,0);.@b<getarraysize(.@temp);set(.@b,.@b+1)) {
		if(getequipid(.@eqid[.@i])>-1)
			for(set(.@a,0);.@a<getequipcardcnt(.@eqid[.@i]);set(.@a,.@a+1))
				if(compare(""+getequipcardid(.@eqid[.@i],.@a),""+.@temp[.@b]))
					set(.@m,.@m+1);
		if(.@m>=3) unequip(.@eqid[.@i]);
		set(.@m,0);
	}
}

 

 

For rAthena you can make it smaller.

 

setarray .@cards$, ""+getequipcardid(7,0), ""+getequipcardid(7,1), ""+getequipcardid(7,2), ""+getequipcardid(7,3);
set .@card$, implode(.@cards$,"|");
for(set(.@b,0);.@b<2;set(.@b,.@b+1))
	if(getequipid(7)>-1)
		if(countstr("|"+.@card$+"|", "|"+.@cards$[.@b]+"|", 0)>=3)
			unequip(7);
Posted

it gonna be a pain for you to edit every single card in the server to avoid them from using 3 or more same card in same equipments..

 

i remember QQFoolSelina posted a small source snippet on how to fix your problem ... try check source support/request forum ...

Posted

it gonna be a pain for you to edit every single card in the server to avoid them from using 3 or more same card in same equipments..

 

i remember QQFoolSelina posted a small source snippet on how to fix your problem ... try check source support/request forum ...

 

Well linking it with a function wouldn't be all that hard especially if he's using an SQL database, but I didn't realize this is something he wanted for all items... As I've done something similar with a limited number of items, and I do agree a source mod would be better at restricting the number of cards per equipped.

 

I'm not sure if it works but this might be what you're looking for.

http://rathena.org/board/files/file/2822-card-effect-stack-limit/

Posted
setarray .@eqid, 7,6;
for(set(.@i,0);.@i<getarraysize(.@eqid);set(.@i,.@i+1)) {
	setarray .@temp, getequipcardid(.@eqid[.@i],0), getequipcardid(.@eqid[.@i],1);
	for(set(.@b,0);.@b<getarraysize(.@temp);set(.@b,.@b+1)) {
		if(getequipid(.@eqid[.@i])>-1)
			for(set(.@a,0);.@a<getequipcardcnt(.@eqid[.@i]);set(.@a,.@a+1))
				if(compare(""+getequipcardid(.@eqid[.@i],.@a),""+.@temp[.@b]))
					set(.@m,.@m+1);
		if(.@m>=3) unequip(.@eqid[.@i]);
		set(.@m,0);
	}
}

how can put the ID of card?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...