Skip to content

Misc Functions

Utility functions for consumable item usage and logging.


gObjUseDrink(lpObj, level)

Applies a consumable drink effect to a player. The effect varies by level:

Level Item Effect Duration
0 Ale +0 Speed boost (+20) 80 seconds
1 Ale +1 Speed boost (+20) 180 seconds
2 Remedy of Love Special effect (no speed) 90 seconds
  • Parameters:
    • lpObj (GameObject): Player object.
    • level (integer): Drink level (0, 1, or 2).
  • Returns: void
-- Apply Ale +1 effect (3 minutes speed boost)
gObjUseDrink(player, 1)

gObjCustomLogPlusChaosMix(lpObj, mixType, itemIndex)

Logs a successful Chaos Mix upgrade and optionally broadcasts a server announcement.

  • Parameters:
    • lpObj (GameObject): Player who performed the mix.
    • mixType (integer): Mix type (3 for legacy versions, 5 for S5+).
    • itemIndex (integer): Index of the resulting item.
  • Returns: void

Note

The announcement is only sent if the server announcement flag is enabled in the configuration.

-- Log a successful chaos mix
gObjCustomLogPlusChaosMix(player, 5, GET_ITEM(0, 19))