Jump to content
  • 0
Sign in to follow this  
Nameleszx

How to stack or limit 2 cards only

Question

12 answers to this question

Recommended Posts

  • 0

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[i])            csc++;    }    if(csc>=2)        return 0
Edited by Angelmelody

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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

{ bonus3 bAutoSpell,"WZ_STORMGUST",(2,20/ isequipped(4318)); bonus2 bAddEff,Eff_Freeze,(2000/isequipped( 4318)); },{},{}
Edited by coldfire2k

Share this post


Link to post
Share on other sites
  • 0

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

Yes like that.

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

 

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[i])            csc++;    }    if(csc>=2)        return 0

i got error 

Error	1	error C2065: 'csc' : undeclared identifier	c:usersadmindesktoprathenasrcmappc.c	3737	1	map-server_sql

Share this post


Link to post
Share on other sites
  • 0

 

 

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[i])            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

Share this post


Link to post
Share on other sites
  • 0

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

  int csc;//add this declaration 

Share this post


Link to post
Share on other sites
  • 0

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;
 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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