void LEnc_LoginCorrectParams(ref location, aref chr, string group, string locator)
{
ref player;
// Viper - Sword bugfix Begin
//bool IsPistol, IsBlade, isBlade2;
player = GetMainCharacter();
string CurrentChar, CurModel, curAttr;
CurrentChar = "char" + CurLandEnc.CurCharacter;
//CurModel = "model" + (Rand(Makeint(CurLandEnc.(CurrentChar).modelQuantity)-1) + 1);
chr.id = "Enc_Char" + CurLandEnc.CurCharacter;
//chr.rank = makeint(player.rank) - 2 + rand(4); // NK
if(makeint(chr.rank) <= 0) chr.rank = 1;
//chr.experience = CalculateExperienceFromRank(sti(chr.rank));
facemaker(chr);
//curAttr = "char" + CurLandEnc.CurCharacter + ".pistol";
//if(CheckAttribute(CurLandEnc, curAttr)) IsPistol = true;
//IsPistol = CurLandEnc.(curAttr)
//if(LogsToggle) Log_SetStringToLog(curAttr + " = " + IsPistol); // NK
//curAttr = "char" + CurLandEnc.CurCharacter + ".sword";
//if(CheckAttribute(CurLandEnc, curAttr)) IsBlade2 = true;
//IsBlade = CurLandEnc.(curAttr)
//LAi_NPC_Equip(chr, makeint(chr.rank), IsBlade, floatRet(IsPistol,0.5+frnd()/2.0,frnd()/2.0)); // NK
//if (isBlade2 && !IsBlade && CheckCharacterItem(chr, "blade4") ) TakeItemFromCharacter(chr, "blade4");
// Viper - Sword bugfix End
switch(CurLandEnc.(CurrentChar).type)
{
case "warrior":
LAi_SetWarriorTypeNoGroup(chr);
LAi_warrior_SetStay(chr, true);
LAi_warrior_DialogEnable(chr, true);
break;
case "guardian":
LAi_SetGuardianTypeNoGroup(chr);
break;
case "stay":
LAi_SetStayTypeNoGroup(chr);
break;
case "Sit":
// NK fix for women sitting 05-07-09
if(!IsSittingCharacter(chr))// MAXIMUS: AOP characters got proper animation
{
LAi_SetActorTypeNoGroup(chr);
string newgroup = "goto";
string newloc = LAi_FindRandomLocator(newgroup);
if(newloc == "")
{
newgroup = "reload"
newloc = LAi_FindRandomLocator(newgroup);
}
TeleportCharacterToLocator(&chr, newgroup, newloc);
LAi_ActorWaitDialog(chr, GetMainCharacter()); // enable dialog 05-07-14
}
else { LAi_SetSitTypeNoGroup(chr); }
// NK <--
break;
case "Citizen":
LAi_SetCitizenTypeNoGroup(chr);
break;
case "Actor":
LAi_SetActorTypeNoGroup(chr);
break;
}
//CalculateAppropriateSkills(chr);
//LAi_SetHP(chr, LAI_DEFAULT_HP + (makeint(player.rank)*5), LAI_DEFAULT_HP_MAX + (makeint(player.rank)*5));
chr.Dialog.Filename = CurLandEnc.(CurrentChar).Dialog;
chr.Dialog.CurrentNode = "Node_1";
}