Spell Issue - DarkX - 05-12-2008
Ok I was poking around in MS3.0.3 and started programing some spell projects, and I noticed a issue with the spell editor. The give item fra has issues, the scrllevelreq does not set the level, the scrlitemnum actually sets the players required level. Any idea how to fix it?
Re: Spell Issue - Rian - 05-12-2008
A vanilla 3.0.3 shouldn't have so many issues regarding the spell editor. The only real problem it had was the levelReq, and there's a tutorial around here somewhere that describes how to fix it.
Re: Spell Issue - DarkX - 06-12-2008
I applied that tut, this is the first time I have tried to edit spells since, and that's the issue that came up.
Re: Spell Issue - Tony - 06-12-2008
Well, test a 3.03 vanilla then yeah?
Re: Spell Issue - DarkX - 06-12-2008
Hey I tried out a basic MS3.0.3 and it's the same as the version I am using. same issue with the scrolling bars.
Re: Spell Issue - Tony - 06-12-2008
Give me your SpellEditorInit and SpellEditorOk subs
Re: Spell Issue - DarkX - 06-12-2008
This is both of my subs I have done no change to either
Code: Public Sub SpellEditorInit()
On Error Resume Next
Dim I As Long
frmSpellEditor.cmbClassReq.AddItem "All Classes"
For I = 0 To Max_Classes
frmSpellEditor.cmbClassReq.AddItem Trim(Class(I).name)
Next I
frmSpellEditor.txtName.Text = Trim(Spell(EditorIndex).name)
frmSpellEditor.cmbClassReq.ListIndex = Spell(EditorIndex).ClassReq
frmSpellEditor.scrlLevelReq.Value = Spell(EditorIndex).LevelReq
frmSpellEditor.cmbType.ListIndex = Spell(EditorIndex).Type
If Spell(EditorIndex).Type SPELL_TYPE_GIVEITEM Then
frmSpellEditor.fraVitals.Visible = True
frmSpellEditor.fraGiveItem.Visible = False
frmSpellEditor.scrlVitalMod.Value = Spell(EditorIndex).Data1
Else
frmSpellEditor.fraVitals.Visible = False
frmSpellEditor.fraGiveItem.Visible = True
frmSpellEditor.scrlItemNum.Value = Spell(EditorIndex).Data1
frmSpellEditor.scrlItemValue.Value = Spell(EditorIndex).Data2
End If
If Spell(EditorIndex).Type = SPELL_TYPE_WARP Then
frmSpellEditor.fraVitals.Visible = False
frmSpellEditor.fraGiveItem.Visible = False
frmSpellEditor.fraWarp.Visible = True
frmSpellEditor.scrlMapNum.Value = Spell(EditorIndex).Data1
frmSpellEditor.scrlMapX.Value = Spell(EditorIndex).Data2
frmSpellEditor.scrlMapY.Value = Spell(EditorIndex).Data3
frmSpellEditor.lblMapNum.Caption = frmSpellEditor.scrlMapNum.Value
frmSpellEditor.lblMapX.Caption = frmSpellEditor.scrlMapX.Value
frmSpellEditor.lblMapY.Caption = frmSpellEditor.scrlMapY.Value
End If
frmSpellEditor.Show vbModal
End Sub
Code: Public Sub SpellEditorOk()
Spell(EditorIndex).name = frmSpellEditor.txtName.Text
Spell(EditorIndex).ClassReq = frmSpellEditor.cmbClassReq.ListIndex
Spell(EditorIndex).LevelReq = frmSpellEditor.scrlLevelReq.Value
Spell(EditorIndex).Type = frmSpellEditor.cmbType.ListIndex
If Spell(EditorIndex).Type SPELL_TYPE_GIVEITEM Then
Spell(EditorIndex).Data1 = frmSpellEditor.scrlVitalMod.Value
Else
Spell(EditorIndex).Data1 = frmSpellEditor.scrlItemNum.Value
Spell(EditorIndex).Data2 = frmSpellEditor.scrlItemValue.Value
End If
Spell(EditorIndex).Data3 = 0
If Spell(EditorIndex).Type = SPELL_TYPE_WARP Then
Spell(EditorIndex).Data1 = frmSpellEditor.scrlMapNum.Value
Spell(EditorIndex).Data2 = frmSpellEditor.scrlMapX.Value
Spell(EditorIndex).Data3 = frmSpellEditor.scrlMapY.Value
End If
Call SendSaveSpell(EditorIndex)
InSpellEditor = False
Unload frmSpellEditor
End Sub
|