rizsu0107 Posted August 4, 2023 Posted August 4, 2023 - Id: 55073 AegisName: _Cocodrilo_Charm Name: Cocodrilo Charm Type: Charm Buy: 948 Weight: 10 Trade: NoSell: true NoDrop: true Script: | bonus bDef2,1; bonus bAllStats,5; bonus bAddMaxWeight,10000; bonus2 bAddClass,Class_All,10; bonus2 bMagicAddClass,Class_All,10; skill 257,5; skill 249,5; if ( countitem( 55073 ) >= 2){ message strcharinfo(0),"You can only use 1x "+getitemname(55073)+"! All same charm(s) has been disabled."; bonus bAllStats,-5; bonus bAddMaxWeight,-10000; bonus2 bAddClass,Class_All,-10; bonus2 bMagicAddClass,Class_All,-10; } Hello in my item script, I want to disable the skill 249,5; and skill 257,5; when a player have the same item. I tried disabling it with this skill 249,-5; also tried with skill 249,0; but nothing works. Quote
KazumaSatou Posted August 4, 2023 Posted August 4, 2023 2 hours ago, rizsu0107 said: - Id: 55073 AegisName: _Cocodrilo_Charm Name: Cocodrilo Charm Type: Charm Buy: 948 Weight: 10 Trade: NoSell: true NoDrop: true Script: | bonus bDef2,1; bonus bAllStats,5; bonus bAddMaxWeight,10000; bonus2 bAddClass,Class_All,10; bonus2 bMagicAddClass,Class_All,10; skill 257,5; skill 249,5; if ( countitem( 55073 ) >= 2){ message strcharinfo(0),"You can only use 1x "+getitemname(55073)+"! All same charm(s) has been disabled."; bonus bAllStats,-5; bonus bAddMaxWeight,-10000; bonus2 bAddClass,Class_All,-10; bonus2 bMagicAddClass,Class_All,-10; } Hello in my item script, I want to disable the skill 249,5; and skill 257,5; when a player have the same item. I tried disabling it with this skill 249,-5; also tried with skill 249,0; but nothing works. - Id: 55073 AegisName: _Cocodrilo_Charm Name: Cocodrilo Charm Type: Charm Buy: 948 Weight: 10 Trade: NoSell: true NoDrop: true Script: | if ( countitem( 55073 ) < 2){ bonus bDef2,1; bonus bAllStats,5; bonus bAddMaxWeight,10000; bonus2 bAddClass,Class_All,10; bonus2 bMagicAddClass,Class_All,10; skill 257,5; skill 249,5; } else { message strcharinfo(0),"You can only use 1x "+getitemname(55073)+"! All same charm(s) has been disabled."; bonus bDef2,1; } Try this. Quote
rizsu0107 Posted August 4, 2023 Author Posted August 4, 2023 5 hours ago, KazumaSatou said: - Id: 55073 AegisName: _Cocodrilo_Charm Name: Cocodrilo Charm Type: Charm Buy: 948 Weight: 10 Trade: NoSell: true NoDrop: true Script: | if ( countitem( 55073 ) < 2){ bonus bDef2,1; bonus bAllStats,5; bonus bAddMaxWeight,10000; bonus2 bAddClass,Class_All,10; bonus2 bMagicAddClass,Class_All,10; skill 257,5; skill 249,5; } else { message strcharinfo(0),"You can only use 1x "+getitemname(55073)+"! All same charm(s) has been disabled."; bonus bDef2,1; } Try this. The skill is still there. Quote
WhiteEagle Posted August 5, 2023 Posted August 5, 2023 Maybe change the flag for skill: Flag constants: 0 - SKILL_PERM 1 - SKILL_TEMP 2 - SKILL_TEMPLEVEL 3 - SKILL_PERM_GRANT Like skill 249,5,1; Quote
rizsu0107 Posted August 10, 2023 Author Posted August 10, 2023 (edited) On 8/5/2023 at 5:25 PM, WhiteEagle said: Maybe change the flag for skill: Flag constants: 0 - SKILL_PERM 1 - SKILL_TEMP 2 - SKILL_TEMPLEVEL 3 - SKILL_PERM_GRANT Like skill 249,5,1; omg it works. thank you so much! Edited August 10, 2023 by rizsu0107 Quote
rizsu0107 Posted August 10, 2023 Author Posted August 10, 2023 On 8/5/2023 at 5:25 PM, WhiteEagle said: Maybe change the flag for skill: Flag constants: 0 - SKILL_PERM 1 - SKILL_TEMP 2 - SKILL_TEMPLEVEL 3 - SKILL_PERM_GRANT Like skill 249,5,1; hello again, how about for this script. how can I disable it if having 2 of the same item? Quote
rizsu0107 Posted August 10, 2023 Author Posted August 10, 2023 10 minutes ago, rizsu0107 said: hello again, how about for this script. how can I disable it if having 2 of the same item? solved Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.