[SOLVED]Smb2 trouter

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

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #1by BolanoGustavo » 19 Jan 2017, 22:42

Hi, I need help with smb2 trouter script. I'm trying to do it but it does not work. I would appreciate your help.
Last edited by BolanoGustavo on 24 Jan 2017, 22:22, edited 1 time in total.

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #2by Zwertll » 19 Jan 2017, 22:45

BolanoGustavo wrote:Hi, I need help with smb2 trouter script. I'm trying to do it but it does not work. I would appreciate your help.
You said you tried. What is going wrong? Detail your problem.

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #3by BolanoGustavo » 19 Jan 2017, 23:02

Zwertll wrote:
BolanoGustavo wrote:Hi, I need help with smb2 trouter script. I'm trying to do it but it does not work. I would appreciate your help.
You said you tried. What is going wrong? Detail your problem.
this is script i used:
With npc(sysval(Param1))
If .health = 1 Then
Call NKill(-2,.X-1,.Y-1,30,34,129,0,1)
End if
.ivalb = .ivalb + 1
.curframe = .ivala
If .ivala = 0 Then
.ivala = 1
End if
If .ivalb mod 4 = 0 and .ivalb > 0 Then
If .Ysp <= 0 Then
Select case .ivala
case 1
.ivala = 2
case 2
.ivala = 1
case else
.ivala = 1
End Select
Elseif .Ysp > 0 Then
Select case .ivala
case 3
.ivala = 4
case 4
.ivala = 3
case else
.ivala = 3
End Select
End if
End if
If .ivalb > 81 Then
.Ysp = .Ysp - 0.26
If .Ysp >= -8 Then
.Ysp = -8
End if
If .Y < .PrY - 40 Then
.ivalb = 0
.Y = .PrY - 40
End if
Elseif .ivalb > 81 Then
.Y = .PrY - 40
Elseif .ivalb = 81 Then
.Ysp = -11.6
End if
End With

But there is something that does not fit in all this and does not work and my idea was to equate the movement that does in the original game

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #4by Zwertll » 19 Jan 2017, 23:11

I'll try to help you. First: You should know that .ivala = .ivala +1 is a frames counter. For you to get an animation obviously you will have to switch the frames (you should have already noticed this because you used .curframe) but you should use intervals for this like 8 frames. For the movement of the NPC you can use .Ysp and write conditionals according to the frames. So at a certain time the NPC will change the movement. Other thing: I do not know if you are trying to modify scripts ready but it is not good to do this you can get confused. Obviously you can use them as examples but with good judgment.
Here an mini example for ilustrate:

Code: Select all

(...)
if .ivala<=100 then
.Ysp = -X
elseif .ivala>100 and .ivala<=200 then
.Ysp = X
elseif .ivala>200 then
.ivala = 0
end if
(...)

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #5by BolanoGustavo » 20 Jan 2017, 0:03

Zwertll wrote:I'll try to help you. First: You should know that .ivala = .ivala +1 is a frames counter. For you to get an animation obviously you will have to switch the frames (you should have already noticed this because you used .curframe) but you should use intervals for this like 8 frames. For the movement of the NPC you can use .Ysp and write conditionals according to the frames. So at a certain time the NPC will change the movement. Other thing: I do not know if you are trying to modify scripts ready but it is not good to do this you can get confused. Obviously you can use them as examples but with good judgment.
Here an mini example for ilustrate:

Code: Select all

(...)
if .ivala<=100 then
.Ysp = -X
elseif .ivala>100 and .ivala<=200 then
.Ysp = X
elseif .ivala>200 then
.ivala = 0
end if
(...)
In which values ​​of that script I have to replace or are left so to understand better

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #6by Zwertll » 20 Jan 2017, 0:06

BolanoGustavo wrote:
Zwertll wrote:I'll try to help you. First: You should know that .ivala = .ivala +1 is a frames counter. For you to get an animation obviously you will have to switch the frames (you should have already noticed this because you used .curframe) but you should use intervals for this like 8 frames. For the movement of the NPC you can use .Ysp and write conditionals according to the frames. So at a certain time the NPC will change the movement. Other thing: I do not know if you are trying to modify scripts ready but it is not good to do this you can get confused. Obviously you can use them as examples but with good judgment.
Here an mini example for ilustrate:

Code: Select all

(...)
if .ivala<=100 then
.Ysp = -X
elseif .ivala>100 and .ivala<=200 then
.Ysp = X
elseif .ivala>200 then
.ivala = 0
end if
(...)
In which values ​​of that script I have to replace or are left so to understand better
Replace them. The X is a double value and the (...) is piece of script.

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #7by BolanoGustavo » 20 Jan 2017, 0:14

Zwertll wrote:
BolanoGustavo wrote:
Zwertll wrote:I'll try to help you. First: You should know that .ivala = .ivala +1 is a frames counter. For you to get an animation obviously you will have to switch the frames (you should have already noticed this because you used .curframe) but you should use intervals for this like 8 frames. For the movement of the NPC you can use .Ysp and write conditionals according to the frames. So at a certain time the NPC will change the movement. Other thing: I do not know if you are trying to modify scripts ready but it is not good to do this you can get confused. Obviously you can use them as examples but with good judgment.
Here an mini example for ilustrate:

Code: Select all

(...)
if .ivala<=100 then
.Ysp = -X
elseif .ivala>100 and .ivala<=200 then
.Ysp = X
elseif .ivala>200 then
.ivala = 0
end if
(...)
In which values ​​of that script I have to replace or are left so to understand better
Replace them. The X is a double value and the (...) is piece of script.
I do not mean the script that I wrote that is to say that I must modify or remove from there

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #8by Zwertll » 20 Jan 2017, 0:37

BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:
Zwertll wrote:I'll try to help you. First: You should know that .ivala = .ivala +1 is a frames counter. For you to get an animation obviously you will have to switch the frames (you should have already noticed this because you used .curframe) but you should use intervals for this like 8 frames. For the movement of the NPC you can use .Ysp and write conditionals according to the frames. So at a certain time the NPC will change the movement. Other thing: I do not know if you are trying to modify scripts ready but it is not good to do this you can get confused. Obviously you can use them as examples but with good judgment.
Here an mini example for ilustrate:

Code: Select all

(...)
if .ivala<=100 then
.Ysp = -X
elseif .ivala>100 and .ivala<=200 then
.Ysp = X
elseif .ivala>200 then
.ivala = 0
end if
(...)
In which values ​​of that script I have to replace or are left so to understand better
Replace them. The X is a double value and the (...) is piece of script.
I do not mean the script that I wrote that is to say that I must modify or remove from there
Make a new script and test this mini example so you get a sense of how the NPC moves. Now this no is the definitive script. Is just an example. You will have write the others parts. If you have questions continue posting.

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #9by BolanoGustavo » 20 Jan 2017, 0:49

Hey, another question, how do you do to record in gif?

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #10by Zwertll » 20 Jan 2017, 0:51

BolanoGustavo wrote:Hey, another question, how do you do to record in gif?
You can search in Google by software with these functions.

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #11by BolanoGustavo » 20 Jan 2017, 2:26

Back to the topic.I worked at the first but did not repeat

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #12by Zwertll » 20 Jan 2017, 3:19

BolanoGustavo wrote:Back to the topic.I worked at the first but did not repeat
I really messed up the script I sent. But since this happened think about it a bit: "How am I going to do the repeat script"? Is easy. If you can not, I'll give you the answer. Think about the speeds.

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #13by BolanoGustavo » 20 Jan 2017, 3:50

Zwertll wrote:
BolanoGustavo wrote:Back to the topic.I worked at the first but did not repeat
I really messed up the script I sent. But since this happened think about it a bit: "How am I going to do the repeat script"? Is easy. If you can not, I'll give you the answer. Think about the speeds.
No, I mean that when he jumps and goes down only he does it once, that is, he does not repeat his movement, you did not understand me well

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #14by Zwertll » 20 Jan 2017, 4:19

BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:Back to the topic.I worked at the first but did not repeat
I really messed up the script I sent. But since this happened think about it a bit: "How am I going to do the repeat script"? Is easy. If you can not, I'll give you the answer. Think about the speeds.
No, I mean that when he jumps and goes down only he does it once, that is, he does not repeat his movement, you did not understand me well
I understood. It was my fault. But before I explain how to make the movement get repetitive I want you to try. If you can not, I'll give you the answer.

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #15by BolanoGustavo » 20 Jan 2017, 5:51

Zwertll wrote:
BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:Back to the topic.I worked at the first but did not repeat
I really messed up the script I sent. But since this happened think about it a bit: "How am I going to do the repeat script"? Is easy. If you can not, I'll give you the answer. Think about the speeds.
No, I mean that when he jumps and goes down only he does it once, that is, he does not repeat his movement, you did not understand me well
I understood. It was my fault. But before I explain how to make the movement get repetitive I want you to try. If you can not, I'll give you the answer.
I honestly can not and if I say give me the answer you will believe that I am lazy and forgive me if it causes you discomfort

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #16by Zwertll » 20 Jan 2017, 13:49

BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:Back to the topic.I worked at the first but did not repeat
I really messed up the script I sent. But since this happened think about it a bit: "How am I going to do the repeat script"? Is easy. If you can not, I'll give you the answer. Think about the speeds.
No, I mean that when he jumps and goes down only he does it once, that is, he does not repeat his movement, you did not understand me well
I understood. It was my fault. But before I explain how to make the movement get repetitive I want you to try. If you can not, I'll give you the answer.
I honestly can not and if I say give me the answer you will believe that I am lazy and forgive me if it causes you discomfort
Make a range where .Ysp = 0.

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #17by BolanoGustavo » 20 Jan 2017, 16:07

Zwertll wrote:
BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:Back to the topic.I worked at the first but did not repeat
I really messed up the script I sent. But since this happened think about it a bit: "How am I going to do the repeat script"? Is easy. If you can not, I'll give you the answer. Think about the speeds.
No, I mean that when he jumps and goes down only he does it once, that is, he does not repeat his movement, you did not understand me well
I understood. It was my fault. But before I explain how to make the movement get repetitive I want you to try. If you can not, I'll give you the answer.
I honestly can not and if I say give me the answer you will believe that I am lazy and forgive me if it causes you discomfort
Make a range where .Ysp = 0.
This is what i am trying to do

Code: Select all

With npc(sysval(Param1))
If .health = 1 Then
Call NKill(-2,.X-1,.Y-1,30,34,129,0,1)
End if
.ivalb = .ivalb + 1
.curframe = .ivala
If .ivala = 0 Then
.ivala = 1
End if
If .ivalb mod 4 = 0 and .ivalb > 0 Then
If .Ysp <= 0 Then
Select case .ivala
case 1
.ivala = 2
case 2
.ivala = 1
case else
.ivala = 1
End Select
Elseif .Ysp > 4 Then
Select case .ivala
case 3
.ivala = 4
case 4
.ivala = 3
case else
.ivala = 3
End Select
End if
End if
if .ivalb<=40 then
.Ysp = -6
elseif .ivalb>40 and .ivala<=40 then
.Ysp = 6
elseif .ivalb>0 then
.ivala =0
end if

And I work at the first jump but the only thing I do not understand is its repetition

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #18by Zwertll » 20 Jan 2017, 16:26

BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:
Zwertll wrote:
BolanoGustavo wrote:Back to the topic.I worked at the first but did not repeat
I really messed up the script I sent. But since this happened think about it a bit: "How am I going to do the repeat script"? Is easy. If you can not, I'll give you the answer. Think about the speeds.
No, I mean that when he jumps and goes down only he does it once, that is, he does not repeat his movement, you did not understand me well
I understood. It was my fault. But before I explain how to make the movement get repetitive I want you to try. If you can not, I'll give you the answer.
I honestly can not and if I say give me the answer you will believe that I am lazy and forgive me if it causes you discomfort
Make a range where .Ysp = 0.
This is what i am trying to do

Code: Select all

With npc(sysval(Param1))
If .health = 1 Then
Call NKill(-2,.X-1,.Y-1,30,34,129,0,1)
End if
.ivalb = .ivalb + 1
.curframe = .ivala
If .ivala = 0 Then
.ivala = 1
End if
If .ivalb mod 4 = 0 and .ivalb > 0 Then
If .Ysp <= 0 Then
Select case .ivala
case 1
.ivala = 2
case 2
.ivala = 1
case else
.ivala = 1
End Select
Elseif .Ysp > 4 Then
Select case .ivala
case 3
.ivala = 4
case 4
.ivala = 3
case else
.ivala = 3
End Select
End if
End if
if .ivalb<=40 then
.Ysp = -6
elseif .ivalb>40 and .ivala<=40 then
.Ysp = 6
elseif .ivalb>0 then
.ivala =0
end if

And I work at the first jump but the only thing I do not understand is its repetition
Before setting .ivala to zero, do another elseif by defining a range where .Ysp will be zero.

BolanoGustavo
Topic author, Our friend
Our friend
BolanoGustavo
Topic author, Our friend
Our friend
Reputation: 7
Posts: 71
Joined: 18 Aug 2016

Post #19by BolanoGustavo » 20 Jan 2017, 16:45

By the way, what did you mean by range?

Zwertll
Close friend
Close friend
Zwertll
Close friend
Close friend
Reputation: 51
Posts: 82
Joined: 6 Dec 2016

Post #20by Zwertll » 20 Jan 2017, 16:47

BolanoGustavo wrote:By the way, what did you mean by range?
A break


Return to “Script requests”

Who is online (over the past 5 minutes)

Users browsing this forum: 3 guests