Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.82 KB | None | 0 0
  1. PROFILE_SKILLS_INFO:
  2. mes .@npc_name$;
  3. mes "Do que você precisa?";
  4. mes " ";
  5. mes "Perfil de habilidades: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000";
  6.  
  7. .@selected = select("Carregar:Deletar:Voltar");
  8.  
  9. switch(.@selected)
  10. {
  11. next;
  12. mes .@npc_name$;
  13.  
  14. case 1:
  15. if (getd(.@var_name$ + "_class") != Class)
  16. {
  17. mes "Você não pode carregar um perfil para ^FF0000" + jobname(getd(.@var_name$ + "_class")) + "^000000, porque você é ^FF0000" + jobname(Class) + "^000000.";
  18. next;
  19. mes .@npc_name$;
  20. goto PROFILE_SKILLS_SELECT;
  21. }
  22.  
  23. if (Zeny - .load_skills_cost < 0)
  24. {
  25. mes "Você não tem ^FF0000" + callfunc("F_InsertComma", .create_skills_cost, 3, ".") + "^000000z para carregar seu perfil de habilidades.";
  26. close;
  27. }
  28.  
  29. if (last_skills_profile != #skills_profile[.@profile_id])
  30. resetskill;
  31. else
  32. {
  33. mes "Você já está usando esse perfil.";
  34. mes "Perfil de habilidades: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000";
  35. next;
  36. goto PROFILE_SKILLS_INFO;
  37. }
  38.  
  39. if (SkillPoint - getd(.@var_name$ + "_cost") >= 0)
  40. {
  41. mes "Carregando perfil de habilidades...";
  42. mes "Isso pode demorar um pouco.";
  43.  
  44. SkillPoint -= getd(.@var_name$ + "_cost");
  45. Zeny -= .load_skills_cost;
  46.  
  47. for(.@i = 0; .@i < getd(.@var_name$ + "_count"); .@i++)
  48. {
  49. if ((getd(.@var_name$ + "_id" + "[" + .@i + "]") <= 0) || (getd(.@var_name$ + "_lv" + "[" + .@i + "]") <= 0))
  50. continue;
  51.  
  52. if (getd(.@var_name$ + "_id" + "[" + .@i + "]") == RK_HUNDREDSPEAR)
  53. {
  54. // NOTE: Have any bug in skill 'Hundred Spear'. (ID: RK_HUNDREDSPEAR)
  55. mes " ";
  56. mes "Erro ao carregar:";
  57. mes "^FF0000Hundred Spear^000000 Lv: ^FF0000" + getd(.@var_name$ + "_lv" + "[" + .@i + "]") + "^000000";
  58. mes "Você voltou: ^FF0000" + getd(.@var_name$ + "_lv" + "[" + .@i + "]") + "^000000 pontos de habilidade.";
  59. SkillPoint += getd(.@var_name$ + "_lv" + "[" + .@i + "]");
  60. }
  61. else
  62. skill getd(.@var_name$ + "_id" + "[" + .@i + "]"), getd(.@var_name$ + "_lv" + "[" + .@i + "]"), 0;
  63. }
  64.  
  65. mes " ";
  66. mes "Seu perfil de habilidades foi carregado!";
  67. last_skills_profile = #skills_profile[.@profile_id];
  68. }
  69. else
  70. {
  71. mes "Você não tem pontos suficientes para carregar seu perfil de habilidades.";
  72. mes "Você precisa de mais ^FF0000" + (getd(.@var_name$ + "_cost") - SkillPoint) + "^000000 pontos de habilidade.";
  73.  
  74. if (last_skills_profile != 0)
  75. {
  76. next;
  77. mes .@npc_name$;
  78. mes "Voltando ao perfil anterior.";
  79. mes "Perfil: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000";
  80.  
  81. resetskill;
  82.  
  83. .@var_name$ = "#skilllist_" + last_skills_profile;
  84.  
  85. if (SkillPoint - getd(.@var_name$ + "_cost") >= 0)
  86. {
  87. SkillPoint -= getd(.@var_name$ + "_cost");
  88.  
  89. for(.@i = 0; .@i < getd(.@var_name$ + "_count"); .@i++)
  90. {
  91. if ((getd(.@var_name$ + "_id" + "[" + .@i + "]") <= 0) || (getd(.@var_name$ + "_lv" + "[" + .@i + "]") <= 0))
  92. continue;
  93.  
  94. if (getd(.@var_name$ + "_id" + "[" + .@i + "]") == RK_HUNDREDSPEAR)
  95. {
  96. // NOTE: Have any bug in skill 'Hundred Spear'. (ID: RK_HUNDREDSPEAR)
  97. mes " ";
  98. mes "Erro ao carregar:";
  99. mes "^FF0000Hundred Spear^000000 Lv: ^FF0000" + getd(.@var_name$ + "_lv" + "[" + .@i + "]") + "^000000";
  100. mes "Voltou para: ^FF0000" + getd(.@var_name$ + "_lv" + "[" + .@i + "]") + "^000000 pontos de habilidade.";
  101. SkillPoint += getd(.@var_name$ + "_lv" + "[" + .@i + "]");
  102. }
  103. else
  104. skill getd(.@var_name$ + "_id" + "[" + .@i + "]"), getd(.@var_name$ + "_lv" + "[" + .@i + "]"), 0;
  105. }
  106. }
  107. else
  108. {
  109. next;
  110. mes .@npc_name$;
  111. mes "Falhou ao voltar para o perfil anterior.";
  112. mes "Perfil: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000";
  113. last_skills_profile = 0;
  114. }
  115. }
  116. }
  117.  
  118. next;
  119. goto PROFILE_SKILLS_INFO;
  120. break;
  121.  
  122. case 2:
  123. mes "Você tem certeza que quer deletar o perfil: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000?";
  124. mes "";
  125.  
  126. if (select("Sim:Não") == 1)
  127. {
  128. next;
  129. goto PROFILE_SKILLS_INFO;
  130. }
  131.  
  132. next;
  133. mes .@npc_name$;
  134. mes "Perfil ^FF0000" + getd(.@var_name$ + "_name$") + "^000000 deletado.";
  135.  
  136. if (last_skills_profile == #skills_profile[.@profile_id])
  137. last_skills_profile = 0;
  138.  
  139. setd .@var_name$ + "_count", 0;
  140. setd .@var_name$ + "_cost", 0;
  141. setd .@var_name$ + "_class", 0;
  142. setd .@var_name$ + "_name$", "";
  143. deletearray getd(.@var_name$ + "_lv");
  144. deletearray getd(.@var_name$ + "_id");
  145. deletearray #skills_profile[.@profile_id], 1;
  146.  
  147. next;
  148.  
  149. if (getarraysize(#skills_profile) != 0)
  150. {
  151. mes .@npc_name$;
  152. goto PROFILE_SKILLS_SELECT;
  153. }
  154. else
  155. goto PROFILE_SKILLS_MAIN;
  156. break;
  157.  
  158. case 3:
  159. goto PROFILE_SKILLS_SELECT;
  160. break;
  161. }
  162. }
  163. else
  164. mes "Você não tem um perfil de habilidades.";
  165.  
  166. next;
  167. goto PROFILE_SKILLS_MAIN;
  168. break;
  169.  
  170. case 3:
  171. mes .@npc_name$;
  172.  
  173. if (Zeny - .reset_skills_cost >= 0)
  174. {
  175. Zeny -= .reset_skills_cost;
  176. last_skills_profile = 0;
  177. resetskill;
  178. mes "Suas habilidades foram resetadas.";
  179. }
  180. else
  181. mes "Você não tem ^FF0000" + callfunc("F_InsertComma", .reset_skills_cost, 3, ".") + "^000000z para resetar suas habilidades.";
  182.  
  183. close;
  184. break;
  185.  
  186. case 4:
  187. goto PROFILE_START_MENU;
  188. break;
  189. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement