yuhsing

Untitled

Dec 24th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1.  
  2.  
  3. - script main_script -1,{
  4. OnGoldRoom: callsub OnNPCTalk,1,"Gold Room"; close;
  5. OnZenyRoom: callsub OnNPCTalk,2,"Zeny Room"; close;
  6.  
  7. OnNPCTalk:
  8. mes "Enter ^0055FF"+getarg(1)+"^000000 ?";
  9. mes " ";
  10. mes "Time Duration : "+.second+" seconds.";
  11. next;
  12. if( select("Confirm:Close") == 1 )
  13. if( getd( "#Day_"+getarg(0) ) == atoi( gettimestr( "%Y%m%d", 9 ) ) ){
  14. mes "You cant enter this room more than 1 time in a day.";
  15. }else{
  16. deltimer strnpcinfo(0)+"::OnKick";
  17. addtimer ( .second * 1000 ),strnpcinfo(0)+"::OnKick";
  18. setd( "#Day_"+getarg(0) ),atoi( gettimestr( "%Y%m%d", 9 ) );
  19. if( getarg(0) == 1 ) warp "poring_c02",66,77;
  20. else warp "poring_c02",172,78;
  21. }
  22. close;
  23.  
  24.  
  25. OnKick:
  26. if( strcharinfo(3) == "poring_c02" )
  27. warp "SavePoint",0,0;
  28. end;
  29.  
  30. OnInit:
  31. // how many seconds they stay inside
  32. set .second,5;
  33.  
  34. setarray .@mf[0],mf_nomemo,mf_noteleport,mf_nosave,mf_nobranch,mf_noskill,mf_nowarp,mf_nogo,mf_nomobloot,mf_nomvploot,mf_nowarpto;
  35. for( set .@i,0; .@i < getarraysize( .@mf ); set .@i,.@i + 1 )
  36. setmapflag "poring_c02",.@mf[.@i];
  37.  
  38. while( 1 ){
  39. if( getmapusers( "poring_c02" ) ){
  40. makeitem 607,1,"poring_c02",rand( 61,71 ),rand( 70,85 );
  41. makeitem 969,1,"poring_c02",rand( 165,176 ),rand( 70,85 );
  42. }
  43. sleep rand( 50,500 );
  44. }
  45. end;
  46. }
  47.  
  48. prontera,150,161,5 script Gold Room 757,{
  49. doevent "main_script::OnGoldRoom";
  50. }
  51.  
  52. prontera,155,161,5 script Zeny Room 757,{
  53. doevent "main_script::OnZenyRoom";
  54. }
Advertisement
Add Comment
Please, Sign In to add comment