trainer
Teaches skills for gold, as a trainer does.
Source: src/Moongate.Server.Ultima/Modules/TrainerModule.cs
Functions
Section titled “Functions”trainer.pay(npc, giver, item) -> booleanTakes the gold item the player dropped on the NPC against the quote the player was given: the skill rises by the gold in tenths of a point, at most what was quoted, and the gold above the price stays with the player. True when gold was taken, which is what an on_drag_drop answers; false for anything else, a player with no quote from this NPC, or a skill that can no longer rise.
| Parameter | Type | Default |
|---|---|---|
npc | integer | |
giver | integer | |
item | integer |
Returns boolean.
trainer.quote(npc, player, skill) -> booleanHas the NPC quote the price of teaching the skill (a SkillType) to the player, 1 gold for each tenth of a point, and keeps the quote until the player pays it. The NPC says why when it cannot teach. False when nothing was quoted.
| Parameter | Type | Default |
|---|---|---|
npc | integer | |
player | integer | |
skill | integer |
Returns boolean.
skills
Section titled “skills”trainer.skills(npc, player) -> tableThe skills the NPC teaches that the player knows less of than it would teach: those the NPC has at 60.0 or more, up to a third of its value (42.0 at most), as skill ids in the order of the skills. Empty for an NPC that is not one, a player who is dead or one not in the world.
| Parameter | Type | Default |
|---|---|---|
npc | integer | |
player | integer |
Returns table.
Made with ❤️ by Tom
