-
Notifications
You must be signed in to change notification settings - Fork 5
CastSpell
nyfrk edited this page Aug 29, 2020
·
1 revision
Command a priest to cast a spell.
BOOL ISettlers4Api::CastSpell(
DWORD priest,
DWORD spell,
INT x,
INT y,
DWORD player
);
priest
The index of the priest that casts the spell. The player should own this priest.
spell
The spell type you want the priest to cast. Currently the following values are supported.
Spell |
---|
S4_SPELL_DIVINE_PRESENT 0 |
S4_SPELL_CONVERT_GOOD 1 |
S4_SPELL_FOOD 2 |
S4_SPELL_TERRAIN 3 |
S4_SPELL_DEFENSE 4 |
S4_SPELL_ATTACK 5 |
S4_SPELL_SOLDIER 6 |
S4_SPELL_SPECIAL 7 |
x
This is the target x coordinate on the map for this spell.
y
This is the target y coordinate on the map for this spell.
player
The player who issues the command. Use 0 (zero) to issue this event as the local player.
If this method could append the event successfully it will return TRUE. If an error occurred it will return FALSE.
The corresponding network event id of the command is ID 5048.
See here for a list of the spell identifiers.
Minimum API Level | 1 |
Target Edition | Any |
Header | S4ModApi.h |
Library | S4ModApi.lib |
DLL | S4ModApi.dll |