fellow npc - pet or trust
Re: fellow npc - pet or trust
Hi i'm back
i have find a way for use any fighting npc as a bst per but usable with any job now what i need is some basic codes for tell imput to the pet and where to put those codes inside darkstar core. for example i want prishe to autoengage enemy on fighting and use one of the 5 spell she have under some circustance like cure or curaga with HP below 50% please help me
i have find a way for use any fighting npc as a bst per but usable with any job now what i need is some basic codes for tell imput to the pet and where to put those codes inside darkstar core. for example i want prishe to autoengage enemy on fighting and use one of the 5 spell she have under some circustance like cure or curaga with HP below 50% please help me
Re: fellow npc - pet or trust
i have found this code made by Maelwys but it was working with the old version of ai core if anyone know how to make it working in the last version i appreciate
if (m_PPet->getPetType() == PETTYPE_JUG_PET){
if ((m_MasterCommand == MASTERCOMMAND_SIC || (m_PPet->PMaster->GetMJob() != JOB_BST && m_PPet->PMaster->GetSJob() != JOB_BST)) && m_PPet->health.tp >= 1000 && m_PBattleTarget != nullptr){ //choose random tp move
m_MasterCommand = MASTERCOMMAND_NONE;
if (m_PPet->PetSkills.size() > 0){
// Pick a Random TP Move
SetCurrentMobSkill(m_PPet->PetSkills.at(dsprand::GetRandomNumber(m_PPet->PetSkills.size())));
// Replace with an AoE Damage TP Move if more than one mob nearby, otherwise use a ST Damage TP Move
m_PTargetFind->reset();
m_PPet->m_ActionList.clear();
m_PTargetFind->findWithinArea(m_PBattleTarget, AOERADIUS_ATTACKER, 10); // Default small area
uint16 TotalTargets = m_PTargetFind->m_targets.size();
if (TotalTargets > 1)
{
// Pick an AoE Damage Ablity
int AoEDamageAbilityIndex = 250;
if (m_PPet->name.compare("Lucky Lulush") == 0) { // "Whirl Claws"
AoEDamageAbilityIndex = 2; }
if (m_PPet->name.compare("Gorefang Hobs") == 0) { // "Claw Cyclone"
AoEDamageAbilityIndex = 2; }
if (m_PPet->name.compare("Faithful Falcorr") == 0) { // "Back Heel"
AoEDamageAbilityIndex = 1; }
if (m_PPet->PetSkills.size() > AoEDamageAbilityIndex) {
SetCurrentMobSkill(m_PPet->PetSkills.at(AoEDamageAbilityIndex)); }
}
else {
// Pick a ST Damage Ablity
int STDamageAbilityIndex = 250;
if (m_PPet->name.compare("Lucky Lulush") == 0) { // "Foot Kick"
STDamageAbilityIndex = 0; }
if (m_PPet->name.compare("Gorefang Hobs") == 0) { // "Razor Fang"
STDamageAbilityIndex = 1; }
if (m_PPet->name.compare("Faithful Falcorr") == 0) { // "Back Heel"
STDamageAbilityIndex = 1; }
if (m_PPet->PetSkills.size() > STDamageAbilityIndex) {
SetCurrentMobSkill(m_PPet->PetSkills.at(STDamageAbilityIndex)); }
}
// Replace with a Healing TP Move if Pet or Master are below a percentage of HP
int HealingThreshold = 50; // Percentage of HP to trigger a Heal
if ((m_PPet->PMaster->GetHPP() <= HealingThreshold) || (m_PPet->GetHPP() <= HealingThreshold))
{
// Pick a Healing Ablity
int HealingAbilityIndex = 250;
if (m_PPet->name.compare("Lucky Lulush") == 0) { // "Wild Carrot"
HealingAbilityIndex = 3; }
if (m_PPet->PetSkills.size() > HealingAbilityIndex) {
SetCurrentMobSkill(m_PPet->PetSkills.at(HealingAbilityIndex)); }
}
preparePetAbility(m_PBattleTarget);
return;
}
}
}
if (m_PPet->getPetType() == PETTYPE_JUG_PET){
if ((m_MasterCommand == MASTERCOMMAND_SIC || (m_PPet->PMaster->GetMJob() != JOB_BST && m_PPet->PMaster->GetSJob() != JOB_BST)) && m_PPet->health.tp >= 1000 && m_PBattleTarget != nullptr){ //choose random tp move
m_MasterCommand = MASTERCOMMAND_NONE;
if (m_PPet->PetSkills.size() > 0){
// Pick a Random TP Move
SetCurrentMobSkill(m_PPet->PetSkills.at(dsprand::GetRandomNumber(m_PPet->PetSkills.size())));
// Replace with an AoE Damage TP Move if more than one mob nearby, otherwise use a ST Damage TP Move
m_PTargetFind->reset();
m_PPet->m_ActionList.clear();
m_PTargetFind->findWithinArea(m_PBattleTarget, AOERADIUS_ATTACKER, 10); // Default small area
uint16 TotalTargets = m_PTargetFind->m_targets.size();
if (TotalTargets > 1)
{
// Pick an AoE Damage Ablity
int AoEDamageAbilityIndex = 250;
if (m_PPet->name.compare("Lucky Lulush") == 0) { // "Whirl Claws"
AoEDamageAbilityIndex = 2; }
if (m_PPet->name.compare("Gorefang Hobs") == 0) { // "Claw Cyclone"
AoEDamageAbilityIndex = 2; }
if (m_PPet->name.compare("Faithful Falcorr") == 0) { // "Back Heel"
AoEDamageAbilityIndex = 1; }
if (m_PPet->PetSkills.size() > AoEDamageAbilityIndex) {
SetCurrentMobSkill(m_PPet->PetSkills.at(AoEDamageAbilityIndex)); }
}
else {
// Pick a ST Damage Ablity
int STDamageAbilityIndex = 250;
if (m_PPet->name.compare("Lucky Lulush") == 0) { // "Foot Kick"
STDamageAbilityIndex = 0; }
if (m_PPet->name.compare("Gorefang Hobs") == 0) { // "Razor Fang"
STDamageAbilityIndex = 1; }
if (m_PPet->name.compare("Faithful Falcorr") == 0) { // "Back Heel"
STDamageAbilityIndex = 1; }
if (m_PPet->PetSkills.size() > STDamageAbilityIndex) {
SetCurrentMobSkill(m_PPet->PetSkills.at(STDamageAbilityIndex)); }
}
// Replace with a Healing TP Move if Pet or Master are below a percentage of HP
int HealingThreshold = 50; // Percentage of HP to trigger a Heal
if ((m_PPet->PMaster->GetHPP() <= HealingThreshold) || (m_PPet->GetHPP() <= HealingThreshold))
{
// Pick a Healing Ablity
int HealingAbilityIndex = 250;
if (m_PPet->name.compare("Lucky Lulush") == 0) { // "Wild Carrot"
HealingAbilityIndex = 3; }
if (m_PPet->PetSkills.size() > HealingAbilityIndex) {
SetCurrentMobSkill(m_PPet->PetSkills.at(HealingAbilityIndex)); }
}
preparePetAbility(m_PBattleTarget);
return;
}
}
}
Re: fellow npc - pet or trust
any new's about fellow or trust npc ?
Re: fellow npc - pet or trust
Someone has been working on fellow, but not sure how far along he is.
Re: fellow npc - pet or trust
i have found this https://github.com/DarkstarProject/dark ... 2644b31d84
i'm trying to test it but i can't make it work any idea when this work will be merged in the darkstark core ?
i'm trying to test it but i can't make it work any idea when this work will be merged in the darkstark core ?
-
- Posts: 16
- Joined: Fri Mar 03, 2017 7:44 pm
Re: fellow npc - pet or trust
Does anyone know where I can find the ID information on the Trust Cipher items?
-
- Posts: 16
- Joined: Fri Mar 03, 2017 7:44 pm
Re: fellow npc - pet or trust
Thanks for the lead jono.