Tattoo
Member
- Joined
- Dec 16, 2011
- Messages
- 133
Hi,
i tried to get diffrent golems in my spec, so i checked oldroutine:
var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
if (skill.NumberDeployed < max)
seems to be the part which allows to have more than one golem but only of one type. Is is possible to have diffrent kind of golems?
i tried to splitt the sgslot into numbers and set the number of deployed to < 1 from < max, each golem i need (one fire, one lightning) a diffrent number of sgslot and copied the code for casting, but didn't work
private int _sgSlot1;
private int _sgSlot2;
var sfg = LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Summon Flame Golem");
if (IsCastableHelper(sfg))
{
_summonFlameGolemSlot = sfg.Slot;
_sgSlot1 = _summonFlameGolemSlot;
}
var slg = LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Summon Lightning Golem");
if (IsCastableHelper(slg))
{
_summonLightningGolemSlot = slg.Slot;
_sgSlot2 = _summonLightningGolemSlot;
}
// If we have a Summon Golem skill, we can cast it if we havn't cast it recently.
if (_sgSlot1 != -1 &&
_summonGolemStopwatch.ElapsedMilliseconds >
10000)
{
// See if we can use the skill.
var skill = LokiPoe.InGameState.SkillBarHud.Slot(_sgSlot1);
if (skill.CanUse())
{
var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
if (skill.NumberDeployed < 1)
{
await DisableAlwaysHiglight();
await Coroutines.FinishCurrentAction();
var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sgSlot1, true, myPos);
if (err1 == LokiPoe.InGameState.UseResult.None)
{
_summonGolemStopwatch.Restart();
await Coroutines.FinishCurrentAction(false);
return true;
}
Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
}
}
}
if (_sgSlot2 != -1 &&
_summonGolemStopwatch.ElapsedMilliseconds >
10000)
{
// See if we can use the skill.
var skill = LokiPoe.InGameState.SkillBarHud.Slot(_sgSlot2);
if (skill.CanUse())
{
var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
if (skill.NumberDeployed < 1)
{
await DisableAlwaysHiglight();
await Coroutines.FinishCurrentAction();
var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sgSlot2, true, myPos);
if (err1 == LokiPoe.InGameState.UseResult.None)
{
_summonGolemStopwatch.Restart();
await Coroutines.FinishCurrentAction(false);
return true;
}
Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
}
}
}
i tried to get diffrent golems in my spec, so i checked oldroutine:
var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
if (skill.NumberDeployed < max)
seems to be the part which allows to have more than one golem but only of one type. Is is possible to have diffrent kind of golems?
i tried to splitt the sgslot into numbers and set the number of deployed to < 1 from < max, each golem i need (one fire, one lightning) a diffrent number of sgslot and copied the code for casting, but didn't work

private int _sgSlot1;
private int _sgSlot2;
var sfg = LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Summon Flame Golem");
if (IsCastableHelper(sfg))
{
_summonFlameGolemSlot = sfg.Slot;
_sgSlot1 = _summonFlameGolemSlot;
}
var slg = LokiPoe.InGameState.SkillBarHud.Skills.FirstOrDefault(s => s.Name == "Summon Lightning Golem");
if (IsCastableHelper(slg))
{
_summonLightningGolemSlot = slg.Slot;
_sgSlot2 = _summonLightningGolemSlot;
}
// If we have a Summon Golem skill, we can cast it if we havn't cast it recently.
if (_sgSlot1 != -1 &&
_summonGolemStopwatch.ElapsedMilliseconds >
10000)
{
// See if we can use the skill.
var skill = LokiPoe.InGameState.SkillBarHud.Slot(_sgSlot1);
if (skill.CanUse())
{
var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
if (skill.NumberDeployed < 1)
{
await DisableAlwaysHiglight();
await Coroutines.FinishCurrentAction();
var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sgSlot1, true, myPos);
if (err1 == LokiPoe.InGameState.UseResult.None)
{
_summonGolemStopwatch.Restart();
await Coroutines.FinishCurrentAction(false);
return true;
}
Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
}
}
}
if (_sgSlot2 != -1 &&
_summonGolemStopwatch.ElapsedMilliseconds >
10000)
{
// See if we can use the skill.
var skill = LokiPoe.InGameState.SkillBarHud.Slot(_sgSlot2);
if (skill.CanUse())
{
var max = skill.GetStat(StatTypeGGG.NumberOfGolemsAllowed);
if (skill.NumberDeployed < 1)
{
await DisableAlwaysHiglight();
await Coroutines.FinishCurrentAction();
var err1 = LokiPoe.InGameState.SkillBarHud.UseAt(_sgSlot2, true, myPos);
if (err1 == LokiPoe.InGameState.UseResult.None)
{
_summonGolemStopwatch.Restart();
await Coroutines.FinishCurrentAction(false);
return true;
}
Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", err1, skill.Name);
}
}
}