The New World Posted August 22, 2009 Share Posted August 22, 2009 Well thanks for the 1-4 for Items Robin xP Link to comment Share on other sites More sharing options...
Zamin Posted August 25, 2009 Share Posted August 25, 2009 Hello,Ok, I am having a few problems when I try to make the .exe file with this code.In frmMirage in **Private Sub Image5_Click()**, I get an error in line```Image5.Picture = Image16.Picture```of Image16 that 'Variable no defined'.Also, for modHandleData in service source in **Sub HandleData**, I get an error in case```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```of FileData that 'Variable no defined'.Please help me on this.-Thanks in advance Link to comment Share on other sites More sharing options...
Robin Posted August 26, 2009 Share Posted August 26, 2009 @Rose:> Well thanks for the 1-4 for Items Robin xPIt's the basic code. In my hotbar, it's built upon a custom type.It has SlotType and ObjectNumber. I can then read the SlotType byte to determine whether to send an item use packet, or a spell cast packet. Link to comment Share on other sites More sharing options...
minipimp Posted September 1, 2009 Share Posted September 1, 2009 @Robin:> It's not hard at all.> > ```> Public Hotbar(1 to 10) as long> ```> ```> isUse = false> > Select Case KeyCode> vbKeyF1> hotslot = 1> isUse = true> vbKeyF2> hotslot = 2> isUse = true> vbKeyF3> hotslot = 3> isUse = true> vbKeyF4> hotslot = 4> isUse = true> end select> > If isUse = true then> call SendData("useitem" & SEP_CHAR & hotslot & END_CHAR)> end if> ```> It's much easier than people make it out to be.Im so sorry for asking about this but, could someone tell me were this would be placed and what would i have to do to make that work? Im just a bit confused, Sorry.Thanks. Link to comment Share on other sites More sharing options...
kokorecxd Posted September 3, 2009 Share Posted September 3, 2009 @Zamin:> Hello,> > Ok, I am having a few problems when I try to make the .exe file with this code.> > In frmMirage in **Private Sub Image5_Click()**, I get an error in line> ```> Image5.Picture = Image16.Picture> > ```of Image16 that 'Variable no defined'.> > Also, for modHandleData in service source in **Sub HandleData**, I get an error in case> ```> 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> > ```of FileData that 'Variable no defined'.> > Please help me on this.> > -Thanks in advancesome errors for me.please help us.why we are getting this errors? Link to comment Share on other sites More sharing options...
Robin Posted September 3, 2009 Share Posted September 3, 2009 ```Dim FileData as string```It's not hard. Use your common sense. Link to comment Share on other sites More sharing options...
kokorecxd Posted September 3, 2009 Share Posted September 3, 2009 i will put in handledata? Link to comment Share on other sites More sharing options...
Guest Posted September 3, 2009 Share Posted September 3, 2009 it is in your source file, did you open it with vb? Link to comment Share on other sites More sharing options...
kokorecxd Posted September 3, 2009 Share Posted September 3, 2009 i made but bars always hitting 1\. Spell why? Link to comment Share on other sites More sharing options...
Guest Posted September 3, 2009 Share Posted September 3, 2009 what? Link to comment Share on other sites More sharing options...
kokorecxd Posted September 3, 2009 Share Posted September 3, 2009 i am double clicking 2\. spell and it going in action bars.and i am clicking 3\. spell in spells box and it going in actions bars.but when i click images on action bars it hitting 1\. spell in my spell box.it dont hit 2\. spell or 3\. spell.it is hitting only 1\. spell.sorry for bad english :) Link to comment Share on other sites More sharing options...
Patrick Posted September 3, 2009 Share Posted September 3, 2009 You mean the spell only damages one HP? Thjat would be the power of the spell? Link to comment Share on other sites More sharing options...
Robin Posted September 3, 2009 Share Posted September 3, 2009 No, he means when he tries to cast the spell which is in the 3rd or 2nd slots, it's casting the spell which is in the 1st slot. Link to comment Share on other sites More sharing options...
kokorecxd Posted September 3, 2009 Share Posted September 3, 2009 Robin true.how can i fix it? Link to comment Share on other sites More sharing options...
Robin Posted September 4, 2009 Share Posted September 4, 2009 @kokorecxd:> Robin true.how can i fix it?I'm not going to even look at the tutorial again. The code makes my brain bleed. Link to comment Share on other sites More sharing options...
kris_hole Posted September 8, 2009 Share Posted September 8, 2009 @Robin:> I'm not going to even look at the tutorial again. The code makes my brain bleed.take pain pills :P always seems to work on Left4Dead :P Link to comment Share on other sites More sharing options...
zade_o Posted October 12, 2009 Author Share Posted October 12, 2009 Sweet jesus you're a douche bag Robin.Of course that code can be revised, I could make it better myself if I went through and redid it, I just cranked this out as a rough draft. And the majority of this code is to handle displaying the icons and whatnot so your simple hotbar thing wouldn't cover it all.I know you think you're the most amazing programmer, but try not to be a dick about other peoples source unless you plan on rewriting it completely in a better fashion and releasing it to the public domain for free. Link to comment Share on other sites More sharing options...
Guest Posted October 17, 2009 Share Posted October 17, 2009 @Ghost:> Sweet jesus you're a douche bag Robin.> > Of course that code can be revised, I could make it better myself if I went through and redid it, I just cranked this out as a rough draft. And the majority of this code is to handle displaying the icons and whatnot so your simple hotbar thing wouldn't cover it all.> > I know you think you're the most amazing programmer, but try not to be a dick about other peoples source unless you plan on rewriting it completely in a better fashion and releasing it to the public domain for free.Here here Link to comment Share on other sites More sharing options...
justTim Posted October 18, 2009 Share Posted October 18, 2009 hope you don't mind i post the fix for> - typing a number when talking in chat attempts to cast a spellJust go to frmMirageadd this just at the begining of Private Sub Form_KeyUp ```'check cast Dim CheckCheck = txtMyTextBox.Text Like "[0-9]"If Check = True ThentxtMyTextBox.Locked = TruetxtMyTextBox.Text = ""Else txtMyTextBox.Locked = FalseEnd If'end check```and replace```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```with that:``` If KeyCode = vbKey0 And frmMirage.txtMyTextBox.Locked <> 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.Locked <> 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.Locked <> 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.Locked <> 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.Locked <> 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.Locked <> 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 If KeyCode = vbKey6 And frmMirage.txtMyTextBox.Locked <> 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.Locked <> 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.Locked <> 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.Locked <> 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``` Link to comment Share on other sites More sharing options...
justTim Posted October 18, 2009 Share Posted October 18, 2009 hope you don't mind i post the fix for> - typing a number when talking in chat attempts to cast a spellJust go to frmMirageadd this just at the begining of Private Sub Form_KeyUp ```'check cast Dim CheckCheck = txtMyTextBox.Text Like "[0-9]"If Check = True ThentxtMyTextBox.Locked = TruetxtMyTextBox.Text = ""Else txtMyTextBox.Locked = FalseEnd If'end check```and replace```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```with that:``` If KeyCode = vbKey0 And frmMirage.txtMyTextBox.Locked <> 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.Locked <> 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.Locked <> 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.Locked <> 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.Locked <> 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.Locked <> 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 If KeyCode = vbKey6 And frmMirage.txtMyTextBox.Locked <> 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.Locked <> 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.Locked <> 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.Locked <> 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``` Link to comment Share on other sites More sharing options...
Squiddle Posted October 31, 2009 Share Posted October 31, 2009 I try to put in the first code, but I get errors on every line. I try the second code in the Server, again errors on every line. *Sigh* Link to comment Share on other sites More sharing options...
xppxdd Posted November 2, 2009 Share Posted November 2, 2009 someone can upload an image?it will help me realize what to put… Link to comment Share on other sites More sharing options...
xppxdd Posted November 3, 2009 Share Posted November 3, 2009 can somone help me?i finished put evrything in there places and when im trying to run the server its Complie clearlyno errors no bugsbut when im trying to open the client when the server (with the AB scripts on) its go to the VB6 (with the server) and mark this:"FileData =" In case:``` 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``` Link to comment Share on other sites More sharing options...
minipimp Posted November 11, 2009 Share Posted November 11, 2009 Were would I put Robins hotbar code at? Link to comment Share on other sites More sharing options...
Ertzel Posted November 11, 2009 Share Posted November 11, 2009 thats what I was wondering also :P 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