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

[EO] NPC Spells v.2.0.0


DJMaxus
 Share

Recommended Posts

  • Replies 188
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 months later...
@Skillzalot:

> I did make it work for 1.3.1 not that hard actually

Is there any way you could post how you got it to work for 1.3.1?
This script looks pretty awesome!
Hope I don't get killed for necroposting…lol
Link to comment
Share on other sites

@Zetasis:

> Why not remake it so that this will work for EO2.0 seeing how that is the newest version of EO.

Well, that does seem like the ideal thing to do doesn't it? When I find some time I'll try to update all of my tutorials and post up some new ones I've done. A lot has happened to Eclipse it seems.
Link to comment
Share on other sites

@sotvotkong:

> it would be great if you did.

I 100% agree. When you first released this I was so thankful but then EO was changed and this wouldn't work with out modifications and I was very disappointed that I could never get it to work again. Revising this for 2.0 would be extremely helpful.
Link to comment
Share on other sites

Tutorial updated for EO v.2.0.0

I've revised the tutorial not only to work with v2, but I've also improved on the NpcSpellPlayer sub, and added a few things.

- NPCs can have as many spells as you want them to have, the default is 5
- AoE healing spells, as well as improvement on the AoE damaging spells.
- NPCs use the Casting and Cooldown times now.

Eventually, I will update this again to use Stun spells, DoT, and HoT. Unless someone makes an add-on or something and beats me to it.

Please report any problems you may run into.

Enjoy. Next I'll revise the crafting tut.
Link to comment
Share on other sites

Hey, after playing around with the form work to fit EO 2.0, I keep getting an error with this line of code:

>! ```
' Spell Casting
                                For i = 1 To MAX_NPC_SPELLS
                                    If Npc(npcNum).Spell(i) > 0 Then
                                        If MapNpc(MapNum).Npc(x).SpellTimer(i) + (Spell(Npc(npcNum).Spell(i)).CastTime * 1000) < GetTickCount Then
                                            NpcSpellPlayer x, target, i
                                        End If
                                    End If
                                Next
```

Basically all I did was make the scrollbars use the old NPC Spell arrangement with some minor tweaks. For instance, This is the scroll bar for spell number one:

>! ```
Private Sub scrlSpell1_Change()
Dim aString As String
    ' If debug mode, handle error then exit out
    If Options.Debug = 1 Then On Error GoTo errorhandler

    If scrlSpell1.Value = 0 Then aString = "None" Else aString = Trim$(Spell(scrlSpell1.Value).Name)
    lblSpellOne.Caption = "Spell One: " & aString
    Npc(EditorIndex).Spell1 = scrlSpell1.Value

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "scrlAnimation_Change", "frmEditor_NPC", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
```

Im new to this crap so can you please tell me what I'm doing wrong? Thanks.
Link to comment
Share on other sites

@Salted:

> Hey, after playing around with the form work to fit EO 2.0, I keep getting an error with this line of code:
>
> >! ```
> ' Spell Casting
>                                 For i = 1 To MAX_NPC_SPELLS
>                                     If Npc(npcNum).Spell(i) > 0 Then
>                                         If MapNpc(MapNum).Npc(x).SpellTimer(i) + (Spell(Npc(npcNum).Spell(i)).CastTime * 1000) < GetTickCount Then
>                                             NpcSpellPlayer x, target, i
>                                         End If
>                                     End If
>                                 Next
> ```
>
> Basically all I did was make the scrollbars use the old NPC Spell arrangement with some minor tweaks. For instance, This is the scroll bar for spell number one:
>
> >! ```
> Private Sub scrlSpell1_Change()
> Dim aString As String
>     ' If debug mode, handle error then exit out
>     If Options.Debug = 1 Then On Error GoTo errorhandler
>    
>     If scrlSpell1.Value = 0 Then aString = "None" Else aString = Trim$(Spell(scrlSpell1.Value).Name)
>     lblSpellOne.Caption = "Spell One: " & aString
>     Npc(EditorIndex).Spell1 = scrlSpell1.Value
>    
>     ' Error handler
>     Exit Sub
> errorhandler:
>     HandleError "scrlAnimation_Change", "frmEditor_NPC", Err.Number, Err.Description, Err.Source, Err.HelpContext
>     Err.Clear
>     Exit Sub
> End Sub
> ```
>
> Im new to this crap so can you please tell me what I'm doing wrong? Thanks.

First of all, that's not one line, that's 8.

Second, with the new tutorial, there is no Spell1 or Spell2 scroll bars, there are a set number of spells determined by one single scroll bar, the scroll bar's limit is determined by MAX_NPC_SPELLS

I will include form work later, but for now, please use my frmEditor_NPC and copy from it.
Link to comment
Share on other sites

@Zetasis:

> So for some reason I get an error when I try and compile. It says the SpellIndex variable is undefined in **Private Sub scrlSpell_Change()**. I have attached a screen shot also.

At the very top of your frmEditor_NPC, under Option Explicit, add:
```
Private SpellIndex As Long
```
Link to comment
Share on other sites

im getting a variable undefined error on this in the private type npc rec, client side. 
```
Spell(1 To MAX_NPC_SPELLS) As Long
```
i added it right were the tut says to, copied the form in, made sure the buttons had correct code.

missed that part on the client side in the tut. i guess.  i duno, anyways i added this to constants and it works now just fine.
```
' NPC Spells
Public Const MAX_NPC_SPELLS As Long = 5
```

now this makes me wonder should i have this as well on the client side?
```
' Npc spells 
SpellTimer(1 To MAX_NPC_SPELLS) As Long   
Heals As Integer
```

server side i get a error on vital : expected array.  heres the line of code.
```
InitDamage = Spell(SpellNum).Vital(NPC(MapNpc(mapnum).NPC(MapNpcNum).Num).Stat(Stats.intelligence) / 2)

```
you forgot a +

```
InitDamage = Spell(SpellNum).Vital+(NPC(MapNpc(mapnum).NPC(MapNpcNum).Num).Stat(Stats.intelligence) / 2)

```
hope that helps a few peps out.
Link to comment
Share on other sites

  • 2 weeks later...

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...