Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Event System a bit confused. [Resolved]


Nazban
 Share

Recommended Posts

I'm currently playing around with the Event System that Eclipse Advanced .15 is using. Here is what I'm trying to do:

Talk to NPC

>>

Menu (Gives Axe),(Exit Event) or (Take x5 Logs+give xp or gold)

After talking to the NPC if its your first time he will give you the woodcutting axe then he will tell you to go bring him x5 logs.

When you bring him x5 logs he will take them and give you xp or gold etc.

I have everything working except the part were he will take your logs and give you variable: X. I do not know how to accomplish this part. He will only take your logs and give you nothing for them.

Also is there a way to detect if the user already has a wood cutting axe and the npc will not be able to give the player the axe unlimited times?

Thanks for all your help guys I hope I made sense lol just ask if you guys did not understand what I'm trying to say.
Link to comment
Share on other sites

```

Name: Cutting Wood

1: @Show Choices

2: @Change Item (Gives Axe)

3: @Exit Event

4: @Change Item (Takes X5 Logs)

5: @Change Exp (Gives Exp)

1: @Show Choices

Menu Query(Msg): Hi, take the axe blah blah, now that u have your axe go chop wood and bring me x5 Logs.

(Choices): Ok give me the axe!: 2

No Thanks: 3

I have x5 Logs!: 4

```
Link to comment
Share on other sites

> ok, I'm still learning it but I believe you need a conditional branch to check weather you have 5 logs
>
> edit: Or at least thats how I would do it

Thanks highonpaint, I figured I did but I have no clue how to link a branch with something else I will try and find a guide or anything I can on the conditional branch part of the event system.
Link to comment
Share on other sites

I take no credit for this but agor told me this way and it works- thanks agor

[background=rgb(247, 247, 247)]This actually took me a while to figure out how to do this. The check item amount is still broken though and needs a source fix. It doesn't correctly check the amount of items.[/background]

[background=rgb(247, 247, 247)]The next two pictures show how it should look and I'm going to break down what each line does after it.[/background]

[background=rgb(247, 247, 247)]This is what it needs to look like in a nutshell (Can add more stuff if you so desire).[/background]

[background=rgb(247, 247, 247)]

**Spoiler**

![](http://i.imgur.com/XjueU.jpg)[/background]

[background=rgb(247, 247, 247)]The Conditional Branch[/background]

[background=rgb(247, 247, 247)]

**Spoiler**

![](http://i.imgur.com/ha3pH.jpg)[/background]

[background=rgb(247, 247, 247)](1) This is just a simple show message that makes the npc acknowledge you're talking to him.[/background]

[background=rgb(247, 247, 247)](2) This is the conditional branch to check if you have the logs. The positive bar is telling it what line of code to go to when the condition is met, while the negative bar is telling it what line of code to go to if the condition is not met.[/background]

[background=rgb(247, 247, 247)](3)It appears the code won't run in the conditional branch unless you add exit events in right the conditional branch and after all the positive line of code.[/background]

[background=rgb(247, 247, 247)](4)The conditional branch runs this line if the condition works, then it keeps running each line after, until you add an exit event. The exit event after tells the branch that's all the positive code that needs to be ran.[/background]

[background=rgb(247, 247, 247)](5) Ends the positive Line of code.[/background]

[background=rgb(247, 247, 247)](6)The negative line of code starts here and runs until I add another exit event or there is no other line of code.[/background]
Link to comment
Share on other sites

This is awesome thanks so much highonpaint, this has helped me out so much, I never knew it kept running each line after until it hits an exit event. I have completed everything I was trying to do except the giving of unlimited axes but this can be easily fixed by taking the item before giving it. I've also learned two main functions in the event system running multiple lines and conditional branches thanks again!
Link to comment
Share on other sites

> This is awesome thanks so much highonpaint, this has helped me out so much, I never knew it kept running each line after until it hits an exit event. I have completed everything I was trying to do except the giving of unlimited axes but this can be easily fixed by taking the item before giving it. I've also learned two main functions in the event system running multiple lines and conditional branches thanks again!

thats fine, ive just made event system tutorial for making a skill trainer simple but very effective and compact, check it out if you want.

p.s, please lock the topic and put resolved in the title (admins would appreciate it)
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
 Share

×
×
  • Create New...