Jump to content

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
https://wrobot.eu/forums/topic/9204-addingusing-a-counter/
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
https://wrobot.eu/forums/topic/9204-addingusing-a-counter/#findComment-42740
Share on other sites

Hello, use https://wrobot.eu/forums/topic/8588-declaration-code/?do=findComment&comment=39434

(RunCode) Var.SetVar("counter", 0);

(RunCode) Var.SetVar("counter", Var.GetVar<int>("counter") + 1);


(If) Var.GetVar<int>("counter") == 10

 

Link to comment
https://wrobot.eu/forums/topic/9204-addingusing-a-counter/#findComment-42769
Share on other sites

On 4/28/2018 at 7:26 PM, Droidz said:

can you share sample profile ou screenshot

I can't screenshot cuz it becomes black once I paste it into Photoshop, I give u directly the xml of the profile (Quester).

 

testcounter.xml

Link to comment
https://wrobot.eu/forums/topic/9204-addingusing-a-counter/#findComment-43007
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...