Jump to content

Adding/Using a counter


ScripterQQ

Recommended Posts

Hello, I'm working on some quester profile but I struggle with adding a counter, I'm not so exped in C# but I believe it's something easy to do.

What the quest order should look like:

1) var counter = 0
2) Pulse "quest 1"
3) var counter = counter + 1
4) If counter = 10
5) Msgbox "Counter equals to 10"
6) Go To Step "9"
7) Endif
8) Go To Step "2"
9) Pulse "quest 2"


Any help?

Link to comment
Share on other sites

Nevermind, I found with RunLuaCode i can just set a variable and recall/check it when necessary, easier than I thought :)

 

EDIT: I cannot set a "If variable = X, then GoToStep" step with lua, so I'm again at the starting point, need to find a solution..

Link to comment
Share on other sites

I get an error

CS1525: '=' is not a valid term in the expression

CS1026: Expected ) symbol

CS1002: Expected ; symbol

CS1525: ')' is not a valid term in the expression

 

This is when I add the IF condition

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...