Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Buscar el check user level en el server y pegas esto
- Public Sub CheckUserLevel(ByVal UserIndex As Integer)
- On Error GoTo CheckUserLevel_Error
- 'by lucho for dolwur
- Dim Pts As Integer
- Dim AumentoHIT As Integer
- Dim AumentoMANA As Integer
- Dim AumentoSTA As Integer
- Dim AumentoHP As Integer
- Dim WasNewbie As Boolean
- Dim WasQuince As Boolean
- Dim WasSiete As Boolean
- Dim WasOcho As Boolean
- Dim WasNueve As Boolean
- Dim WasQuinceElv As Boolean
- Dim WasVeinte As Boolean
- Dim WasVeinticinco As Boolean
- Dim WasQuinceM As Boolean
- Dim WasTreintaM As Boolean
- Dim WasHM As Boolean
- Dim WasUM As Boolean
- Dim WasMM As Boolean
- Dim WasVip As Boolean
- Dim WasVipp As Boolean
- Dim WasVipb As Boolean
- Dim WasNoUM As Boolean
- Dim waspremium As Boolean
- Dim Promedio As Double
- Dim aux As Integer
- Dim DistVida(1 To 5) As Integer
- Dim GI As Integer 'Guild Index
- 10 WasNewbie = EsNewbie(UserIndex)
- 20 WasQuince = EsQuince(UserIndex)
- 30 WasSiete = EsSiete(UserIndex)
- 40 WasOcho = EsOcho(UserIndex)
- 50 WasNueve = EsNueve(UserIndex)
- 60 WasQuince = EsQuince(UserIndex)
- 70 WasVeinte = EsVeinte(UserIndex)
- 80 WasVeinticinco = EsVeinticinco(UserIndex)
- 90 WasQuinceM = EsQuinceM(UserIndex)
- 100 WasTreintaM = EsTreintaM(UserIndex)
- 110 WasHM = EsHM(UserIndex)
- 120 WasUM = EsUM(UserIndex)
- 130 WasMM = EsMM(UserIndex)
- 140 WasVip = EsVip(UserIndex)
- 150 WasVipp = EsVipp(UserIndex)
- 160 WasVipb = EsVipb(UserIndex)
- 170 WasNoUM = NoEsUM(UserIndex)
- 180 waspremium = EsPremium(UserIndex)
- 190 With UserList(UserIndex)
- 200 Do While .Stats.Exp >= .Stats.ELU
- 'Checkea si alcanzó el máximo nivel
- 210 If .Stats.ELV >= STAT_MAXELV Then
- 220 .Stats.Exp = 0
- 230 .Stats.ELU = 0
- 240 Exit Sub
- 250 End If
- 'Store it!
- 260 Call Statistics.UserLevelUp(UserIndex)
- Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessagePlayWave(SND_NIVEL, .Pos.X, .Pos.Y))
- Call WriteConsoleMsg(UserIndex, "¡Has subido de nivel!", FontTypeNames.FONTTYPE_INFO)
- 290 If .Stats.ELV = 1 Then
- 300 Pts = 0
- 310 Else
- 'For multiple levels being rised at once
- 320 Pts = Pts + 0
- 330 End If
- 340 .Stats.ELV = .Stats.ELV + 1
- 350 .Stats.Exp = .Stats.Exp - .Stats.ELU
- 'Nueva subida de exp x lvl. Pablo (ToxicWaste)
- 360 If .Stats.ELV = 2 Then
- 370 .Stats.ELU = 450
- 380 ElseIf .Stats.ELV = 3 Then
- 390 .Stats.ELU = 675
- 400 ElseIf .Stats.ELV = 4 Then
- 410 .Stats.ELU = 1012
- 420 ElseIf .Stats.ELV = 5 Then
- 430 .Stats.ELU = 1518
- 440 ElseIf .Stats.ELV = 6 Then
- 450 .Stats.ELU = 2277
- 460 ElseIf .Stats.ELV = 7 Then
- 470 .Stats.ELU = 3416
- 480 ElseIf .Stats.ELV = 8 Then
- 490 .Stats.ELU = 5124
- 500 ElseIf .Stats.ELV = 9 Then
- 510 .Stats.ELU = 7886
- 520 ElseIf .Stats.ELV = 10 Then
- 530 .Stats.ELU = 11529
- 540 ElseIf .Stats.ELV = 11 Then
- 550 .Stats.ELU = 14988
- 560 ElseIf .Stats.ELV = 12 Then
- 570 .Stats.ELU = 19484
- 580 ElseIf .Stats.ELV = 13 Then
- 590 .Stats.ELU = 25329
- 600 ElseIf .Stats.ELV = 14 Then
- 610 .Stats.ELU = 32928
- 620 ElseIf .Stats.ELV = 15 Then
- 630 .Stats.ELU = 42806
- 640 ElseIf .Stats.ELV = 16 Then
- 650 .Stats.ELU = 55648
- 660 ElseIf .Stats.ELV = 17 Then
- 670 .Stats.ELU = 72342
- 680 ElseIf .Stats.ELV = 18 Then
- 690 .Stats.ELU = 94045
- 700 ElseIf .Stats.ELV = 19 Then
- 710 .Stats.ELU = 122259
- 720 ElseIf .Stats.ELV = 20 Then
- 730 .Stats.ELU = 158937
- 740 ElseIf .Stats.ELV = 21 Then
- 750 .Stats.ELU = 206618
- 760 ElseIf .Stats.ELV = 22 Then
- 770 .Stats.ELU = 268603
- 780 ElseIf .Stats.ELV = 23 Then
- 790 .Stats.ELU = 349184
- 800 ElseIf .Stats.ELV = 24 Then
- 810 .Stats.ELU = 453939
- 820 ElseIf .Stats.ELV = 25 Then
- 830 .Stats.ELU = 544727
- 840 ElseIf .Stats.ELV = 26 Then
- 850 .Stats.ELU = 667632
- 860 ElseIf .Stats.ELV = 27 Then
- 870 .Stats.ELU = 784406
- 880 ElseIf .Stats.ELV = 28 Then
- 890 .Stats.ELU = 941287
- 900 ElseIf .Stats.ELV = 29 Then
- 910 .Stats.ELU = 1129544
- 920 ElseIf .Stats.ELV = 30 Then
- 930 .Stats.ELU = 1355453
- 940 ElseIf .Stats.ELV = 31 Then
- 950 .Stats.ELU = 1626544
- 960 ElseIf .Stats.ELV = 32 Then
- 970 .Stats.ELU = 1951853
- 980 ElseIf .Stats.ELV = 33 Then
- 990 .Stats.ELU = 2342224
- 1000 ElseIf .Stats.ELV = 34 Then
- 1010 .Stats.ELU = 3372803
- 1020 ElseIf .Stats.ELV = 35 Then
- 1030 .Stats.ELU = 4047364
- 1040 ElseIf .Stats.ELV = 36 Then
- 1050 .Stats.ELU = 5828204
- 1060 ElseIf .Stats.ELV = 37 Then
- 1070 .Stats.ELU = 6993845
- 1080 ElseIf .Stats.ELV = 38 Then
- 1090 .Stats.ELU = 8392614
- 1100 ElseIf .Stats.ELV = 39 Then
- 1110 .Stats.ELU = 10071137
- 1120 ElseIf .Stats.ELV = 40 Then
- 1130 .Stats.ELU = 120853640
- 1140 ElseIf .Stats.ELV = 41 Then
- 1150 .Stats.ELU = 145024370
- 1160 ElseIf .Stats.ELV = 42 Then
- 1170 .Stats.ELU = 174029240
- 1180 ElseIf .Stats.ELV = 43 Then
- 1190 .Stats.ELU = 208835090
- 1200 ElseIf .Stats.ELV = 44 Then
- 1210 .Stats.ELU = 417670180
- 1220 ElseIf .Stats.ELV = 45 Then
- 1230 .Stats.ELU = 835340360
- 1240 ElseIf .Stats.ELV = 46 Then
- 1250 .Stats.ELU = 1670680720
- 1260 Else
- 1270 .Stats.ELU = 0
- 1280 End If
- 1290 Select Case .clase
- Case eClass.Warrior
- 1300 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 1310 AumentoHP = RandomNumber(9, 12)
- 1320 Case 20
- 1330 AumentoHP = RandomNumber(8, 12)
- 1340 Case 19
- 1350 AumentoHP = RandomNumber(8, 11)
- 1360 Case 18
- 1370 AumentoHP = RandomNumber(7, 11)
- 1380 Case Else
- 1390 AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPGuerrero
- 1400 End Select
- 1410 If (.Stats.ELV < 48) Then
- 1420 AumentoHIT = IIf(.Stats.ELV > 35, 2, 3)
- 1430 Else
- 1440 AumentoHIT = 1
- 1450 End If
- 1460 AumentoSTA = AumentoSTDef
- 1470 Case eClass.Hunter
- 1480 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 1490 AumentoHP = RandomNumber(9, 11)
- 1500 Case 20
- 1510 AumentoHP = RandomNumber(8, 11)
- 1520 Case 19
- 1530 AumentoHP = RandomNumber(7, 11)
- 1540 Case 18
- 1550 AumentoHP = RandomNumber(6, 10)
- 1560 Case Else
- 1570 AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 1580 End Select
- 1590 If (.Stats.ELV < 48) Then
- 1600 AumentoHIT = IIf(.Stats.ELV > 35, 2, 3)
- 1610 Else
- 1620 AumentoHIT = 1
- 1630 End If
- 1640 AumentoSTA = AumentoSTDef
- 1650 Case eClass.Pirat
- 1660 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 1670 AumentoHP = RandomNumber(9, 11)
- 1680 Case 20
- 1690 AumentoHP = RandomNumber(8, 11)
- 1700 Case 19
- 1710 AumentoHP = RandomNumber(7, 11)
- 1720 Case 18
- 1730 AumentoHP = RandomNumber(6, 11)
- 1740 Case Else
- 1750 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPGuerrero
- 1760 End Select
- 1770 If (.Stats.ELV < 48) Then
- 1780 AumentoHIT = 3
- 1790 Else
- 1800 AumentoHIT = 2
- 1810 End If
- 1820 AumentoSTA = AumentoSTDef
- 1830 Case eClass.Paladin
- 1840 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 1850 AumentoHP = RandomNumber(9, 11)
- 1860 Case 20
- 1870 AumentoHP = RandomNumber(8, 11)
- 1880 Case 19
- 1890 AumentoHP = RandomNumber(7, 11)
- 1900 Case 18
- 1910 AumentoHP = RandomNumber(6, 11)
- 1920 Case Else
- 1930 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPCazador
- 1940 End Select
- 1950 If (.Stats.ELV > 47) Then
- 1960 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 + AdicionalHPCazador
- 1970 End If
- 1980 If (.Stats.ELV < 48) Then
- 1990 AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
- 2000 Else
- 2010 AumentoHIT = 1
- 2020 End If
- 2030 If (.Stats.ELV < 48) Then
- 2040 AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
- 2050 Else
- 2060 AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) \ 2
- 2070 End If
- 2080 AumentoSTA = AumentoSTDef
- 2090 Case eClass.Thief
- 2100 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2110 AumentoHP = RandomNumber(6, 9)
- 2120 Case 20
- 2130 AumentoHP = RandomNumber(5, 9)
- 2140 Case 19
- 2150 AumentoHP = RandomNumber(4, 9)
- 2160 Case 18
- 2170 AumentoHP = RandomNumber(4, 8)
- 2180 Case Else
- 2190 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 2200 End Select
- 2210 AumentoHIT = 2
- 2220 AumentoSTA = AumentoSTLadron
- 2230 Case eClass.Mage
- 2240 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2250 AumentoHP = RandomNumber(6, 9)
- 2260 Case 20
- 2270 AumentoHP = RandomNumber(5, 8)
- 2280 Case 19
- 2290 AumentoHP = RandomNumber(4, 8)
- 2300 Case 18
- 2310 AumentoHP = RandomNumber(3, 8)
- 2320 Case Else
- 2330 AumentoHP = RandomNumber(5, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
- 2340 End Select
- 2350 If AumentoHP < 1 Then AumentoHP = 4
- 2360 If (.Stats.ELV > 47) Then
- 2370 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 - AdicionalHPCazador
- 2380 End If
- 2390 AumentoHIT = 1
- 'AumentoMANA = 3 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 2400 AumentoSTA = AumentoSTMago
- 2410 If (.Stats.MaxMAN >= 2000) Then
- 2420 AumentoMANA = (3 * .Stats.UserAtributos(eAtributos.Inteligencia)) / 2
- 2430 Else
- 2440 AumentoMANA = 3 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 2450 End If
- 2460 Case eClass.Worker
- 2470 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2480 AumentoHP = RandomNumber(9, 12)
- 2490 Case 20
- 2500 AumentoHP = RandomNumber(8, 12)
- 2510 Case 19
- 2520 AumentoHP = RandomNumber(7, 12)
- 2530 Case 18
- 2540 AumentoHP = RandomNumber(6, 11)
- 2550 Case Else
- 2560 AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
- 2570 End Select
- 2580 AumentoHIT = 1
- 2590 AumentoSTA = AumentoSTTrabajador
- 2600 Case eClass.Cleric
- 2610 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2620 AumentoHP = RandomNumber(7, 10)
- 2630 Case 20
- 2640 AumentoHP = RandomNumber(6, 10)
- 2650 Case 19
- 2660 AumentoHP = RandomNumber(6, 9)
- 2670 Case 18
- 2680 AumentoHP = RandomNumber(5, 9)
- 2690 Case Else
- 2700 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 2710 End Select
- 2720 If (.Stats.ELV > 47) Then
- 2730 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
- 2740 End If
- 2750 If (.Stats.ELV < 48) Then
- 2760 AumentoHIT = 2
- 2770 Else
- 2780 AumentoHIT = 1
- 2790 End If
- 2800 If (.Stats.ELV < 48) Then
- 2810 AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 2820 Else
- 2830 AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 2840 End If
- 2850 AumentoSTA = AumentoSTDef
- 2860 Case eClass.Druid
- 2870 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2880 AumentoHP = RandomNumber(7, 10)
- 2890 Case 20
- 2900 AumentoHP = RandomNumber(6, 10)
- 2910 Case 19
- 2920 AumentoHP = RandomNumber(6, 9)
- 2930 Case 18
- 2940 AumentoHP = RandomNumber(5, 9)
- 2950 Case Else
- 2960 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 2970 End Select
- 2980 If (.Stats.ELV > 47) Then
- 2990 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
- 3000 End If
- 3010 If (.Stats.ELV < 48) Then
- 3020 AumentoHIT = 2
- 3030 Else
- 3040 AumentoHIT = 1
- 3050 End If
- 3060 If (.Stats.ELV < 48) Then
- 3070 AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 3080 Else
- 3090 AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 3100 End If
- 3110 AumentoSTA = AumentoSTDef
- 3120 Case eClass.Assasin
- 3130 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 3140 AumentoHP = RandomNumber(7, 10)
- 3150 Case 20
- 3160 AumentoHP = RandomNumber(6, 10)
- 3170 Case 19
- 3180 AumentoHP = RandomNumber(6, 9)
- 3190 Case 18
- 3200 AumentoHP = RandomNumber(5, 9)
- 3210 Case Else
- 3220 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 3230 End Select
- 3240 If (.Stats.ELV > 47) Then
- 3250 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
- 3260 End If
- 3270 If (.Stats.ELV < 48) Then
- 3280 AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
- 3290 Else
- 3300 AumentoHIT = 1
- 3310 End If
- 3320 If (.Stats.ELV < 48) Then
- 3330 AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
- 3340 Else
- 3350 AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
- 3360 End If
- 3370 AumentoSTA = AumentoSTDef
- 3380 Case eClass.Bard
- 3390 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 3400 AumentoHP = RandomNumber(7, 10)
- 3410 Case 20
- 3420 AumentoHP = RandomNumber(6, 10)
- 3430 Case 19
- 3440 AumentoHP = RandomNumber(6, 9)
- 3450 Case 18
- 3460 AumentoHP = RandomNumber(5, 9)
- 3470 Case Else
- 3480 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 3490 End Select
- 3500 If (.Stats.ELV > 47) Then
- 3510 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
- 3520 End If
- 3530 If (.Stats.ELV < 48) Then
- 3540 AumentoHIT = 2
- 3550 Else
- 3560 AumentoHIT = 1
- 3570 End If
- 3580 If (.Stats.ELV < 48) Then
- 3590 AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 3600 Else
- 3610 AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 3620 End If
- 3630 AumentoSTA = AumentoSTDef
- ' Case eClass.Bandit
- ' Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- ' Case 21
- 'AumentoHP = RandomNumber(9, 11)
- ' Case 20
- 'AumentoHP = RandomNumber(8, 11)
- 'Case 19
- 'AumentoHP = RandomNumber(7, 11)
- 'Case 18
- 'AumentoHP = RandomNumber(6, 11)
- 'Case Else
- 'AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPCazador
- ' End Select
- ' If (.Stats.ELV > 47) Then
- ' AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 + AdicionalHPCazador
- ' End If
- ' If (.Stats.ELV < 48) Then
- ' AumentoHIT = AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
- 'Else
- 'AumentoHIT = 1
- ' End If
- ' If (.Stats.ELV < 48) Then
- 'AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) / 3 * 2
- 'Else
- 'AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) / 3
- 'End If
- ' AumentoSTA = AumentoStBandido
- 3640 Case Else
- 3650 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 3660 AumentoHP = RandomNumber(6, 8)
- 3670 Case 20
- 3680 AumentoHP = RandomNumber(5, 8)
- 3690 Case 19
- 3700 AumentoHP = RandomNumber(4, 8)
- 3710 Case 18
- 3720 AumentoHP = RandomNumber(3, 8)
- 3730 Case Else
- 3740 AumentoHP = RandomNumber(5, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
- 3750 End Select
- 3760 AumentoHIT = 2
- 3770 AumentoSTA = AumentoSTDef
- 3780 End Select
- 'Actualizamos HitPoints
- 3790 .Stats.MaxHp = .Stats.MaxHp + AumentoHP
- 3800 If .Stats.MaxHp > STAT_MAXHP Then .Stats.MaxHp = STAT_MAXHP
- 'Actualizamos Stamina
- 3810 .Stats.MaxSta = .Stats.MaxSta + AumentoSTA
- 3820 If .Stats.MaxSta > STAT_MAXSTA Then .Stats.MaxSta = STAT_MAXSTA
- 'Actualizamos Mana
- 3830 .Stats.MaxMAN = .Stats.MaxMAN + AumentoMANA
- 3840 If .Stats.MaxMAN > STAT_MAXMAN Then .Stats.MaxMAN = STAT_MAXMAN
- 'Actualizamos Golpe Máximo
- 3850 .Stats.MaxHIT = .Stats.MaxHIT + AumentoHIT
- 3860 If .Stats.ELV < 36 Then
- 3870 If .Stats.MaxHIT > STAT_MAXHIT_UNDER36 Then _
- .Stats.MaxHIT = STAT_MAXHIT_UNDER36
- 3880 Else
- 3890 If .Stats.MaxHIT > STAT_MAXHIT_OVER36 Then _
- .Stats.MaxHIT = STAT_MAXHIT_OVER36
- 3900 End If
- 'Actualizamos Golpe Mínimo
- 3910 .Stats.MinHIT = .Stats.MinHIT + AumentoHIT
- 3920 If .Stats.ELV < 36 Then
- 3930 If .Stats.MinHIT > STAT_MAXHIT_UNDER36 Then _
- .Stats.MinHIT = STAT_MAXHIT_UNDER36
- 3940 Else
- 3950 If .Stats.MinHIT > STAT_MAXHIT_OVER36 Then _
- .Stats.MinHIT = STAT_MAXHIT_OVER36
- 3960 End If
- 'Notificamos al user
- If AumentoHP > 0 Then
- Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoHP & " puntos de vida.", FontTypeNames.FONTTYPE_INFO)
- End If
- If AumentoSTA > 0 Then
- Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoSTA & " puntos de energía.", FontTypeNames.FONTTYPE_INFO)
- End If
- If AumentoMANA > 0 Then
- Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoMANA & " puntos de maná.", FontTypeNames.FONTTYPE_INFO)
- End If
- If AumentoHIT > 0 Then
- Call WriteConsoleMsg(UserIndex, "Tu golpe máximo aumentó en " & AumentoHIT & " puntos.", FontTypeNames.FONTTYPE_INFO)
- Call WriteConsoleMsg(UserIndex, "Tu golpe mínimo aumentó en " & AumentoHIT & " puntos.", FontTypeNames.FONTTYPE_INFO)
- End If
- 4100 Call LogDesarrollo(.Name & " paso a nivel " & .Stats.ELV & " gano HP: " & AumentoHP)
- 4110 .Stats.MinHp = .Stats.MaxHp
- 'If user is in a party, we modify the variable p_sumaniveleselevados
- 4120 Call mdParty.ActualizarSumaNivelesElevados(UserIndex)
- 'If user reaches lvl 25 and he is in a guild, we check the guild's alignment and expulses the user if guild has factionary alignment
- 4130 If .Stats.ELV = 25 Then
- 4140 GI = .GuildIndex
- 4150 If GI > 0 Then
- 4160 If modGuilds.GuildAlignment(GI) = "Del Mal" Or modGuilds.GuildAlignment(GI) = "Real" Then
- 'We get here, so guild has factionary alignment, we have to expulse the user
- 4170 Call modGuilds.m_EcharMiembroDeClan(-1, .Name)
- 4180 Call SendData(SendTarget.ToGuildMembers, GI, PrepareMessageConsoleMsg(.Name & " deja el clan.", FontTypeNames.FONTTYPE_GUILD))
- 4190 Call WriteConsoleMsg(UserIndex, "¡Ya tienes la madurez suficiente como para decidir bajo que estandarte pelearás! Por esta razón, hasta tanto no te enlistes en la facción bajo la cual tu clan está alineado, estarás excluído del mismo.", FontTypeNames.FONTTYPE_GUILD)
- 4200 End If
- 4210 End If
- 4220 End If
- 4230 Loop
- 'If it ceased to be a newbie, remove newbie items and get char away from newbie dungeon
- 4240 If Not EsNewbie(UserIndex) And WasNewbie Then
- 4250 Call QuitarNewbieObj(UserIndex)
- 4260 If UCase$(MapInfo(.Pos.map).Restringir) = "NEWBIE" Then
- 4270 Call WarpUserChar(UserIndex, 1, 50, 50, True)
- 4280 Call WriteConsoleMsg(UserIndex, "Debes abandonar el Dungeon Newbie.", FontTypeNames.FONTTYPE_INFO)
- 4290 End If
- 4300 End If
- 4360 End With
- 4370 Call WriteUpdateUserStats(UserIndex)
- On Error GoTo 0
- Exit Sub
- CheckUserLevel_Error:
- LogError "Error " & Err.Number & " (" & Err.Description & ") in procedure CheckUserLevel, line " & Erl & "."
- End Sub
- ''
- ' Checks if the user gets the next level.
- '
- ' @param UserIndex Specifies reference to user
- Public Sub CheckUserLevelF1(ByVal UserIndex As Integer)
- On Error GoTo CheckUserLevel_Error
- 'by lucho for dolwur
- Dim Pts As Integer
- Dim AumentoHIT As Integer
- Dim AumentoMANA As Integer
- Dim AumentoSTA As Integer
- Dim AumentoHP As Integer
- Dim WasNewbie As Boolean
- Dim WasQuince As Boolean
- Dim WasSiete As Boolean
- Dim WasOcho As Boolean
- Dim WasNueve As Boolean
- Dim WasQuinceElv As Boolean
- Dim WasVeinte As Boolean
- Dim WasVeinticinco As Boolean
- Dim WasQuinceM As Boolean
- Dim WasTreintaM As Boolean
- Dim WasHM As Boolean
- Dim WasUM As Boolean
- Dim WasMM As Boolean
- Dim WasVip As Boolean
- Dim WasVipp As Boolean
- Dim WasVipb As Boolean
- Dim WasNoUM As Boolean
- Dim waspremium As Boolean
- Dim Promedio As Double
- Dim aux As Integer
- Dim DistVida(1 To 5) As Integer
- Dim GI As Integer 'Guild Index
- 10 WasNewbie = EsNewbie(UserIndex)
- 20 WasQuince = EsQuince(UserIndex)
- 30 WasSiete = EsSiete(UserIndex)
- 40 WasOcho = EsOcho(UserIndex)
- 50 WasNueve = EsNueve(UserIndex)
- 60 WasQuince = EsQuince(UserIndex)
- 70 WasVeinte = EsVeinte(UserIndex)
- 80 WasVeinticinco = EsVeinticinco(UserIndex)
- 90 WasQuinceM = EsQuinceM(UserIndex)
- 100 WasTreintaM = EsTreintaM(UserIndex)
- 110 WasHM = EsHM(UserIndex)
- 120 WasUM = EsUM(UserIndex)
- 130 WasMM = EsMM(UserIndex)
- 140 WasVip = EsVip(UserIndex)
- 150 WasVipp = EsVipp(UserIndex)
- 160 WasVipb = EsVipb(UserIndex)
- 170 WasNoUM = NoEsUM(UserIndex)
- 180 waspremium = EsPremium(UserIndex)
- 190 With UserList(UserIndex)
- 200 Do While .Stats.Exp >= .Stats.ELU
- 'Checkea si alcanzó el máximo nivel
- 210 If .Stats.ELV >= STAT_MAXELV Then
- 220 .Stats.Exp = 0
- 230 .Stats.ELU = 0
- 240 Exit Sub
- 250 End If
- 'Store it!
- 260 Call Statistics.UserLevelUp(UserIndex)
- If .Stats.ELV >= 48 Then
- 270 Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessagePlayWave(SND_NIVEL, .Pos.X, .Pos.Y))
- 280 Call WriteConsoleMsg(UserIndex, "¡Has subido de nivel!", FontTypeNames.FONTTYPE_INFO)
- End If
- 290 If .Stats.ELV = 1 Then
- 300 Pts = 0
- 310 Else
- 'For multiple levels being rised at once
- 320 Pts = Pts + 0
- 330 End If
- 340 .Stats.ELV = .Stats.ELV + 1
- 350 .Stats.Exp = .Stats.Exp - .Stats.ELU
- 'Nueva subida de exp x lvl. Pablo (ToxicWaste)
- 360 If .Stats.ELV = 2 Then
- 370 .Stats.ELU = 450
- 380 ElseIf .Stats.ELV = 3 Then
- 390 .Stats.ELU = 675
- 400 ElseIf .Stats.ELV = 4 Then
- 410 .Stats.ELU = 1012
- 420 ElseIf .Stats.ELV = 5 Then
- 430 .Stats.ELU = 1518
- 440 ElseIf .Stats.ELV = 6 Then
- 450 .Stats.ELU = 2277
- 460 ElseIf .Stats.ELV = 7 Then
- 470 .Stats.ELU = 3416
- 480 ElseIf .Stats.ELV = 8 Then
- 490 .Stats.ELU = 5124
- 500 ElseIf .Stats.ELV = 9 Then
- 510 .Stats.ELU = 7886
- 520 ElseIf .Stats.ELV = 10 Then
- 530 .Stats.ELU = 11529
- 540 ElseIf .Stats.ELV = 11 Then
- 550 .Stats.ELU = 14988
- 560 ElseIf .Stats.ELV = 12 Then
- 570 .Stats.ELU = 19484
- 580 ElseIf .Stats.ELV = 13 Then
- 590 .Stats.ELU = 25329
- 600 ElseIf .Stats.ELV = 14 Then
- 610 .Stats.ELU = 32928
- 620 ElseIf .Stats.ELV = 15 Then
- 630 .Stats.ELU = 42806
- 640 ElseIf .Stats.ELV = 16 Then
- 650 .Stats.ELU = 55648
- 660 ElseIf .Stats.ELV = 17 Then
- 670 .Stats.ELU = 72342
- 680 ElseIf .Stats.ELV = 18 Then
- 690 .Stats.ELU = 94045
- 700 ElseIf .Stats.ELV = 19 Then
- 710 .Stats.ELU = 122259
- 720 ElseIf .Stats.ELV = 20 Then
- 730 .Stats.ELU = 158937
- 740 ElseIf .Stats.ELV = 21 Then
- 750 .Stats.ELU = 206618
- 760 ElseIf .Stats.ELV = 22 Then
- 770 .Stats.ELU = 268603
- 780 ElseIf .Stats.ELV = 23 Then
- 790 .Stats.ELU = 349184
- 800 ElseIf .Stats.ELV = 24 Then
- 810 .Stats.ELU = 453939
- 820 ElseIf .Stats.ELV = 25 Then
- 830 .Stats.ELU = 544727
- 840 ElseIf .Stats.ELV = 26 Then
- 850 .Stats.ELU = 667632
- 860 ElseIf .Stats.ELV = 27 Then
- 870 .Stats.ELU = 784406
- 880 ElseIf .Stats.ELV = 28 Then
- 890 .Stats.ELU = 941287
- 900 ElseIf .Stats.ELV = 29 Then
- 910 .Stats.ELU = 1129544
- 920 ElseIf .Stats.ELV = 30 Then
- 930 .Stats.ELU = 1355453
- 940 ElseIf .Stats.ELV = 31 Then
- 950 .Stats.ELU = 1626544
- 960 ElseIf .Stats.ELV = 32 Then
- 970 .Stats.ELU = 1951853
- 980 ElseIf .Stats.ELV = 33 Then
- 990 .Stats.ELU = 2342224
- 1000 ElseIf .Stats.ELV = 34 Then
- 1010 .Stats.ELU = 3372803
- 1020 ElseIf .Stats.ELV = 35 Then
- 1030 .Stats.ELU = 4047364
- 1040 ElseIf .Stats.ELV = 36 Then
- 1050 .Stats.ELU = 5828204
- 1060 ElseIf .Stats.ELV = 37 Then
- 1070 .Stats.ELU = 6993845
- 1080 ElseIf .Stats.ELV = 38 Then
- 1090 .Stats.ELU = 8392614
- 1100 ElseIf .Stats.ELV = 39 Then
- 1110 .Stats.ELU = 10071137
- 1120 ElseIf .Stats.ELV = 40 Then
- 1130 .Stats.ELU = 120853640
- 1140 ElseIf .Stats.ELV = 41 Then
- 1150 .Stats.ELU = 145024370
- 1160 ElseIf .Stats.ELV = 42 Then
- 1170 .Stats.ELU = 174029240
- 1180 ElseIf .Stats.ELV = 43 Then
- 1190 .Stats.ELU = 208835090
- 1200 ElseIf .Stats.ELV = 44 Then
- 1210 .Stats.ELU = 417670180
- 1220 ElseIf .Stats.ELV = 45 Then
- 1230 .Stats.ELU = 835340360
- 1240 ElseIf .Stats.ELV = 46 Then
- 1250 .Stats.ELU = 1670680720
- 1260 Else
- 1270 .Stats.ELU = 0
- 1280 End If
- 1290 Select Case .clase
- Case eClass.Warrior
- 1300 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 1310 AumentoHP = RandomNumber(9, 12)
- 1320 Case 20
- 1330 AumentoHP = RandomNumber(8, 12)
- 1340 Case 19
- 1350 AumentoHP = RandomNumber(8, 11)
- 1360 Case 18
- 1370 AumentoHP = RandomNumber(7, 11)
- 1380 Case Else
- 1390 AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPGuerrero
- 1400 End Select
- 1410 If (.Stats.ELV < 48) Then
- 1420 AumentoHIT = IIf(.Stats.ELV > 35, 2, 3)
- 1430 Else
- 1440 AumentoHIT = 1
- 1450 End If
- 1460 AumentoSTA = AumentoSTDef
- 1470 Case eClass.Hunter
- 1480 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 1490 AumentoHP = RandomNumber(9, 11)
- 1500 Case 20
- 1510 AumentoHP = RandomNumber(8, 11)
- 1520 Case 19
- 1530 AumentoHP = RandomNumber(7, 11)
- 1540 Case 18
- 1550 AumentoHP = RandomNumber(6, 10)
- 1560 Case Else
- 1570 AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 1580 End Select
- 1590 If (.Stats.ELV < 48) Then
- 1600 AumentoHIT = IIf(.Stats.ELV > 35, 2, 3)
- 1610 Else
- 1620 AumentoHIT = 1
- 1630 End If
- 1640 AumentoSTA = AumentoSTDef
- 1650 Case eClass.Pirat
- 1660 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 1670 AumentoHP = RandomNumber(9, 11)
- 1680 Case 20
- 1690 AumentoHP = RandomNumber(8, 11)
- 1700 Case 19
- 1710 AumentoHP = RandomNumber(7, 11)
- 1720 Case 18
- 1730 AumentoHP = RandomNumber(6, 11)
- 1740 Case Else
- 1750 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPGuerrero
- 1760 End Select
- 1770 If (.Stats.ELV < 48) Then
- 1780 AumentoHIT = 3
- 1790 Else
- 1800 AumentoHIT = 2
- 1810 End If
- 1820 AumentoSTA = AumentoSTDef
- 1830 Case eClass.Paladin
- 1840 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 1850 AumentoHP = RandomNumber(9, 11)
- 1860 Case 20
- 1870 AumentoHP = RandomNumber(8, 11)
- 1880 Case 19
- 1890 AumentoHP = RandomNumber(7, 11)
- 1900 Case 18
- 1910 AumentoHP = RandomNumber(6, 11)
- 1920 Case Else
- 1930 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPCazador
- 1940 End Select
- 1950 If (.Stats.ELV > 47) Then
- 1960 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 + AdicionalHPCazador
- 1970 End If
- 1980 If (.Stats.ELV < 48) Then
- 1990 AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
- 2000 Else
- 2010 AumentoHIT = 1
- 2020 End If
- 2030 If (.Stats.ELV < 48) Then
- 2040 AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
- 2050 Else
- 2060 AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) \ 2
- 2070 End If
- 2080 AumentoSTA = AumentoSTDef
- 2090 Case eClass.Thief
- 2100 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2110 AumentoHP = RandomNumber(6, 9)
- 2120 Case 20
- 2130 AumentoHP = RandomNumber(5, 9)
- 2140 Case 19
- 2150 AumentoHP = RandomNumber(4, 9)
- 2160 Case 18
- 2170 AumentoHP = RandomNumber(4, 8)
- 2180 Case Else
- 2190 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 2200 End Select
- 2210 AumentoHIT = 2
- 2220 AumentoSTA = AumentoSTLadron
- 2230 Case eClass.Mage
- 2240 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2250 AumentoHP = RandomNumber(6, 9)
- 2260 Case 20
- 2270 AumentoHP = RandomNumber(5, 8)
- 2280 Case 19
- 2290 AumentoHP = RandomNumber(4, 8)
- 2300 Case 18
- 2310 AumentoHP = RandomNumber(3, 8)
- 2320 Case Else
- 2330 AumentoHP = RandomNumber(5, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
- 2340 End Select
- 2350 If AumentoHP < 1 Then AumentoHP = 4
- 2360 If (.Stats.ELV > 47) Then
- 2370 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 - AdicionalHPCazador
- 2380 End If
- 2390 AumentoHIT = 1
- 'AumentoMANA = 3 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 2400 AumentoSTA = AumentoSTMago
- 2410 If (.Stats.MaxMAN >= 2000) Then
- 2420 AumentoMANA = (3 * .Stats.UserAtributos(eAtributos.Inteligencia)) / 2
- 2430 Else
- 2440 AumentoMANA = 3 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 2450 End If
- 2460 Case eClass.Worker
- 2470 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2480 AumentoHP = RandomNumber(9, 12)
- 2490 Case 20
- 2500 AumentoHP = RandomNumber(8, 12)
- 2510 Case 19
- 2520 AumentoHP = RandomNumber(7, 12)
- 2530 Case 18
- 2540 AumentoHP = RandomNumber(6, 11)
- 2550 Case Else
- 2560 AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
- 2570 End Select
- 2580 AumentoHIT = 1
- 2590 AumentoSTA = AumentoSTTrabajador
- 2600 Case eClass.Cleric
- 2610 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2620 AumentoHP = RandomNumber(7, 10)
- 2630 Case 20
- 2640 AumentoHP = RandomNumber(6, 10)
- 2650 Case 19
- 2660 AumentoHP = RandomNumber(6, 9)
- 2670 Case 18
- 2680 AumentoHP = RandomNumber(5, 9)
- 2690 Case Else
- 2700 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 2710 End Select
- 2720 If (.Stats.ELV > 47) Then
- 2730 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
- 2740 End If
- 2750 If (.Stats.ELV < 48) Then
- 2760 AumentoHIT = 2
- 2770 Else
- 2780 AumentoHIT = 1
- 2790 End If
- 2800 If (.Stats.ELV < 48) Then
- 2810 AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 2820 Else
- 2830 AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 2840 End If
- 2850 AumentoSTA = AumentoSTDef
- 2860 Case eClass.Druid
- 2870 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 2880 AumentoHP = RandomNumber(7, 10)
- 2890 Case 20
- 2900 AumentoHP = RandomNumber(6, 10)
- 2910 Case 19
- 2920 AumentoHP = RandomNumber(6, 9)
- 2930 Case 18
- 2940 AumentoHP = RandomNumber(5, 9)
- 2950 Case Else
- 2960 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 2970 End Select
- 2980 If (.Stats.ELV > 47) Then
- 2990 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
- 3000 End If
- 3010 If (.Stats.ELV < 48) Then
- 3020 AumentoHIT = 2
- 3030 Else
- 3040 AumentoHIT = 1
- 3050 End If
- 3060 If (.Stats.ELV < 48) Then
- 3070 AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 3080 Else
- 3090 AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 3100 End If
- 3110 AumentoSTA = AumentoSTDef
- 3120 Case eClass.Assasin
- 3130 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 3140 AumentoHP = RandomNumber(7, 10)
- 3150 Case 20
- 3160 AumentoHP = RandomNumber(6, 10)
- 3170 Case 19
- 3180 AumentoHP = RandomNumber(6, 9)
- 3190 Case 18
- 3200 AumentoHP = RandomNumber(5, 9)
- 3210 Case Else
- 3220 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 3230 End Select
- 3240 If (.Stats.ELV > 47) Then
- 3250 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
- 3260 End If
- 3270 If (.Stats.ELV < 48) Then
- 3280 AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
- 3290 Else
- 3300 AumentoHIT = 1
- 3310 End If
- 3320 If (.Stats.ELV < 48) Then
- 3330 AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
- 3340 Else
- 3350 AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
- 3360 End If
- 3370 AumentoSTA = AumentoSTDef
- 3380 Case eClass.Bard
- 3390 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 3400 AumentoHP = RandomNumber(7, 10)
- 3410 Case 20
- 3420 AumentoHP = RandomNumber(6, 10)
- 3430 Case 19
- 3440 AumentoHP = RandomNumber(6, 9)
- 3450 Case 18
- 3460 AumentoHP = RandomNumber(5, 9)
- 3470 Case Else
- 3480 AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
- 3490 End Select
- 3500 If (.Stats.ELV > 47) Then
- 3510 AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
- 3520 End If
- 3530 If (.Stats.ELV < 48) Then
- 3540 AumentoHIT = 2
- 3550 Else
- 3560 AumentoHIT = 1
- 3570 End If
- 3580 If (.Stats.ELV < 48) Then
- 3590 AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 3600 Else
- 3610 AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
- 3620 End If
- 3630 AumentoSTA = AumentoSTDef
- ' Case eClass.Bandit
- ' Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- ' Case 21
- 'AumentoHP = RandomNumber(9, 11)
- ' Case 20
- 'AumentoHP = RandomNumber(8, 11)
- 'Case 19
- 'AumentoHP = RandomNumber(7, 11)
- 'Case 18
- 'AumentoHP = RandomNumber(6, 11)
- 'Case Else
- 'AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPCazador
- ' End Select
- ' If (.Stats.ELV > 47) Then
- ' AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 + AdicionalHPCazador
- ' End If
- ' If (.Stats.ELV < 48) Then
- ' AumentoHIT = AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
- 'Else
- 'AumentoHIT = 1
- ' End If
- ' If (.Stats.ELV < 48) Then
- 'AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) / 3 * 2
- 'Else
- 'AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) / 3
- 'End If
- ' AumentoSTA = AumentoStBandido
- 3640 Case Else
- 3650 Select Case .Stats.UserAtributos(eAtributos.Constitucion)
- Case 21
- 3660 AumentoHP = RandomNumber(6, 8)
- 3670 Case 20
- 3680 AumentoHP = RandomNumber(5, 8)
- 3690 Case 19
- 3700 AumentoHP = RandomNumber(4, 8)
- 3710 Case 18
- 3720 AumentoHP = RandomNumber(3, 8)
- 3730 Case Else
- 3740 AumentoHP = RandomNumber(5, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
- 3750 End Select
- 3760 AumentoHIT = 2
- 3770 AumentoSTA = AumentoSTDef
- 3780 End Select
- 'Actualizamos HitPoints
- 3790 .Stats.MaxHp = .Stats.MaxHp + AumentoHP
- 3800 If .Stats.MaxHp > STAT_MAXHP Then .Stats.MaxHp = STAT_MAXHP
- 'Actualizamos Stamina
- 3810 .Stats.MaxSta = .Stats.MaxSta + AumentoSTA
- 3820 If .Stats.MaxSta > STAT_MAXSTA Then .Stats.MaxSta = STAT_MAXSTA
- 'Actualizamos Mana
- 3830 .Stats.MaxMAN = .Stats.MaxMAN + AumentoMANA
- 3840 If .Stats.MaxMAN > STAT_MAXMAN Then .Stats.MaxMAN = STAT_MAXMAN
- 'Actualizamos Golpe Máximo
- 3850 .Stats.MaxHIT = .Stats.MaxHIT + AumentoHIT
- 3860 If .Stats.ELV < 36 Then
- 3870 If .Stats.MaxHIT > STAT_MAXHIT_UNDER36 Then _
- .Stats.MaxHIT = STAT_MAXHIT_UNDER36
- 3880 Else
- 3890 If .Stats.MaxHIT > STAT_MAXHIT_OVER36 Then _
- .Stats.MaxHIT = STAT_MAXHIT_OVER36
- 3900 End If
- 'Actualizamos Golpe Mínimo
- 3910 .Stats.MinHIT = .Stats.MinHIT + AumentoHIT
- 3920 If .Stats.ELV < 36 Then
- 3930 If .Stats.MinHIT > STAT_MAXHIT_UNDER36 Then _
- .Stats.MinHIT = STAT_MAXHIT_UNDER36
- 3940 Else
- 3950 If .Stats.MinHIT > STAT_MAXHIT_OVER36 Then _
- .Stats.MinHIT = STAT_MAXHIT_OVER36
- 3960 End If
- 'Notificamos al user
- If .Stats.ELV >= 48 Then
- 3970 If AumentoHP > 0 Then
- 3980 Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoHP & " puntos de vida.", FontTypeNames.FONTTYPE_INFO)
- 3990 End If
- 4000 If AumentoSTA > 0 Then
- 4010 Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoSTA & " puntos de energía.", FontTypeNames.FONTTYPE_INFO)
- 4020 End If
- 4030 If AumentoMANA > 0 Then
- 4040 Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoMANA & " puntos de maná.", FontTypeNames.FONTTYPE_INFO)
- 4050 End If
- 4060 If AumentoHIT > 0 Then
- 4070 Call WriteConsoleMsg(UserIndex, "Tu golpe máximo aumentó en " & AumentoHIT & " puntos.", FontTypeNames.FONTTYPE_INFO)
- 4080 Call WriteConsoleMsg(UserIndex, "Tu golpe mínimo aumentó en " & AumentoHIT & " puntos.", FontTypeNames.FONTTYPE_INFO)
- 4090 End If
- End If
- 4100 Call LogDesarrollo(.Name & " paso a nivel " & .Stats.ELV & " gano HP: " & AumentoHP)
- 4110 .Stats.MinHp = .Stats.MaxHp
- 'If user is in a party, we modify the variable p_sumaniveleselevados
- 4120 Call mdParty.ActualizarSumaNivelesElevados(UserIndex)
- 'If user reaches lvl 25 and he is in a guild, we check the guild's alignment and expulses the user if guild has factionary alignment
- 4130 If .Stats.ELV = 25 Then
- 4140 GI = .GuildIndex
- 4150 If GI > 0 Then
- 4160 If modGuilds.GuildAlignment(GI) = "Del Mal" Or modGuilds.GuildAlignment(GI) = "Real" Then
- 'We get here, so guild has factionary alignment, we have to expulse the user
- 4170 Call modGuilds.m_EcharMiembroDeClan(-1, .Name)
- 4180 Call SendData(SendTarget.ToGuildMembers, GI, PrepareMessageConsoleMsg(.Name & " deja el clan.", FontTypeNames.FONTTYPE_GUILD))
- 4190 Call WriteConsoleMsg(UserIndex, "¡Ya tienes la madurez suficiente como para decidir bajo que estandarte pelearás! Por esta razón, hasta tanto no te enlistes en la facción bajo la cual tu clan está alineado, estarás excluído del mismo.", FontTypeNames.FONTTYPE_GUILD)
- 4200 End If
- 4210 End If
- 4220 End If
- 4230 Loop
- 'If it ceased to be a newbie, remove newbie items and get char away from newbie dungeon
- 4240 If Not EsNewbie(UserIndex) And WasNewbie Then
- 4250 Call QuitarNewbieObj(UserIndex)
- 4260 If UCase$(MapInfo(.Pos.map).Restringir) = "NEWBIE" Then
- 4270 Call WarpUserChar(UserIndex, 1, 50, 50, True)
- 4280 Call WriteConsoleMsg(UserIndex, "Debes abandonar el Dungeon Newbie.", FontTypeNames.FONTTYPE_INFO)
- 4290 End If
- 4300 End If
- 4360 End With
- 4370 Call WriteUpdateUserStats(UserIndex)
- On Error GoTo 0
- Exit Sub
- CheckUserLevel_Error:
- LogError "Error " & Err.Number & " (" & Err.Description & ") in procedure CheckUserLevel, line " & Erl & "."
- End Sub
- 'luego de pegar estos 2 sub`s
- 'En el handle nivel buscas:
- Call CheckUserLevel(UserIndex)
- 'y pones el de f1:
- Call CheckUserLevelF1(UserIndex) y listo.
- 'PLUS:para evitar dupeos y esa vaina
- 'Buscas en el handlecommercestart:
- If MapInfo(.Pos.map).Pk = True Then
- Call WriteConsoleMsg(UserIndex, "¡Para poder comerciar debes estar en una ciudad segura!", FONTTYPE_INFO)
- Exit Sub
- End If
- 'Y pones abajo:
- If Not .Pos.map = 200 Then
- WriteConsoleMsg UserIndex, "Debes encontrar en Zona de comercio para utilizar el Comerciar", FontTypeNames.FONTTYPE_INFO
- Exit Sub
- End If
- 'Y listo, después pones tp en ulla al mapa 200 así pueden comerciar sin riesgos de que te dupeen todo el ao, luego si hay algo más te aviso y te lo paso.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement