yuhsing

Untitled

Jun 7th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1.  
  2. prontera,155,181,5 script Sample 757,{
  3. mes "Which map you want to rent.";
  4. .@i = select( .menu$ ) - 1;
  5. if( !getcharid(2) ){
  6. mes "You need a guild.";
  7. }else if( $rent_expire[.@i] < gettimetick(2) ){
  8. mes "You have rent this map.";
  9. // mapwarp .map$[.@i],"prontera",155,181;
  10. $rent_expire[.@i] = gettimetick(2) + ( .rent_duration * 86400 );
  11. $guild_id[.@i] = getcharid(2);
  12. if( select( "Warp to Map","Close" ) == 1 )
  13. warp .map$[.@i],0,0;
  14. }else{
  15. mes "This Map has been rent by "+getguildname( $guild_id[.@i] );
  16. }
  17. close;
  18.  
  19. OnInit:
  20. // map list
  21. setarray .map$,"izlude","payon","alberta";
  22. .map_size = getarraysize( .map$ );
  23. // how many day
  24. .rent_duration = 31;
  25.  
  26. for( .@i = 0; .@i < .map_size; .@i++ ){
  27. set .menu$,.menu$ + .map$[.@i] +":";
  28. setmapflag .map$[.@i],mf_loadevent;
  29. }
  30. end;
  31.  
  32. OnPCLoadMapEvent:
  33. .@map$ = strcharinfo(3);
  34. .@guild_id = getcharid(2);
  35. for( .@i = 0; .@i < .map_size; .@i++ )
  36. if( .map$[.@i] == .@map$ && $guild_id[.@i] && $guild_id[.@i] != .@guild_id ){
  37. mes "You cant enter this map.";
  38. mes "This map reserved for "+getguildname( $guild_id[.@i] );
  39. close2;
  40. warp "SavePoint",0,0;
  41. }
  42. end;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment