Jump to content
  • 0

Can not make restrict properly mvp card


Kido

Question


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Well i'm trying to restrict mvp card

where you may use a limite of 2 of the marked as restricted cards

and if you equip more han 2, you will un-equip all

this is the script im using

function	script	Card	{
setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
for( set .@i,0; .@i<getarraysize(.Card); set .@i,.@i+1 ) {
	if ( isequipped(.Card[.@i]) == 1 ) {
		set @Card,@Card+1;
		if ( @Card > 2){
		dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
		set @Card,0;
		nude;
		}
	}
}
end;
}

The problem is, that when i run that script, i can NOT use 2 mvp cards of the restricted IDs, when i do, everything is un-equiped. Well the main problem is that even if i use 1 of the restricted mvp cards, anyway it will un-equip everything.

 

I just want to make it un-equip your armos if you use more than 2 of the restricted mvp cards, but this just won't happen, i also tryied to define it more than 3         if ( @Card > 3){ but same problema.

Please help ):

Link to comment
Share on other sites

13 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

did you do like this ?

4357,B_Seyren_Card,Lord Knight Card,6,20,,10,,,,,,,,769,,,,,{  skill "LK_BERSERK",1; },{ callfunc "Sample"; },{}

or just simply added the function ..hmm

 

you need @reloaditemdb and have them to relog / re-equip the item to make the effect take place.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Try this one instead : 

function    script    Card    {
    setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
    set .size, getarraysize(.Card);
    for ( set .@i,0; .@i < .size; set .@i,.@i+1 ) {
        if ( isequippedcnt(.Card[.@i]) > 2 ) {
            dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
            nude;
        }
    }
    return;
}
Edited by Patskie
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Try this one instead : 

function    script    Card    {
    setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
    set .size, getarraysize(.Card);
    for ( set .@i,0; .@i < .size; set .@i,.@i+1 ) {
        if ( isequippedcnt(.Card[.@i]) > 2 ) {
            dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
            nude;
        }
    }
    end;
}

 

it did not work ):

 

this how i have it on my restricted cards

 

4430,Ifrit_Card,Ifrit Card,6,20,,10,,,,,,,,136,,,,,{ bonus bBaseAtk,(JobLevel/1); bonus bCritical,(JobLevel/8); bonus bHit,(JobLevel/5); bonus bAspdRate,50; bonus3 bAutoSpellWhenHit,"NPC_EARTHQUAKE",2,10; },{ callfunc "Card"; },{}

What's wrong ):?

 

function	script	Card	{
setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
set .size, getarraysize(.Card);
for ( set .@i,0; .@i < .size; set .@i,.@i+1 ) {
if ( isequippedcnt(.Card[.@i]) > 2 ) {
dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
nude;
}
}
end;
}

i puted tabs and everything ):

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Edited my previous post. Change end to return. Sorry i don't have the time to check on my local server so bare with me :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Edited my previous post. Change end to return. Sorry i don't have the time to check on my local server so bare with me :)

 

sorry sir the problem persists, nothing happens ):

3t3c.png

function	script	Card	{
	setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
	set .size, getarraysize(.Card);
	for ( set .@i,0; .@i < .size; set .@i,.@i+1 ) {
		if ( isequippedcnt(.Card[.@i]) > 2 ) {
		dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
		nude;
		}
	}
	return;
}

sorry for bother you this much

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

-   script    Card    -1,{
    setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
    for ( set .@i,0; .@i < getarraysize(.Card); set .@i,.@i+1 ) {
        if ( isequippedcnt(.Card[.@i]) > 2 ) {
        dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
        nude;
        }
    }
    return;
}

Try this? Why you are using function?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

-   script    Card    -1,{
    setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
    for ( set .@i,0; .@i < getarraysize(.Card); set .@i,.@i+1 ) {
        if ( isequippedcnt(.Card[.@i]) > 2 ) {
        dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
        nude;
        }
    }
    return;
}

Try this? Why you are using function?

nope still not working, i were abble to equip 2 hw card and 2 ifrits (testing of course with my gm) 

-	script	Card	-1,{
    setarray .Card[0],4357,4359,4361,4363,4365,4367,4457,4463,4462,4459,4456,4458,4441,4408,4430,4263,4403,4419,4376,4399,4407,4451;
    for ( set .@i,0; .@i < getarraysize(.Card); set .@i,.@i+1 ) {
        if ( isequippedcnt(.Card[.@i]) > 2 ) {
        dispbottom "Superaste el limite de 2 cartas restringidas, por favor usa maximo dos.";
        nude;
        }
    }
    return;
}

i found that script on google an started to use it becaus im unskilled on scripting ): and i requested befor for an mvp card restrict but the psot was kinda ignored

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Do you want to enable only one card not two?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Do you want to enable only one card not two?

 

i want to make allow the use of max of 2 of selected mvp card, they can be the same or they can be combined, for example

 

1 ifrit + 1 kiel =  ok

1 ifrit + 1 ifrit = ok

1 ifrit + 1 kiel + 1 ifrit = both 3 cards loose its effects or all items are un-equiped

 

All mvp cards tha have the "callfunc "Card";" script like the ifrit one o:!

4430,Ifrit_Card,Ifrit Card,6,20,,10,,,,,,,,136,,,,,{ bonus bBaseAtk,(JobLevel/1); bonus bCritical,(JobLevel/8); bonus bHit,(JobLevel/5); bonus bAspdRate,50; bonus3 bAutoSpellWhenHit,"NPC_EARTHQUAKE",2,10; },{ callfunc "Card"; },{}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Do you want to enable only one card not two?

 

allright maybe i just asked too much, i just want to make that script to work

when more than 2 of the ids of items on the script are equiped on, they will get its equipments off

that is what the script is supposed to do, but for example when i equip ID 4367 and 4457 the equipments won't get off

please, im so sad because some of my players leave my server for the over powered players that has many mvps

 

thanks i hope you guys can help me im begging

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Emistry one : 


 


Item Combo Restriction [ LHZ Card ]


 


Just change the id number


  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Emistry one : 

 

Item Combo Restriction [ LHZ Card ]

 

Just change the id number

 

it did not work ): or do i have to shutdown the server and then turn it on?

because i added it and i also did @reloadscript but i'm still able to equip them ):

esAw0vT.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Emistry one : 

 

Item Combo Restriction [ LHZ Card ]

 

Just change the id number

 

 

did you do like this ?

4357,B_Seyren_Card,Lord Knight Card,6,20,,10,,,,,,,,769,,,,,{  skill "LK_BERSERK",1; },{ callfunc "Sample"; },{}

or just simply added the function ..hmm

 

you need @reloaditemdb and have them to relog / re-equip the item to make the effect take place.

 

thanks now it works :´D i hope i will recover some players, this will help, thanks again :´3!

Link to comment
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.   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.

×
×
  • Create New...