Creating a Service NPC
Jump to navigation
Jump to search
Creating an NPC that can offer services such as smithing or a gym is fairly easy.
Player
- First off, create a player from the players database. I'll set the label to testMerchant. WARNING: DO NOT CHANGE A LABEL AFTER SETTING IT.
- Fill out the player fields, use the question mark help menu for more information about the various fields. The important part is that you set Team to 1 or more.
Encounter
- Create an encounter in a dungeon room unless you already have. Make sure it's set to Friendly.
- Add the player to the encounter.
- In the encounter, create a new start/passive game action by clicking unique.
- Services are set by selecting a GameAction type, and then picking the player who should offer the service, and some optional data based on the type. You can add multiple GameActions with services to a single player.
- altar : Offers fetish rerolls.
- bank : Offers banking, hurr.
- gym : Offers gym services. To offer the correct ability click Add under tags and search for ga_. You should find classes such as ga_warrior. You can use multiple tags if you want to offer multiple classes in one gym.
- rentRoom : Macro for setting the room_last_rented dungeon var in the current dungeon to the current game time. Set a text that the innkeeper should say when asking the player if they want to rent a room, cost in copper to rent a room, and what the innkeeper should say when the room is successfully rented. Use the roomRentedAciveDungeon on a door game action on a mesh to check if the player has rented a room in the current dungeon or not.
- repairShop : Offer smithing and dying services.
- shop : Offer a shop. Link a shop from the Shop library.
- transmog : Offer transmogrification of armor.
That's all there is to it!