Tomm0017 / rsmod

New repository: https://github.com/rsmod/rsmod
https://github.com/rsmod/rsmod
Apache License 2.0
125 stars 101 forks source link

Add support for binding to an object by name rather than id #43

Closed tristonplummer closed 5 years ago

tristonplummer commented 5 years ago

Useful for objects with have the same name, but many different ids.


on_obj_option(obj = "furnace", option = "smelt") {
    // initiate smelting action
}
Tomm0017 commented 5 years ago

Though useful, I can see an issue where commonly used names may collide with an object that shouldn't perform the same action.

Tomm0017 commented 5 years ago

Quickly went to find an example.

If I was working on Smithing I may bind "Anvil" to open the smithing interface, etc.

The Dragon forge has an anvil (obj 32215), which is used to forge a dragon platebody and not normal smithing.