Make a certain npc destroys a certain block

Description: Have idea for a script, but you can't make it? Post it here!
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

fnafan8888888888 M
Topic author, Count
Count
fnafan8888888888 M
Topic author, Count
Count
Age: 18
Reputation: 23
Posts: 211
Joined: 30 Jun 2019

Post #1by fnafan8888888888 » 24 Nov 2019, 2:03

I request that script because just like in New Super Mario Bros U where the Giant Koopa Shells destroy the tiny bricks without turning to the other side, for example I want npc-172 and npc-174 to destroy Brick Blocks.

Lx Xzit M
Moderator
Moderator
Avatar
Lx Xzit M
Moderator
Moderator
Reputation: 376
Posts: 748
Joined: 9 Nov 2015
Website

Post #2by Lx Xzit » 24 Nov 2019, 8:21

Use it with parallel execution. Any shell with this code will be able to break blocks continuously.

Code: Select all

with npc(sysval(param1))
  if .ivala = 1 then
   .ivalb = itrcreate(11, 0, .x+.xsp, .y, .width, .height)
    do
      .ivalc = itrnext(.ivalb)
      if .ivalc > 0 then
        with block(.ivalc)
          if .id = 4 or .id = 188 or .id = 60 or .id = 226 then
            .state = 1
       call audioset(2, 3, 0, "hit")
          end if
        end with
      else
        exit do
      end if
    loop
    call berase(0, .ivalb)
  end if
end with
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

fnafan8888888888 M
Topic author, Count
Count
fnafan8888888888 M
Topic author, Count
Count
Age: 18
Reputation: 23
Posts: 211
Joined: 30 Jun 2019

Post #3by fnafan8888888888 » 24 Nov 2019, 16:46

Lx Xzit wrote:Use it with parallel execution. Any shell with this code will be able to break blocks continuously.

Code: Select all

with npc(sysval(param1))
 if .ivala = 1 then
 .ivalb = itrcreate(11, 0, .x+.xsp, .y, .width, .height)
 do
 .ivalc = itrnext(.ivalb)
 if .ivalc > 0 then
 with block(.ivalc)
 if .id = 4 or .id = 188 or .id = 60 or .id = 226 then
 .state = 1
 call audioset(2, 3, 0, "hit")
 end if
 end with
 else
 exit do
 end if
 loop
 call berase(0, .ivalb)
 end if
end with
Thank you so much :good:

fnafan8888888888 M
Topic author, Count
Count
fnafan8888888888 M
Topic author, Count
Count
Age: 18
Reputation: 23
Posts: 211
Joined: 30 Jun 2019

Post #4by fnafan8888888888 » 27 Dec 2019, 17:10

Lx Xzit wrote:Use it with parallel execution. Any shell with this code will be able to break blocks continuously.

Code: Select all

with npc(sysval(param1))
 if .ivala = 1 then
 .ivalb = itrcreate(11, 0, .x+.xsp, .y, .width, .height)
 do
 .ivalc = itrnext(.ivalb)
 if .ivalc > 0 then
 with block(.ivalc)
 if .id = 4 or .id = 188 or .id = 60 or .id = 226 then
 .state = 1
 call audioset(2, 3, 0, "hit")
 end if
 end with
 else
 exit do
 end if
 loop
 call berase(0, .ivalb)
 end if
end with
Will this script work if I set it to Banzai Bill?

Lx Xzit M
Moderator
Moderator
Avatar
Lx Xzit M
Moderator
Moderator
Reputation: 376
Posts: 748
Joined: 9 Nov 2015
Website

Post #5by Lx Xzit » 28 Dec 2019, 7:33

yes, but then remove the line "if .ivala = 1" (which is exclusively for shells) and its respective "end if" (the line above End With)
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

fnafan8888888888 M
Topic author, Count
Count
fnafan8888888888 M
Topic author, Count
Count
Age: 18
Reputation: 23
Posts: 211
Joined: 30 Jun 2019

Post #6by fnafan8888888888 » 28 Dec 2019, 13:29

Lx Xzit wrote:yes, but then remove the line "if .ivala = 1" (which is exclusively for shells) and its respective "end if" (the line above End With)
OK, thanks :)


Return to “Script requests”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest