Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROFILE_SKILLS_INFO:
- mes .@npc_name$;
- mes "Do que você precisa?";
- mes " ";
- mes "Perfil de habilidades: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000";
- .@selected = select("Carregar:Deletar:Voltar");
- switch(.@selected)
- {
- next;
- mes .@npc_name$;
- case 1:
- if (getd(.@var_name$ + "_class") != Class)
- {
- mes "Você não pode carregar um perfil para ^FF0000" + jobname(getd(.@var_name$ + "_class")) + "^000000, porque você é ^FF0000" + jobname(Class) + "^000000.";
- next;
- mes .@npc_name$;
- goto PROFILE_SKILLS_SELECT;
- }
- if (Zeny - .load_skills_cost < 0)
- {
- mes "Você não tem ^FF0000" + callfunc("F_InsertComma", .create_skills_cost, 3, ".") + "^000000z para carregar seu perfil de habilidades.";
- close;
- }
- if (last_skills_profile != #skills_profile[.@profile_id])
- resetskill;
- else
- {
- mes "Você já está usando esse perfil.";
- mes "Perfil de habilidades: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000";
- next;
- goto PROFILE_SKILLS_INFO;
- }
- if (SkillPoint - getd(.@var_name$ + "_cost") >= 0)
- {
- mes "Carregando perfil de habilidades...";
- mes "Isso pode demorar um pouco.";
- SkillPoint -= getd(.@var_name$ + "_cost");
- Zeny -= .load_skills_cost;
- for(.@i = 0; .@i < getd(.@var_name$ + "_count"); .@i++)
- {
- if ((getd(.@var_name$ + "_id" + "[" + .@i + "]") <= 0) || (getd(.@var_name$ + "_lv" + "[" + .@i + "]") <= 0))
- continue;
- if (getd(.@var_name$ + "_id" + "[" + .@i + "]") == RK_HUNDREDSPEAR)
- {
- // NOTE: Have any bug in skill 'Hundred Spear'. (ID: RK_HUNDREDSPEAR)
- mes " ";
- mes "Erro ao carregar:";
- mes "^FF0000Hundred Spear^000000 Lv: ^FF0000" + getd(.@var_name$ + "_lv" + "[" + .@i + "]") + "^000000";
- mes "Você voltou: ^FF0000" + getd(.@var_name$ + "_lv" + "[" + .@i + "]") + "^000000 pontos de habilidade.";
- SkillPoint += getd(.@var_name$ + "_lv" + "[" + .@i + "]");
- }
- else
- skill getd(.@var_name$ + "_id" + "[" + .@i + "]"), getd(.@var_name$ + "_lv" + "[" + .@i + "]"), 0;
- }
- mes " ";
- mes "Seu perfil de habilidades foi carregado!";
- last_skills_profile = #skills_profile[.@profile_id];
- }
- else
- {
- mes "Você não tem pontos suficientes para carregar seu perfil de habilidades.";
- mes "Você precisa de mais ^FF0000" + (getd(.@var_name$ + "_cost") - SkillPoint) + "^000000 pontos de habilidade.";
- if (last_skills_profile != 0)
- {
- next;
- mes .@npc_name$;
- mes "Voltando ao perfil anterior.";
- mes "Perfil: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000";
- resetskill;
- .@var_name$ = "#skilllist_" + last_skills_profile;
- if (SkillPoint - getd(.@var_name$ + "_cost") >= 0)
- {
- SkillPoint -= getd(.@var_name$ + "_cost");
- for(.@i = 0; .@i < getd(.@var_name$ + "_count"); .@i++)
- {
- if ((getd(.@var_name$ + "_id" + "[" + .@i + "]") <= 0) || (getd(.@var_name$ + "_lv" + "[" + .@i + "]") <= 0))
- continue;
- if (getd(.@var_name$ + "_id" + "[" + .@i + "]") == RK_HUNDREDSPEAR)
- {
- // NOTE: Have any bug in skill 'Hundred Spear'. (ID: RK_HUNDREDSPEAR)
- mes " ";
- mes "Erro ao carregar:";
- mes "^FF0000Hundred Spear^000000 Lv: ^FF0000" + getd(.@var_name$ + "_lv" + "[" + .@i + "]") + "^000000";
- mes "Voltou para: ^FF0000" + getd(.@var_name$ + "_lv" + "[" + .@i + "]") + "^000000 pontos de habilidade.";
- SkillPoint += getd(.@var_name$ + "_lv" + "[" + .@i + "]");
- }
- else
- skill getd(.@var_name$ + "_id" + "[" + .@i + "]"), getd(.@var_name$ + "_lv" + "[" + .@i + "]"), 0;
- }
- }
- else
- {
- next;
- mes .@npc_name$;
- mes "Falhou ao voltar para o perfil anterior.";
- mes "Perfil: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000";
- last_skills_profile = 0;
- }
- }
- }
- next;
- goto PROFILE_SKILLS_INFO;
- break;
- case 2:
- mes "Você tem certeza que quer deletar o perfil: ^FF0000" + getd(.@var_name$ + "_name$") + "^000000?";
- mes "";
- if (select("Sim:Não") == 1)
- {
- next;
- goto PROFILE_SKILLS_INFO;
- }
- next;
- mes .@npc_name$;
- mes "Perfil ^FF0000" + getd(.@var_name$ + "_name$") + "^000000 deletado.";
- if (last_skills_profile == #skills_profile[.@profile_id])
- last_skills_profile = 0;
- setd .@var_name$ + "_count", 0;
- setd .@var_name$ + "_cost", 0;
- setd .@var_name$ + "_class", 0;
- setd .@var_name$ + "_name$", "";
- deletearray getd(.@var_name$ + "_lv");
- deletearray getd(.@var_name$ + "_id");
- deletearray #skills_profile[.@profile_id], 1;
- next;
- if (getarraysize(#skills_profile) != 0)
- {
- mes .@npc_name$;
- goto PROFILE_SKILLS_SELECT;
- }
- else
- goto PROFILE_SKILLS_MAIN;
- break;
- case 3:
- goto PROFILE_SKILLS_SELECT;
- break;
- }
- }
- else
- mes "Você não tem um perfil de habilidades.";
- next;
- goto PROFILE_SKILLS_MAIN;
- break;
- case 3:
- mes .@npc_name$;
- if (Zeny - .reset_skills_cost >= 0)
- {
- Zeny -= .reset_skills_cost;
- last_skills_profile = 0;
- resetskill;
- mes "Suas habilidades foram resetadas.";
- }
- else
- mes "Você não tem ^FF0000" + callfunc("F_InsertComma", .reset_skills_cost, 3, ".") + "^000000z para resetar suas habilidades.";
- close;
- break;
- case 4:
- goto PROFILE_START_MENU;
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement