clear_url - ryzom/ryzomcore GitHub Wiki
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
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.
()clearUrl() // clearUrl__This function has no arguments.
- A
CCreatureSetUrlMsgwith itsClearflag set, listing every spawned bot of the group, is sent to EGS - For each of these bots, EGS empties the URL and the action name and removes the
WebPageFlagfrom the creature's BotChat program - On the client, the menu entry no longer appears when a player right-clicks the NPC
// Add a web link to the NPCs, and remove it again later
()setUrl("Visit our website", "https://example.ryzom.dev/example.php");
// ...
()clearUrl();- The action is removed whether it was set with setUrl or comes from the description of the bot (a
webentry 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
setUrlis dropped then as well.
- 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)