yuhsing

Untitled

Aug 30th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1.  
  2. - script ygg_room -1,{
  3.  
  4. OnTalk:
  5. set .@map$,strcharinfo(3);
  6. if( select( ( .@map$ != .map$ )?"Enter Yggroom":"Leave Yggroom","close" ) == 1 ){
  7. if( callsub( OnBotCheck ) ){
  8. if( .@map$ != .map$ ){
  9. next;
  10. mes "You have to pay "+.zeny+" zeny to enter.";
  11. if( Zeny >= .zeny ){
  12. if( select( "Pay Zeny and Enter.","Cancel" ) == 1 ){
  13. set Zeny,Zeny - .zeny;
  14. warp .map$,0,0;
  15. }
  16. }
  17. }else{
  18. warp "SavePoint",0,0;
  19. }
  20. }
  21. }
  22. close;
  23.  
  24. OnPCLoginEvent:
  25. if( strcharinfo(3) == .map$ ){
  26. if( !callsub( OnBotCheck ) ){
  27. warp "SavePoint",0,0;
  28. }
  29. }
  30. end;
  31.  
  32. OnBotCheck:
  33. mes "Please enter the code given.";
  34. set .@random$,""+rand( 10000000,999999999 );
  35. mes "^FF0000"+.@random$+"^000000";
  36. input .@input$;
  37. if( .@input$ == .@random$ ){
  38. mes "Correct";
  39. return 1;
  40. }else{
  41. mes "Wrong.";
  42. }
  43. return 0;
  44.  
  45. OnInit:
  46. set .map$,"guild_vs1-4";
  47. // zeny cost to enter ygg room
  48. set .zeny,10000000;
  49. end;
  50.  
  51. OnMobKilled:
  52. getitem 607,1;
  53. end;
  54. }
  55.  
  56. // exit npc...
  57. guild_vs1-4,50,50,5 script Ygg Room Exit 757,{
  58. doevent "ygg_room::OnTalk";
  59. }
  60.  
  61. // entrance npc...
  62. prontera,155,181,5 script Ygg Room Entrance 757,{
  63. doevent "ygg_room::OnTalk";
  64. }
  65.  
  66.  
  67.  
  68.  
  69. guild_vs1-4 mapflag nocommand 90
  70. guild_vs1-4 mapflag nomobloot
  71. guild_vs1-4 mapflag nomvploot
  72.  
  73.  
  74. // baphomet jr
  75. guild_vs1-4,0,0,0,0 monster Baphomet Jr. 1101,100,0,0,"ygg_room::OnMobKilled"
Advertisement
Add Comment
Please, Sign In to add comment