convert scrip to XP

Started by whitespirits, October 24, 2017, 06:46:39 am

Previous topic - Next topic

whitespirits

#==============================================================================# ■ Meow Face Exit Canceler#------------------------------------------------------------------------------# Hide Game Window's Border, Disable Close Button and Alt + F4#==============================================================================# How to Use:# Plug & Play, Put this script below Material and above Main#==============================================================================MF_GPPSA = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'PPPPLP', 'L')MF_FW = Win32API.new('user32', 'FindWindow', 'pp', 'l')MF_SCL = Win32API.new('user32', 'SetClassLong', 'lil', 'i')MF_SWL = Win32API.new('user32', 'SetWindowLong', 'iii', 'i')MF_TITLE = " " * 256MF_GPPSA.call('Game','Title','',MF_TITLE,256,".\\Game.ini")MF_TITLE.delete!(" ")MF_HWND = MF_FW.call('RGSS Player', MF_TITLE)MF_SCL.call(MF_HWND, -26, 0x0200)MF_SWL.call(MF_HWND, -16, 0x14000000)


Im looking to stop people closing XPA with ALT F4 and the X for close to stop issues

KK20

At a glance I see no reason that script is not compatible. Did you even try?

Also you made a topic on this already
http://forum.chaos-project.com/index.php/topic,15396.0.html

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

whitespirits

it pastes in a long line, could you help me format it correctly? thanks KK20 :)

LiTTleDRAgo

Here, I'll help you format it.
#==============================================================================
# ■ Meow Face Exit Canceler
#------------------------------------------------------------------------------
# Hide Game Window's Border, Disable Close Button and Alt + F4
#==============================================================================
# How to Use:
# Plug & Play, Put this script below Material and above Main
#==============================================================================
MF_GPPSA = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'PPPPLP', 'L')
MF_FW = Win32API.new('user32', 'FindWindow', 'pp', 'l')
MF_SCL = Win32API.new('user32', 'SetClassLong', 'lil', 'i')
MF_SWL = Win32API.new('user32', 'SetWindowLong', 'iii', 'i')
MF_TITLE = " " * 256
MF_GPPSA.call('Game','Title','',MF_TITLE,256,".\\Game.ini")
MF_TITLE.delete!(" ")
MF_HWND = MF_FW.call('RGSS Player', MF_TITLE)
MF_SCL.call(MF_HWND, -26, 0x0200)
MF_SWL.call(MF_HWND, -16, 0x14000000)

whitespirits

works perfect thanks so much :)

KK20

Not sure if you would still be interested, but I found a way to intercept the close message. You can make the game do some kind of last save call before it closes.

Which I honestly think is the better option than disabling native window operations entirely. Also, there's nothing stopping me from just ending the task in task manager.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!