Skip to content

clear_url

Jan Boon edited this page Nov 12, 2026 · 1 revision

title: Clear URL description: Remove the web page action from an NPC's contextual menu published: true date: 2026-11-12T00:00:00.000Z tags: editor: markdown dateCreated: 2026-11-12T00:00:00.000Z

clearUrl

The clearUrl native AI script function removes the web page action from all spawned bots in the group: the entry in the bot's right-click contextual menu that opens a URL in the in-game browser.

Syntax

()clearUrl() // clearUrl__

Arguments

This function has no arguments.

How It Works

  1. A CCreatureSetUrlMsg with its Clear flag set, listing every spawned bot of the group, is sent to EGS
  2. For each of these bots, EGS empties the URL and the action name and removes the WebPageFlag from the creature's BotChat program
  3. On the client, the menu entry no longer appears when a player right-clicks the NPC

Example

// Add a web link to the NPCs, and remove it again later
()setUrl("Visit our website", "https://example.ryzom.dev/example.php");
// ...
()clearUrl();

Notes

  • The action is removed whether it was set with setUrl or comes from the description of the bot (a web entry in its chat parameters).
  • Only the bots that are spawned when the function is called are affected.
  • EGS takes the web page of a bot from its description each time the AI service sends that description: at each spawn, and whenever it is sent again. A bot whose description has a web page gets it back then, and a URL set with setUrl is dropped then as well.

See also

  • setUrl - Set the URL action on the NPCs of the group
  • addBotChat - Add other types of contextual menu entries

Source: ryzom/server/src/ai_service/nf_grp.cpp (clearUrl__), ryzom/server/src/entities_game_service/creature_manager/creature_manager.cpp (CCreatureSetUrlImp::callback)

Clone this wiki locally