fellow npc - pet or trust

lion85xx
Posts: 17
Joined: Sun Jul 30, 2017 11:03 am

Re: fellow npc - pet or trust

Post by lion85xx » Mon Jan 29, 2018 7:22 pm

Hi i'm back :D
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 :D

lion85xx
Posts: 17
Joined: Sun Jul 30, 2017 11:03 am

Re: fellow npc - pet or trust

Post by lion85xx » Mon Jan 29, 2018 7:29 pm

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 :D


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;
}
}
}

lion85xx
Posts: 17
Joined: Sun Jul 30, 2017 11:03 am

Re: fellow npc - pet or trust

Post by lion85xx » Sun Jul 22, 2018 12:25 pm

any new's about fellow or trust npc ?

Delaide
Posts: 477
Joined: Sat Jun 14, 2014 8:58 am

Re: fellow npc - pet or trust

Post by Delaide » Tue Jul 24, 2018 9:43 pm

Someone has been working on fellow, but not sure how far along he is.

lion85xx
Posts: 17
Joined: Sun Jul 30, 2017 11:03 am

Re: fellow npc - pet or trust

Post by lion85xx » Sat Aug 18, 2018 9:47 am

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 ?

arashikage
Posts: 16
Joined: Fri Mar 03, 2017 7:44 pm

Re: fellow npc - pet or trust

Post by arashikage » Mon Dec 31, 2018 10:13 pm

Does anyone know where I can find the ID information on the Trust Cipher items?

jono659
Posts: 59
Joined: Sat Mar 24, 2018 1:01 pm

Re: fellow npc - pet or trust

Post by jono659 » Wed Jan 02, 2019 7:56 am

Wiggo will be you man for any of that bud

https://discord.gg/JRCrtA

arashikage
Posts: 16
Joined: Fri Mar 03, 2017 7:44 pm

Re: fellow npc - pet or trust

Post by arashikage » Thu Jan 03, 2019 9:59 pm

Thanks for the lead jono.

jono659
Posts: 59
Joined: Sat Mar 24, 2018 1:01 pm

Re: fellow npc - pet or trust

Post by jono659 » Fri Jan 04, 2019 1:51 am

^.^

Post Reply