Advertisement
plugandplaydev

Emergency Call [ @ecall ]

May 26th, 2015
867
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1.  
  2. //============================================================//
  3. // This script is made by Plug and Play //
  4. // Contact us on Facebook http://facebook.com/plugandplayPH //
  5. // Website : http://plugandplay.cf //
  6. //============================================================//
  7.  
  8. - script Emergency Call -1,{
  9. OnInit:
  10. set .Ecall_Cool_Down,60*5; //Change 1 into your desire minutes ( 1 = 1 minute) do not change the 60
  11. set .Ecall_Delay,10; //Do not change this
  12. bindatcmd "ecall",strnpcinfo(3)+"::OnEmergencyCall";
  13. end;
  14.  
  15. OnEmergencyCall:
  16. //Check if you are the Guild Master
  17. if( (!getcharid(2)) || ( getguildmasterid( getcharid(2) ) != getcharid(0) ) ){
  18. message strcharinfo(0),"You cannot use this command";
  19. end;
  20. }
  21.  
  22. //Check Cool Down
  23. if( ( getguildmasterid( getcharid(2) ) == getcharid(0) ) &&
  24. ( @Ecall_Delay > gettimetick(2) ) ){
  25. message strcharinfo(0),"Skill Failed, Emergency Call still in Cool Down";
  26. end;
  27. }
  28. if (getgdskilllv(getcharid(2),10013) < 1) {
  29. message strcharinfo(0),"You need to master Emergency Call Guild Skill";
  30. end;
  31. }
  32. //Cast Emergency Call, Must be a Guild Master, WoE Activated and Woe Castle Maps
  33. if (getgdskilllv(getcharid(2),10013) > 0) {
  34. if( ( getguildmasterid( getcharid(2) ) == getcharid(0) ) && ( agitcheck() || agitcheck2() ) && ( getmapflag(strcharinfo(3),mf_gvg )) ){
  35. set @Ecall_Delay, gettimetick(2)+ .Ecall_Delay +.Ecall_Cool_Down;
  36. unitskilluseid getcharid(3),"GD_EMERGENCYCALL",1;
  37. sleep2 5000;
  38. dispbottom "[ Note ] : You can used the next @ecall after 5 Minutes";
  39. end;
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement