http://heavenswings.ace.st
Would you like to react to this message? Create an account in a few clicks or log in to continue.


http://heavenswings.ace.st Herkez Gelsin Bu Site Kapanacaktır!
 
AnasayfaAnasayfa  Latest imagesLatest images  Kayıt OlKayıt Ol  Giriş yapGiriş yap  

 

 [Guide]New Dmg System

Aşağa gitmek 
YazarMesaj
carpediem
Admin
carpediem


Mesaj Sayısı : 236
Kayıt tarihi : 18/05/08
Nerden : São Paulo/Brasil

[Guide]New Dmg System Empty
MesajKonu: [Guide]New Dmg System   [Guide]New Dmg System Icon_minitimeSalı Mayıs 20, 2008 9:02 am

[Guide]New Dmg System
hi all i patch new dmg system

modAttack.bas in
NormalAttack

Code:
Public Function NormalAttack(index As Integer)

Dim ObjectID As String
Dim SkillID As String
Dim CastingID As String
Dim Crit As String
Dim AfterState As String
Dim Damage As String
Dim NumTargets As Integer
Dim PhyMin As String 'new
Dim PhyMax As String 'new

PhyMin = PlayerData(index).MinPhyAtk 'new
PhyMax = PlayerData(index).MaxPhyAtk 'new


ObjectID = PlayerData(index).AttackingID
PlayerData(index).Attacking = True

'Build Attack Packet
fData = "45B2"
fData = fData & "0000"
fData = fData & "0102"
fData = fData & "02000000" 'attack type blade/sword = 0200 glaive/spear = 2800
fData = fData & PlayerData(index).CharID
fData = fData & (Inverse(DecToHexLong(Int(Rnd * 1048575) + 65536))) 'over id
fData = fData & ObjectID
fData = fData & "01"
fData = fData & "01" 'Num Attacks
fData = fData & "01" 'Num Mobs
fData = fData & ObjectID

If ((Rnd * 100) + 10) > 75 Then 'the 10 should be the crit of the weapon
Crit = "02"
Else
Crit = "01"
End If
Damage = ((Rnd * PhyMin) + PhyMax) ' new dmg
If Crit = "02" Then Damage = Damage * 2

Damage = Inverse(DecToHex10Long(CInt(Damage)))

For i = 1 To 200 ' number of mobs in world
If ObjectID = Mobs(i).ID Then
If Mobs(i).HP <= 0 Then Exit Function
Mobs(i).HP = Mobs(i).HP - HexToDec(Inverse(Damage))
If Mobs(i).HP < 0 Then
AfterState = "80" 'dead
Else
AfterState = "00"
End If
Exit For
End If
Next i

fData = fData & AfterState
fData = fData & Crit
fData = fData & Damage
fData = fData & "0000"
pLen = (Len(fData) - Cool / 2
fData = WordFromInteger(pLen) & fData

'Broadcast attack data.
For x = 1 To UBound(PlayerData)
If PlayerData(x).Ingame = True Then
frmMain.GameSocket(x).SendData cv_StringFromHex(fData)
End If
Next x

If AfterState = "80" Then 'remove dead mob after 4 seconds

'After attacking is over

'If the killed monster was a unique, we shell inform the players
If ObjectID = UniqueID(1) Then 'Tiger Girl
UniqueAnnounce True, PlayerData(index).Charname, "1954"
End If
If ObjectID = UniqueID(2) Then 'Tiger Girl
UniqueAnnounce True, PlayerData(index).Charname, "1982"
End If
If ObjectID = UniqueID(3) Then 'Tiger Girl
UniqueAnnounce True, PlayerData(index).Charname, "2002"
End If
If ObjectID = UniqueID(4) Then 'Tiger Girl
UniqueAnnounce True, PlayerData(index).Charname, "3810"
End If
If ObjectID = UniqueID(5) Then 'Tiger Girl
UniqueAnnounce True, PlayerData(index).Charname, "23638"
End If
If ObjectID = UniqueID(6) Then 'Captin Ivy
UniqueAnnounce True, PlayerData(index).Charname, "23639"
End If

Load frmMain.DeathTimer(i)
frmMain.DeathTimer(i).Interval = 4000
frmMain.DeathTimer(i).Enabled = True
PlayerData(index).Attacking = False

fData = "0200"
fData = fData & "CDB2"
fData = fData & "0000"
fData = fData & "0200"
frmMain.GameSocket(index).SendData cv_StringFromHex(fData)

'sp/xp
fData = "0D00"
fData = fData & "D230"
fData = fData & "0000"
fData = fData & ObjectID
fData = fData & Inverse(DecToHexLong(1))
fData = fData & Inverse(DecToHexLong(1))
fData = fData & "00"

For i = 1 To UBound(PlayerData)
If PlayerData(i).Ingame = True Then
frmMain.GameSocket(i).SendData cv_StringFromHex(fData)
End If
Next i

'Berserk orb
If ((Rnd * 10) + 0) > 7 Then 'not sure what the chance of getting a Berserk orb is 30% isnt bad
fData = "0600"
fData = fData & "B330"
fData = fData & "0000"
fData = fData & "04"
fData = fData & ByteFromInteger((PlayerData(index).BerserkBar + 1))
fData = fData & ObjectID
If PlayerData(index).BerserkBar < 5 Then
PlayerData(index).BerserkBar = PlayerData(index).BerserkBar + 1
For i = 1 To UBound(PlayerData)
If PlayerData(i).Ingame = True Then
frmMain.GameSocket(i).SendData cv_StringFromHex(fData)
End If
Next i
End If
End If
End If

frmMain.AttackDelay(index).Interval = 1350
frmMain.AttackDelay(index).Enabled = True

End Function


AttackSkill:

Code:
Public Function AttackSkill(index As Integer)

Dim ObjectID(1 To 9) As String
Dim SkillID As String
Dim CastingID As String
Dim Crit As String
Dim AfterState As String
Dim Damage As String
Dim NumTargets As Integer
Dim TimerVar As Integer
Dim PhyMin As String
Dim PhyMax As String

PhyMin = PlayerData(index).MinPhyAtk
PhyMax = PlayerData(index).MaxPhyAtk

'Check if the skill can hit multiple targets and if so check the radius and get all the mobs in the radius
'and put them into the ObjectID Array
'Check if its a multi hit skill
ObjectID(1) = PlayerData(index).AttackingID
SkillID = PlayerData(index).AttackSkillID
NumTargets = 1

fData = "45B2"
fData = fData & "0000"
fData = fData & "0102"
fData = fData & SkillID
fData = fData & PlayerData(index).CharID
CastingID = (Inverse((DecToHexLong(Int(Rnd * 1548575) + 65536))))
fData = fData & CastingID
fData = fData & ObjectID(1)
fData = fData & "00"

pLen = (Len(fData) - Cool / 2
fData = WordFromInteger(pLen) & fData
For i = 1 To UBound(PlayerData)
If PlayerData(i).Ingame = True Then
frmMain.GameSocket(i).SendData cv_StringFromHex(fData)
End If
Next i

'then you need to wait the casting time then

fData = "05B5"
fData = fData & "0000"
fData = fData & "01"
fData = fData & CastingID
fData = fData & ObjectID(1)
fData = fData & "01"
fData = fData & "01" 'Num Attacks
fData = fData & ByteFromInteger(NumTargets)

For x = 1 To NumTargets

fData = fData & ObjectID(x)
If ((Rnd * 50) + 10) > 35 Then 'the 10 should be the crit of the weapon
Crit = "02"
Else
Crit = "01"
End If
Damage = ((Rnd * PhyMin) + PhyMax)
If Crit = "02" Then Damage = Damage * 2
Damage = Inverse(DecToHex10Long(CInt(Damage)))

For i = 1 To 200 'Number of mobs in area
If ObjectID(x) = Mobs(i).ID Then
If Mobs(i).HP <= 0 Then Exit Function
TimerVar = i
Mobs(i).HP = Mobs(i).HP - HexToDec(Inverse(Damage))
If Mobs(i).HP < 0 Then
AfterState = "80" 'dead
Else
AfterState = "00"
End If
Exit For
End If
Next i

fData = fData & AfterState
fData = fData & Crit
fData = fData & Damage
fData = fData & "0000"

Next x

pLen = (Len(fData) - Cool / 2
fData = WordFromInteger(pLen) & fData
For i = 1 To UBound(PlayerData)
If PlayerData(i).Ingame = True Then
frmMain.GameSocket(i).SendData cv_StringFromHex(fData)
End If
Next i

'Skill Over
fData = "0200"
fData = fData & "CDB2"
fData = fData & "0000"
fData = fData & "0200"
frmMain.GameSocket(index).SendData cv_StringFromHex(fData)

'If mob is dead
If AfterState = "80" Then 'remove dead mob after 4 seconds
For x = 1 To NumTargets
Select Case ObjectID(x)
Case UniqueID(1)
UniqueAnnounce True, PlayerData(index).Charname, "1954"
Case UniqueID(2)
UniqueAnnounce True, PlayerData(index).Charname, "1982"
Case UniqueID(3)
UniqueAnnounce True, PlayerData(index).Charname, "2002"
Case UniqueID(4)
UniqueAnnounce True, PlayerData(index).Charname, "3810"
Case UniqueID(5)
UniqueAnnounce True, PlayerData(index).Charname, "23638"
Case UniqueID(6)
UniqueAnnounce True, PlayerData(index).Charname, "23639"
End Select
Next x
Load frmMain.DeathTimer(TimerVar)
frmMain.DeathTimer(TimerVar).Interval = 4000
frmMain.DeathTimer(TimerVar).Enabled = True

'sp/xp
fData = "0D00"
fData = fData & "D230"
fData = fData & "0000"
fData = fData & ObjectID(1)
fData = fData & Inverse(DecToHexLong(1))
fData = fData & Inverse(DecToHexLong(1))
fData = fData & "00"

For i = 1 To UBound(PlayerData)
If PlayerData(i).Ingame = True Then
frmMain.GameSocket(i).SendData cv_StringFromHex(fData)
End If
Next i

'Berserk orb
If ((Rnd * 10) + 0) > 7 Then 'not sure what the chance of getting a Berserk orb is 30% isnt bad

fData = "0600"
fData = fData & "B330"
fData = fData & "0000"
fData = fData & "04"
fData = fData & ByteFromInteger((PlayerData(index).BerserkBar + 1))
fData = fData & ObjectID(1)
If PlayerData(index).BerserkBar < 5 Then
PlayerData(index).BerserkBar = PlayerData(index).BerserkBar + 1
For i = 1 To UBound(PlayerData)
If PlayerData(i).Ingame = True Then
frmMain.GameSocket(i).SendData cv_StringFromHex(fData)
End If
Next i
End If
End If
End If

PlayerData(index).UsingSkill = True
PlayerData(index).AttackSkillID = ""
frmMain.AttackDelay(index).Interval = 2200 'skill delay
frmMain.AttackDelay(index).Enabled = True

End Function




.ini files in
minphyatk
maxphyatk

change
Sayfa başına dön Aşağa gitmek
https://worldhackteam.forumdizini.com
 
[Guide]New Dmg System
Sayfa başına dön 
1 sayfadaki 1 sayfası
 Similar topics
-
» [GUIDE]Working Player Pot System
» [Guide] GlobalChat-Function 4 VB
» [Guide] Weather-Function 4 VB
» [Guide]Skill upgrade
» [Guide] Exchange-Function 4 VB

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
http://heavenswings.ace.st :: http://heavenswings.ace.st :: http://heavenswings.ace.st-
Buraya geçin: