Advertisement
Guest User

by lucho

a guest
Nov 22nd, 2019
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Buscar el check user level en el server y pegas esto
  2. Public Sub CheckUserLevel(ByVal UserIndex As Integer)
  3.     On Error GoTo CheckUserLevel_Error
  4. 'by lucho for dolwur
  5.          Dim Pts As Integer
  6.           Dim AumentoHIT As Integer
  7.           Dim AumentoMANA As Integer
  8.           Dim AumentoSTA As Integer
  9.           Dim AumentoHP As Integer
  10.           Dim WasNewbie As Boolean
  11.              Dim WasQuince As Boolean
  12.              Dim WasSiete As Boolean
  13.              Dim WasOcho As Boolean
  14.              Dim WasNueve As Boolean
  15.              Dim WasQuinceElv As Boolean
  16.              Dim WasVeinte As Boolean
  17.              Dim WasVeinticinco As Boolean
  18.              Dim WasQuinceM As Boolean
  19.              Dim WasTreintaM As Boolean
  20.              Dim WasHM As Boolean
  21.              Dim WasUM As Boolean
  22.              Dim WasMM As Boolean
  23.              Dim WasVip As Boolean
  24.              Dim WasVipp As Boolean
  25.              Dim WasVipb As Boolean
  26.              Dim WasNoUM As Boolean
  27.       Dim waspremium As Boolean
  28.           Dim Promedio As Double
  29.           Dim aux As Integer
  30.           Dim DistVida(1 To 5) As Integer
  31.           Dim GI As Integer 'Guild Index
  32.          
  33. 10        WasNewbie = EsNewbie(UserIndex)
  34. 20        WasQuince = EsQuince(UserIndex)
  35. 30        WasSiete = EsSiete(UserIndex)
  36. 40        WasOcho = EsOcho(UserIndex)
  37. 50        WasNueve = EsNueve(UserIndex)
  38. 60        WasQuince = EsQuince(UserIndex)
  39. 70        WasVeinte = EsVeinte(UserIndex)
  40. 80        WasVeinticinco = EsVeinticinco(UserIndex)
  41. 90        WasQuinceM = EsQuinceM(UserIndex)
  42. 100       WasTreintaM = EsTreintaM(UserIndex)
  43. 110       WasHM = EsHM(UserIndex)
  44. 120       WasUM = EsUM(UserIndex)
  45. 130       WasMM = EsMM(UserIndex)
  46. 140       WasVip = EsVip(UserIndex)
  47. 150       WasVipp = EsVipp(UserIndex)
  48. 160       WasVipb = EsVipb(UserIndex)
  49. 170       WasNoUM = NoEsUM(UserIndex)
  50. 180       waspremium = EsPremium(UserIndex)
  51.          
  52. 190       With UserList(UserIndex)
  53. 200           Do While .Stats.Exp >= .Stats.ELU
  54.                  
  55.                   'Checkea si alcanzó el máximo nivel
  56. 210               If .Stats.ELV >= STAT_MAXELV Then
  57. 220                   .Stats.Exp = 0
  58. 230                   .Stats.ELU = 0
  59. 240                   Exit Sub
  60. 250               End If
  61.                  
  62.                   'Store it!
  63. 260               Call Statistics.UserLevelUp(UserIndex)
  64.                  
  65.             Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessagePlayWave(SND_NIVEL, .Pos.X, .Pos.Y))
  66.             Call WriteConsoleMsg(UserIndex, "¡Has subido de nivel!", FontTypeNames.FONTTYPE_INFO)
  67.                  
  68. 290               If .Stats.ELV = 1 Then
  69. 300                   Pts = 0
  70. 310               Else
  71.                       'For multiple levels being rised at once
  72. 320                   Pts = Pts + 0
  73. 330               End If
  74.                  
  75. 340               .Stats.ELV = .Stats.ELV + 1
  76.                  
  77. 350               .Stats.Exp = .Stats.Exp - .Stats.ELU
  78.                  
  79.                   'Nueva subida de exp x lvl. Pablo (ToxicWaste)
  80. 360               If .Stats.ELV = 2 Then
  81. 370                   .Stats.ELU = 450
  82. 380                   ElseIf .Stats.ELV = 3 Then
  83. 390                   .Stats.ELU = 675
  84. 400                   ElseIf .Stats.ELV = 4 Then
  85. 410                   .Stats.ELU = 1012
  86. 420                   ElseIf .Stats.ELV = 5 Then
  87. 430                   .Stats.ELU = 1518
  88. 440                   ElseIf .Stats.ELV = 6 Then
  89. 450                   .Stats.ELU = 2277
  90. 460                   ElseIf .Stats.ELV = 7 Then
  91. 470                   .Stats.ELU = 3416
  92. 480                   ElseIf .Stats.ELV = 8 Then
  93. 490                   .Stats.ELU = 5124
  94. 500                   ElseIf .Stats.ELV = 9 Then
  95. 510                   .Stats.ELU = 7886
  96. 520                   ElseIf .Stats.ELV = 10 Then
  97. 530                   .Stats.ELU = 11529
  98. 540                   ElseIf .Stats.ELV = 11 Then
  99. 550                   .Stats.ELU = 14988
  100. 560                   ElseIf .Stats.ELV = 12 Then
  101. 570                   .Stats.ELU = 19484
  102. 580                   ElseIf .Stats.ELV = 13 Then
  103. 590                   .Stats.ELU = 25329
  104. 600                   ElseIf .Stats.ELV = 14 Then
  105. 610                   .Stats.ELU = 32928
  106. 620                   ElseIf .Stats.ELV = 15 Then
  107. 630                   .Stats.ELU = 42806
  108. 640                   ElseIf .Stats.ELV = 16 Then
  109. 650                   .Stats.ELU = 55648
  110. 660                   ElseIf .Stats.ELV = 17 Then
  111. 670                   .Stats.ELU = 72342
  112. 680                   ElseIf .Stats.ELV = 18 Then
  113. 690                   .Stats.ELU = 94045
  114. 700                   ElseIf .Stats.ELV = 19 Then
  115. 710                   .Stats.ELU = 122259
  116. 720                   ElseIf .Stats.ELV = 20 Then
  117. 730                   .Stats.ELU = 158937
  118. 740                   ElseIf .Stats.ELV = 21 Then
  119. 750                   .Stats.ELU = 206618
  120. 760                   ElseIf .Stats.ELV = 22 Then
  121. 770                   .Stats.ELU = 268603
  122. 780                   ElseIf .Stats.ELV = 23 Then
  123. 790                   .Stats.ELU = 349184
  124. 800                   ElseIf .Stats.ELV = 24 Then
  125. 810                   .Stats.ELU = 453939
  126. 820                   ElseIf .Stats.ELV = 25 Then
  127. 830                   .Stats.ELU = 544727
  128. 840                   ElseIf .Stats.ELV = 26 Then
  129. 850                   .Stats.ELU = 667632
  130. 860                   ElseIf .Stats.ELV = 27 Then
  131. 870                   .Stats.ELU = 784406
  132. 880                   ElseIf .Stats.ELV = 28 Then
  133. 890                   .Stats.ELU = 941287
  134. 900                   ElseIf .Stats.ELV = 29 Then
  135. 910                   .Stats.ELU = 1129544
  136. 920                   ElseIf .Stats.ELV = 30 Then
  137. 930                   .Stats.ELU = 1355453
  138. 940                   ElseIf .Stats.ELV = 31 Then
  139. 950                   .Stats.ELU = 1626544
  140. 960                   ElseIf .Stats.ELV = 32 Then
  141. 970                   .Stats.ELU = 1951853
  142. 980                   ElseIf .Stats.ELV = 33 Then
  143. 990                   .Stats.ELU = 2342224
  144. 1000                  ElseIf .Stats.ELV = 34 Then
  145. 1010                  .Stats.ELU = 3372803
  146. 1020                  ElseIf .Stats.ELV = 35 Then
  147. 1030                  .Stats.ELU = 4047364
  148. 1040                  ElseIf .Stats.ELV = 36 Then
  149. 1050                  .Stats.ELU = 5828204
  150. 1060                  ElseIf .Stats.ELV = 37 Then
  151. 1070                  .Stats.ELU = 6993845
  152. 1080                  ElseIf .Stats.ELV = 38 Then
  153. 1090                  .Stats.ELU = 8392614
  154. 1100                  ElseIf .Stats.ELV = 39 Then
  155. 1110                  .Stats.ELU = 10071137
  156. 1120                  ElseIf .Stats.ELV = 40 Then
  157. 1130                  .Stats.ELU = 120853640
  158. 1140                  ElseIf .Stats.ELV = 41 Then
  159. 1150                  .Stats.ELU = 145024370
  160. 1160                  ElseIf .Stats.ELV = 42 Then
  161. 1170                  .Stats.ELU = 174029240
  162. 1180                  ElseIf .Stats.ELV = 43 Then
  163. 1190                  .Stats.ELU = 208835090
  164. 1200                  ElseIf .Stats.ELV = 44 Then
  165. 1210                  .Stats.ELU = 417670180
  166. 1220                  ElseIf .Stats.ELV = 45 Then
  167. 1230                  .Stats.ELU = 835340360
  168. 1240                  ElseIf .Stats.ELV = 46 Then
  169. 1250                  .Stats.ELU = 1670680720
  170. 1260                  Else
  171. 1270                  .Stats.ELU = 0
  172. 1280                  End If
  173.                  
  174. 1290         Select Case .clase
  175.                  Case eClass.Warrior
  176. 1300                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  177.                           Case 21
  178. 1310                      AumentoHP = RandomNumber(9, 12)
  179. 1320                      Case 20
  180. 1330                      AumentoHP = RandomNumber(8, 12)
  181. 1340                      Case 19
  182. 1350                      AumentoHP = RandomNumber(8, 11)
  183. 1360                      Case 18
  184. 1370                      AumentoHP = RandomNumber(7, 11)
  185. 1380                      Case Else
  186. 1390                      AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPGuerrero
  187. 1400                      End Select
  188.                          
  189.                          
  190. 1410                      If (.Stats.ELV < 48) Then
  191. 1420                      AumentoHIT = IIf(.Stats.ELV > 35, 2, 3)
  192. 1430                      Else
  193. 1440                      AumentoHIT = 1
  194. 1450                      End If
  195.                          
  196. 1460                      AumentoSTA = AumentoSTDef
  197.                      
  198. 1470                  Case eClass.Hunter
  199. 1480                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  200.                           Case 21
  201. 1490                      AumentoHP = RandomNumber(9, 11)
  202. 1500                      Case 20
  203. 1510                      AumentoHP = RandomNumber(8, 11)
  204. 1520                      Case 19
  205. 1530                      AumentoHP = RandomNumber(7, 11)
  206. 1540                      Case 18
  207. 1550                      AumentoHP = RandomNumber(6, 10)
  208. 1560                      Case Else
  209. 1570                      AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  210. 1580                      End Select
  211.                      
  212.                      
  213. 1590                  If (.Stats.ELV < 48) Then
  214. 1600                      AumentoHIT = IIf(.Stats.ELV > 35, 2, 3)
  215. 1610                      Else
  216. 1620                      AumentoHIT = 1
  217. 1630                      End If
  218.                          
  219. 1640                      AumentoSTA = AumentoSTDef
  220.                      
  221. 1650                  Case eClass.Pirat
  222. 1660                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  223.                           Case 21
  224. 1670                      AumentoHP = RandomNumber(9, 11)
  225. 1680                      Case 20
  226. 1690                      AumentoHP = RandomNumber(8, 11)
  227. 1700                      Case 19
  228. 1710                      AumentoHP = RandomNumber(7, 11)
  229. 1720                      Case 18
  230. 1730                      AumentoHP = RandomNumber(6, 11)
  231. 1740                      Case Else
  232. 1750                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPGuerrero
  233. 1760                      End Select
  234.                      
  235. 1770                  If (.Stats.ELV < 48) Then
  236. 1780                      AumentoHIT = 3
  237. 1790                      Else
  238. 1800                      AumentoHIT = 2
  239. 1810                      End If
  240.                          
  241. 1820                      AumentoSTA = AumentoSTDef
  242.                      
  243. 1830                  Case eClass.Paladin
  244. 1840                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  245.                           Case 21
  246. 1850                      AumentoHP = RandomNumber(9, 11)
  247. 1860                      Case 20
  248. 1870                      AumentoHP = RandomNumber(8, 11)
  249. 1880                      Case 19
  250. 1890                      AumentoHP = RandomNumber(7, 11)
  251. 1900                      Case 18
  252. 1910                      AumentoHP = RandomNumber(6, 11)
  253. 1920                      Case Else
  254. 1930                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPCazador
  255. 1940                      End Select
  256.                      
  257.                  
  258. 1950              If (.Stats.ELV > 47) Then
  259. 1960              AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 + AdicionalHPCazador
  260. 1970              End If
  261.                  
  262. 1980                 If (.Stats.ELV < 48) Then
  263. 1990                      AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
  264. 2000                      Else
  265. 2010                      AumentoHIT = 1
  266. 2020                      End If
  267.                          
  268. 2030                If (.Stats.ELV < 48) Then
  269. 2040                AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
  270. 2050                Else
  271. 2060                AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) \ 2
  272. 2070                End If
  273.                    
  274. 2080                      AumentoSTA = AumentoSTDef
  275.                      
  276. 2090                  Case eClass.Thief
  277. 2100                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  278.                           Case 21
  279. 2110                      AumentoHP = RandomNumber(6, 9)
  280. 2120                      Case 20
  281. 2130                      AumentoHP = RandomNumber(5, 9)
  282. 2140                      Case 19
  283. 2150                      AumentoHP = RandomNumber(4, 9)
  284. 2160                      Case 18
  285. 2170                      AumentoHP = RandomNumber(4, 8)
  286. 2180                      Case Else
  287. 2190                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  288. 2200                      End Select
  289.                      
  290. 2210                      AumentoHIT = 2
  291. 2220                      AumentoSTA = AumentoSTLadron
  292.                      
  293. 2230                  Case eClass.Mage
  294. 2240                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  295.                           Case 21
  296. 2250                      AumentoHP = RandomNumber(6, 9)
  297. 2260                      Case 20
  298. 2270                      AumentoHP = RandomNumber(5, 8)
  299. 2280                      Case 19
  300. 2290                      AumentoHP = RandomNumber(4, 8)
  301. 2300                      Case 18
  302. 2310                      AumentoHP = RandomNumber(3, 8)
  303. 2320                      Case Else
  304. 2330                      AumentoHP = RandomNumber(5, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
  305. 2340                      End Select
  306. 2350                      If AumentoHP < 1 Then AumentoHP = 4
  307.                          
  308. 2360                      If (.Stats.ELV > 47) Then
  309. 2370                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 - AdicionalHPCazador
  310. 2380                      End If
  311.                          
  312. 2390                      AumentoHIT = 1
  313.                           'AumentoMANA = 3 * .Stats.UserAtributos(eAtributos.Inteligencia)
  314. 2400                      AumentoSTA = AumentoSTMago
  315.                          
  316. 2410                      If (.Stats.MaxMAN >= 2000) Then
  317. 2420                      AumentoMANA = (3 * .Stats.UserAtributos(eAtributos.Inteligencia)) / 2
  318. 2430                      Else
  319. 2440                      AumentoMANA = 3 * .Stats.UserAtributos(eAtributos.Inteligencia)
  320. 2450                      End If
  321.                                    
  322. 2460                  Case eClass.Worker
  323. 2470                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  324.                           Case 21
  325. 2480                      AumentoHP = RandomNumber(9, 12)
  326. 2490                      Case 20
  327. 2500                      AumentoHP = RandomNumber(8, 12)
  328. 2510                      Case 19
  329. 2520                      AumentoHP = RandomNumber(7, 12)
  330. 2530                      Case 18
  331. 2540                      AumentoHP = RandomNumber(6, 11)
  332. 2550                      Case Else
  333. 2560                      AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
  334. 2570                      End Select
  335.                      
  336. 2580                      AumentoHIT = 1
  337. 2590                      AumentoSTA = AumentoSTTrabajador
  338.                      
  339.                    
  340. 2600                  Case eClass.Cleric
  341. 2610                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  342.                           Case 21
  343. 2620                      AumentoHP = RandomNumber(7, 10)
  344. 2630                      Case 20
  345. 2640                      AumentoHP = RandomNumber(6, 10)
  346. 2650                      Case 19
  347. 2660                      AumentoHP = RandomNumber(6, 9)
  348. 2670                      Case 18
  349. 2680                      AumentoHP = RandomNumber(5, 9)
  350. 2690                      Case Else
  351. 2700                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  352. 2710                      End Select
  353.                      
  354. 2720                  If (.Stats.ELV > 47) Then
  355. 2730                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
  356. 2740                      End If
  357.                      
  358. 2750                                 If (.Stats.ELV < 48) Then
  359. 2760                      AumentoHIT = 2
  360. 2770                      Else
  361. 2780                      AumentoHIT = 1
  362. 2790                      End If
  363.                          
  364. 2800                If (.Stats.ELV < 48) Then
  365. 2810                AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
  366. 2820                Else
  367. 2830                AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
  368. 2840                End If
  369.                      
  370. 2850                      AumentoSTA = AumentoSTDef
  371.                      
  372. 2860                  Case eClass.Druid
  373. 2870                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  374.                           Case 21
  375. 2880                      AumentoHP = RandomNumber(7, 10)
  376. 2890                      Case 20
  377. 2900                      AumentoHP = RandomNumber(6, 10)
  378. 2910                      Case 19
  379. 2920                      AumentoHP = RandomNumber(6, 9)
  380. 2930                      Case 18
  381. 2940                      AumentoHP = RandomNumber(5, 9)
  382. 2950                      Case Else
  383. 2960                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  384. 2970                      End Select
  385.                  
  386. 2980                  If (.Stats.ELV > 47) Then
  387. 2990                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
  388. 3000                      End If
  389.                      
  390. 3010                                 If (.Stats.ELV < 48) Then
  391. 3020                      AumentoHIT = 2
  392. 3030                      Else
  393. 3040                      AumentoHIT = 1
  394. 3050                      End If
  395.                          
  396. 3060                If (.Stats.ELV < 48) Then
  397. 3070                AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
  398. 3080                Else
  399. 3090                AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
  400. 3100                End If
  401.                    
  402. 3110                      AumentoSTA = AumentoSTDef
  403.                      
  404. 3120                  Case eClass.Assasin
  405. 3130                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  406.                           Case 21
  407. 3140                      AumentoHP = RandomNumber(7, 10)
  408. 3150                      Case 20
  409. 3160                      AumentoHP = RandomNumber(6, 10)
  410. 3170                      Case 19
  411. 3180                      AumentoHP = RandomNumber(6, 9)
  412. 3190                      Case 18
  413. 3200                      AumentoHP = RandomNumber(5, 9)
  414. 3210                      Case Else
  415. 3220                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  416. 3230                      End Select
  417.                      
  418. 3240                                  If (.Stats.ELV > 47) Then
  419. 3250                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
  420. 3260                      End If
  421.                      
  422. 3270                                 If (.Stats.ELV < 48) Then
  423. 3280                      AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
  424. 3290                      Else
  425. 3300                      AumentoHIT = 1
  426. 3310                      End If
  427.                          
  428. 3320                If (.Stats.ELV < 48) Then
  429. 3330                AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
  430. 3340                Else
  431. 3350                AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
  432. 3360                End If
  433.                      
  434. 3370                      AumentoSTA = AumentoSTDef
  435.                      
  436. 3380                  Case eClass.Bard
  437. 3390                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  438.                           Case 21
  439. 3400                      AumentoHP = RandomNumber(7, 10)
  440. 3410                      Case 20
  441. 3420                      AumentoHP = RandomNumber(6, 10)
  442. 3430                      Case 19
  443. 3440                      AumentoHP = RandomNumber(6, 9)
  444. 3450                      Case 18
  445. 3460                      AumentoHP = RandomNumber(5, 9)
  446. 3470                      Case Else
  447. 3480                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  448. 3490                      End Select
  449.                      
  450. 3500                  If (.Stats.ELV > 47) Then
  451. 3510                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
  452. 3520                      End If
  453.                      
  454. 3530                                 If (.Stats.ELV < 48) Then
  455. 3540                      AumentoHIT = 2
  456. 3550                      Else
  457. 3560                      AumentoHIT = 1
  458. 3570                      End If
  459.                          
  460. 3580                If (.Stats.ELV < 48) Then
  461. 3590                AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
  462. 3600                Else
  463. 3610                AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
  464. 3620                End If
  465.                    
  466. 3630                      AumentoSTA = AumentoSTDef
  467.                                      
  468.                                      
  469.                                                ' Case eClass.Bandit
  470.                                            '    Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  471.                         ' Case 21
  472.                          'AumentoHP = RandomNumber(9, 11)
  473.                         ' Case 20
  474.                          'AumentoHP = RandomNumber(8, 11)
  475.                          'Case 19
  476.                          'AumentoHP = RandomNumber(7, 11)
  477.                          'Case 18
  478.                          'AumentoHP = RandomNumber(6, 11)
  479.                          'Case Else
  480.                          'AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPCazador
  481.                         ' End Select
  482.                          
  483.                                         '  If (.Stats.ELV > 47) Then
  484.                         ' AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 + AdicionalHPCazador
  485.                         ' End If
  486.                      
  487.                            '          If (.Stats.ELV < 48) Then
  488.                         ' AumentoHIT = AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
  489.                          'Else
  490.                          'AumentoHIT = 1
  491.                         ' End If
  492.                          
  493.                    ' If (.Stats.ELV < 48) Then
  494.                    'AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) / 3 * 2
  495.                    'Else
  496.                    'AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) / 3
  497.                    'End If
  498.                    
  499.                          ' AumentoSTA = AumentoStBandido
  500.                                      
  501. 3640                  Case Else
  502. 3650                     Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  503.                           Case 21
  504. 3660                      AumentoHP = RandomNumber(6, 8)
  505. 3670                      Case 20
  506. 3680                      AumentoHP = RandomNumber(5, 8)
  507. 3690                      Case 19
  508. 3700                      AumentoHP = RandomNumber(4, 8)
  509. 3710                      Case 18
  510. 3720                      AumentoHP = RandomNumber(3, 8)
  511. 3730                      Case Else
  512. 3740                      AumentoHP = RandomNumber(5, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
  513. 3750                      End Select
  514.                      
  515. 3760                      AumentoHIT = 2
  516. 3770                      AumentoSTA = AumentoSTDef
  517. 3780              End Select
  518.                  
  519.                   'Actualizamos HitPoints
  520. 3790              .Stats.MaxHp = .Stats.MaxHp + AumentoHP
  521. 3800              If .Stats.MaxHp > STAT_MAXHP Then .Stats.MaxHp = STAT_MAXHP
  522.                  
  523.                   'Actualizamos Stamina
  524. 3810              .Stats.MaxSta = .Stats.MaxSta + AumentoSTA
  525. 3820              If .Stats.MaxSta > STAT_MAXSTA Then .Stats.MaxSta = STAT_MAXSTA
  526.                  
  527.                   'Actualizamos Mana
  528. 3830              .Stats.MaxMAN = .Stats.MaxMAN + AumentoMANA
  529. 3840              If .Stats.MaxMAN > STAT_MAXMAN Then .Stats.MaxMAN = STAT_MAXMAN
  530.                  
  531.                   'Actualizamos Golpe Máximo
  532. 3850              .Stats.MaxHIT = .Stats.MaxHIT + AumentoHIT
  533. 3860              If .Stats.ELV < 36 Then
  534. 3870                  If .Stats.MaxHIT > STAT_MAXHIT_UNDER36 Then _
  535.                           .Stats.MaxHIT = STAT_MAXHIT_UNDER36
  536. 3880              Else
  537. 3890                  If .Stats.MaxHIT > STAT_MAXHIT_OVER36 Then _
  538.                           .Stats.MaxHIT = STAT_MAXHIT_OVER36
  539. 3900              End If
  540.                  
  541.                   'Actualizamos Golpe Mínimo
  542. 3910              .Stats.MinHIT = .Stats.MinHIT + AumentoHIT
  543. 3920              If .Stats.ELV < 36 Then
  544. 3930                  If .Stats.MinHIT > STAT_MAXHIT_UNDER36 Then _
  545.                           .Stats.MinHIT = STAT_MAXHIT_UNDER36
  546. 3940              Else
  547. 3950                  If .Stats.MinHIT > STAT_MAXHIT_OVER36 Then _
  548.                           .Stats.MinHIT = STAT_MAXHIT_OVER36
  549. 3960              End If
  550.                  
  551.             'Notificamos al user
  552.            If AumentoHP > 0 Then
  553.                 Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoHP & " puntos de vida.", FontTypeNames.FONTTYPE_INFO)
  554.             End If
  555.             If AumentoSTA > 0 Then
  556.                 Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoSTA & " puntos de energía.", FontTypeNames.FONTTYPE_INFO)
  557.             End If
  558.             If AumentoMANA > 0 Then
  559.                 Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoMANA & " puntos de maná.", FontTypeNames.FONTTYPE_INFO)
  560.             End If
  561.             If AumentoHIT > 0 Then
  562.                 Call WriteConsoleMsg(UserIndex, "Tu golpe máximo aumentó en " & AumentoHIT & " puntos.", FontTypeNames.FONTTYPE_INFO)
  563.                 Call WriteConsoleMsg(UserIndex, "Tu golpe mínimo aumentó en " & AumentoHIT & " puntos.", FontTypeNames.FONTTYPE_INFO)
  564.             End If
  565.                  
  566. 4100              Call LogDesarrollo(.Name & " paso a nivel " & .Stats.ELV & " gano HP: " & AumentoHP)
  567.                  
  568. 4110              .Stats.MinHp = .Stats.MaxHp
  569.  
  570.                       'If user is in a party, we modify the variable p_sumaniveleselevados
  571. 4120                  Call mdParty.ActualizarSumaNivelesElevados(UserIndex)
  572.                           '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
  573.              
  574. 4130              If .Stats.ELV = 25 Then
  575. 4140                  GI = .GuildIndex
  576. 4150                  If GI > 0 Then
  577. 4160                      If modGuilds.GuildAlignment(GI) = "Del Mal" Or modGuilds.GuildAlignment(GI) = "Real" Then
  578.                               'We get here, so guild has factionary alignment, we have to expulse the user
  579. 4170                          Call modGuilds.m_EcharMiembroDeClan(-1, .Name)
  580. 4180                          Call SendData(SendTarget.ToGuildMembers, GI, PrepareMessageConsoleMsg(.Name & " deja el clan.", FontTypeNames.FONTTYPE_GUILD))
  581. 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)
  582. 4200                      End If
  583. 4210                  End If
  584. 4220              End If
  585.  
  586. 4230          Loop
  587.              
  588.               'If it ceased to be a newbie, remove newbie items and get char away from newbie dungeon
  589. 4240          If Not EsNewbie(UserIndex) And WasNewbie Then
  590. 4250              Call QuitarNewbieObj(UserIndex)
  591. 4260              If UCase$(MapInfo(.Pos.map).Restringir) = "NEWBIE" Then
  592. 4270                  Call WarpUserChar(UserIndex, 1, 50, 50, True)
  593. 4280                  Call WriteConsoleMsg(UserIndex, "Debes abandonar el Dungeon Newbie.", FontTypeNames.FONTTYPE_INFO)
  594. 4290              End If
  595. 4300          End If
  596.              
  597.              
  598. 4360      End With
  599.          
  600. 4370      Call WriteUpdateUserStats(UserIndex)
  601.    
  602.     On Error GoTo 0
  603.     Exit Sub
  604.  
  605. CheckUserLevel_Error:
  606.  
  607.     LogError "Error " & Err.Number & " (" & Err.Description & ") in procedure CheckUserLevel, line " & Erl & "."
  608.  
  609. End Sub
  610.  
  611. ''
  612. ' Checks if the user gets the next level.
  613. '
  614. ' @param UserIndex Specifies reference to user
  615.  
  616. Public Sub CheckUserLevelF1(ByVal UserIndex As Integer)
  617.     On Error GoTo CheckUserLevel_Error
  618. 'by lucho for dolwur
  619.          Dim Pts As Integer
  620.           Dim AumentoHIT As Integer
  621.           Dim AumentoMANA As Integer
  622.           Dim AumentoSTA As Integer
  623.           Dim AumentoHP As Integer
  624.           Dim WasNewbie As Boolean
  625.              Dim WasQuince As Boolean
  626.              Dim WasSiete As Boolean
  627.              Dim WasOcho As Boolean
  628.              Dim WasNueve As Boolean
  629.              Dim WasQuinceElv As Boolean
  630.              Dim WasVeinte As Boolean
  631.              Dim WasVeinticinco As Boolean
  632.              Dim WasQuinceM As Boolean
  633.              Dim WasTreintaM As Boolean
  634.              Dim WasHM As Boolean
  635.              Dim WasUM As Boolean
  636.              Dim WasMM As Boolean
  637.              Dim WasVip As Boolean
  638.              Dim WasVipp As Boolean
  639.              Dim WasVipb As Boolean
  640.              Dim WasNoUM As Boolean
  641.       Dim waspremium As Boolean
  642.           Dim Promedio As Double
  643.           Dim aux As Integer
  644.           Dim DistVida(1 To 5) As Integer
  645.           Dim GI As Integer 'Guild Index
  646.          
  647. 10        WasNewbie = EsNewbie(UserIndex)
  648. 20        WasQuince = EsQuince(UserIndex)
  649. 30        WasSiete = EsSiete(UserIndex)
  650. 40        WasOcho = EsOcho(UserIndex)
  651. 50        WasNueve = EsNueve(UserIndex)
  652. 60        WasQuince = EsQuince(UserIndex)
  653. 70        WasVeinte = EsVeinte(UserIndex)
  654. 80        WasVeinticinco = EsVeinticinco(UserIndex)
  655. 90        WasQuinceM = EsQuinceM(UserIndex)
  656. 100       WasTreintaM = EsTreintaM(UserIndex)
  657. 110       WasHM = EsHM(UserIndex)
  658. 120       WasUM = EsUM(UserIndex)
  659. 130       WasMM = EsMM(UserIndex)
  660. 140       WasVip = EsVip(UserIndex)
  661. 150       WasVipp = EsVipp(UserIndex)
  662. 160       WasVipb = EsVipb(UserIndex)
  663. 170       WasNoUM = NoEsUM(UserIndex)
  664. 180       waspremium = EsPremium(UserIndex)
  665.          
  666. 190       With UserList(UserIndex)
  667. 200           Do While .Stats.Exp >= .Stats.ELU
  668.                  
  669.                   'Checkea si alcanzó el máximo nivel
  670. 210               If .Stats.ELV >= STAT_MAXELV Then
  671. 220                   .Stats.Exp = 0
  672. 230                   .Stats.ELU = 0
  673. 240                   Exit Sub
  674. 250               End If
  675.                  
  676.                   'Store it!
  677. 260               Call Statistics.UserLevelUp(UserIndex)
  678.                  
  679.                   If .Stats.ELV >= 48 Then
  680. 270               Call SendData(SendTarget.ToPCArea, UserIndex, PrepareMessagePlayWave(SND_NIVEL, .Pos.X, .Pos.Y))
  681. 280               Call WriteConsoleMsg(UserIndex, "¡Has subido de nivel!", FontTypeNames.FONTTYPE_INFO)
  682.                 End If
  683.                  
  684. 290               If .Stats.ELV = 1 Then
  685. 300                   Pts = 0
  686. 310               Else
  687.                       'For multiple levels being rised at once
  688. 320                   Pts = Pts + 0
  689. 330               End If
  690.                  
  691. 340               .Stats.ELV = .Stats.ELV + 1
  692.                  
  693. 350               .Stats.Exp = .Stats.Exp - .Stats.ELU
  694.                  
  695.                   'Nueva subida de exp x lvl. Pablo (ToxicWaste)
  696. 360               If .Stats.ELV = 2 Then
  697. 370                   .Stats.ELU = 450
  698. 380                   ElseIf .Stats.ELV = 3 Then
  699. 390                   .Stats.ELU = 675
  700. 400                   ElseIf .Stats.ELV = 4 Then
  701. 410                   .Stats.ELU = 1012
  702. 420                   ElseIf .Stats.ELV = 5 Then
  703. 430                   .Stats.ELU = 1518
  704. 440                   ElseIf .Stats.ELV = 6 Then
  705. 450                   .Stats.ELU = 2277
  706. 460                   ElseIf .Stats.ELV = 7 Then
  707. 470                   .Stats.ELU = 3416
  708. 480                   ElseIf .Stats.ELV = 8 Then
  709. 490                   .Stats.ELU = 5124
  710. 500                   ElseIf .Stats.ELV = 9 Then
  711. 510                   .Stats.ELU = 7886
  712. 520                   ElseIf .Stats.ELV = 10 Then
  713. 530                   .Stats.ELU = 11529
  714. 540                   ElseIf .Stats.ELV = 11 Then
  715. 550                   .Stats.ELU = 14988
  716. 560                   ElseIf .Stats.ELV = 12 Then
  717. 570                   .Stats.ELU = 19484
  718. 580                   ElseIf .Stats.ELV = 13 Then
  719. 590                   .Stats.ELU = 25329
  720. 600                   ElseIf .Stats.ELV = 14 Then
  721. 610                   .Stats.ELU = 32928
  722. 620                   ElseIf .Stats.ELV = 15 Then
  723. 630                   .Stats.ELU = 42806
  724. 640                   ElseIf .Stats.ELV = 16 Then
  725. 650                   .Stats.ELU = 55648
  726. 660                   ElseIf .Stats.ELV = 17 Then
  727. 670                   .Stats.ELU = 72342
  728. 680                   ElseIf .Stats.ELV = 18 Then
  729. 690                   .Stats.ELU = 94045
  730. 700                   ElseIf .Stats.ELV = 19 Then
  731. 710                   .Stats.ELU = 122259
  732. 720                   ElseIf .Stats.ELV = 20 Then
  733. 730                   .Stats.ELU = 158937
  734. 740                   ElseIf .Stats.ELV = 21 Then
  735. 750                   .Stats.ELU = 206618
  736. 760                   ElseIf .Stats.ELV = 22 Then
  737. 770                   .Stats.ELU = 268603
  738. 780                   ElseIf .Stats.ELV = 23 Then
  739. 790                   .Stats.ELU = 349184
  740. 800                   ElseIf .Stats.ELV = 24 Then
  741. 810                   .Stats.ELU = 453939
  742. 820                   ElseIf .Stats.ELV = 25 Then
  743. 830                   .Stats.ELU = 544727
  744. 840                   ElseIf .Stats.ELV = 26 Then
  745. 850                   .Stats.ELU = 667632
  746. 860                   ElseIf .Stats.ELV = 27 Then
  747. 870                   .Stats.ELU = 784406
  748. 880                   ElseIf .Stats.ELV = 28 Then
  749. 890                   .Stats.ELU = 941287
  750. 900                   ElseIf .Stats.ELV = 29 Then
  751. 910                   .Stats.ELU = 1129544
  752. 920                   ElseIf .Stats.ELV = 30 Then
  753. 930                   .Stats.ELU = 1355453
  754. 940                   ElseIf .Stats.ELV = 31 Then
  755. 950                   .Stats.ELU = 1626544
  756. 960                   ElseIf .Stats.ELV = 32 Then
  757. 970                   .Stats.ELU = 1951853
  758. 980                   ElseIf .Stats.ELV = 33 Then
  759. 990                   .Stats.ELU = 2342224
  760. 1000                  ElseIf .Stats.ELV = 34 Then
  761. 1010                  .Stats.ELU = 3372803
  762. 1020                  ElseIf .Stats.ELV = 35 Then
  763. 1030                  .Stats.ELU = 4047364
  764. 1040                  ElseIf .Stats.ELV = 36 Then
  765. 1050                  .Stats.ELU = 5828204
  766. 1060                  ElseIf .Stats.ELV = 37 Then
  767. 1070                  .Stats.ELU = 6993845
  768. 1080                  ElseIf .Stats.ELV = 38 Then
  769. 1090                  .Stats.ELU = 8392614
  770. 1100                  ElseIf .Stats.ELV = 39 Then
  771. 1110                  .Stats.ELU = 10071137
  772. 1120                  ElseIf .Stats.ELV = 40 Then
  773. 1130                  .Stats.ELU = 120853640
  774. 1140                  ElseIf .Stats.ELV = 41 Then
  775. 1150                  .Stats.ELU = 145024370
  776. 1160                  ElseIf .Stats.ELV = 42 Then
  777. 1170                  .Stats.ELU = 174029240
  778. 1180                  ElseIf .Stats.ELV = 43 Then
  779. 1190                  .Stats.ELU = 208835090
  780. 1200                  ElseIf .Stats.ELV = 44 Then
  781. 1210                  .Stats.ELU = 417670180
  782. 1220                  ElseIf .Stats.ELV = 45 Then
  783. 1230                  .Stats.ELU = 835340360
  784. 1240                  ElseIf .Stats.ELV = 46 Then
  785. 1250                  .Stats.ELU = 1670680720
  786. 1260                  Else
  787. 1270                  .Stats.ELU = 0
  788. 1280                  End If
  789.                  
  790. 1290         Select Case .clase
  791.                  Case eClass.Warrior
  792. 1300                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  793.                           Case 21
  794. 1310                      AumentoHP = RandomNumber(9, 12)
  795. 1320                      Case 20
  796. 1330                      AumentoHP = RandomNumber(8, 12)
  797. 1340                      Case 19
  798. 1350                      AumentoHP = RandomNumber(8, 11)
  799. 1360                      Case 18
  800. 1370                      AumentoHP = RandomNumber(7, 11)
  801. 1380                      Case Else
  802. 1390                      AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPGuerrero
  803. 1400                      End Select
  804.                          
  805.                          
  806. 1410                      If (.Stats.ELV < 48) Then
  807. 1420                      AumentoHIT = IIf(.Stats.ELV > 35, 2, 3)
  808. 1430                      Else
  809. 1440                      AumentoHIT = 1
  810. 1450                      End If
  811.                          
  812. 1460                      AumentoSTA = AumentoSTDef
  813.                      
  814. 1470                  Case eClass.Hunter
  815. 1480                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  816.                           Case 21
  817. 1490                      AumentoHP = RandomNumber(9, 11)
  818. 1500                      Case 20
  819. 1510                      AumentoHP = RandomNumber(8, 11)
  820. 1520                      Case 19
  821. 1530                      AumentoHP = RandomNumber(7, 11)
  822. 1540                      Case 18
  823. 1550                      AumentoHP = RandomNumber(6, 10)
  824. 1560                      Case Else
  825. 1570                      AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  826. 1580                      End Select
  827.                      
  828.                      
  829. 1590                  If (.Stats.ELV < 48) Then
  830. 1600                      AumentoHIT = IIf(.Stats.ELV > 35, 2, 3)
  831. 1610                      Else
  832. 1620                      AumentoHIT = 1
  833. 1630                      End If
  834.                          
  835. 1640                      AumentoSTA = AumentoSTDef
  836.                      
  837. 1650                  Case eClass.Pirat
  838. 1660                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  839.                           Case 21
  840. 1670                      AumentoHP = RandomNumber(9, 11)
  841. 1680                      Case 20
  842. 1690                      AumentoHP = RandomNumber(8, 11)
  843. 1700                      Case 19
  844. 1710                      AumentoHP = RandomNumber(7, 11)
  845. 1720                      Case 18
  846. 1730                      AumentoHP = RandomNumber(6, 11)
  847. 1740                      Case Else
  848. 1750                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPGuerrero
  849. 1760                      End Select
  850.                      
  851. 1770                  If (.Stats.ELV < 48) Then
  852. 1780                      AumentoHIT = 3
  853. 1790                      Else
  854. 1800                      AumentoHIT = 2
  855. 1810                      End If
  856.                          
  857. 1820                      AumentoSTA = AumentoSTDef
  858.                      
  859. 1830                  Case eClass.Paladin
  860. 1840                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  861.                           Case 21
  862. 1850                      AumentoHP = RandomNumber(9, 11)
  863. 1860                      Case 20
  864. 1870                      AumentoHP = RandomNumber(8, 11)
  865. 1880                      Case 19
  866. 1890                      AumentoHP = RandomNumber(7, 11)
  867. 1900                      Case 18
  868. 1910                      AumentoHP = RandomNumber(6, 11)
  869. 1920                      Case Else
  870. 1930                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPCazador
  871. 1940                      End Select
  872.                      
  873.                  
  874. 1950              If (.Stats.ELV > 47) Then
  875. 1960              AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 + AdicionalHPCazador
  876. 1970              End If
  877.                  
  878. 1980                 If (.Stats.ELV < 48) Then
  879. 1990                      AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
  880. 2000                      Else
  881. 2010                      AumentoHIT = 1
  882. 2020                      End If
  883.                          
  884. 2030                If (.Stats.ELV < 48) Then
  885. 2040                AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
  886. 2050                Else
  887. 2060                AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) \ 2
  888. 2070                End If
  889.                    
  890. 2080                      AumentoSTA = AumentoSTDef
  891.                      
  892. 2090                  Case eClass.Thief
  893. 2100                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  894.                           Case 21
  895. 2110                      AumentoHP = RandomNumber(6, 9)
  896. 2120                      Case 20
  897. 2130                      AumentoHP = RandomNumber(5, 9)
  898. 2140                      Case 19
  899. 2150                      AumentoHP = RandomNumber(4, 9)
  900. 2160                      Case 18
  901. 2170                      AumentoHP = RandomNumber(4, 8)
  902. 2180                      Case Else
  903. 2190                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  904. 2200                      End Select
  905.                      
  906. 2210                      AumentoHIT = 2
  907. 2220                      AumentoSTA = AumentoSTLadron
  908.                      
  909. 2230                  Case eClass.Mage
  910. 2240                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  911.                           Case 21
  912. 2250                      AumentoHP = RandomNumber(6, 9)
  913. 2260                      Case 20
  914. 2270                      AumentoHP = RandomNumber(5, 8)
  915. 2280                      Case 19
  916. 2290                      AumentoHP = RandomNumber(4, 8)
  917. 2300                      Case 18
  918. 2310                      AumentoHP = RandomNumber(3, 8)
  919. 2320                      Case Else
  920. 2330                      AumentoHP = RandomNumber(5, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
  921. 2340                      End Select
  922. 2350                      If AumentoHP < 1 Then AumentoHP = 4
  923.                          
  924. 2360                      If (.Stats.ELV > 47) Then
  925. 2370                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 - AdicionalHPCazador
  926. 2380                      End If
  927.                          
  928. 2390                      AumentoHIT = 1
  929.                           'AumentoMANA = 3 * .Stats.UserAtributos(eAtributos.Inteligencia)
  930. 2400                      AumentoSTA = AumentoSTMago
  931.                          
  932. 2410                      If (.Stats.MaxMAN >= 2000) Then
  933. 2420                      AumentoMANA = (3 * .Stats.UserAtributos(eAtributos.Inteligencia)) / 2
  934. 2430                      Else
  935. 2440                      AumentoMANA = 3 * .Stats.UserAtributos(eAtributos.Inteligencia)
  936. 2450                      End If
  937.                                    
  938. 2460                  Case eClass.Worker
  939. 2470                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  940.                           Case 21
  941. 2480                      AumentoHP = RandomNumber(9, 12)
  942. 2490                      Case 20
  943. 2500                      AumentoHP = RandomNumber(8, 12)
  944. 2510                      Case 19
  945. 2520                      AumentoHP = RandomNumber(7, 12)
  946. 2530                      Case 18
  947. 2540                      AumentoHP = RandomNumber(6, 11)
  948. 2550                      Case Else
  949. 2560                      AumentoHP = RandomNumber(6, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
  950. 2570                      End Select
  951.                      
  952. 2580                      AumentoHIT = 1
  953. 2590                      AumentoSTA = AumentoSTTrabajador
  954.                      
  955.                    
  956. 2600                  Case eClass.Cleric
  957. 2610                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  958.                           Case 21
  959. 2620                      AumentoHP = RandomNumber(7, 10)
  960. 2630                      Case 20
  961. 2640                      AumentoHP = RandomNumber(6, 10)
  962. 2650                      Case 19
  963. 2660                      AumentoHP = RandomNumber(6, 9)
  964. 2670                      Case 18
  965. 2680                      AumentoHP = RandomNumber(5, 9)
  966. 2690                      Case Else
  967. 2700                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  968. 2710                      End Select
  969.                      
  970. 2720                  If (.Stats.ELV > 47) Then
  971. 2730                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
  972. 2740                      End If
  973.                      
  974. 2750                                 If (.Stats.ELV < 48) Then
  975. 2760                      AumentoHIT = 2
  976. 2770                      Else
  977. 2780                      AumentoHIT = 1
  978. 2790                      End If
  979.                          
  980. 2800                If (.Stats.ELV < 48) Then
  981. 2810                AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
  982. 2820                Else
  983. 2830                AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
  984. 2840                End If
  985.                      
  986. 2850                      AumentoSTA = AumentoSTDef
  987.                      
  988. 2860                  Case eClass.Druid
  989. 2870                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  990.                           Case 21
  991. 2880                      AumentoHP = RandomNumber(7, 10)
  992. 2890                      Case 20
  993. 2900                      AumentoHP = RandomNumber(6, 10)
  994. 2910                      Case 19
  995. 2920                      AumentoHP = RandomNumber(6, 9)
  996. 2930                      Case 18
  997. 2940                      AumentoHP = RandomNumber(5, 9)
  998. 2950                      Case Else
  999. 2960                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  1000. 2970                      End Select
  1001.                  
  1002. 2980                  If (.Stats.ELV > 47) Then
  1003. 2990                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
  1004. 3000                      End If
  1005.                      
  1006. 3010                                 If (.Stats.ELV < 48) Then
  1007. 3020                      AumentoHIT = 2
  1008. 3030                      Else
  1009. 3040                      AumentoHIT = 1
  1010. 3050                      End If
  1011.                          
  1012. 3060                If (.Stats.ELV < 48) Then
  1013. 3070                AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
  1014. 3080                Else
  1015. 3090                AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
  1016. 3100                End If
  1017.                    
  1018. 3110                      AumentoSTA = AumentoSTDef
  1019.                      
  1020. 3120                  Case eClass.Assasin
  1021. 3130                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  1022.                           Case 21
  1023. 3140                      AumentoHP = RandomNumber(7, 10)
  1024. 3150                      Case 20
  1025. 3160                      AumentoHP = RandomNumber(6, 10)
  1026. 3170                      Case 19
  1027. 3180                      AumentoHP = RandomNumber(6, 9)
  1028. 3190                      Case 18
  1029. 3200                      AumentoHP = RandomNumber(5, 9)
  1030. 3210                      Case Else
  1031. 3220                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  1032. 3230                      End Select
  1033.                      
  1034. 3240                                  If (.Stats.ELV > 47) Then
  1035. 3250                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
  1036. 3260                      End If
  1037.                      
  1038. 3270                                 If (.Stats.ELV < 48) Then
  1039. 3280                      AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
  1040. 3290                      Else
  1041. 3300                      AumentoHIT = 1
  1042. 3310                      End If
  1043.                          
  1044. 3320                If (.Stats.ELV < 48) Then
  1045. 3330                AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
  1046. 3340                Else
  1047. 3350                AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia)
  1048. 3360                End If
  1049.                      
  1050. 3370                      AumentoSTA = AumentoSTDef
  1051.                      
  1052. 3380                  Case eClass.Bard
  1053. 3390                      Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  1054.                           Case 21
  1055. 3400                      AumentoHP = RandomNumber(7, 10)
  1056. 3410                      Case 20
  1057. 3420                      AumentoHP = RandomNumber(6, 10)
  1058. 3430                      Case 19
  1059. 3440                      AumentoHP = RandomNumber(6, 9)
  1060. 3450                      Case 18
  1061. 3460                      AumentoHP = RandomNumber(5, 9)
  1062. 3470                      Case Else
  1063. 3480                      AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2)
  1064. 3490                      End Select
  1065.                      
  1066. 3500                  If (.Stats.ELV > 47) Then
  1067. 3510                      AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4
  1068. 3520                      End If
  1069.                      
  1070. 3530                                 If (.Stats.ELV < 48) Then
  1071. 3540                      AumentoHIT = 2
  1072. 3550                      Else
  1073. 3560                      AumentoHIT = 1
  1074. 3570                      End If
  1075.                          
  1076. 3580                If (.Stats.ELV < 48) Then
  1077. 3590                AumentoMANA = 2 * .Stats.UserAtributos(eAtributos.Inteligencia)
  1078. 3600                Else
  1079. 3610                AumentoMANA = 1 * .Stats.UserAtributos(eAtributos.Inteligencia)
  1080. 3620                End If
  1081.                    
  1082. 3630                      AumentoSTA = AumentoSTDef
  1083.                                      
  1084.                                      
  1085.                                                ' Case eClass.Bandit
  1086.                                            '    Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  1087.                         ' Case 21
  1088.                          'AumentoHP = RandomNumber(9, 11)
  1089.                         ' Case 20
  1090.                          'AumentoHP = RandomNumber(8, 11)
  1091.                          'Case 19
  1092.                          'AumentoHP = RandomNumber(7, 11)
  1093.                          'Case 18
  1094.                          'AumentoHP = RandomNumber(6, 11)
  1095.                          'Case Else
  1096.                          'AumentoHP = RandomNumber(4, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) + AdicionalHPCazador
  1097.                         ' End Select
  1098.                          
  1099.                                         '  If (.Stats.ELV > 47) Then
  1100.                         ' AumentoHP = .Stats.UserAtributos(eAtributos.Constitucion) \ 4 + AdicionalHPCazador
  1101.                         ' End If
  1102.                      
  1103.                            '          If (.Stats.ELV < 48) Then
  1104.                         ' AumentoHIT = AumentoHIT = IIf(.Stats.ELV > 35, 1, 3)
  1105.                          'Else
  1106.                          'AumentoHIT = 1
  1107.                         ' End If
  1108.                          
  1109.                    ' If (.Stats.ELV < 48) Then
  1110.                    'AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) / 3 * 2
  1111.                    'Else
  1112.                    'AumentoMANA = .Stats.UserAtributos(eAtributos.Inteligencia) / 3
  1113.                    'End If
  1114.                    
  1115.                          ' AumentoSTA = AumentoStBandido
  1116.                                      
  1117. 3640                  Case Else
  1118. 3650                     Select Case .Stats.UserAtributos(eAtributos.Constitucion)
  1119.                           Case 21
  1120. 3660                      AumentoHP = RandomNumber(6, 8)
  1121. 3670                      Case 20
  1122. 3680                      AumentoHP = RandomNumber(5, 8)
  1123. 3690                      Case 19
  1124. 3700                      AumentoHP = RandomNumber(4, 8)
  1125. 3710                      Case 18
  1126. 3720                      AumentoHP = RandomNumber(3, 8)
  1127. 3730                      Case Else
  1128. 3740                      AumentoHP = RandomNumber(5, .Stats.UserAtributos(eAtributos.Constitucion) \ 2) - AdicionalHPCazador
  1129. 3750                      End Select
  1130.                      
  1131. 3760                      AumentoHIT = 2
  1132. 3770                      AumentoSTA = AumentoSTDef
  1133. 3780              End Select
  1134.                  
  1135.                   'Actualizamos HitPoints
  1136. 3790              .Stats.MaxHp = .Stats.MaxHp + AumentoHP
  1137. 3800              If .Stats.MaxHp > STAT_MAXHP Then .Stats.MaxHp = STAT_MAXHP
  1138.                  
  1139.                   'Actualizamos Stamina
  1140. 3810              .Stats.MaxSta = .Stats.MaxSta + AumentoSTA
  1141. 3820              If .Stats.MaxSta > STAT_MAXSTA Then .Stats.MaxSta = STAT_MAXSTA
  1142.                  
  1143.                   'Actualizamos Mana
  1144. 3830              .Stats.MaxMAN = .Stats.MaxMAN + AumentoMANA
  1145. 3840              If .Stats.MaxMAN > STAT_MAXMAN Then .Stats.MaxMAN = STAT_MAXMAN
  1146.                  
  1147.                   'Actualizamos Golpe Máximo
  1148. 3850              .Stats.MaxHIT = .Stats.MaxHIT + AumentoHIT
  1149. 3860              If .Stats.ELV < 36 Then
  1150. 3870                  If .Stats.MaxHIT > STAT_MAXHIT_UNDER36 Then _
  1151.                           .Stats.MaxHIT = STAT_MAXHIT_UNDER36
  1152. 3880              Else
  1153. 3890                  If .Stats.MaxHIT > STAT_MAXHIT_OVER36 Then _
  1154.                           .Stats.MaxHIT = STAT_MAXHIT_OVER36
  1155. 3900              End If
  1156.                  
  1157.                   'Actualizamos Golpe Mínimo
  1158. 3910              .Stats.MinHIT = .Stats.MinHIT + AumentoHIT
  1159. 3920              If .Stats.ELV < 36 Then
  1160. 3930                  If .Stats.MinHIT > STAT_MAXHIT_UNDER36 Then _
  1161.                           .Stats.MinHIT = STAT_MAXHIT_UNDER36
  1162. 3940              Else
  1163. 3950                  If .Stats.MinHIT > STAT_MAXHIT_OVER36 Then _
  1164.                           .Stats.MinHIT = STAT_MAXHIT_OVER36
  1165. 3960              End If
  1166.                  
  1167.                   'Notificamos al user
  1168.                  If .Stats.ELV >= 48 Then
  1169. 3970              If AumentoHP > 0 Then
  1170. 3980                  Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoHP & " puntos de vida.", FontTypeNames.FONTTYPE_INFO)
  1171. 3990              End If
  1172. 4000              If AumentoSTA > 0 Then
  1173. 4010                  Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoSTA & " puntos de energía.", FontTypeNames.FONTTYPE_INFO)
  1174. 4020              End If
  1175. 4030              If AumentoMANA > 0 Then
  1176. 4040                  Call WriteConsoleMsg(UserIndex, "Has ganado " & AumentoMANA & " puntos de maná.", FontTypeNames.FONTTYPE_INFO)
  1177. 4050              End If
  1178. 4060              If AumentoHIT > 0 Then
  1179. 4070                  Call WriteConsoleMsg(UserIndex, "Tu golpe máximo aumentó en " & AumentoHIT & " puntos.", FontTypeNames.FONTTYPE_INFO)
  1180. 4080                  Call WriteConsoleMsg(UserIndex, "Tu golpe mínimo aumentó en " & AumentoHIT & " puntos.", FontTypeNames.FONTTYPE_INFO)
  1181. 4090              End If
  1182.                 End If
  1183.                  
  1184. 4100              Call LogDesarrollo(.Name & " paso a nivel " & .Stats.ELV & " gano HP: " & AumentoHP)
  1185.                  
  1186. 4110              .Stats.MinHp = .Stats.MaxHp
  1187.  
  1188.                       'If user is in a party, we modify the variable p_sumaniveleselevados
  1189. 4120                  Call mdParty.ActualizarSumaNivelesElevados(UserIndex)
  1190.                           '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
  1191.              
  1192. 4130              If .Stats.ELV = 25 Then
  1193. 4140                  GI = .GuildIndex
  1194. 4150                  If GI > 0 Then
  1195. 4160                      If modGuilds.GuildAlignment(GI) = "Del Mal" Or modGuilds.GuildAlignment(GI) = "Real" Then
  1196.                               'We get here, so guild has factionary alignment, we have to expulse the user
  1197. 4170                          Call modGuilds.m_EcharMiembroDeClan(-1, .Name)
  1198. 4180                          Call SendData(SendTarget.ToGuildMembers, GI, PrepareMessageConsoleMsg(.Name & " deja el clan.", FontTypeNames.FONTTYPE_GUILD))
  1199. 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)
  1200. 4200                      End If
  1201. 4210                  End If
  1202. 4220              End If
  1203.  
  1204. 4230          Loop
  1205.              
  1206.               'If it ceased to be a newbie, remove newbie items and get char away from newbie dungeon
  1207. 4240          If Not EsNewbie(UserIndex) And WasNewbie Then
  1208. 4250              Call QuitarNewbieObj(UserIndex)
  1209. 4260              If UCase$(MapInfo(.Pos.map).Restringir) = "NEWBIE" Then
  1210. 4270                  Call WarpUserChar(UserIndex, 1, 50, 50, True)
  1211. 4280                  Call WriteConsoleMsg(UserIndex, "Debes abandonar el Dungeon Newbie.", FontTypeNames.FONTTYPE_INFO)
  1212. 4290              End If
  1213. 4300          End If
  1214.              
  1215.              
  1216. 4360      End With
  1217.          
  1218. 4370      Call WriteUpdateUserStats(UserIndex)
  1219.    
  1220.     On Error GoTo 0
  1221.     Exit Sub
  1222.  
  1223. CheckUserLevel_Error:
  1224.  
  1225.     LogError "Error " & Err.Number & " (" & Err.Description & ") in procedure CheckUserLevel, line " & Erl & "."
  1226.  
  1227. End Sub
  1228.  
  1229. 'luego de pegar estos 2 sub`s
  1230. 'En el handle nivel buscas:
  1231. Call CheckUserLevel(UserIndex)
  1232. 'y pones el de f1:
  1233. Call CheckUserLevelF1(UserIndex) y listo.
  1234.  
  1235. 'PLUS:para evitar dupeos y esa vaina
  1236. 'Buscas en el handlecommercestart:
  1237.        If MapInfo(.Pos.map).Pk = True Then
  1238.             Call WriteConsoleMsg(UserIndex, "¡Para poder comerciar debes estar en una ciudad segura!", FONTTYPE_INFO)
  1239.             Exit Sub
  1240.         End If
  1241. 'Y pones abajo:
  1242.                If Not .Pos.map = 200 Then
  1243.             WriteConsoleMsg UserIndex, "Debes encontrar en Zona de comercio para utilizar el Comerciar", FontTypeNames.FONTTYPE_INFO
  1244.             Exit Sub
  1245.         End If
  1246. '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