【VX Release】All over the world to send a script

Image
When your game is very great, when the map's numerous, how did you solve the problem of long distance travel? Here's a solution: when you arrive in a region, will open a switch,This switch is controlled by the "transfer system" you can call this system in the menu, in another place to the places you have visited, Is it right? Very convenient?
Matters needing attention in using this script——————————————————————————————
You can use this sentence script to call this system:
$scene = Scene_Teleport.new
From up to down town must be order, otherwise it will error

TOWNS[0]=["town name", a control switch, [map number, coordinates X, coordinates Y,]Orientation.

Name = you want to transfer the name of the town
Map number X Y is the target location
Control switch = is very simple, is the switch is open, then your breath menu is this map
Please refer to the following toward = Digital matrix:
......2↑
4←....→6
.....↓8
Do you understand?

May I say you do not really understand, then you can directly into your project test, believe you will know how to use, in addition, Amy, how much do you know about Chinese? If I made a Chinese game, can you help me translate into English version?

  1. #==============================================================================
  2. # The script from the China http://www.66RPG.com, used and reproduced please keep this information
  3. # transfer share: if you are using a this script writer, please keep this information, because it is from Chinese script resource, if
  4. # you ignore this clause, well, I wish you “山高水低”
  5. #==============================================================================
  6.  
  7. # custom content interpretation:
  8. # TOWNS[number "is a place, you can easily write", the switch number, [transfer to map ID, transfer to map x,
  9. # making making making   transfer to map y], role orientation.
  10. #
  11. # number please according to 0, 1, 2, 3...... Down the order.
  12. When the number # switch, can choose the delivery place
  13. # role orientation, 2, 4 left, 6 right, 8, direction and the relationship between digital specific can reference your numeric keypad
  14. # if other directions please ourselves.
  15. #
  16. #
  17. Method of use: # public events in the need to transmit the portal, transfer, transfer, transfer stone Feathers Hotel a place:
  18. # making making   call script: $scene = Scene_Teleport.new
  19. #
  20. #==============================================================================
  21. TOWNS=[]
  22. TOWNS[0]=["魔幻森林",1,[23,8,5],2]
  23. TOWNS[1]=["齐拉海",2,[59,48,8],4]
  24. TOWNS[2]=["贾拉山脉",3,[34,9,10],8]
  25. TOWNS[3]=["苏泊尔湖",4,[52,15,38],8]
  26. TOWNS[4]=["宝石平原",5,[40,6,23],8]
  27. TOWNS[5]=["梦幻之地",6,[46,9,16],8]
  28. TOWNS[6]=["乌卡雪山",7,[46,9,16],8]
  29. TOWNS[7]=["拉苏河",8,[46,9,16],8]
  30. TOWNS[8]=["奇遇之海",9,[46,9,16],8]
  31. TOWNS[9]=["纳奥湖",10,[46,9,16],8]
  32. TOWNS[10]=["克莫伐木场",11,[46,9,16],8]
  33. TOWNS[11]=["阿罗工房",12,[46,9,16],8]
  34. TOWNS[12]=["黎明皇家港",13,[46,9,16],8]
  35. #==============================================================================
  36. # ■ Window_Teleport
  37. #------------------------------------------------------------------------------
  38. #==============================================================================
  39. class Window_Teleport < Window_Selectable
  40.   #--------------------------------------------------------------------------
  41.   # ● Initialization of the like
  42.   #--------------------------------------------------------------------------
  43.   def initialize
  44.     super(640,640,64,64)
  45.     self.contents = Bitmap.new(width, height)
  46.     self.opacity = 180
  47.     get_towns
  48.     draw_towns
  49.     @column_max = 1
  50.   end
  51.   #--------------------------------------------------------------------------
  52.   # ● Get to town and window size
  53.   #--------------------------------------------------------------------------
  54.   def get_towns
  55.     @carol3_towns = []
  56.     @width_temp = 0
  57.     @cont_use = false
  58.     for town in TOWNS
  59.       if $game_switches[town[1]]==true
  60.         @carol3_towns.push(town)
  61.         if contents.text_size(town[0]).width >= @width_temp
  62.           @width_temp = contents.text_size(town[0]).width
  63.         end
  64.       end
  65.     end
  66.     @item_max = @carol3_towns.size
  67.     if @item_max == 0
  68.       @carol3_towns[0] = ["There is no known area exploration!",1,[1,1,1]]
  69.       $game_player.move_up
  70.       @width_temp = contents.text_size(@carol3_towns[0][0]).width
  71.       @item_max = 1
  72.       @cont_use = true
  73.     end
  74.     self.width = [@width_temp+32,480].min
  75.     self.height = [(@item_max+1)*32,360].min
  76.     self.x = (608-self.width)/2
  77.     self.y = (480-self.height)/2
  78.     self.contents = Bitmap.new(width-32,row_max*WLH)
  79.   end
  80.   #--------------------------------------------------------------------------
  81.   # ●Depicting the town name
  82.   #--------------------------------------------------------------------------
  83.   def draw_towns
  84.     for i in 0...@carol3_towns.size
  85.       self.contents.draw_text(0,i*WLH,@width_temp,WLH,@carol3_towns[i][0],1)
  86.     end
  87.   end
  88.   #--------------------------------------------------------------------------
  89.   # ● The content returned
  90.   #========================================================================
  91.   # ● Map number
  92.   #--------------------------------------------------------------------------
  93.   def map_id
  94.     return @carol3_towns[self.index][2][0]
  95.   end
  96.  
  97.   def map_x
  98.     return @carol3_towns[self.index][2][1]
  99.   end      
  100.  
  101.   def map_y
  102.     return @carol3_towns[self.index][2][2]
  103.   end
  104.  
  105.   def map_direction
  106.     return @carol3_towns[self.index][3]
  107.   end
  108.   #--------------------------------------------------------------------------
  109.   # ● judging whether a city without
  110.   #--------------------------------------------------------------------------
  111.   def cant_use?
  112.     return @cont_use
  113.   end
  114. end
  115. #==============================================================================
  116. # ■ Scene_Teleport
  117. #------------------------------------------------------------------------------
  118. #==============================================================================
  119. class Scene_Teleport < Scene_Base
  120.   def start
  121.     Sound.play_decision
  122.     @carol3_trans_white = false
  123.     @carol3_map_sprite = Spriteset_Map.new
  124.     @carol3_teleport_window = Window_Teleport.new
  125.     if @carol3_teleport_window.cant_use?
  126.       @carol3_teleport_window.index = -1
  127.     else
  128.       @carol3_teleport_window.index = 0
  129.     end
  130.   end
  131.  
  132.   def terminate
  133.     super
  134.     @carol3_teleport_window.dispose
  135.   end
  136.  
  137.   def update
  138.     super
  139.  
  140.     carol3_update
  141.   end
  142.  
  143.   def update_scene
  144.     @carol3_teleport_window.active = true
  145.     $game_player.reserve_transfer(@carol3_teleport_window.map_id, @carol3_teleport_window.map_x, @carol3_teleport_window.map_y, @carol3_teleport_window.map_direction)
  146.     $game_map.autoplay      
  147.     $scene = Scene_Map.new
  148.   end
  149.  
  150.   def carol3_update
  151.     @carol3_teleport_window.update
  152.     if Input.trigger?(Input::B)
  153.       Sound.play_cancel
  154.       $scene = Scene_Map.new
  155.       $game_player.move_up
  156.       return
  157.     end
  158.     if Input.trigger?(Input::C)
  159.       if @carol3_teleport_window.index == -1
  160.         Sound.play_cancel
  161.         $scene = Scene_Map.new
  162.         return
  163.       else        
  164.         Audio.se_play("Audio/SE/" + "Teleport",100,100)
  165.         update_scene        
  166.         return
  167.       end
  168.     end    
  169.   end
  170. end
  171.  
  172. #==============================================================================
  173. # The script from the China http://www.66RPG.com, used and reproduced please keep this information
  174. #==============================================================================
  175.  
Expand to see the code.
That's cool, thanks for sharing.

I don't personally know any Chinese, but it's sometimes easy to correct computer-translated sentences, so we might be some help.
Princess Amy wrote:
That's cool, thanks for sharing.

I don't personally know any Chinese, but it's sometimes easy to correct computer-translated sentences, so we might be some help.

Thank you, Amy, I have a whole game testing and optimization plan this summer, I hope to be able to send my friend in Berlin to play with him, I put the program named "spread a long name Princess" (a very "Renaissance" name)

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=78294