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

[EO] adding spell_type_scripted (how call a module or other thing)


DshWinchester
 Share

Recommended Posts

I wanna make scripted spells in sourse(eclipse origins)
so

I am at Server sourse

what I already do:
add a new public const on the spell constants
Public Const SPELL_TYPE_SCRIPTED As Byte = 5

and now ,at the "select case spell type"

>! Select Case SpellCastType
        Case 0 ' self-cast target
            Select Case Spell(spellnum).Type
                Case SPELL_TYPE_HEALHP
                    SpellPlayer_Effect Vitals.HP, True, Index, Vital, spellnum
                    DidCast = True
                Case SPELL_TYPE_HEALMP
                    SpellPlayer_Effect Vitals.MP, True, Index, Vital, spellnum
                    DidCast = True
                Case SPELL_TYPE_WARP
                    SendAnimation MapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index
                    PlayerWarp Index, Spell(spellnum).Map, Spell(spellnum).x, Spell(spellnum).y
                    SendAnimation GetPlayerMap(Index), Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index
                    DidCast = True

            End Select

below the end select
I put

Case SPELL_TYPE_SCRIPTED

and I wanna call a module (scriptedspells)

what I need to do?

explaining
inside that modscriptedspells
will have the scripts

divide by subs

any tip for doing this better? ;D
Link to comment
Share on other sites

You can just create a Public Sub inside that module and then call the Sub. Add a "Script" value to the SpellRec and then pass the Script value of the spell through the parameters of that Sub. Divide the different scripted spells using a Select Case statement.
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...