agregan en 1 modulo
- Option Explicit
- 'Numero del npc que hay que clikear.
- Public Const IA_NPC As Integer = 80
- 'Defensa del bot jeje
- Private Const IA_MINDEF As Integer = 10
- Private Const IA_MAXDEF As Integer = 12
- 'Mapa donde spawnea.
- Private Const IA_MAP As Integer = 16
- Private Const IA_X As Byte = 50
- Private Const IA_Y As Byte = 50
- 'Posiciones donde cae el user
- Private Const IA_USERX As Byte = 44
- Private Const IA_USERY As Byte = 33
- 'Nombre del char
- Private Const IA_NAME As String = "el putisimo dios maTih.-"
- 'Te da oro al matarlo
- Private Const IA_PREMIO As Long = 100000
- 'Charindex reservado.
- Private Const IA_CHAR As Integer = 9999
- 'STATS
- Private Const IA_HP As Integer = 400
- Private Const IA_MAN As Integer = 2000
- 'Datos del char
- '/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
- 'ATENCION : Acá van los números de objetos!!!
- Private Const IA_HEAD As Integer = 4
- Private Const IA_BODY As Integer = 485
- Private Const IA_WEAPON As Integer = 660
- Private Const IA_SHIELD As Integer = 404
- Private Const IA_HELMET As Integer = 405
- 'ATENCION : Acá van los números de objetos!!!
- '/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
- 'Cantidad de hechizos que lanza
- Private Const IA_M_SPELL As Byte = 2
- 'Constantes de intervalos.
- Private Const IA_SINT As Integer = 1000 'Intervalo entre hechizo-hechizo.
- Private Const IA_SREMO As Integer = 300 'Intervalo remo.
- Private Const IA_MOVINT As Integer = 240 'Intervalo caminta.
- Private Const IA_USEOBJ As Integer = 200 'Intervalo usar potas.
- 'Probabilidades de que te pegue
- Private Const IA_CASTEO As Byte = 77
- Type ia_Interval
- SpellCount As Byte 'Intervalo para tirar hechizos.
- UseItemCount As Byte 'Intervalo para usar pociones.
- MoveCharCount As Byte 'Intervalo para mover el char.
- ParalizisCount As Byte 'Intervalo para removerse.
- End Type
- Type ia_Spells
- DamageMin As Byte 'Minimo daño que hace.
- DamageMax As Byte 'Maximo daño que hace.
- spellIndex As Byte 'Lo usamos para el fx.
- End Type
- Type Bot
- Pos As WorldPos 'Posicion en el mundo.
- Vida As Integer 'Vida del bot.
- Mana As Integer 'Mana del bot.
- Char As Char 'Apariencia.
- Invocado As Boolean 'Si existe.
- Paralizado As Boolean 'Si está inmo.
- UserIndex As Integer 'Usuario peleando con el bot.
- Intervalos As ia_Interval 'Intervalos de acciones.
- End Type
- Public ia_Bot As Bot
- Public ia_spell(1 To IA_M_SPELL) As ia_Spells
- Sub ia_CreateChar(ByVal UserIndex As Integer)
- ' @designer : maTih.-
- ' @date : 2012/02/01
- With ia_Bot.Char
- .body = ObjData(IA_BODY).Ropaje
- .Head = IA_HEAD
- .WeaponAnim = ObjData(IA_WEAPON).WeaponAnim
- .ShieldAnim = ObjData(IA_WEAPON).ShieldAnim
- .CascoAnim = ObjData(IA_HELMET).CascoAnim
- WriteCharacterCreate UserIndex, .body, .Head, eHeading.NORTH, IA_CHAR, IA_X, IA_Y, .WeaponAnim, .ShieldAnim, 0, 0, .CascoAnim, IA_NAME, 0, 0
- End With
- End Sub
- Sub ia_Spawn(ByVal UserIndex As Integer)
- ' @designer : maTih.-
- ' @date : 2012/02/01
- With ia_Bot
- WarpUserChar UserIndex, IA_MAP, IA_USERX, IA_USERY, True
- .Invocado = True
- .Mana = IA_MAN
- .Vida = IA_HP
- .UserIndex = UserIndex
- .Paralizado = False
- .Pos.Map = IA_MAP
- .Pos.X = IA_X
- .Pos.Y = IA_Y
- ia_CreateChar UserIndex
- ia_Action
- frmMain.timerIA.Enabled = True
- WriteChatOverHead UserIndex, "VENI PUTO VENI ! ejejje", IA_CHAR, vbCyan
- .Intervalos.SpellCount = 100
- End With
- End Sub
- Sub ia_Spells()
- ' @designer : maTih.-
- ' @date : 2012/02/01
- 'Un poco hardcodeado pero bueno :D
- 'Hechizo 1 : descarga.
- ia_spell(1).DamageMax = 120
- ia_spell(1).DamageMax = 177
- ia_spell(1).spellIndex = 23
- 'Hechizo 2 : apoca
- ia_spell(2).DamageMin = 190
- ia_spell(2).DamageMax = 220
- ia_spell(2).spellIndex = 25
- End Sub
- Sub ia_MoveChar(ByRef hError As Boolean)
- ' @designer : maTih.-
- ' @date : 2012/02/01
- With ia_Bot
- Dim nRandom As Byte
- '25% De probabilidades de moverse a
- 'cualquiera de las cuatro direcciones.
- nRandom = RandomNumber(1, 4)
- Select Case nRandom
- Case 1
- If ia_LegalPos(.Pos.X + 1, .Pos.Y) = False Then hError = True: Exit Sub
- .Pos.X = .Pos.X + 1
- Case 2
- If ia_LegalPos(.Pos.X - 1, .Pos.Y) = False Then hError = True: Exit Sub
- .Pos.X = .Pos.X - 1
- Case 3
- If ia_LegalPos(.Pos.X, .Pos.Y + 1) = False Then hError = True: Exit Sub
- .Pos.Y = .Pos.Y + 1
- Case 4
- If ia_LegalPos(.Pos.X, .Pos.Y - 1) = False Then hError = True: Exit Sub
- .Pos.Y = .Pos.Y - 1
- End Select
- End With
- End Sub
- Function ia_LegalPos(ByVal X As Byte, ByVal Y As Byte) As Boolean
- ' @designer : maTih.-
- ' @date : 2012/02/01
- ' @modificated : Esta función ya no trabaja con la pos del npc si no que ahora usa los parámetros.
- ia_LegalPos = False
- With MapData(IA_MAP, X, Y)
- '¿Es un mapa valido?
- If (IA_MAP <= 0 Or IA_MAP > NumMaps) Or (X < MinXBorder Or X > MaxXBorder Or Y < MinYBorder Or Y > MaxYBorder) Then Exit Function
- 'Tile bloqueado?
- If .Blocked <> 0 Then Exit Function
- 'Hay un usuario?
- If .UserIndex > 0 Then
- 'Si no es un adminInvisible entonces nos vamos.
- If UserList(.UserIndex).flags.AdminInvisible <> 1 Then Exit Function
- End If
- 'Hay un NPC?
- if .NpcIndex <> 0 then exit function
- 'Válido para evitar el rango Y pero no su eje X.
- If Abs(Y - UserList(ia_Bot.UserIndex).Pos.Y) > RANGO_VISION_Y Then Exit Function
- If Abs(X - UserList(ia_Bot.UserIndex).Pos.X) > RANGO_VISION_X Then Exit Function
- ia_LegalPos = True
- End With
- End Function
- Sub ia_Action()
- ' @designer : maTih.-
- ' @date : 2012/02/01
- Dim pIndex As Integer
- Dim sRandom As Byte
- Dim rMan As Integer
- Dim foundErr As Boolean
- With ia_Bot
- pIndex = .UserIndex
- 'ilógico que pase..
- If pIndex <= 0 Then Exit Sub
- 'Contadores de intervalo.
- ia_CheckInts
- 'Si se puede mover AND no está inmo se mueve al azar.
- If .Intervalos.MoveCharCount = 0 And .Paralizado = False Then
- ia_MoveChar foundErr
- If foundErr Then Exit Sub
- 'NEW--------
- 'Checkeo si es una posición válida.
- 'Actualizamos solamente el cliente del usuario.
- WriteCharacterMove pIndex, IA_CHAR, .Pos.X, .Pos.Y
- 'Testeo
- .Intervalos.MoveCharCount = (IA_MOVINT / 40)
- End If
- 'STATS..
- 'Prioriza la vida ante todo
- If .Vida < IA_HP Then
- 'Checkeo el intervalo.
- If .Intervalos.UseItemCount > 0 Then Exit Sub
- 'Recupera 30 cada 200 ms.
- .Vida = .Vida + 30
- If .Vida > IA_HP Then .Vida = IA_HP
- 'Uso la poción, seteo el interval
- .Intervalos.UseItemCount = (IA_USEOBJ / 40)
- Exit Sub
- End If
- 'Si tenia la vida llena usa azules.
- If .Mana < IA_MAN Then
- 'Checkeo el intervalo.
- If .Intervalos.UseItemCount = 0 Then
- 'Recupera el 3% de la mana.
- .Mana = .Mana + Porcentaje(IA_MAN, 3)
- If .Mana > IA_MAN Then .Mana = IA_MAN
- .Intervalos.UseItemCount = (IA_USEOBJ / 40)
- End If
- 'Hacer una constante después, con esto hacemos un random
- 'Para que azulee y combee a la ves.
- If RandomNumber(1, 4) < 4 Then Exit Sub
- End If
- 'Bueno si está acá es por que tenia la vida y mana llenas.
- 'Puede castear?
- If .Intervalos.SpellCount = 0 Then
- 'Feo, aunque digamos que solo hace apoca desc remo
- 'Así que va a andar bien.
- 'Si la mana es < a 300 [gasto del remo] no hacemos nada.
- If .Mana < 300 Then Exit Sub
- 'Si está paralizado prioriza removerse.
- If .Paralizado Then
- WriteChatOverHead pIndex, Hechizos(10).PalabrasMagicas, IA_CHAR, vbCyan
- .Paralizado = False
- 'Agrego esto por que si no tirarle inmo era al pedo
- 'Seguia caminando practicamente :PP
- .Intervalos.ParalizisCount = (IA_SREMO / 40)
- 'Se removió entonces salimos del sub y seteamos el intervalo
- .Intervalos.SpellCount = (IA_SINT / 40)
- Exit Sub
- End If
- 'No está paralizado entonces castea un hechizo random.
- 'Si, es un robot, pero puede manquear no?
- If RandomNumber(1, 100) > IA_CASTEO Then Exit Sub
- sRandom = RandomNumber(1, IA_M_SPELL)
- 'Si no llega con la mana del hechizo AND la del otro
- 'tampoco entonces no hacemos nada
- If sRandom = 1 Then
- 'Si no llega a la mana del spell 1 (descarga)
- 'No hacemos nada ya que tampoco llega
- 'al apocalipsis.
- rMan = Hechizos(ia_spell(1).spellIndex).ManaRequerido
- If rMan > .Mana Then Exit Sub
- ElseIf sRandom = 2 Then
- rMan = Hechizos(ia_spell(2).spellIndex).ManaRequerido
- 'Pero si es spell 2 (apoca) AND llegamos
- 'con la mana para descarga, entonces
- 'Seteamos sRandom como 1 y casteamos
- 'descarga.
- If rMan > .Mana Then
- 'Modifico la formula y hago un random
- 'Dado a que una ves que queda en -1000 de mana
- 'Nunca más tira apoca y castea puras descargas.
- If .Mana > 460 And RandomNumber(1, 100) < 50 Then
- sRandom = 1
- Else
- Exit Sub
- End If
- End If
- rMan = Hechizos(ia_spell(sRandom).spellIndex).ManaRequerido
- 'Descontamos la maná y seteamos el intervalo.
- .Mana = .Mana - rMan
- .Intervalos.SpellCount = (IA_SINT / 20) 'Se chekea cada 40 ms.
- 'Creamos el fx y le descontamos la vida al usuario.
- WriteCreateFX pIndex, UserList(pIndex).Char.CharIndex, Hechizos(ia_spell(sRandom).spellIndex).FXgrh, Hechizos(ia_spell(sRandom).spellIndex).loops
- WriteChatOverHead pIndex, Hechizos(ia_spell(sRandom).spellIndex).PalabrasMagicas, IA_CHAR, vbCyan
- 'Random damage :D
- sRandom = RandomNumber(ia_spell(sRandom).DamageMin, ia_spell(sRandom).DamageMax)
- 'Quitamos daño.
- UserList(pIndex).Stats.MinHp = UserList(pIndex).Stats.MinHp - sRandom
- 'Check si muere.
- If UserList(pIndex).Stats.MinHp <= 0 Then
- UserDie pIndex
- ia_EraseChar
- End If
- 'Actualizamos el cliente.
- WriteUpdateHP pIndex
- End If
- End If
- End With
- End Sub
- Function ia_Check(ByVal UserIndex As Integer, ByVal X As Byte, ByVal Y As Byte) As Boolean
- ' @designer : maTih.-
- ' @date : 2012/02/01
- With ia_Bot
- If .Invocado Then
- If .UserIndex = UserIndex Then
- If .Pos.X = X And .Pos.Y = Y Then
- ia_Check = True
- UserList(UserIndex).flags.TargetBOT = True
- WriteConsoleMsg UserIndex, "Ves a " & IA_NAME & " [BOT]", FontTypeNames.FONTTYPE_CITIZEN
- Exit Function
- End If
- End If
- End If
- ia_Check = False
- End With
- End Function
- Sub ia_UserDamage(ByVal Spell As Byte)
- ' @designer : maTih.-
- ' @date : 2012/02/01
- Dim rMan As Integer
- Dim damage As Integer
- Dim usedFont As FontTypeNames
- usedFont = FontTypeNames.FONTTYPE_CITIZEN
- 'Checkeo que el hechizo no sea 0.
- If Not Spell <> 0 Then Exit Sub
- With UserList(ia_Bot.UserIndex)
- rMan = Hechizos(Spell).ManaRequerido
- 'Llega con la mana?
- If rMan > .Stats.MinMAN Then
- WriteConsoleMsg ia_Bot.UserIndex, "No tienes suficiente mana!", usedFont
- Exit Sub
- End If
- 'Energia?
- If Hechizos(Spell).StaRequerido > .Stats.MinSta Then
- WriteConsoleMsg ia_Bot.UserIndex, "No tienes suficiente energia!", usedFont
- Exit Sub
- End If
- If Hechizos(Spell).Inmoviliza Or Hechizos(Spell).Paraliza Then
- 'Le pongo el flag en verdadero.
- ia_Bot.Paralizado = True
- 'Mensaje informando.
- WriteConsoleMsg ia_Bot.UserIndex, "Has paralizado ah " & IA_NAME, usedFont
- 'Creo la animacion sobre el char.
- WriteCreateFX ia_Bot.UserIndex, IA_CHAR, Hechizos(Spell).FXgrh, Hechizos(Spell).loops
- 'SpellWorlds .
- DecirPalabrasMagicas Hechizos(Spell).PalabrasMagicas, ia_Bot.UserIndex
- 'Quito mana y energia
- .Stats.MinMAN = .Stats.MinMAN - rMan
- .Stats.MinSta = .Stats.MinSta - Hechizos(Spell).StaRequerido
- 'le doy intervalo
- ia_Bot.Intervalos.ParalizisCount = (IA_SREMO / 2)
- WriteUpdateUserStats ia_Bot.UserIndex
- Exit Sub
- End If
- damage = RandomNumber(Hechizos(Spell).MinHp, Hechizos(Spell).MaxHp)
- damage = damage + Porcentaje(damage, 3 * .Stats.ELV)
- If Not damage <> 0 Then Exit Sub
- 'Quitamos vida
- ia_Bot.Vida = ia_Bot.Vida - damage
- 'Aviso al usuario.
- WriteConsoleMsg ia_Bot.UserIndex, "Le has quitado " & damage & " puntos de vida a " & IA_NAME, usedFont
- 'Tiro las spell worlds
- DecirPalabrasMagicas Hechizos(Spell).PalabrasMagicas, ia_Bot.UserIndex
- 'Creo el fx.
- WriteCreateFX ia_Bot.UserIndex, IA_CHAR, Hechizos(Spell).FXgrh, Hechizos(Spell).loops
- 'saco mana y energia y actualizo el cliente
- .Stats.MinMAN = .Stats.MinMAN - rMan
- .Stats.MinSta = .Stats.MinSta - Hechizos(Spell).StaRequerido
- WriteUpdateUserStats ia_Bot.UserIndex
- If ia_Bot.Vida <= 0 Then
- 'Murió?
- ia_EraseChar True
- End If
- End With
- End Sub
- Sub ia_DamageHit()
- ' @designer : maTih.-
- ' @date : 2012/02/01
- Dim nDamage As Integer
- nDamage = CalcularDaño(ia_Bot.UserIndex)
- nDamage = nDamage - (RandomNumber(IA_MINDEF, IA_MAXDEF))
- WriteConsoleMsg ia_Bot.UserIndex, "Le has pegado ah " & IA_NAME & " por " & nDamage, FontTypeNames.FONTTYPE_CITIZEN
- WriteChatOverHead ia_Bot.UserIndex, "-" & nDamage, IA_CHAR, vbCyan
- ia_Bot.Vida = ia_Bot.Vida - nDamage
- If ia_Bot.Vida <= 0 Then
- ia_EraseChar True
- End If
- End Sub
- Sub ia_EraseChar(Optional ByVal killedbyUSER As Boolean = False)
- ' @designer : maTih.-
- ' @date : 2012/02/01
- With ia_Bot
- WriteCharacterRemove .UserIndex, IA_CHAR
- WarpUserChar .UserIndex, 1, 50, 50, True
- With .Char
- .body = 0
- .CascoAnim = 0
- .FX = 0
- .loops = 0
- .Head = 0
- .heading = 0
- .ShieldAnim = 0
- .WeaponAnim = 0
- End With
- .Vida = 0
- .Mana = 0
- If killedbyUSER = False Then .UserIndex = 0
- With .Pos
- .Map = 0
- .X = 0
- .Y = 0
- End With
- .Invocado = False
- .Paralizado = False
- With .Intervalos
- .MoveCharCount = 0
- .SpellCount = 0
- .UseItemCount = 0
- .ParalizisCount = 0
- End With
- If .UserIndex > 0 Then
- WriteConsoleMsg .UserIndex, "Has matado ah " & IA_NAME, FontTypeNames.FONTTYPE_CITIZEN
- UserList(.UserIndex).Stats.GLD = UserList(.UserIndex).Stats.GLD + IA_PREMIO
- WriteUpdateGold .UserIndex
- .UserIndex = 0
- End If
- frmMain.timerIA.Enabled = False
- End With
- End Sub
- Sub ia_CheckInts()
- ' @designer : maTih.-
- ' @date : 2012/02/01
- With ia_Bot.Intervalos
- If .MoveCharCount > 0 Then .MoveCharCount = .MoveCharCount - 1
- If .SpellCount > 0 Then .SpellCount = .SpellCount - 1
- If .UseItemCount > 0 Then .UseItemCount = .UseItemCount - 1
- If .ParalizisCount > 0 Then .ParalizisCount = .ParalizisCount - 1
- End With
- End Sub
remplazan el sub usuarioataca por este
- Public Sub UsuarioAtaca(ByVal userIndex As Integer)
- '***************************************************
- 'Author: Unknown
- 'Last Modification: -
- '
- '***************************************************
- Dim Index As Integer
- Dim AttackPos As WorldPos
- 'Check bow's interval
- If Not IntervaloPermiteUsarArcos(userIndex, False) Then Exit Sub
- 'Check Spell-Magic interval
- If Not IntervaloPermiteMagiaGolpe(userIndex) Then
- 'Check Attack interval
- If Not IntervaloPermiteAtacar(userIndex) Then
- Exit Sub
- End If
- End If
- With UserList(userIndex)
- 'Quitamos stamina
- If .Stats.MinSta >= 10 Then
- Call QuitarSta(userIndex, RandomNumber(1, 10))
- Else
- If .Genero = eGenero.Hombre Then
- Call WriteConsoleMsg(userIndex, "Estás muy cansado para luchar.", FontTypeNames.FONTTYPE_INFO)
- Else
- Call WriteConsoleMsg(userIndex, "Estás muy cansada para luchar.", FontTypeNames.FONTTYPE_INFO)
- End If
- Exit Sub
- End If
- AttackPos = .Pos
- Call HeadtoPos(.Char.heading, AttackPos)
- 'Exit if not legal
- If AttackPos.X < XMinMapSize Or AttackPos.X > XMaxMapSize Or AttackPos.Y <= YMinMapSize Or AttackPos.Y > YMaxMapSize Then
- Call SendData(SendTarget.ToPCArea, userIndex, PrepareMessagePlayWave(SND_SWING, .Pos.X, .Pos.Y))
- Exit Sub
- End If
- If ia_Bot.Invocado Then
- If ia_Bot.userIndex = userIndex Then
- If ia_Bot.Pos.X = AttackPos.X And ia_Bot.Pos.Y = AttackPos.Y Then
- ia_DamageHit
- End If
- End If
- End If
- Index = MapData(AttackPos.Map, AttackPos.X, AttackPos.Y).userIndex
- 'Look for user
- If Index > 0 Then
- Call UsuarioAtacaUsuario(userIndex, Index)
- Call WriteUpdateUserStats(userIndex)
- Call WriteUpdateUserStats(Index)
- Exit Sub
- End If
- Index = MapData(AttackPos.Map, AttackPos.X, AttackPos.Y).NPCIndex
- 'Look for NPC
- If Index > 0 Then
- If Npclist(Index).Attackable Then
- If Npclist(Index).MaestroUser > 0 And MapInfo(Npclist(Index).Pos.Map).Pk = False Then
- Call WriteConsoleMsg(userIndex, "No puedes atacar mascotas en zona segura.", FontTypeNames.FONTTYPE_FIGHT)
- Exit Sub
- End If
- Call UsuarioAtacaNpc(userIndex, Index)
- Else
- Call WriteConsoleMsg(userIndex, "No puedes atacar a este NPC.", FontTypeNames.FONTTYPE_FIGHT)
- End If
- Call WriteUpdateUserStats(userIndex)
- Exit Sub
- End If
- Call SendData(SendTarget.ToPCArea, userIndex, PrepareMessagePlayWave(SND_SWING, .Pos.X, .Pos.Y))
- Call WriteUpdateUserStats(userIndex)
- If .Counters.Trabajando Then .Counters.Trabajando = .Counters.Trabajando - 1
- If .Counters.Ocultando Then .Counters.Ocultando = .Counters.Ocultando - 1
- End With
- End Sub
agregan al type UserFlags
- TargetBOT as boolean
buscan en el sub handleworkleftclick
- 'Check intervals and cast
- If .flags.Hechizo > 0 Then
- Call LanzarHechizo(.flags.Hechizo, userIndex)
- .flags.Hechizo = 0
- Else
- Call WriteConsoleMsg(userIndex, "¡Primero selecciona el hechizo que quieres lanzar!", FontTypeNames.FONTTYPE_INFO)
- End If
arriba ponen
- 'Si tiene el bot targeteado AND es el que esta contra
- 'El bot, dañamos.
- If .flags.TargetBOT Then
- If ia_Bot.userIndex = userIndex Then
- If .flags.Hechizo > 0 Then
- ia_UserDamage .flags.Hechizo
- .flags.TargetBOT = False
- .flags.Hechizo = 0
- Exit Sub
- End If
- End If
- End If
buscan en el sub lookattile
- '¿Es un personaje?
arriba ponen
- If Y + 1 <= YMaxMapSize Then
- ia_Check userIndex, X, Y + 1
- ia_Check userIndex, X, Y
- End If
crean un timer en el frmmain y le ponen estas propiedades
Name=timerIA
Interval=40
Enabled=False
le hacen 2 click y leponen esto de codiog
- If ia_Bot.Invocado Then ia_Action
van al sub main() y agregan
- call ia_Spells
bueno ahora buscamos
- Talk ';
abajo ponemos
- BotCombat '/COMBATIR
buscan
- Case ClientPacketID.Talk ';
- Call HandleTalk(userIndex)
abajo ponen
- Case ClientPacketID.BotCombat
- Call HandlebotCombat(userIndex)
agregan arriba de
- private sub handletalk
- Private Sub handleBotCombat(ByVal userIndex As Integer)
- ' @designer : maTih.-
- ' @date : 2012/02/01
- With UserList(userIndex)
- Dim tNpc As Integer
- Dim uFnt As FontTypeNames
- uFnt = FontTypeNames.FONTTYPE_CITIZEN
- tNpc = .flags.targetNPC
- .incomingData.ReadByte
- If .flags.Muerto Then
- WriteConsoleMsg userIndex, "Estas muerto!", uFnt
- Exit Sub
- End If
- If .Counters.Pena > 0 Then
- WriteConsoleMsg userIndex, "Estas preso!", uFnt
- Exit Sub
- End If
- If Not tNpc <> 0 Then
- WriteConsoleMsg userIndex, "Debes seleccionar un npc.", uFnt
- Exit Sub
- End If
- If Npclist(tNpc).Numero <> IA_NPC Then
- WriteConsoleMsg userIndex, "Debes buscar al npc Entrenador de duelos!", uFnt
- Exit Sub
- End If
- If ia_Bot.Invocado Then
- WriteChatOverHead userIndex, "Ya hay un usuario combatiendo, intenta luego.", Npclist(tNpc).Char.CharIndex, vbCyan
- Exit Sub
- End If
- ia_Spawn userIndex
- End With
- End Sub
cliente
buscan
- Talk ';
abajo
- BotCombat '/COMBATIR
agregan arriba de
- public sub WriteTalk
- Sub WriteBotCombat()
- ' @designer : maTih.-
- ' @date : 2012/02/01
- outgoingData.WriteByte ClientPacketID.BotCombat
- End Sub
buscan
- case "/meditar"
Arriba ponen
- Case "/COMBATIR"
- WriteBOTCOMBAT
datean un npc con algo asi
- [NPCXXX] 'Mercader
- Name=Mercader
- NpcType=0
- Desc=Hola fraksa2,si queres ser humillado por una computadora, clikeame y pone /COMBATIR, No me hago cargo de lo frustrado que podés llegar a qedar
- Head=2
- Heading=3
- Body=3
- Movement=1
- Attackable=0
- ReSpawn=0
- Hostile=0
- Domable=0
- Alineacion=0
- Comercia=0
bien con eso estaría, cosas que tienen que cambiar :
'Numero del npc que hay que clikear.
Public Const IA_NPC As Integer = 80
re obvio
'Defensa del bot jeje
Private Const IA_MINDEF As Integer = 10
Private Const IA_MAXDEF As Integer = 12
re obvio
'Mapa donde spawnea.
Private Const IA_MAP As Integer = 16
Private Const IA_X As Byte = 50
Private Const IA_Y As Byte = 50
re obvio
'Posiciones donde cae el user
Private Const IA_USERX As Byte = 44
Private Const IA_USERY As Byte = 33
re obvio
'Nombre del char
Private Const IA_NAME As String = "el putisimo dios maTih.-"
re obvio
'Te da oro al matarlo
Private Const IA_PREMIO As Long = 100000
re obvio
'STATS
Private Const IA_HP As Integer = 400
Private Const IA_MAN As Integer = 2000
re obvio
'Datos del char
'/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
'ATENCION : Acá van los números de objetos!!!
Private Const IA_HEAD As Integer = 4
Private Const IA_BODY As Integer = 485
Private Const IA_WEAPON As Integer = 660
Private Const IA_SHIELD As Integer = 404
Private Const IA_HELMET As Integer = 405
'ATENCION : Acá van los números de objetos!!!
'/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
eso es el eqipo , helmet = casco, shield = escudo, weapon = arma, body = armadura y head= cabeza
'Constantes de intervalos.
Private Const IA_SINT As Integer = 1000 'Intervalo entre hechizo-hechizo.
Private Const IA_SREMO As Integer = 300 'Intervalo remo.
Private Const IA_MOVINT As Integer = 240 'Intervalo caminta.
Private Const IA_USEOBJ As Integer = 200 'Intervalo usar potas.
re obvio
'Probabilidades de que te pegue
Private Const IA_CASTEO As Byte = 77
probabilidades de manquear, entre mas dice ahi menos manquea
PD: Está hecho así no más y es bastantee básico, pero para los que me lo pidieron/querian saber mas o menos como hacerlo
Video subido por milagrosa :
http://www.youtube.com/watch?v=JbkY1vhTo8Y&feature=youtu.be




800 ![Dragon Ancestral [1] Dragon Ancestral [1]](./images/ranks/Rango30.gif)



![Dragon Ancestral [2] Dragon Ancestral [2]](./images/ranks/Rango31.gif)



![Dragon Ancestral [3] Dragon Ancestral [3]](./images/ranks/Rango32.gif)

![Newbie [4] Newbie [4]](./images/ranks/Rango3.gif)

![Dragon Ancestral [4] Dragon Ancestral [4]](./images/ranks/Rango33.gif)


![Destructor de Mentes [6] Destructor de Mentes [6]](./images/ranks/Rango18.gif)
![Newbie [5] Newbie [5]](./images/ranks/Rango4.gif)


![Aprendiz [4] Aprendiz [4]](./images/ranks/Rango9.gif)



![Aprendiz [7] Aprendiz [7]](./images/ranks/Rango12.gif)
