Seen January 10th, 2017
Posted April 21st, 2016
180 posts
5.5 Years
Oh that may be the case to be honest I just assumed it was 0xA for every multi-stat raising move. Let me look at Calm Mind to see if it also uses 0xA.
If you use a Pokemon with Dragon Dance + Shell Smash against a Zigzagoon with only Fake Tears, start with 2 Dragon Dances, and then go for a Shell Smash you will notice that neither of the defenses will lower when the regular defense should be going down.

I made this script a few weeks ago and cleaned it up a bit using yours as template. This is Quiver Dance and Shell Smash combined with Dragon Dance. I use Dragon Dance because I want the AI to recognize to use it when it wants to outspeed an opponent that is faster. I don't think the AI will act much differently if you choose to combine QDance with Calm Mind (My QDance is pretty much identical to yours).

I've tested this with all kinds of combinations and it should work. Note that this is for Emerald but should be easy to translate using the offsets in Mr. Ds's code. I made this based on the original Dragon Dance and Curse scripts combined.

EDIT: I noticed that my old effect did not pierce through White Smoke so I'm updating it with a fix. I believe yours has the same problem MrDollSteak. You can just change 0x1 TRUE @XX to 0x81 TRUE @XX and playstatanimation to 0x1 0x24 0x9 and it will work properly.

Credit to DoesntKnowHowToPlay's Hammer Arm Script for this fix.
Spoiler:
#dynamic 0x[Offset]
#freespacebyte 0xFF

#include moves.bsh

#org @start
jumpifhalfword 0x0 0x20241EA 0x[Attack# in Hex] @QDance
jumpifhalfword 0x0 0x20241EA 0x[Attack# in Hex] @ShellSmash
goto 0x82DA731

#org @QDance
attackcanceler
attackstring
ppreduce
jumpifstat 0x1 0x3 0x5 0xC @SpAtt
jumpifstat 0x1 0x3 0x4 0xC @SpAtt
jumpifstat 0x1 0x0 0x3 0xC 0x82DA71D

#org @SpAtt
attackanimation
waitanimation
setbyte 0x202448F 0x0
playstatchangeanimation 0x0 0x38 0x0
setbyte 0x202448E 0x14
statbuffchange 0x41 TRUE @SpDef
jumpifbyte 0x0 0x2024337 0x2 @SpDef
printfromtable 0x85CC89C
waitmessage 0x40

#org @SpDef
setbyte 0x202448E 0x15
statbuffchange 0x41 TRUE @Speed
jumpifbyte 0x0 0x2024337 0x2 @Speed
printfromtable 0x85CC89C
waitmessage 0x40

#org @Speed
setbyte 0x202448E 0x13
statbuffchange 0x41 TRUE 0x82DA790
jumpifbyte 0x0 0x2024337 0x2 0x82DA790
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x82D8A4E

#org @ShellSmash
attackcanceler
attackstring
ppreduce
jumpifstat 0x1 0x2 0x2 0x0 @DropDef
jumpifstat 0x1 0x2 0x5 0x0 @DropDef
jumpifstat 0x1 0x1 0x1 0xC @DropDef
jumpifstat 0x1 0x1 0x4 0xC @DropDef
jumpifstat 0x1 0x0 0x3 0xC 0x82DA71D

#org @DropDef
attackanimation
waitanimation
playstatchangeanimation 0x1 0x24 0x9
setbyte 0x202448E 0x92
statbuffchange 0x81 TRUE @DropSpDef
jumpifbyte 0x0 0x2024337 0x2 @DropSpDef
printfromtable 0x85CC8A8
waitmessage 0x40

#org @DropSpDef
setbyte 0x202448E 0x95
statbuffchange 0x81 TRUE @2Att
jumpifbyte 0x0 0x2024337 0x2 @2Att
printfromtable 0x85CC8A8
waitmessage 0x40

#org @2Att
setbyte 0x202448F 0x0
playstatchangeanimation 0x0 0x1A 0x0
setbyte 0x202448E 0x21
statbuffchange 0x41 TRUE @2SpAtt
jumpifbyte 0x0 0x2024337 0x2 @2SpAtt
printfromtable 0x85CC89C
waitmessage 0x40

#org @2SpAtt
setbyte 0x202448E 0x24
statbuffchange 0x41 TRUE @2Speed
jumpifbyte 0x0 0x2024337 0x2 @2Speed
printfromtable 0x85CC89C
waitmessage 0x40

#org @2Speed
setbyte 0x202448E 0x23
statbuffchange 0x41 TRUE 0x82DA790
jumpifbyte 0x0 0x2024337 0x2 0x82DA790
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x82D8A4E