zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 ![](http://www.worldofwarcraftstuff.com/images/guides/druid/bear_form_button_thumb.jpg)The thing in the bottom left of the image is the action bar. In case you don't know what an action bar is.I want to warn you, this is going to get a little confusing if you're not used to source, and or not used to conforming code to fit your source…........NOTE: THE TUTORIAL SPANS OVER 2 POSTSFirst thing's first...-Add 10 labels to your frmMirage, and make them indexed, and make them all invisibleTo perfectly match this code, the labels should be:Label14(1) through Label14(10)-Add 10 Images to your frmMirage, do not make them indexed and align them to make an action barTo perfectly match this code, use these 10 images...Image7, Image8, Image9, Image10, Image11, Image12, Image13, Image14, Image15, Image5-Also, note that to use the numbers as well as left click you need to use the code to make it so you have to press enter before you can type in chat.Now go to frmMirage, go to the very top, right under Option Explicit and paste this code```Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer```Second, let's take care of the packets we're gonna use…Go to ModHandleData in the client and add this code somewhere in sub HandleData``` If casestring = "getspell1" Then Dim s s = parse(1) frmMirage.Label14(1).Caption = s If s <> "" Then frmMirage.Image7.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell2" Then s = parse(1) frmMirage.Label14(2).Caption = s If s <> "" Then frmMirage.Image8.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell3" Then s = parse(1) frmMirage.Label14(3).Caption = s If s <> "" Then frmMirage.Image9.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell4" Then s = parse(1) frmMirage.Label14(4).Caption = s If s <> "" Then frmMirage.Image10.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell5" Then s = parse(1) frmMirage.Label14(5).Caption = s If s <> "" Then frmMirage.Image11.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell6" Then s = parse(1) frmMirage.Label14(6).Caption = s If s <> "" Then frmMirage.Image12.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell7" Then s = parse(1) frmMirage.Label14(7).Caption = s If s <> "" Then frmMirage.Image13.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell8" Then s = parse(1) frmMirage.Label14(8).Caption = s If s <> "" Then frmMirage.Image14.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell9" Then s = parse(1) frmMirage.Label14(9).Caption = s If s <> "" Then frmMirage.Image15.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If If casestring = "getspell10" Then s = parse(1) frmMirage.Label14(10).Caption = s If s <> "" Then frmMirage.Image5.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & s & ".gif") End If End If```Now, go to modHandleData in the server, under sub HandleData add this code``` Case "setspell1" Call WriteINI("SK1", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell1" FileData = ReadINI("SK1", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell1" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell2" Call WriteINI("SK2", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell2" FileData = ReadINI("SK2", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell2" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell3" Call WriteINI("SK3", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell3" FileData = ReadINI("SK3", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell3" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell4" Call WriteINI("SK4", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell4" FileData = ReadINI("SK4", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell4" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell5" Call WriteINI("SK5", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell5" FileData = ReadINI("SK5", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell5" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell6" Call WriteINI("SK6", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell6" FileData = ReadINI("SK6", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell6" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell7" Call WriteINI("SK7", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell7" FileData = ReadINI("SK7", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell7" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell8" Call WriteINI("SK8", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell8" FileData = ReadINI("SK8", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell8" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell9" Call WriteINI("SK9", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell5" FileData = ReadINI("SK5", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell9" & SEP_CHAR & FileData & END_CHAR) Exit Sub Case "setspell10" Call WriteINI("SK10", "sid", Parse(1), App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini") Exit Sub Case "loadspell10" FileData = ReadINI("SK10", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell10" & SEP_CHAR & FileData & END_CHAR) Exit Sub```PACKETS FINISHEDNow, find modGameLogic in the server, inside the sub JoinGame put this code``` Dim FileData As String FileData = ReadINI("SK1", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell1" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK2", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell2" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK3", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell3" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK4", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell4" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK5", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell5" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK6", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell6" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK7", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell7" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK8", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell8" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK9", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell9" & SEP_CHAR & FileData & END_CHAR) FileData = ReadINI("SK10", "sid", App.Path & "\Scripts\db\" & GetPlayerName(Index) & ".ini", vbNullString) Call SendDataTo(Index, "getspell10" & SEP_CHAR & FileData & END_CHAR)```This is the code that updates your icons as soon as you log in.Now, on the client side, go to frmMirage and double click on lstSpells. Change that ENTIRE sub to this:```Private Sub lstSpells_DblClick() Dim O, r, p, Q As String Dim i Dim X Dim exists As Boolean O = lstSpells.Text r = Right(O, Len(O) - 3) If (StrComp(Left(O, 1), "-") <> 0) Then If (Image7.Picture = Image16.Picture) Then Image7.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell1" & SEP_CHAR & r & END_CHAR) ElseIf (Image8.Picture = Image16.Picture) Then Image8.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell2" & SEP_CHAR & r & END_CHAR) ElseIf (Image9.Picture = Image16.Picture) Then Image9.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell3" & SEP_CHAR & r & END_CHAR) ElseIf (Image10.Picture = Image16.Picture) Then Image10.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell4" & SEP_CHAR & r & END_CHAR) ElseIf (Image11.Picture = Image16.Picture) Then Image11.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell5" & SEP_CHAR & r & END_CHAR) ElseIf (Image12.Picture = Image16.Picture) Then Image12.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell6" & SEP_CHAR & r & END_CHAR) ElseIf (Image13.Picture = Image16.Picture) Then Image13.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell7" & SEP_CHAR & r & END_CHAR) ElseIf (Image14.Picture = Image16.Picture) Then Image14.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell8" & SEP_CHAR & r & END_CHAR) ElseIf (Image15.Picture = Image16.Picture) Then Image15.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell9" & SEP_CHAR & r & END_CHAR) ElseIf (Image5.Picture = Image16.Picture) Then Image5.Picture = LoadPicture(App.Path & "\GUI\SpellIcons\" & r & ".gif") Call SendData("setspell10" & SEP_CHAR & r & END_CHAR) Else Call AddText("All of your spell slots are full.", WHITE) End If End IfEnd Sub```Add this code inside of frmMirage to allow left clicking on the spells```Private Sub Image5_Click() Dim ssp As String Dim i Dim j ssp = Label14(10).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image5.Picture = Image16.Picture Call SendData("setspell10" & SEP_CHAR & Null & END_CHAR) Else If Image5.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image7_Click() Dim ssp As String Dim i Dim j ssp = Label14(1).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image7.Picture = Image16.Picture Call SendData("setspell1" & SEP_CHAR & Null & END_CHAR) Else If Image7.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image8_Click() Dim ssp As String Dim i Dim j ssp = Label14(2).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image8.Picture = Image16.Picture Call SendData("setspell2" & SEP_CHAR & Null & END_CHAR) Else If Image8.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image9_Click() Dim ssp As String Dim i Dim j ssp = Label14(3).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image9.Picture = Image16.Picture Call SendData("setspell3" & SEP_CHAR & Null & END_CHAR) Else If Image9.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image10_Click() Dim ssp As String Dim i Dim j ssp = Label14(4).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image10.Picture = Image16.Picture Call SendData("setspell4" & SEP_CHAR & Null & END_CHAR) Else If Image10.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image11_Click() Dim ssp As String Dim i Dim j ssp = Label14(5).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image11.Picture = Image16.Picture Call SendData("setspell5" & SEP_CHAR & Null & END_CHAR) Else If Image11.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image12_Click() Dim ssp As String Dim i Dim j ssp = Label14(6).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image12.Picture = Image16.Picture Call SendData("setspell6" & SEP_CHAR & Null & END_CHAR) Else If Image12.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image13_Click() Dim ssp As String Dim i Dim j ssp = Label14(7).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image13.Picture = Image16.Picture Call SendData("setspell7" & SEP_CHAR & Null & END_CHAR) Else If Image13.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image14_Click() Dim ssp As String Dim i Dim j ssp = Label14(8).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image14.Picture = Image16.Picture Call SendData("setspell8" & SEP_CHAR & Null & END_CHAR) Else If Image14.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd SubPrivate Sub Image15_Click() Dim ssp As String Dim i Dim j ssp = Label14(9).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image15.Picture = Image16.Picture Call SendData("setspell9" & SEP_CHAR & Null & END_CHAR) Else If Image15.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End IfEnd Sub```Again, in the client, go to frmMirage and find sub form_keyUp and add these at the bottom```If KeyCode = vbKey0 And frmMirage.txtMyTextBox.visible=false Then Dim ssp As String Dim j ssp = Label14(10).Caption i = 0 j = 0 Dim p As String Dim r As String While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image5.Picture = Image16.Picture Call SendData("setspell10" & SEP_CHAR & Null & END_CHAR) Else If Image5.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If If KeyCode = vbKey1 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(1).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image7.Picture = Image16.Picture Call SendData("setspell1" & SEP_CHAR & Null & END_CHAR) Else If Image7.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If If KeyCode = vbKey2 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(2).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image8.Picture = Image16.Picture Call SendData("setspell2" & SEP_CHAR & Null & END_CHAR) Else If Image8.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If If KeyCode = vbKey3 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(3).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image9.Picture = Image16.Picture Call SendData("setspell3" & SEP_CHAR & Null & END_CHAR) Else If Image9.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If If KeyCode = vbKey4 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(4).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image10.Picture = Image16.Picture Call SendData("setspell4" & SEP_CHAR & Null & END_CHAR) Else If Image10.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If If KeyCode = vbKey5 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(5).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image11.Picture = Image16.Picture Call SendData("setspell5" & SEP_CHAR & Null & END_CHAR) Else If Image11.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If``` Link to comment Share on other sites More sharing options...
zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 ```If KeyCode = vbKey6 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(6).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image12.Picture = Image16.Picture Call SendData("setspell6" & SEP_CHAR & Null & END_CHAR) Else If Image12.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If If KeyCode = vbKey7 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(7).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image13.Picture = Image16.Picture Call SendData("setspell7" & SEP_CHAR & Null & END_CHAR) Else If Image13.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If If KeyCode = vbKey8 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(8).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image14.Picture = Image16.Picture Call SendData("setspell8" & SEP_CHAR & Null & END_CHAR) Else If Image14.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If If KeyCode = vbKey9 And frmMirage.txtMyTextBox.visible=false Then ssp = Label14(9).Caption i = 0 j = 0 While i < lstSpells.ListCount p = lstSpells.List(i) r = Right(p, Len(p) - 3) If StrComp(r, ssp) = 0 Then j = i End If i = i + 1 Wend If GetAsyncKeyState(2) <> 0 Then Image15.Picture = Image16.Picture Call SendData("setspell9" & SEP_CHAR & Null & END_CHAR) Else If Image15.Picture <> Image16.Picture Then If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then SpellMemorized = Val#(lstSpells.List(j)) Else Call AddText("No spell in this slot.", BRIGHTRED) End If If Player(MyIndex).Spell(lstSpells.ListIndex + 1) > 0 Then If GetTickCount > Player(MyIndex).AttackTimer + 1000 Then Call SendData("cast" & SEP_CHAR & SpellMemorized & END_CHAR) Player(MyIndex).Attacking = 1 Player(MyIndex).AttackTimer = GetTickCount Player(MyIndex).CastedSpell = YES End If Else Call AddText("No spell in this slot.", BRIGHTRED) End If End If End If End If```-======================================================Nowww! Here's an explanation on how you make spells work with this.Make this directory from your client folderClient\GUI\SpellIcons\Save files in there. All files must be .gif to work with this script ( you can change that if you want)But take a simple fire spell as an exmaple.Make a spell using the /Editspell commandName the spell FireBlastNow, save the icon as Client\GUI\SpellIcons\FireBlast.gifAaannnnndddd I think that's all there is to it. I'll try to provide support if anyone has issues. Feel free to make improvements but i swear to god if you use this and don't credit I will hunt you down and kill you. Other than that…have fun and good luck. Link to comment Share on other sites More sharing options...
zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 List of Known Bugs that I'll fix tomorrow :~~- Clicking on a spell in your spell book that has no spell there causes a crash~~- typing a number when talking in chat attempts to cast a spell Link to comment Share on other sites More sharing options...
mrmiguu Posted December 4, 2008 Share Posted December 4, 2008 This is amazing, great job. I plan on using this with Lostica, and maybe some tweaks, but nevertheless it pwns hardcore! Link to comment Share on other sites More sharing options...
zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 Good to hear someone likes it =) Link to comment Share on other sites More sharing options...
The Oracle Posted December 4, 2008 Share Posted December 4, 2008 awesome job ghost! Link to comment Share on other sites More sharing options...
zade_o Posted December 4, 2008 Author Share Posted December 4, 2008 Thanks =) Haven't gotten a chance to fix those 2 bugs. been busy with math hw. Link to comment Share on other sites More sharing options...
Devogen Posted December 5, 2008 Share Posted December 5, 2008 Good Shit, works well.To solve text box bug, resolve the focus on the main form in a loop. Link to comment Share on other sites More sharing options...
gorkogames Posted December 5, 2008 Share Posted December 5, 2008 Working ? Link to comment Share on other sites More sharing options...
Tyr Posted December 5, 2008 Share Posted December 5, 2008 porbably yes, as he have been working on this for some time and has checked it.very good job btw :D Link to comment Share on other sites More sharing options...
gorkogames Posted December 5, 2008 Share Posted December 5, 2008 Yes, i try and work.Thanks *Gh0st …Very very good job... Link to comment Share on other sites More sharing options...
zade_o Posted December 5, 2008 Author Share Posted December 5, 2008 Oh yeah one of the bugs isn't actually a bug, I just thought it was because i forgot to compile the edited source and I ran the actual EXE. so clicking or pressing a number with no spell doesn't cause a crash. Link to comment Share on other sites More sharing options...
Warconn Posted December 5, 2008 Share Posted December 5, 2008 @Gh0st:> List of Known Bugs that I'll fix tomorrow :> - Clicking on a spell in your spell book that has no spell there causes a crash> - typing a number when talking in chat attempts to cast a spellnice job, i have edited the code for my liking if that is alright with you, still crediting you for the main code. also it is much easier to use the F's instead of numbers, just a thought though, thats what i am doing. Havent got to test it yet, just making some adjustments still.ill let you know how it turns outWarconn Link to comment Share on other sites More sharing options...
zade_o Posted December 5, 2008 Author Share Posted December 5, 2008 Yeah. the Fs would be a real easy edit. I'm just really good with a keyboard so I prefer to use numbers, especially since i used to use them in wow lol. Thanks for the credit =) Link to comment Share on other sites More sharing options...
Warconn Posted December 6, 2008 Share Posted December 6, 2008 yep, great code, but you didnt explain one thing, what isImage16.Picturewhat is image16 suppose to be so that i can change it, i have the rest changed, but i dont get this one. is it suppose to be like a clean one without any picture in it? Link to comment Share on other sites More sharing options...
zade_o Posted December 6, 2008 Author Share Posted December 6, 2008 Image16 is just an empty picture. Sorry about that. For some reason it wouldn't work when i checked to see if the slots' images were = to null, so I just threw in a picture but never gave it a picture.Then when it checks to see if say.. Image7.picture = Image16.picturethey will be equal if there is no spell in Image7Does that make sense? Link to comment Share on other sites More sharing options...
Khalus Posted December 6, 2008 Share Posted December 6, 2008 Very nice…GJ Link to comment Share on other sites More sharing options...
Warconn Posted December 6, 2008 Share Posted December 6, 2008 yea, thats what i figured you ment lol, i still cant test as i am having major problems with my spell form, i get a 380 error everytime i try and open it, i can give you specifics when i get back to my original computer.It just stopped working when i implemented your snippet, so i thought i would post here :)Thanks Link to comment Share on other sites More sharing options...
zade_o Posted December 6, 2008 Author Share Posted December 6, 2008 Your spells stopped working when you put in this code?…EDIT- I did just realize that I left part of the code out, I don't know why this would affect your spells though but it's worth a try.If you go back up to the first post, the first snippet of code that I tell you to put under Option explicit, I forgot to add that the first time so I just put it in now. I guess try that out? Link to comment Share on other sites More sharing options...
Skieth Posted December 6, 2008 Share Posted December 6, 2008 THIS ACTION BAR IS NOT VERY ACTIONY!In seriousness, nice job. Link to comment Share on other sites More sharing options...
Warconn Posted December 6, 2008 Share Posted December 6, 2008 @Gh0st:> Your spells stopped working when you put in this code?…> > EDIT- I did just realize that I left part of the code out, I don't know why this would affect your spells though but it's worth a try.> If you go back up to the first post, the first snippet of code that I tell you to put under Option explicit, I forgot to add that the first time so I just put it in now. I guess try that out?yea, im back on my base comp now, and i added what you said, but it still didnt make any difference.i am getting RTE 380 on this like of code frmSpellEditor.scrlSpellTime.Value = Spell(EditorIndex).SpellTimeit says Invaliad Property ValueWhat does that mean. i got rid of all of my spells, and put in blanks in there place, but it still didnt fix it? Link to comment Share on other sites More sharing options...
zade_o Posted December 6, 2008 Author Share Posted December 6, 2008 I don't know. I've never gotten that error… I don't think that's related to this code lol Link to comment Share on other sites More sharing options...
Techno 5.0 Posted December 6, 2008 Share Posted December 6, 2008 Omg thank you…i was about to atempt at this but nvm :D Link to comment Share on other sites More sharing options...
sir zach Posted December 6, 2008 Share Posted December 6, 2008 http://www.touchofdeathforums.com/smf/index.php/topic,28926.msg254134.html#msg254134^ Press enter to talkThanks for the tutorial :) Link to comment Share on other sites More sharing options...
Warconn Posted December 6, 2008 Share Posted December 6, 2008 @Gh0st:> I don't know. I've never gotten that error… I don't think that's related to this code lolhmm alright, ill have to find out else where cause it is disrupting my whole projectThanks Though Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now