Phantom Of Rogue-Gon Posted September 10, 2013 Group: Members Topic Count: 65 Topics Per Day: 0.02 Content Count: 181 Reputation: 0 Joined: 08/07/13 Last Seen: September 15, 2014 Share Posted September 10, 2013 (edited) if the player [4] weapon and the card function is 1511 the max card in weapon is 3 . if the players 4 card in weapon he/she cant use the weapon Edited September 10, 2013 by Phantom Of Rogue-Gon Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 10, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted September 10, 2013 why not just edit the db/re/item_db.txt and change to 3 slots instead of having 4 slots ? Quote Link to comment Share on other sites More sharing options...
Phantom Of Rogue-Gon Posted September 10, 2013 Group: Members Topic Count: 65 Topics Per Day: 0.02 Content Count: 181 Reputation: 0 Joined: 08/07/13 Last Seen: September 15, 2014 Author Share Posted September 10, 2013 the weapon is 4 slot but he or she can use 3 max of card same id Quote Link to comment Share on other sites More sharing options...
Skorm Posted September 10, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted September 10, 2013 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); Quote Link to comment Share on other sites More sharing options...
Emistry Posted September 11, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted September 11, 2013 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 ... Quote Link to comment Share on other sites More sharing options...
Skorm Posted September 11, 2013 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted September 11, 2013 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/ Quote Link to comment Share on other sites More sharing options...
Phantom Of Rogue-Gon Posted September 11, 2013 Group: Members Topic Count: 65 Topics Per Day: 0.02 Content Count: 181 Reputation: 0 Joined: 08/07/13 Last Seen: September 15, 2014 Author Share Posted September 11, 2013 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? Quote Link to comment Share on other sites More sharing options...
GmOcean Posted September 11, 2013 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 666 Reputation: 93 Joined: 04/27/12 Last Seen: August 17, 2015 Share Posted September 11, 2013 You don't need to. It will get the ID of the card for you. This script is designed to be universal, meaning it works with all cards. Quote Link to comment Share on other sites More sharing options...
Question
Phantom Of Rogue-Gon
if the player [4] weapon and the card function is 1511 the max card in weapon is 3 . if the players 4 card in weapon he/she cant use the weapon
Edited by Phantom Of Rogue-GonLink to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.