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

Skill/Item Creation System Returns! (For Eclipse 2.7)


the_best_flash
 Share

Recommended Posts

  • Replies 76
  • Created
  • Last Reply

Top Posters In This Topic

I get an error. Function not defind.

Private Sub NameSkill_Click()
Dim I As Long
Dim num As Long
  frmExpEdit.SkillName2.caption = SetName.Text
  Call ChangeSkillName(LstSkills.ListIndex + 1, SetName.Text)
  Call SaveSkillData
  num = LstSkills.ListIndex
  LstSkills.Clear
  For I = 1 To MAX_SKILLS
    LstSkills.AddItem CStr(Skills.skill(I).Name)
  Next I
  LstSkills.ListIndex = num
End Sub
Link to comment
Share on other sites

@Warconn:

> Alright, thanks, i think i am getting the hang of it ;)
>
> so i would use
>
> ```
> Function TeachPlayerNewRecipe(ByVal Index As Long, Cut Normal Wood) As Long
> ```
> or what should i use for the Cut Normal Wood Recipe
>
> Thanks Again, 
>
> Warconn

First, you would somehow teach the player a recipe.

```
dim success as long
        success = TeachPlayerNewRecipe(index, RECIPE NUMBER)
        if success = 0 then
              call playermsg("You learned", OTHER STUFF IN FUNCTION)
        else if success > 0 then
              call playermsg("You need to learn recipe number " & success & " first", OTHER STUFF IN FUNCTION)
        else if success = -1 then
              call playermsg("You already know this recipe.", OTHER STUFF IN FUNCTION)
        end if
```Something like that should work. I guess I forgot to create a function that returned the recipe name based on the recipe number. I'll add that when I have time.
The second function perimeter requires a number not a name. And you just use it like a normal sad script function. I just gave you the function header so you could see how it was used.

To make an item:
```
call make(index, RECIPE NUMBER)
```You may want to use some of my other functions in order to make sure the player has learned the recipe first.
Link to comment
Share on other sites

@Basil:

> I get an error. Function not defind.
>
> Private Sub NameSkill_Click()
> Dim I As Long
> Dim num As Long
>   frmExpEdit.SkillName2.caption = SetName.Text
>   Call ChangeSkillName(LstSkills.ListIndex + 1, SetName.Text)
>   Call SaveSkillData
>   num = LstSkills.ListIndex
>   LstSkills.Clear
>   For I = 1 To MAX_SKILLS
>     LstSkills.AddItem CStr(Skills.skill(I).Name)
>   Next I
>   LstSkills.ListIndex = num
> End Sub

If you pasted the code in yourself did you follow the instructions that said:
"Next open modGameLogic and paste this code at the bottom of the file:"

That is where that function is declared.
Link to comment
Share on other sites

@the_best_flash:

> First, you would somehow teach the player a recipe.
>
> ```
> dim success as long
>         success = TeachPlayerNewRecipe(index, RECIPE NUMBER)
>         if success = 0 then
>               call playermsg("You learned", OTHER STUFF IN FUNCTION)
>         else if success > 0 then
>               call playermsg("You need to learn recipe number " & success & " first", OTHER STUFF IN FUNCTION)
>         else if success = -1 then
>               call playermsg("You already know this recipe.", OTHER STUFF IN FUNCTION)
>         end if
> ```Something like that should work. I guess I forgot to create a function that returned the recipe name based on the recipe number. I'll add that when I have time.
> The second function perimeter requires a number not a name. And you just use it like a normal sad script function. I just gave you the function header so you could see how it was used.
>
> To make an item:
> ```
> call make(index, RECIPE NUMBER)
> ```You may want to use some of my other functions in order to make sure the player has learned the recipe first.

Alright, thanks

[EDIT]
Just tryed it out, and it works perfect ;)  thanks

Some small things that you might want to look into. Being able when you use a skill have it say like you begin "what ever the skill is" like in barons.  I have just replaced barons for yours, and it is working out pretty well. also you might want to have it say like, " You tryed to cut wood…" or what ever instead of You Tryed...  Overall this is a very well made.  Thanks Again
Link to comment
Share on other sites

I added a function for getting the recipe name, and I fixed the bug you mentioned.

> Function getRecipeName(ByVal recipe As Long) As String
> Returns the name of the specified recipe

> Being able when you use a skill have it say like you begin "what ever the skill is" like in barons.

This could be done using some of the sad script commands I added…

```
call playermsg("You begin to" &  GetSkillName(SKILL NUMBER), OTHER FUNCTION STUFF)
```or something like that. Most of the details like that I've left up to the game creators.
Link to comment
Share on other sites

Erros for fish editor
Line 30: Property TabPicture(0) in FishingTabs had an invalid file reference.
Line 112: Property TabPicture(1) in FishingTabs had an invalid file reference.
Line 181: Property TabPicture(2) in FishingTabs had an invalid file reference.
Line 221: Property TabPicture(3) in FishingTabs had an invalid file reference.
Link to comment
Share on other sites

Theres a few things wrong with the new update, Whenever you click the new fishing button on the server, it displays and RTE:

"Run-time error '28': Out of Stack Space"

Secondly: Item making button displays RTE:

"Run-time error '9': Subscript out of Range"
This is pointing towards:
```
MakeAreaList.AddItem I & ": " & Trim(MakeList.Item(MakeList.makeArea(ListSelect.ListIndex).Items(I)).Name)
```in the frmItemCreationEditor under: ListSelect: Click Sub

Thirdly…. (minor, yet still important), In frmSkillsEdit form, when loading or saving skills it does not record the xp equation number, Number 1, Number 2, Number 3.

And Lastly :P... (pretty major-ish), When loading the max-XP and min-XP it does not record the xp stats. So when i save Max: 17, Min: 3 - then save... It is recorded to be Max: 2, Min: 1  ;)

_I hope i helped you with some things :),_
  -Tiggilyboo
Link to comment
Share on other sites

As for the first bug report:

> Theres a few things wrong with the new update, Whenever you click the new fishing button on the server, it displays and RTE:
>
> "Run-time error '28': Out of Stack Space"

I won't worry too much about that… The fishing button isn't anywhere near finished yet (It was too much of a pain to comment out all the code) and I can't replicate the error. Every time I click the button a completely useless and unfinished menu pops up (like it should). The only thing that I can think of that would cause that would be a function that calls itself...

As for the second one:

> Secondly: Item making button displays RTE:
>
> "Run-time error '9': Subscript out of Range"

I don't get that one either. There are three things you could try though:
1) copy the data.ini from your last working server file and use that
2) delete your "skill" folder
3) delete the last 3 variables in your data.ini (MAX_SKILLS, MAX_MAKE, MAX_AREA) and your "skill" folder

And as for the last two:

> Thirdly…. (minor, yet still important), In frmSkillsEdit form, when loading or saving skills it does not record the xp equation number, Number 1, Number 2, Number 3.
>
> And Lastly :P... (pretty major-ish), When loading the max-XP and min-XP it does not record the xp stats. So when i save Max: 17, Min: 3 - then save... It is recorded to be Max: 2, Min: 1

They should be fixed in the update included below.

Thanks for the help.
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...