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

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 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

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

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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