stylist.txt 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //===== rAthena Script =======================================
  2. //= Stylist
  3. //===== By: ==================================================
  4. //= Euphy
  5. //===== Current Version: =====================================
  6. //= 1.1
  7. //===== Compatible With: =====================================
  8. //= rAthena Project
  9. //===== Description: =========================================
  10. //= Changes your hair style, hair color, and cloth color.
  11. //===== Additional Comments: =================================
  12. //= 1.0 Initial script.
  13. //= 1.1 Switched to 'getbattleflag', credits to Saithis. [Euphy]
  14. //============================================================
  15. prontera,170,180,1 script Stylist#custom_stylist 122,{
  16. setarray .@Styles[1],
  17. getbattleflag("max_cloth_color"),
  18. getbattleflag("max_hair_style"),
  19. getbattleflag("max_hair_color");
  20. setarray .@Look[1],
  21. LOOK_CLOTHES_COLOR,
  22. LOOK_HAIR,
  23. LOOK_HAIR_COLOR;
  24. set .@s, select(" ~ Cloth color: ~ Hairstyle: ~ Hair color");
  25. set .@Revert, getlook(.@Look[.@s]);
  26. set .@Style,1;
  27. while(1) {
  28. setlook .@Look[.@s], .@Style;
  29. message strcharinfo(0),"This is style #"+.@Style+".";
  30. set .@menu$, " ~ Next (^0055FF"+((.@Style!=.@Styles[.@s])?.@Style+1:1)+"^000000): ~ Previous (^0055FF"+((.@Style!=1)?.@Style-1:.@Styles[.@s])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)";
  31. switch(select(.@menu$)) {
  32. case 1:
  33. set .@Style, ((.@Style != .@Styles[.@s]) ? .@Style+1 : 1);
  34. break;
  35. case 2:
  36. set .@Style, ((.@Style != 1) ? .@Style-1 : .@Styles[.@s]);
  37. break;
  38. case 3:
  39. message strcharinfo(0),"Choose a style between 1 - "+.@Styles[.@s]+".";
  40. input .@Style,0,.@Styles[.@s];
  41. if (!.@Style)
  42. set .@Style, rand(1,.@Styles[.@s]);
  43. break;
  44. case 4:
  45. set .@Style, .@Revert;
  46. setlook .@Look[.@s], .@Revert;
  47. break;
  48. }
  49. }
  50. }