can somebody tell me the Script to let the
Player start my own Module as "Standartrogue"?
I want no Character Creation for the Player....only start as Rogue
with all the basic Equip and Skills.
thx
Modifié par SvasK, 04 décembre 2009 - 04:51 .
Modifié par SvasK, 04 décembre 2009 - 04:51 .
#include "log_h"
#include "plot_h"
#include "utility_h"
#include "sys_chargen_h"
#include "sys_rewards_h"
void main()
{
event ev = GetCurrentEvent();
object oHero = GetHero();
switch(GetEventType(ev))
{
////////////////////////////////////////////////////////////////////////
// Sent by: The engine
// When: The module starts. This can happen only once for a single
// game instance.
////////////////////////////////////////////////////////////////////////
case EVENT_TYPE_MODULE_START:
{
// skip character generation
Chargen_InitializeCharacter(oHero);
// create a female, elf, wizard
SetName(oHero, "Elissanna");
Chargen_SelectGender(oHero, GENDER_FEMALE);
Chargen_SelectRace(oHero, RACE_ELF);
Chargen_SelectCoreclass(oHero, class_WIZARD);
Chargen_SelectBackground(oHero, BACKGROUND_MAGI);
AS_AddclassLevels(oHero, class_WIZARD, 1);
// give the player some equipment
EquipItem(oHero, UT_AddItemToInventory(R"magestaff.uti"));
EquipItem(oHero, UT_AddItemToInventory(R"playerclothing.uti"));
// select some spell for the player
_AddAbility(oHero, ABILITY_SPELL_ARCANE_BOLT);
_AddAbility(oHero, ABILITY_SPELL_WINTERS_GRASP);
_AddAbility(oHero, ABILITY_SPELL_LIGHTNING);
break;
}
}
// call core module event handler
HandleEvent(ev, R"module_core.ncs");
}
Modifié par Sunjammer, 28 novembre 2009 - 06:54 .