Jump to content
  • 0

Restriction of Card


Zikoziz

Question


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   16
  • Joined:  12/19/13
  • Last Seen:  

 

Hi,

I'm developing a script for restricting mvp cards on maps of woe

and its really doing is restricting the use of all mvp cards in the server

I post the script function and the card function

 

Script function



function script Card {

OnPCLoadMapEvent:
if (strcharinfo(3) == @Maps$[.@i]) {
atcommand "@storeall "+ strcharinfo(0);
for( set .@i,0; .@i<getarraysize(.Card$); set .@i,.@i+1 ) {
if ( isequipped(.Card$[.@i]) == 1 ) {
set @Card$,@Card$+1;
if ( @Card$ > 1){
dispbottom "No puedes usar más de una MvP card acá.";
set @Card$,0;
nude;
}
}
}
setarray .Card$[0],4357,4361,4363,4365,4367;
setarray .Maps$[0],
"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05",
"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05",
"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05",
"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05",
"arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05",
"schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05";

}
end;
}
aldeg_cas01 mapflag loadevent
aldeg_cas02 mapflag loadevent
aldeg_cas03 mapflag loadevent
aldeg_cas04 mapflag loadevent
aldeg_cas05 mapflag loadevent
gefg_cas01 mapflag loadevent
gefg_cas02 mapflag loadevent
gefg_cas03 mapflag loadevent
gefg_cas04 mapflag loadevent
gefg_cas05 mapflag loadevent
prtg_cas01 mapflag loadevent
prtg_cas02 mapflag loadevent
prtg_cas03 mapflag loadevent
prtg_cas04 mapflag loadevent
prtg_cas05 mapflag loadevent
schg_cas01 mapflag loadevent
schg_cas02 mapflag loadevent
schg_cas03 mapflag loadevent
schg_cas04 mapflag loadevent
schg_cas05 mapflag loadevent
arug_cas01 mapflag loadevent
arug_cas02 mapflag loadevent
arug_cas03 mapflag loadevent
arug_cas04 mapflag loadevent
arug_cas05 mapflag loadevent


 

Script item_db

add---> callfunc "Card"



4357,B_Seyren_Card,Lord Knight Card,6,20,,10,,,,,,,,769,,,,,{ callfunc "Card"; skill "LK_BERSERK",1; bonus bMaxHPrate,-50; },{},{}
4361,B_Harword_Card,MasterSmith Card,6,20,,10,,,,,,,,2,,,,,{ callfunc "Card"; bonus bBreakWeaponRate,1000; bonus bBreakArmorRate,700; },{},{}
4363,B_Magaleta_Card,High Priest Card,6,20,,10,,,,,,,,16,,,,,{ callfunc "Card"; bonus5 bAutoSpellWhenHit,"HP_ASSUMPTIO",5,50,BF_WEAPON|BF_MAGIC,0; },{},{}
4365,B_Katrinn_Card,High Wizard Card,6,20,,10,,,,,,,,769,,,,,{ bonus2 bIgnoreMdefClassRate,Class_Normal,100; bonus bVariableCastrate,100; bonus bSPrecovRate,-100; },{},{ heal 0,-2000; }
4367,B_Shecil_Card,Sniper Card,6,20,,10,,,,,,,,2,,,,,{ callfunc "Card"; bonus2 bHpDrainRate,100,20; bonus bHPrecovRate,-10; },{},{}



Example: The skill "Bersek" disappears

 

thump_2269623error.png

 

 

PS: The item_db don't show any error to

 


please helpme!!!!

Regards


 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   27
  • Joined:  12/05/13
  • Last Seen:  

I don't understand much what you're script is trying to do, but why not just use this method instead?

http://rathena.org/board/topic/99346-how-to-disable-maya-purple-card-during-woe/#entry274609

 

It's easier to do, and won't give you any trouble.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  07/08/12
  • Last Seen:  


He is trying to allow only one mvp card on a specific map. I think so.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   16
  • Joined:  12/19/13
  • Last Seen:  

No need mapflag only script

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