set_url - ryzom/ryzomcore GitHub Wiki


title: Set URL description: published: true date: 2023-03-12T13:54:50.848Z tags: editor: markdown dateCreated: 2023-03-12T13:54:25.498Z

setUrl

The setUrl native AI script function is used to set the name and URL of an action in the bot's right-click context menu. When the player clicks on the action in the menu, the URL is opened in the in-game browser.

Syntax

()setUrl(actionName: s, url: s)

Arguments

  • actionName (string): The name of the action that will be displayed in the context menu when the player mouses over it.
  • url (string): The URL that will be opened in the in-game browser when the player clicks on the action.

Example

()setUrl("Click on Me", "https://www.example.com/script.php");

This example code sets the name of the action in the bot's context menu to "Click on Me" and the URL to "https://www.example.com/script.php".

⚠️ **GitHub.com Fallback** ⚠️