RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Rmvx Ace landing restrictions conversion

0 Members and 1 Guest are viewing this topic.

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
Spoiler for:
Code: [Select]
#===============================================================================
# Landing Restrictions - RMVX
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Written by ahref
# 10/4/08
# Version 1.00
#===============================================================================
# This script Changes the get_off_vehcile function so players can only
# exit ships and boats if the script determines that the vehicle is at a port
# using the name of the event infront of it.
#
# The script will allow the player to leave their ship if any of the following
# are found in the event name:
# * Port
# * PORT
# * port
#===============================================================================

#===============================================================================
# ** Game_Player
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Summary of Changes:
# new method : at_port
# edit to method : get_off_vehicle
#===============================================================================
class Game_Player < Game_Character
#-----------------------------------------------------------------------------
# Checks if player is at a port
#-----------------------------------------------------------------------------
def at_port(x,y)
event = $game_map.events_xy (x, y)
if event.empty?
return false
else
if (event[0].name =~ /\PORT/i) !=nil
return true
else
return false
end
end
end
#-----------------------------------------------------------------------------
# Rewritten to include new method
#-----------------------------------------------------------------------------
def get_off_vehicle
if in_airship? # Airship
return unless airship_land_ok?(@x, @y) # Can't land?
else # Boat/ship
front_x = $game_map.x_with_direction(@x, @direction)
front_y = $game_map.y_with_direction(@y, @direction)
return unless at_port(front_x, front_y) # Can't touch land?
end
$game_map.vehicles[@vehicle_type].get_off # Get off processing
if in_airship? # Airship
@direction = 2 # Face down
else # Boat/ship
force_move_forward # Move one step forward
@transparent = false # Remove transparency
end
@vehicle_getting_off = true # Start getting off operation
@move_speed = 4 # Return move speed
@through = false # Passage OFF
@walking_bgm.play # Restore walking BGM
make_encounter_count # Initialize encounter
end
end

#===============================================================================
# ** Game_Event
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Summary of Changes:
# new method : name returns event name @D
#===============================================================================
class Game_Event < Game_Character
#-----------------------------------------------------------------------------
# Returns the name of an event
#-----------------------------------------------------------------------------
def name
return @event.name
end
end


#===============================================================================
# Version 1.00
# 10/4/08
# Written by ahref
#===============================================================================
# Landing Restrictions - RMVX
#===============================================================================

So this script right here is something that people have been looking for for Ace and i was wondering if one of the scripting geniuses here at RMRK could possibly convert it to ace platform for continued use in the RM series.
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Code: [Select]
#===============================================================================
# Landing Restrictions - RMVXA
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Written by ahref
# 10/4/08
# Version 1.00
#===============================================================================
# This script Changes the get_off_vehcile function so players can only
# exit ships and boats if the script determines that the vehicle is at a port
# using the name of the event infront of it.
#
# The script will allow the player to leave their ship if any of the following
# are found in the event name:
# * Port
# * PORT
# * port
#===============================================================================

#===============================================================================
# ** Game_Player
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Summary of Changes:
#    new method : at_port
#    edit to method : get_off_vehicle
#===============================================================================
class Game_Player < Game_Character
#-----------------------------------------------------------------------------
# Checks if player is at a port
#-----------------------------------------------------------------------------
def at_port(x,y)
event = $game_map.events_xy(x, y)
if event.empty?
return false
else
if (event[0].name =~ /\PORT/i) !=nil
return true
else
return false
end
end
end
#-----------------------------------------------------------------------------
# Rewritten to include new method
#-----------------------------------------------------------------------------
def get_off_vehicle
if in_airship?   # Airship
return unless airship_land_ok?(@x, @y)   # Can't land?
else     # Boat/ship
front_x = $game_map.x_with_direction(@x, @direction)
front_y = $game_map.y_with_direction(@y, @direction)
return unless at_port(front_x, front_y) # Can't touch land?
end
$game_map.vehicle(@vehicle_type).get_off    # Get off processing
if in_airship?   # Airship
@direction = 2   # Face down
else     # Boat/ship
force_move_forward   # Move one step forward
@transparent = false     # Remove transparency
end
@vehicle_getting_off = true  # Start getting off operation
@move_speed = 4  # Return move speed
@through = false     # Passage OFF
make_encounter_count     # Initialize encounter
end
end

#===============================================================================
# ** Game_Event
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Summary of Changes:
#    new method : name returns event name @D
#===============================================================================
class Game_Event < Game_Character
#-----------------------------------------------------------------------------
# Returns the name of an event
#-----------------------------------------------------------------------------
def name
return @event.name
end
end


#===============================================================================
# Version 1.00
# 10/4/08
# Written by ahref
#===============================================================================
# Landing Restrictions - RMVX
#===============================================================================
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
You pie feeders!
Rep:
Level 68
Everyone... Actually Everyone hates me :)
2012 Biggest Drama Whore
Final Statement: I chowder5lock am a dipshit and MA is a pretty cool dude.