~Hakurei Shrine~ > Rika and Nitori's Garage Experiments
Custom scripts by Frazer
(1/3) > >>
Frazer:
I want to show off a few scripts of a spellcard on the four different difficulties (easy, normal, hard & lunatic) I have made in minutes. This is one of the few scripts (of many test ones) of which I have actually even tried to make a spellcard, even if by accident.

Comments and opinions would be appreciated.



EDIT: Lowered the speed to make the spell cards slightly easier.



Blossom Sign - Blooming Flower ~ Easy

--- Code: ---#TouhouDanmakufu
#Title[Blooming Flower Easy]
#Text[Test script]
#Image[.\img\Scarletsign.png]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {

let ImgBoss = "script\img\ExRumia.png";

let count = 0;
let count2 = 0;
let num = 240;
let a = 0;
let b = 180;
let speed = 1;

@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);

SetMovePosition02(225, 120, 60);
CutIn(YOUMU, "Blossom Sign "\""Blooming Flower"\", "", 0, 0, 0, 0);

LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
}

@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);

SetShotAutoDeleteClip(200, 200, 200, 200);

if(count == 60){
loop(num){
CreateShotA(1, GetX, GetY, 0);
SetShotDataA(1, 0, speed-1, a, 4, -0.15, 0, GREEN12);
SetShotDataA(1, 60, speed, a+180, 8, 0, 6, RED12);
SetShotDataA(1, 90, NULL, NULL, 0, 0, 6, RED12);

a += 19;
speed += 0.008;

FireShot(1);
}
}

speed = 1;


if(count == 120){
loop(num){
CreateShotA(2, GetX, GetY, 0);
SetShotDataA(2, 0, speed-1, b, -4, -0.15, 0, GREEN12);
SetShotDataA(2, 60, speed, b+180, -8, 0, 6, YELLOW12);
SetShotDataA(2, 90, NULL, NULL, 0, 0, 6, YELLOW12);

b -= 19;
speed += 0.008;

FireShot(2);
}

speed = 1;

count=0
}



if(count2 == 60){
SetMovePositionRandom01(50,20,5,GetClipMinX()+100,30,GetClipMaxX()-100,100);

count2 = 0;
}

count++;
count2++;
}

@DrawLoop {
DrawGraphic(GetX, GetY);
}

@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---




Blossom Sign - Blooming Flower ~ Normal

--- Code: ---#TouhouDanmakufu
#Title[Blooming Flower Normal]
#Text[Test script]
#Image[.\img\Scarletsign.png]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {

let ImgBoss = "script\img\ExRumia.png";

let count = 60;
let count2 = 0;
let num = 480;
let a = 0;
let b = 180;
let speed = 1;

@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);

SetMovePosition02(225, 120, 60);
CutIn(YOUMU, "Blossom Sign "\""Blooming Flower"\", "", 0, 0, 0, 0);

LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
}

@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);

SetShotAutoDeleteClip(200, 200, 200, 200);

if(count == 120){
loop(num){
CreateShotA(1, GetX, GetY, 0);
SetShotDataA(1, 0, speed-1, a, 4, -0.25, 0, GREEN12);
SetShotDataA(1, 60, speed, a+180, 8, 0, 6, RED12);
SetShotDataA(1, 90, NULL, NULL, 0, 0, 6, RED12);

a += 10;
speed += 0.008;

FireShot(1);
}
}

speed = 1;


if(count == 240){
loop(num){
CreateShotA(2, GetX, GetY, 0);
SetShotDataA(2, 0, speed-1, b, -4, -0.25, 0, GREEN12);
SetShotDataA(2, 60, speed, b+180, -8, 0, 6, YELLOW12);
SetShotDataA(2, 90, NULL, NULL, 0, 0, 6, YELLOW12);

b -= 10;
speed += 0.008;

FireShot(2);
}

speed = 1;

count=0
}



if(count2 == 120){
SetMovePositionRandom01(50,20,5,GetClipMinX()+100,30,GetClipMaxX()-100,100);

count2 = 0;
}

count++;
count2++;
}

@DrawLoop {
DrawGraphic(GetX, GetY);
}

@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---




Blossom Sign - Blooming Roses and Violets ~ Hard

--- Code: ---#TouhouDanmakufu
#Title[Blooming Roses and Violets Hard]
#Text[Test script]
#Image[.\img\Scarletsign.png]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {

let ImgBoss = "script\img\ExRumia.png";

let count = 0;
let count2 = 0;
let num = 480;
let a = 0;
let b = 180;
let speed = 1;

@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);

SetMovePosition02(225, 120, 60);
CutIn(YOUMU, "Blossom Sign "\""Blooming Roses and Violets"\", "", 0, 0, 0, 0);

LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
}

@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);

SetShotAutoDeleteClip(200, 200, 200, 200);

if(count == 60){
loop(num){
CreateShotA(1, GetX, GetY, 0);
SetShotDataA(1, 0, speed-1, a, 4, -0.15, 0, GREEN12);
SetShotDataA(1, 60, speed, a+180, 4, 0, 6, RED12);
SetShotDataA(1, 90, NULL, NULL, 0, 0, 6, RED12);

a += 10;
speed += 0.008;

FireShot(1);
}
}

speed = 1;


if(count == 120){
loop(num){
CreateShotA(2, GetX, GetY, 0);
SetShotDataA(2, 0, speed-1, b, -4, -0.15, 0, GREEN12);
SetShotDataA(2, 60, speed, b+180, -4, 0, 6, BLUE12);
SetShotDataA(2, 90, NULL, NULL, 0, 0, 6, BLUE12);

b -= 10;
speed += 0.008;

FireShot(2);
}

speed = 1;

count=0
}



if(count2 == 60){
SetMovePositionRandom01(50,20,5,GetClipMinX()+100,30,GetClipMaxX()-100,100);

count2 = 0;
}

count++;
count2++;
}

@DrawLoop {
DrawGraphic(GetX, GetY);
}

@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---





Blossom Sign - Blooming Roses and Violets ~ Lunatic

--- Code: ---#TouhouDanmakufu
#Title[Blooming Roses and Violets Lunatic]
#Text[Test script]
#Image[.\img\Scarletsign.png]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {

let ImgBoss = "script\img\ExRumia.png";

let count = 0;
let count2 = 0;
let num = 480;
let a = 0;
let b = 180;
let speed = 1;

@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);

SetMovePosition02(225, 120, 60);
CutIn(YOUMU, "Blossom Sign "\""Blooming Roses and Violets"\", "", 0, 0, 0, 0);

LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
}

@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);

SetShotAutoDeleteClip(200, 200, 200, 200);

if(count == 60){
loop(num){
CreateShotA(1, GetX, GetY, 0);
SetShotDataA(1, 0, speed-1, a, 4, -0.15, 0, GREEN12);
SetShotDataA(1, 60, speed, a+180, 8, 0, 6, RED12);
SetShotDataA(1, 90, NULL, NULL, 0, 0, 6, RED12);

a += 10;
speed += 0.008;

FireShot(1);
}
}

speed = 1;


if(count == 120){
loop(num){
CreateShotA(2, GetX, GetY, 0);
SetShotDataA(2, 0, speed-1, b, -4, -0.15, 0, GREEN12);
SetShotDataA(2, 60, speed, b+180, -8, 0, 6, BLUE12);
SetShotDataA(2, 90, NULL, NULL, 0, 0, 6, BLUE12);

b -= 10;
speed += 0.008;

FireShot(2);
}

speed = 1;

count=0
}



if(count2 == 60){
SetMovePositionRandom01(50,20,5,GetClipMinX()+100,30,GetClipMaxX()-100,100);

count2 = 0;
}

count++;
count2++;
}

@DrawLoop {
DrawGraphic(GetX, GetY);
}

@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---
Drake:
The green ones don't do anything, and you could do with a little speed reduction. It's pretty good, though.
Naut:
The flowers are spawned green, then change to either blue or red. Speed does seem a bit much for lunatic, but I'm certainly not gonna complain. It's a really cool effect, good stuff.
Frazer:
The reason the bullets start out green is to imitate a bud before bloom. Then they change color when the buds bloom. The green ones are the ones that change color into red, blue and yellow flowers.

And I will keep the speed reduction suggestion in mind.
Frazer:
Here is another spell card of mine that I made before. Personally, I like it even how it is right now.






--- Code: ---#TouhouDanmakufu
#Title[Dreadnought "The Faring Assault"]
#Text[Test script]
#Image[.\img\Dreadnought.bmp]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
let ImgBoss = "script\thC\IMAGE\CHAR\DOT\boss_remilia.png";

let count = 0;
let time = 0;

@Initialize {
SetLife(1);
SetTimer(50);
SetScore(1000000);
SetDamageRate(0, 0);
SetDurableSpellCard;

SetMovePosition02(225, 200, 60);
CutIn(YOUMU, "Dreadnought "\""The Faring Assault"\", "", 0, 0, 0, 0);

LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 128, 128);
}

@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);

if(count == 120){
PlaySE("lib\THCCL\SE\lazer01.wav");
CreateLaserB(1, 1, 20, RED02, 0);
SetLaserDataB(1, 0, 6, 0, 0, 0, 0, 45, 0);
SetLaserDataB(1, 60, 0, 0, 0, 0, 0, 45, 0);
SetLaserDataB(1, 120, 0, NULL, 0, NULL, 0, NULL, -2);
SetLaserDataB(1, 180, 0, NULL, 0, NULL, 0, NULL, 4);
SetLaserDataB(1, 210, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(1, 400, 0, NULL, 0, NULL, 0, NULL, 0.7);
SetLaserDataB(1, 915, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(1, 960, 0, NULL, 0, NULL, 0, NULL, -2);
SetLaserDataB(1, 1020, 0, NULL, 0, NULL, 0, NULL, 4);
SetLaserDataB(1, 1060, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(1, 1100, 0, NULL, 0, NULL, 0, NULL, -0.5);
SetLaserDataB(1, 1130, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(1, 1330, 0, NULL, 0, NULL, 0, NULL, -0.5);
SetLaserDataB(1, 1380, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(1, 1600, 0, NULL, 0, NULL, 0, NULL, -0.7);
SetLaserDataB(1, 2115, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(1, 2180, 0, NULL, 0, NULL, 0, NULL, -3);
SetLaserDataB(1, 2240, 0, NULL, 0, NULL, 0, NULL, 4);
SetLaserDataB(1, 2285, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(1, 2315, 0, NULL, 0, NULL, 0, NULL, -0.5);

CreateLaserB(3, 1, 20, RED02, 0);
SetLaserDataB(3, 0, 6, 0, 0, 0, 0, 135, 0);
SetLaserDataB(3, 60, 0, 0, 0, 0, 0, 135, 0);
SetLaserDataB(3, 270, 0, NULL, 0, NULL, 0, NULL, 2);
SetLaserDataB(3, 330, 0, NULL, 0, NULL, 0, NULL, -4);
SetLaserDataB(3, 360, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(3, 400, 0, NULL, 0, NULL, 0, NULL, 0.7);
SetLaserDataB(3, 915, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(3, 960, 0, NULL, 0, NULL, 0, NULL, 2);
SetLaserDataB(3, 1020, 0, NULL, 0, NULL, 0, NULL, -4);
SetLaserDataB(3, 1060, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(3, 1100, 0, NULL, 0, NULL, 0, NULL, 0.5);
SetLaserDataB(3, 1130, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(3, 1330, 0, NULL, 0, NULL, 0, NULL, 0.5);
SetLaserDataB(3, 1380, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(3, 1600, 0, NULL, 0, NULL, 0, NULL, -0.7);
SetLaserDataB(3, 2115, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(3, 2180, 0, NULL, 0, NULL, 0, NULL, 3);
SetLaserDataB(3, 2240, 0, NULL, 0, NULL, 0, NULL, -4);
SetLaserDataB(3, 2285, 0, NULL, 0, NULL, 0, NULL, 0);
SetLaserDataB(3, 2315, 0, NULL, 0, NULL, 0, NULL, 0.5);

ascent(i in 1..10){
    CreateShotA(2, 0, 0, 10);
    SetShotDataA(2, 0, 3, 90, 0, 0, 3, RED11);
    CreateShotA(4, 0, 0, 10);
    SetShotDataA(4, 0, 3, 90, 0, 0, 3, RED11);
    CreateShotA(5, 0, 0, 10);
    SetShotDataA(5, 0, 3, 90, 0, 0, 3, RED11);
    CreateShotA(9, 0, 0, 10);
    SetShotDataA(9, 0, 3, 90, 0, 0, 3, RED11);
    CreateShotA(10, 0, 0, 10);
    SetShotDataA(10, 0, 3, 90, 0, 0, 3, RED11);
    CreateShotA(11, 0, 0, 10);
    SetShotDataA(11, 0, 3, 90, 0, 0, 3, RED11);
    CreateShotA(15, 0, 0, 10);
    SetShotDataA(15, 0, 3, 90, 0, 0, 3, RED11);
    CreateShotA(16, 0, 0, 10);
    SetShotDataA(16, 0, 3, 90, 0, 0, 3, RED11);
    CreateShotA(17, 0, 0, 10);
    SetShotDataA(17, 0, 3, 90, 0, 0, 3, RED11);

    CreateShotA(6, 0, 0, 10);
    SetShotDataA(6, 0, 3, -90, 0, 0, 3, RED11);
    CreateShotA(7, 0, 0, 10);
    SetShotDataA(7, 0, 3, -90, 0, 0, 3, RED11);
    CreateShotA(8, 0, 0, 10);
    SetShotDataA(8, 0, 3, -90, 0, 0, 3, RED11);
    CreateShotA(12, 0, 0, 10);
    SetShotDataA(12, 0, 3, -90, 0, 0, 3, RED11);
    CreateShotA(13, 0, 0, 10);
    SetShotDataA(13, 0, 3, -90, 0, 0, 3, RED11);
    CreateShotA(14, 0, 0, 10);
    SetShotDataA(14, 0, 3, -90, 0, 0, 3, RED11);
    CreateShotA(18, 0, 0, 10);
    SetShotDataA(18, 0, 3, -90, 0, 0, 3, RED11);
    CreateShotA(19, 0, 0, 10);
    SetShotDataA(19, 0, 3, -90, 0, 0, 3, RED11);
    CreateShotA(20, 0, 0, 10);
    SetShotDataA(20, 0, 3, -90, 0, 0, 3, RED11);

    AddShot(i*3+180, 1, 2, 20);
    AddShot(i*3+180, 1, 4, 100);
    AddShot(i*3+180, 1, 5, 180);
    AddShot(i*3+1020, 1, 9, 20);
    AddShot(i*3+1020, 1, 10, 100);
    AddShot(i*3+1020, 1, 11, 180);

    AddShot(i*3+330, 3, 6, 20);
    AddShot(i*3+330, 3, 7, 100);
    AddShot(i*3+330, 3, 8, 180);
    AddShot(i*3+1020, 3, 12, 20);
    AddShot(i*3+1020, 3, 13, 100);
    AddShot(i*3+1020, 3, 14, 180);
}

ascent(i in 1..100){
    CreateShotA(15, 0, 0, 10);
    SetShotDataA(15, 0, 3, 90, 0, 0, 3, RED12);
    CreateShotA(16, 0, 0, 10);
    SetShotDataA(16, 0, 3, 90, 0, 0, 3, RED12);
    CreateShotA(17, 0, 0, 10);
    SetShotDataA(17, 0, 3, 90, 0, 0, 3, RED12);

    CreateShotA(18, 0, 0, 10);
    SetShotDataA(18, 0, 3, -90, 0, 0, 3, RED12);
    CreateShotA(19, 0, 0, 10);
    SetShotDataA(19, 0, 3, -90, 0, 0, 3, RED12);
    CreateShotA(20, 0, 0, 10);
    SetShotDataA(20, 0, 3, -90, 0, 0, 3, RED12);

    AddShot(i*7+2240, 1, 15, 20);
    AddShot(i*7+2240, 1, 16, 100);
    AddShot(i*7+2240, 1, 17, 180);

    AddShot(i*7+2240, 3, 18, 20);
    AddShot(i*7+2240, 3, 19, 100);
    AddShot(i*7+2240, 3, 20, 180);
}

FireShot(1);
FireShot(3);
}


if(count == 1220){
SetShotDirectionType(PLAYER);
    CreateShot01(GetX, GetY, 8, 0, RED02, 0);

count=1215;
}


if(time==1290){
count=1221;
}


if(count == 1250){
SetShotDirectionType(PLAYER);
    CreateShot01(GetX, GetY, 8, 0, RED02, 0);

count=1245;
}


if(time==1380){
count=1251;
}


if(count == 1280){
SetShotDirectionType(PLAYER);
    CreateShot01(GetX, GetY, 8, 10, RED02, 0);
    CreateShot01(GetX, GetY, 8, -10, RED02, 0);
    CreateShot01(GetX, GetY, 8, 0, RED01, 0);

count=1275;
}


if(time==1501){
count=1281;
}


if(count==1380){
SetShotDirectionType(PLAYER);
    CreateShot01(GetX, GetY, 8, 30, RED02, 0);
    CreateShot01(GetX, GetY, 8, -30, RED02, 0);
    CreateShot01(GetX, GetY, 8, 0, RED01, 0);

count=1375;
}


if(time==2181){
count=1381;
}
count++;
time++;
}

@DrawLoop {
DrawGraphic(GetX, GetY);
}

@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---
Navigation
Message Index
Next page

Go to full version