yuhsing

Untitled

Aug 18th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1.  
  2. - script Sample -1,{
  3.  
  4. OnPCLoginEvent:
  5. if( prestige_count ){
  6. atcommand "@adjgroup "+prestige_count;
  7. }
  8. end;
  9.  
  10. OnPrestige:
  11. if( BaseLevel < 150 || JobLevel < 50 ){
  12. message strcharinfo(0),"You need to be Level 150 and Job Level 50.";
  13. }else if( prestige_count >= .max_limit ){
  14. message strcharinfo(0),"You can only prestige maximum of "+.max_limit+" times.";
  15. }else if( prestige_count >= 8 ){
  16. message strcharinfo(0),"You can only prestige through a Custom Quests.";
  17. }else{
  18. explode( .@prestige_job_list$,prestige_job_list$,"|" );
  19. .@prestige_job_list_size = getarraysize( .@prestige_job_list$ );
  20. .@prestige_job_list$[ .@prestige_job_list_size ] = Class;
  21. prestige_job_list$ = implode( .@prestige_job_list$,"|" );
  22. prestige_count++;
  23. jobchange Job_Novice;
  24. resetlvl 1;
  25. StatusPoint = 100;
  26. message strcharinfo(0),"Prestiged for "+prestige_count+"/"+.max_limit+" times.";
  27. }
  28. end;
  29.  
  30. OnChangeClass:
  31. if( !prestige_count ){
  32. dispbottom "You didnt prestiged yet.";
  33. }else if( !.@atcmd_numparameters || !compare( prestige_job_list$+"|",.@atcmd_parameters$[0]+"|" ) ){
  34. dispbottom "@changeclass <job id> / @cc <job id>";
  35. dispbottom "=======================================";
  36. explode( .@prestige_job_list$,prestige_job_list$,"|" );
  37. .@prestige_job_list_size = getarraysize( .@prestige_job_list$ );
  38. while( .@i < .@prestige_job_list_size ){
  39. if( !compare( ":"+.@menu$+":" , ":"+.@prestige_job_list$[.@i]+":" ) ){
  40. .@menu$ = .@menu$ + .@prestige_job_list$[.@i] +":";
  41. .@job_menu[ .@job_menu_size ] = .@prestige_job_list$[.@i];
  42. .@job_menu_size++;
  43. }
  44. .@i++;
  45. }
  46. .@i = 0;
  47. while( .@i < .@job_menu_size ){
  48. dispbottom "ID: "+.@job_menu[.@i]+" - "+jobname( .@job_menu[.@i] );
  49. .@i++;
  50. }
  51.  
  52. }else if( !compare( prestige_job_list$+"|",.@atcmd_parameters$[0]+"|" ) ){
  53. dispbottom "This Job ID doesnt exist in your prestige.";
  54. }else{
  55. .@job_id = atoi( .@atcmd_parameters$[0] );
  56. jobchange .@job_id;
  57. message strcharinfo(0),"Changed to "+jobname( .@job_id );
  58. }
  59. end;
  60.  
  61. OnInit:
  62. // max pretige amount
  63. .max_limit = 10;
  64.  
  65. // custom commands
  66. bindatcmd "prestige",strnpcinfo(0)+"::OnPrestige";
  67. bindatcmd "changeclass",strnpcinfo(0)+"::OnChangeClass";
  68. bindatcmd "cc",strnpcinfo(0)+"::OnChangeClass";
  69. end;
  70. }
Advertisement
Add Comment
Please, Sign In to add comment