Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOBot: Add support for objects in script files. Define $account, $character, and $mapstate built-in variables. #103

Merged
merged 6 commits into from
Feb 4, 2022

Conversation

ethanmoffat
Copy link
Owner

Objects work sort of like arrays. Each one is a property bag, properties are assigned dynamically and created if they don't exist. Properties can be nested objects or arrays. Arrays may contain objects.

$obj = object()
$obj.$prop1 = "My property"
print ($obj.$prop1)

Built-in objects $account, $character, and $mapstate evaluate their properties when they are accessed, since the data structures are immutable and instances can change.

@ethanmoffat ethanmoffat merged commit fc07b10 into master Feb 4, 2022
@ethanmoffat ethanmoffat deleted the bot_script_objects branch February 4, 2022 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant