[Tea-Script] SMB3 Power-up System

Description: You made a script? Submit it here to show your creation to the public, share, take reviews, provision of the help and support is here!
Moderators: Yoshi021, Lx Xzit, 5438A38A, TepigFan101, Moderators

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Reputation: 21
Posts: 126
Joined: 23 Jun 2016
Location: Socialist Federative Soviet Republic of the Mushrooms
Tencent QQ

Post #1by Super Mario Player » 7 Jul 2016, 15:26

I've finally got it to work; here's a script that lets you use the SMB3 system instead of the SMB1 one (if you dunno the difference, see this topic I've made).
Thanks to rotom407 for their support!

Here's the script:

Code: Select all

if Char(1).Status > 2 and Char(1).Status <> 11 then
v(a)=0
Do
Char(1).Status=2
call sleep(1)
v(a)=v(a)+1
Loop Until v(a)>20
end if


Attached a test level:
smb3_powerup.lvl
(3.65 KiB) Downloaded 120 times


To use it for your custom level, you must:
1- Create a new variable called "a";
2- Create a new script called "Hit" and copy/paste the code above in that script;
3- Create a new event called "Player - GotHurt" (the name must be this exact name) and click Others -> Scripts and there select the script "Hit".

Hope it'll be useful! :)
My current project:
Spoiler
The Legend of Zelda: The Curse of the Wise Men
Image

The Tower of Challenges

Languages I speak (if you want to PM me):
Spoiler
Image Image Image

Click to see my YouTube channel
Image

Lx Xzit M
Moderator
Moderator
Lx Xzit M
Moderator
Moderator
Reputation: 136
Posts: 427
Joined: 9 Nov 2015
Website

Post #2by Lx Xzit » 7 Jul 2016, 20:27

This is pretty interesting! I tried to do some minor modifications to the Script because here are some missing frames:
Spoiler
Image

I did the same for all the power-ups (except for mini-mushroom of course :P) BUT there's a weird problem at statuses >8, look at this:
Spoiler
Image

I've looked at the script at least 3 times and seems everything it's fine, I guess it's a bug of the game (I reported it here anyway).

This is the script if anyone is interested:

Code: Select all

'Fire Mario
if Char(1).Status > 2 and Char(1).Status = 3 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=3
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Leaf Mario
if Char(1).Status > 2 and Char(1).Status = 4 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=4
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Tanooki Mario
if Char(1).Status > 2 and Char(1).Status = 5 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=5
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Hammer Mario
if Char(1).Status > 2 and Char(1).Status = 6 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=6
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Ice Mario
if Char(1).Status > 2 and Char(1).Status = 7 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=7
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Frog Mario
if Char(1).Status > 2 and Char(1).Status = 8 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=8
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Shell Mario
if Char(1).Status > 2 and Char(1).Status = 9 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=9
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Propeller Mario
if Char(1).Status > 2 and Char(1).Status = 10 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=10
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if

'Penguin Mario
if Char(1).Status > 2 and Char(1).Status = 12 then
v(a)=0
Char(1).Status=2
do
Char(1).Status=12
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(a)=v(a)+1
Loop Until v(a)>4
end if
VISIT MY YOUTUBE CHANNEL! LX XZIT

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Reputation: 21
Posts: 126
Joined: 23 Jun 2016
Location: Socialist Federative Soviet Republic of the Mushrooms
Tencent QQ

Post #3by Super Mario Player » 8 Jul 2016, 0:17

I've noticed that too, when I tried to create a script that turns Mario into one particular form, and for statuses from 1 to 8 everything's fine, but for statuses from 9 to 12, Mario turns into Frog Mario instead of the form he's intended to take.
BTW, this glitch doesn't occur with the original script (the one with the missing frames), as these frames were - I believe, as rotom407 helped me a lot for this script - intentionally skipped to avoid the said animation glitch. I'll post that in the "Troubleshooting" section!
EDIT: It was already reported...
BTW I tested your script but it doesn't seem to work for me :/
Ignore what I said, I didn't copy/paste it for all power-ups
My current project:
Spoiler
The Legend of Zelda: The Curse of the Wise Men
Image

The Tower of Challenges

Languages I speak (if you want to PM me):
Spoiler
Image Image Image

Click to see my YouTube channel
Image

Lx Xzit M
Moderator
Moderator
Lx Xzit M
Moderator
Moderator
Reputation: 136
Posts: 427
Joined: 9 Nov 2015
Website

Post #4by Lx Xzit » 8 Jul 2016, 6:12

Okay I've made a little update (I don't know if I should make a new topic of this...)
Here's the code, now it works for Luigi too and I changed the name of the variables to "Mario" and "Luigi" (due "a" and "b" variables are the most used, I thought would be better use the variables with the name of the character, so that people can use this on their episodes easier).

I also removed the animation effects for statuses 9, 10 and 12, just like in the original Script you've posted. :>

Here's the code:

Code: Select all

'MAAAAAAARIO
'Fire Mario
if Char(1).Status > 2 and Char(1).Status = 3 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=3
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Leaf Mario
if Char(1).Status > 2 and Char(1).Status = 4 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=4
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Tanooki Mario
if Char(1).Status > 2 and Char(1).Status = 5 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=5
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Hammer Mario
if Char(1).Status > 2 and Char(1).Status = 6 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=6
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Ice Mario
if Char(1).Status > 2 and Char(1).Status = 7 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=7
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Frog Mario
if Char(1).Status > 2 and Char(1).Status = 8 then
v(Mario)=0
Char(1).Status=2
do
Char(1).Status=8
call Sleep(3.7)
Char(1).Status=2
call Sleep(3.7)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Shell Mario
if Char(1).Status > 2 and Char(1).Status = 9 then
v(Mario)=0
Do
Char(1).Status=2
call sleep(1)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Propeller Mario
if Char(1).Status > 2 and Char(1).Status = 10 then
v(Mario)=0
Do
Char(1).Status=2
call sleep(1)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

'Penguin Mario
if Char(1).Status > 2 and Char(1).Status = 12 then
v(Mario)=0
Do
Char(1).Status=2
call sleep(1)
v(Mario)=v(Mario)+1
Loop Until v(Mario)>4
end if

' LUIGIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
'Fire Luigi
if Char(2).Status > 2 and Char(2).Status = 3 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=3
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Leaf Luigi
if Char(2).Status > 2 and Char(2).Status = 4 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=4
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Tanooki Luigi
if Char(2).Status > 2 and Char(2).Status = 5 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=5
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Hammer Luigi
if Char(2).Status > 2 and Char(2).Status = 6 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=6
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Ice Luigi
if Char(2).Status > 2 and Char(2).Status = 7 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=7
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Frog Luigi
if Char(2).Status > 2 and Char(2).Status = 8 then
v(Luigi)=0
Char(2).Status=2
do
Char(2).Status=8
call Sleep(3.7)
Char(2).Status=2
call Sleep(3.7)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Shell Luigi
if Char(2).Status > 2 and Char(2).Status = 9 then
v(Luigi)=0
Do
Char(2).Status=2
call sleep(1)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Propeller Luigi
if Char(2).Status > 2 and Char(2).Status = 10 then
v(Luigi)=0
Do
Char(2).Status=2
call sleep(1)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if

'Penguin Luigi
if Char(2).Status > 2 and Char(2).Status = 12 then
v(Luigi)=0
Do
Char(2).Status=2
call sleep(1)
v(Luigi)=v(Luigi)+1
Loop Until v(Luigi)>4
end if


And here's an example level (basically the same you uploaded but with other variables):
smb3_powerup.lvl
(8.94 KiB) Downloaded 43 times
VISIT MY YOUTUBE CHANNEL! LX XZIT

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Reputation: 21
Posts: 126
Joined: 23 Jun 2016
Location: Socialist Federative Soviet Republic of the Mushrooms
Tencent QQ

Post #5by Super Mario Player » 8 Jul 2016, 15:50

I tested it and it looks good :good: you can make a new thread if you want
My current project:
Spoiler
The Legend of Zelda: The Curse of the Wise Men
Image

The Tower of Challenges

Languages I speak (if you want to PM me):
Spoiler
Image Image Image

Click to see my YouTube channel
Image

TheCreator520
Our friend
Our friend
Avatar
TheCreator520
Our friend
Our friend
Reputation: 38
Posts: 66
Joined: 21 Feb 2016

Post #6by TheCreator520 » 9 Jul 2016, 10:04

Not so complicated , just use this :

Code: Select all

Check1:
If char(1).Status > 2 Then
Check2:
If char(1).Status <= 2 Then
char(1).Status = 2
Else
Call sleep(1)
Goto Check2
End if
Elseif char(1).Status = 2 Then
End if
Call sleep(1)
Goto Check1
Image

rotom407 M
Nice citizen
Nice citizen
rotom407 M
Nice citizen
Nice citizen
Age: 19
Reputation: 1
Posts: 15
Joined: 28 Jun 2016

Post #7by rotom407 » 9 Jul 2016, 14:13

Let's make it even simpler. It's getting tricky now...
(executed when the player gets hurt)

Code: Select all

If char(1).Status > 2 Then
 Do
  If char(1).Status <= 2 Then
   char(1).Status = 2
   Exit Do
  End If
  Call sleep(1)
 Loop
End If

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Reputation: 21
Posts: 126
Joined: 23 Jun 2016
Location: Socialist Federative Soviet Republic of the Mushrooms
Tencent QQ

Post #8by Super Mario Player » 9 Jul 2016, 17:20

Thanks, I think your scripts are better than mine; I may use it in my episode. :good:
My current project:
Spoiler
The Legend of Zelda: The Curse of the Wise Men
Image

The Tower of Challenges

Languages I speak (if you want to PM me):
Spoiler
Image Image Image

Click to see my YouTube channel
Image

Lx Xzit M
Moderator
Moderator
Lx Xzit M
Moderator
Moderator
Reputation: 136
Posts: 427
Joined: 9 Nov 2015
Website

Post #9by Lx Xzit » 9 Jul 2016, 22:53

rotom407 wrote:Let's make it even simpler. It's getting tricky now...
(executed when the player gets hurt)

Code: Select all

If char(1).Status > 2 Then
 Do
  If char(1).Status <= 2 Then
   char(1).Status = 2
   Exit Do
  End If
  Call sleep(1)
 Loop
End If

Oh that's much better! By the way. I wonder if there's a way to remove the extra mushroom that appears on the item box. when you're Super Mario and become Fire Mario you'll have a mushroom in the item box plus the mushroom you have when you get hurt, there's a double mushroom, what makes the game be unfairly easy. Is there a way to remove this when it happen?
VISIT MY YOUTUBE CHANNEL! LX XZIT

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Reputation: 21
Posts: 126
Joined: 23 Jun 2016
Location: Socialist Federative Soviet Republic of the Mushrooms
Tencent QQ

Post #10by Super Mario Player » 9 Jul 2016, 23:29

Use Char(1).Itemrsrv to set what is in the player's item box
Edit: BTW, the value to assign to Char(1).Itemrsrv is the ID of the NPC to put in the item box, e.g. if you wanna put a Mushroom in the player's item box, assign it the value 9. The cool thing is that it also lets you put any NPC in their item box (although I think there's no point in putting a SMB3 Bowser in their item box, but the fact that it might be funny). Assign it the value 0 to delete whatever the player has in their item box.
My current project:
Spoiler
The Legend of Zelda: The Curse of the Wise Men
Image

The Tower of Challenges

Languages I speak (if you want to PM me):
Spoiler
Image Image Image

Click to see my YouTube channel
Image

Lx Xzit M
Moderator
Moderator
Lx Xzit M
Moderator
Moderator
Reputation: 136
Posts: 427
Joined: 9 Nov 2015
Website

Post #11by Lx Xzit » 17 Jul 2016, 9:19

Thanks for the tip! I will try it.
VISIT MY YOUTUBE CHANNEL! LX XZIT

Shadowblitz16
Close friend
Close friend
Shadowblitz16
Close friend
Close friend
Reputation: 13
Posts: 93
Joined: 15 Aug 2016

Post #12by Shadowblitz16 » 9 Oct 2016, 9:41

@Super Mario Player

Bug: In 2 player, Link loses his power up if Toad is hit while Link is in fairy mode.
I'm sure it happens in other scenarios but that's the characters I was using.

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Reputation: 21
Posts: 126
Joined: 23 Jun 2016
Location: Socialist Federative Soviet Republic of the Mushrooms
Tencent QQ

Post #13by Super Mario Player » 9 Oct 2016, 18:51

Shadowblitz16 wrote:@Super Mario Player

Bug: In 2 player, Link loses his power up if Toad is hit while Link is in fairy mode.
I'm sure it happens in other scenarios but that's the characters I was using.
Okay, did you use my script, or this of Lx Xzit, TheCreator520 or rotom407?
My current project:
Spoiler
The Legend of Zelda: The Curse of the Wise Men
Image

The Tower of Challenges

Languages I speak (if you want to PM me):
Spoiler
Image Image Image

Click to see my YouTube channel
Image

Shadowblitz16
Close friend
Close friend
Shadowblitz16
Close friend
Close friend
Reputation: 13
Posts: 93
Joined: 15 Aug 2016

Post #14by Shadowblitz16 » 9 Oct 2016, 22:52

@Super Mario Player
I uses Lx Xzit's from the post at 7 Jul 2016, 20:12

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Reputation: 21
Posts: 126
Joined: 23 Jun 2016
Location: Socialist Federative Soviet Republic of the Mushrooms
Tencent QQ

Post #15by Super Mario Player » 9 Oct 2016, 23:27

Shadowblitz16 wrote:@Super Mario Player
I uses Lx Xzit's from the post at 7 Jul 2016, 20:12
Try to use the built-in SMB3 Power-up system (Since the release of SMBX 1.4.3, it is now possible to set the power-up system to SMB3 via Events -> Others -> Special Events, then scroll down to find the SMB3 power-up system)
My current project:
Spoiler
The Legend of Zelda: The Curse of the Wise Men
Image

The Tower of Challenges

Languages I speak (if you want to PM me):
Spoiler
Image Image Image

Click to see my YouTube channel
Image

Shadowblitz16
Close friend
Close friend
Shadowblitz16
Close friend
Close friend
Reputation: 13
Posts: 93
Joined: 15 Aug 2016

Post #16by Shadowblitz16 » 10 Oct 2016, 1:20

wow didn't know that thanks

Toy Bonnie
Good citizen
Good citizen
Avatar
Toy Bonnie
Good citizen
Good citizen
Reputation: 6
Posts: 28
Joined: 11 Aug 2016

Post #17by Toy Bonnie » 1 Dec 2016, 2:36

We no longer need this script,because 38A made a SMB3 powerup system in SMBX 1.4.3.
:tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux:
Not :beta:
:whistle:
:windows: :bomb: :windows: :bomb: :windows: :bomb: :fox:

Super Mario Player M
Topic author, Duke
Duke
Avatar
Super Mario Player M
Topic author, Duke
Duke
Reputation: 21
Posts: 126
Joined: 23 Jun 2016
Location: Socialist Federative Soviet Republic of the Mushrooms
Tencent QQ

Post #18by Super Mario Player » 1 Dec 2016, 9:33

Toy Bonnie wrote:We no longer need this script,because 38A made a SMB3 powerup system in SMBX 1.4.3.
:tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux: :tux:
Absolutely.
My current project:
Spoiler
The Legend of Zelda: The Curse of the Wise Men
Image

The Tower of Challenges

Languages I speak (if you want to PM me):
Spoiler
Image Image Image

Click to see my YouTube channel
Image


Return to “Script submission”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest