![]() |
| |||||||
| Vb Paylaşımlar Genel paylaşımlar.. |
| |
| |
![]() |
| | LinkBack | Konu Araçları | Stil |
| | #1 (permalink) |
| Acemi Oyuncu |
2 checkbox (check3 hp için check4 mp için ) 2 textbox ( text2 hp için % degeri text3 mp için ) 2 combobox ( combo1 hp combo2 mp ) 2 optionbox ( op1 hf tarzı op2 normal ) 2 label (label25 label30) 2 timer (timer5 normal timer6 hf tarzı ) 2 listbox (list2 list3) Timer Kodları Checklere birşey yazılmıycak timerlerle halledicez timer5 ( normal hp mp en = true int = 1300 ) Alıntı: Private Sub Timer5_Timer() If Option2.Value = True Then If Check3.Value = 1 Then ' HP Check aktif ise If KarakterHP < ((KarakterMaxHP * Text2.Text) / 100) Then CanPot End If End If If Check4.Value = 1 Then ' MP Check aktif ise If KarakterMP < ((KarakterMaxMP * Text3.Text) / 100) Then ManaPot End If End If End If End Sub timer6 ( hf tarzı (en = true int = 2000 ) Alıntı: Private Sub Timer6_Timer() If Option1.Value = True Then OtoPot End If End Sub Modül Kodları Alıntı: Public Sub OtoPot() If Form1.Option1.Value = True Then InventoryOku If KalanMana > 90 Then If PotAra("Potion of Spirit") = 1 Then Paket "3103207A0700" + KarakterID + KarakterID Exit Sub End If If KalanMana > 180 Then If PotAra("Potion of Intelligence") = 1 Then Paket "3103217A0700" + KarakterID + KarakterID Exit Sub End If End If If KalanMana > 480 Then If PotAra("Potion of Sagacity") = 1 Then Paket "3103227A0700" + KarakterID + KarakterID Exit Sub End If End If If KalanMana > 960 Then If PotAra("Potion of Wisdom") = 1 Then Paket "3103237A0700" + KarakterID + KarakterID Exit Sub End If End If If KalanMana > 1920 Then If PotAra("Potion of Soul") = 1 Then Paket "3103247A0700" + KarakterID + KarakterID Exit Sub End If End If ' Can Potlar If KalanCan > 70 Then If PotAra("Holy water") = 1 Then Paket "31031A7A0700" + KarakterID + KarakterID Exit Sub End If End If If KalanCan > 90 Then If PotAra("Water of life") = 1 Then Paket "31031B7A0700" + KarakterID + KarakterID Exit Sub End If End If If KalanCan > 180 Then If PotAra("Water of love") = 1 Then Paket "31031C7A0700" + KarakterID + KarakterID Exit Sub End If End If If KalanCan > 360 Then If PotAra("Water of grace") = 1 Then Paket "31031D7A0700" + KarakterID + KarakterID Exit Sub End If End If If KalanCan > 720 Then If PotAra("Water of favors") = 1 Then Paket "31031E7A0700" + KarakterID + KarakterID Exit Sub End If End If End If End If End Sub Public Function KalanMana() KalanMana = KarakterMaxMP - Form1.Label25.Caption End Function Public Function KalanCan() KalanCan = KarakterMaxHP - Form1.Label30.Caption End Function Public Function PotAra(Deger As String) Dim i For i = 0 To Form1.List3.ListCount If Form1.List3.List(i) = Deger Then PotAra = 1 Exit For Else PotAra = 0 End If Next End Function Public Sub InventoryOku() Dim tmpBase As Long, tmpLng1 As Long, tmpLng2 As Long, tmpLng3 As Long, tmpLng4 As Long Dim lngItemID As Long, lngItemID_Ext As Long, lngItemNameLen As Long, AdrItemName As Long Dim ItemNameB() As Byte Dim ItemName As String Dim i As Integer tmpBase = LongOku(KO_PTR_DLG) 'read KO_DLGBMA adress tmpLng1 = LongOku(tmpBase + &H1A0) 'first pointer Form1.List3.Clear For i = 26 To 53 'read 0 to 41 inventory slots (0=earring, 1=helmet, 2=earring, 3=necklace, 4=pauldron ....14=first inventory slot) tmpLng2 = LongOku(tmpLng1 + (&H134 + (4 * i))) 'inventory slot tmpLng3 = LongOku(tmpLng2 + &H38) 'item id adress tmpLng4 = LongOku(tmpLng2 + &H3C) 'item id_ext adress lngItemID = LongOku(tmpLng3) 'item id value lngItemID_Ext = LongOku(tmpLng4) 'item id_ext value lngItemID = lngItemID + lngItemID_Ext 'real item id lngItemNameLen = LongOku(tmpLng3 + &H10) 'n° characters in item name AdrItemName = LongOku(tmpLng3 + &HC) 'item name adress ItemName = "" 'reset ItemName variable If lngItemNameLen > 0 Then SıraByteOku AdrItemName, ItemNameB, lngItemNameLen 'get item name (byte array) ItemName = StrConv(ItemNameB, vbUnicode) 'convert it to string End If 'If ItemName = "" Then Else Form1.list2.AddItem ItemName & " " & lngItemID 'If ItemName = "" Then Else Form1.list2.ItemData(Form1.list2.NewIndex) = lngItemID 'Form1.list2.AddItem Format$(i, "00") & "- " & ItemName & " " & lngItemID If Form1.List2.ListCount = "28" Then 'Form1.list2.AddItem Form1.list2.ListCount + 1 & "-) " & ItemName Else Form1.List2.AddItem Form1.List2.ListCount + 1 & "-) " & ItemName End If If ItemName <> "" Then If Mid(ItemName, 1, 6) = "Potion" Then Form1.List3.AddItem ItemName If Mid(ItemName, 1, 5) = "Water" Then Form1.List3.AddItem ItemName If Mid(ItemName, 1, 4) = "Holy" Then Form1.List3.AddItem ItemName End If Next End Sub option kodları Alıntı: Private Sub Option1_Click() Combo1.Enabled = False Combo2.Enabled = False Text2.Enabled = False Text3.Enabled = False Check3.Enabled = False Check4.Enabled = False End Sub Private Sub Option2_Click() Combo1.Enabled = True Combo2.Enabled = True Text2.Enabled = True Text3.Enabled = True Check3.Enabled = True Check4.Enabled = True End Sub Dikkatli yaparsanız Çalışır |
| | |
![]() |
| Etiket |
| bastırma, normal, pot |
| Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir) | |
| Konu Araçları | |
| Stil | |
| |