Welcome to Yserbius.Org! Join our Ultima Online Private Server and have some old school fun.

Decoding yserbius map functions - falling through a trapdoor

patchx

Message for Upgrade
#1
~/ Hi All ~/

Some of the maps contain trapdoors. It looks like there are actions that you can perform to prevent yourself from falling through one of them. Here's the code for a trapdoor function:

Code:
Function TrapDoor

  If( ( UsedSkill( SKILL_DETECT ) And SkillLevel( SKILL_DETECT ) >= 10 )
    Or UsedSpell( SPELL_TRUE_SEEING )
    Or UsedItem( ITEM_MAGIC_EYE_AMULET )
    Or UsedItem( ITEM_OMNISCIENT_PRISM )
    Or [COLOR="red"]UnknownFunction2[/COLOR]( 0, 1 ) )
  Then
    Print( "You found a trapdoor." )
  Else
    Print( "You fall through a trapdoor." )
    map = MAP_LavaCellar
    position = 9, 8
    direction = NORTH
    Goto( map, position, direction )
  End If

End Function
Another words you will not fall through the trapdoor in question IF:
  • You used Detect skill with skill level above 10
  • You used True Seeing spell
  • You used Omniscent prism
  • You used Magic Eye amulet
  • UnknownFunction2

Does anybody have an idea about the last action / condition for not falling through?

Best regards,
-PaTchX
 
#2
patchx - these posts of yours are incredibly interesting. Great work!

I have a few questions, if you're willing.

These lines you're posting - are they decoded from the actual executable, or are they extrapolated from the map files? Are you working on decoding the entire map file format, or are you debugging the code as you go along?

Good luck, by the way. I look forward to seeing even more information in the future.
 

patchx

Message for Upgrade
#3
patchx - these posts of yours are incredibly interesting. Great work!

I have a few questions, if you're willing.

These lines you're posting - are they decoded from the actual executable, or are they extrapolated from the map files? Are you working on decoding the entire map file format, or are you debugging the code as you go along?

Good luck, by the way. I look forward to seeing even more information in the future.
These lines are pseudo-code decoded from map files, combined with information from the main executable. Each map file is an overlay - a collection of code containing function calls to the main executable.

The main map file contains square information - i.e. what map function gets called where.

Best regards,
-p
 
Top