How to stack or limit 2 cards only

Nameleszx

New member
Messages
108
Points
0
How to stack or limit 2 cards only? For example the Stormy Knight card, i want to limit it for 2 cards only.

 
I don't get this. You mean 2 cards on the entire server, on a singue equipment piece, ...?

 
i think he wants the effect to stack up to 2x only. Adding 1 more stormy after 2 cards has been added will not add any effect on the item

 
Hmmm idk if this will do the trick.. Someone correct me if im mistaking.

Code:
{ bonus3 bAutoSpell,"WZ_STORMGUST",(2,20/ isequipped(4318)); bonus2 bAddEff,Eff_Freeze,(2000/isequipped( 4318)); },{},{}
 
Last edited by a moderator:
I think your request require a source mod.

try this

pc.c

inside the pc_insert_card() function

 int csc;//add this declaration


find

 // remember the card id to insert  nameid = sd->status.inventory[idx_card].nameid;

add after

Code:
    for(i=0;i<sd->inventory_data[idx_equip]->slot;i++){        if(nameid == sd->status.inventory[idx_equip].card[i])            csc++;    }    if(csc>=2)        return 0
 
Last edited by a moderator:
Or manually change every MvP card script to some weird code that involves variable usage and the use of checkequipcardid.

I'd honestly prefer Angelmelody answer even if it involves recompilation.

 
How do I disable stack of multiple other item then? for example thanatos card or raydric card? let say I wan limit only 1 card for raydric because my server got 4 slot robe.

 
I think your request require a source mod.

try this

pc.c

inside the pc_insert_card() function

 int csc;//add this declaration

find

 // remember the card id to insert  nameid = sd->status.inventory[idx_card].nameid;

add after

 for(i=0;i<sd->inventory_data[idx_equip]->slot;i++){    if(nameid == sd->status.inventory[idx_equip].card)      csc++;  }  if(csc>=2)    return 0
i got error 

Code:
Error	1	error C2065: 'csc' : undeclared identifier	c:usersadmindesktoprathenasrcmappc.c	3737	1	map-server_sql
 
I think your request require a source mod.

try this

pc.c

inside the pc_insert_card() function

 int csc;//add this declaration

find

 // remember the card id to insert  nameid = sd->status.inventory[idx_card].nameid;

add after

 for(i=0;i<sd->inventory_data[idx_equip]->slot;i++){    if(nameid == sd->status.inventory[idx_equip].card)      csc++;  }  if(csc>=2)    return 0
i got error 

Error 1 error C2065: 'csc' : undeclared identifier c:usersadmindesktoprathenasrcmappc.c 3737 1 map-server_sql
you forgot to  declare that  variable

 
is this correct ? 

int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip, int csc)

 
Last edited by a moderator:
is this correct ? 

int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip, int csc)
it is already mentioned in Angelmelody 1st post.

pc.c
inside the pc_insert_card() function
Code:
  int csc;//add this declaration 
 
Last edited by a moderator:
got error in this

    // remember the card id to insert
    nameid = sd->status.inventory[idx_card].nameid;
    int csc;//add this declaration
    
    for(i=0;i<sd->inventory_data[idx_equip]->slot;i++){        if(nameid == sd->status.inventory[idx_equip].card)            csc++;    }    if(csc>=4)        return 0;
 

 
Back
Top