-
PC_HERO lower (reset) stats, LP, XP, XP_NEXT
Hi. I am looking for a way to lower the stats of PC_HERO in a later chapter.
I was successful with those
Code:
var C_Npc hero;
hero = Hlp_GetNpc(PC_Hero);
Npc_SetTrueGuild(hero, GIL_NONE);
hero.guild = GIL_NONE;
Npc_SetTalentValue (hero, NPC_TALENT_1H, 0);
Npc_SetTalentValue (hero, NPC_TALENT_2H, 0);
Npc_SetTalentValue (hero, NPC_TALENT_BOW, 0);
Npc_SetTalentValue (hero, NPC_TALENT_CROSSBOW, 0);
Npc_SetTalentValue (hero, NPC_TALENT_PICKLOCK, 90);
Npc_SetTalentValue (hero, NPC_TALENT_PICKPOCKET, 90);
Npc_SetTalentValue (hero, NPC_TALENT_ACROBAT , 0 );
Npc_SetTalentValue (hero, NPC_TALENT_SNEAK , 0);
but I can't get it work for
NPC_TALENT_MAGE
ATR_STRENGTH
ATR_DEXTERITY
ATR_MANA_MAX
ATR_MANA
ATR_HITPOINTS_MAX
ATR_HITPOINTS
Any help will be apreciated.
(I'm looking for vanilla way, not LeGo / Ninja / Union ...)
Also, any way to reset LP and XP/XP_NEXT?
Basically I need to have PC_HERO with the stats from the beginning of the game.
-
It is not necessary to re-declare the global instance of hero, wouldn't that be enough?
Code:
func void ResetHero()
{
//Reset hero
//--------- abilities --------
hero.attribute[ATR_STRENGTH] = 10;
hero.attribute[ATR_DEXTERITY] = 10;
hero.attribute[ATR_MANA_MAX] = 5;
hero.attribute[ATR_MANA] = 5;
hero.attribute[ATR_HITPOINTS_MAX]= 40;
hero.attribute[ATR_HITPOINTS] = 40;
//Experience
hero.exp = 0;
hero.exp_next = 500;
hero.lp = 0;
//Talante
Npc_SetTalentValue (hero, NPC_TALENT_1H, 0);
Npc_SetTalentSkill(hero, NPC_TALENT_1H, 0);
Npc_SetTalentValue (hero, NPC_TALENT_2H, 0);
Npc_SetTalentSkill(hero, NPC_TALENT_2H, 0);
Npc_SetTalentValue (hero, NPC_TALENT_BOW, 0);
Npc_SetTalentSkill(hero, NPC_TALENT_BOW, 0);
Npc_SetTalentValue (hero, NPC_TALENT_CROSSBOW, 0);
Npc_SetTalentSkill(hero, NPC_TALENT_CROSSBOW, 0);
Npc_SetTalentValue (hero, NPC_TALENT_PICKLOCK, 90);
Npc_SetTalentSkill(hero, NPC_TALENT_PICKLOCK, 0);
Npc_SetTalentValue (hero, NPC_TALENT_PICKPOCKET, 90);
Npc_SetTalentSkill(hero, NPC_TALENT_PICKPOCKET, 0);
Npc_SetTalentValue (hero, NPC_TALENT_ACROBAT , 0 );
Npc_SetTalentSkill(hero, NPC_TALENT_ACROBAT , 0);
Npc_SetTalentValue (hero, NPC_TALENT_SNEAK , 0);
Npc_SetTalentSkill(hero, NPC_TALENT_SNEAK , 0);
Mdl_RemoveOverlayMDS (hero, "HUMANS_ACROBATIC.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_1HST1.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_1HST2.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_2HST1.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_2HST2.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_BOWT1.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_BOWT2.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_CBOWT1.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_CBOWT2.MDS");
Npc_SetTalentSkill(hero, NPC_TALENT_MAGE, 0);
//Animals
Knows_GetTeeth = FALSE;
Knows_GetClaws = FALSE;
Knows_GetFur = FALSE;
Knows_GetHide = FALSE;
Knows_GetMCMandibles = FALSE;
Knows_GetMCPlates = FALSE;
Knows_GetBFSting = FALSE;
Knows_GetUluMulu = FALSE;
};
-
Zitat von N1kX
It is not necessary to re-declare the global instance of hero, wouldn't that be enough?
Code:
func void ResetHero()
{
//Reset hero
//--------- abilities --------
hero.attribute[ATR_STRENGTH] = 10;
hero.attribute[ATR_DEXTERITY] = 10;
hero.attribute[ATR_MANA_MAX] = 5;
hero.attribute[ATR_MANA] = 5;
hero.attribute[ATR_HITPOINTS_MAX]= 40;
hero.attribute[ATR_HITPOINTS] = 40;
//Experience
hero.exp = 0;
hero.exp_next = 500;
hero.lp = 0;
//Talante
Npc_SetTalentValue (hero, NPC_TALENT_1H, 0);
Npc_SetTalentSkill(hero, NPC_TALENT_1H, 0);
Npc_SetTalentValue (hero, NPC_TALENT_2H, 0);
Npc_SetTalentSkill(hero, NPC_TALENT_2H, 0);
Npc_SetTalentValue (hero, NPC_TALENT_BOW, 0);
Npc_SetTalentSkill(hero, NPC_TALENT_BOW, 0);
Npc_SetTalentValue (hero, NPC_TALENT_CROSSBOW, 0);
Npc_SetTalentSkill(hero, NPC_TALENT_CROSSBOW, 0);
Npc_SetTalentValue (hero, NPC_TALENT_PICKLOCK, 90);
Npc_SetTalentSkill(hero, NPC_TALENT_PICKLOCK, 0);
Npc_SetTalentValue (hero, NPC_TALENT_PICKPOCKET, 90);
Npc_SetTalentSkill(hero, NPC_TALENT_PICKPOCKET, 0);
Npc_SetTalentValue (hero, NPC_TALENT_ACROBAT , 0 );
Npc_SetTalentSkill(hero, NPC_TALENT_ACROBAT , 0);
Npc_SetTalentValue (hero, NPC_TALENT_SNEAK , 0);
Npc_SetTalentSkill(hero, NPC_TALENT_SNEAK , 0);
Mdl_RemoveOverlayMDS (hero, "HUMANS_ACROBATIC.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_1HST1.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_1HST2.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_2HST1.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_2HST2.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_BOWT1.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_BOWT2.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_CBOWT1.MDS");
Mdl_RemoveOverlayMDS (hero, "HUMANS_CBOWT2.MDS");
Npc_SetTalentSkill(hero, NPC_TALENT_MAGE, 0);
//Animals
Knows_GetTeeth = FALSE;
Knows_GetClaws = FALSE;
Knows_GetFur = FALSE;
Knows_GetHide = FALSE;
Knows_GetMCMandibles = FALSE;
Knows_GetMCPlates = FALSE;
Knows_GetBFSting = FALSE;
Knows_GetUluMulu = FALSE;
};
Thank you so much! This is exactly what I was looking for.
Only thing that stays the same is LVL.
-
-
Zitat von N1kX
add just
hero.level = 0;
You're a genius!
Many thanks again
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
|