Kaioru / Edelstein

A v.95.1 Mushroom game server emulator written in C# .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing script functionality

Bia10 opened this issue · comments

commented

currently these are missing functions for scipts:
disableUI() - hides UI
lockUI() - prevent players actions
directionmode()
setStandAloneMode()
PortalSE()
IncreaseSlotLimit()

commented

d4af001 - Adds GetInventoryLimit and SetInventoryLimit for example:

inventory = target.get_inventory()

-- 0x1 - Equip, 0x2 - Consume, 0x3 - Install, 0x4 - Etc, 0x5 - Cash
inventory.get_inventory_limit(0x1)
inventory.set_inventory_limit(0x1, 48)

bbfe1e4 - Adds settings of DirectionMode and StandAloneMode like so:

target.direction_mode = true -- or false
target.stand_alone_mode = true -- or false

a570844 - Adds PlayPortalSoundEffect used like so:

target.play_portal_sound_effect()
commented

great now we need just

c.getSession().write(UIPacket.IntroDisableUI(false));
c.getSession().write(UIPacket.IntroLock(false));

    public static byte[] IntroLock(boolean enable) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CYGNUS_INTRO_LOCK.getValue());
        mplew.write(enable ? 1 : 0);
        mplew.writeInt(0);

        return mplew.getPacket();
    }

    public static byte[] IntroDisableUI(boolean enable) {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        mplew.writeShort(SendPacketOpcode.CYGNUS_INTRO_DISABLE_UI.getValue());
        mplew.write(enable ? 1 : 0);

        return mplew.getPacket();
    }

v90?

commented

From what I see, LockUI is not available in v95
image
The opcode for LockUI in other versions usually lie between OpenUIWithOption and SetDirectionMode

commented

okay but there has to be a way to close UI in video scenes?

commented

target.direction_mode = true removes and disables UI from my tests.
target.direction_mode = false re-enables UI controls.

I'm not sure what StandAloneMode does though. Might actually be IntroDisableUI in your reference