Hello developers.
I've been trying to impilemt /buff commands for admin on server.
It worked well on my self, but i wanted it to give to other players also then i reworked the code
Here is the code wich worked on me
here is the code wich didn't work to give players
I tried with the first with assigment from numbers to buff to add pUser->GetId()); but got a bunch of errors. Then i looked up buffpang and found SI_ASS_CHEER, but then i got error again of SI_ASS_CHEER
anyone who could help me?
I've been trying to impilemt /buff commands for admin on server.
It worked well on my self, but i wanted it to give to other players also then i reworked the code
Here is the code wich worked on me
PHP Code:
BOOL TextCmd_buff(CScanner& scanner)
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)scanner.dwValue;
if (IsValidObj(pUser))
{
pUser->DoActiveSkill(20, 7, pUser);
pUser->DoActiveSkill(49, 7, pUser);
pUser->DoActiveSkill(50, 7, pUser);
pUser->DoActiveSkill(52, 7, pUser);
pUser->DoActiveSkill(53, 7, pUser);
pUser->DoActiveSkill(114, 7, pUser);
pUser->DoActiveSkill(115, 7, pUser);
pUser->DoActiveSkill(116, 7, pUser);
pUser->AddText("Successfully buffed!");
}
else
{
pUser->AddText("Something went terrible wrong!");
}
#endif
return TRUE;
}
PHP Code:
BOOL TextCmd_buff(CScanner & s)
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)s.dwValue;
if (IsValidObj(pUser))
{
pUser->DoActiveSkill( SI_ASS_HEAL_PATIENCE, 20, 1, 130, 3600000, pUser->GetId());
pUser->DoActiveSkill( SI_ASS_CHEER_QUICKSTEP, 20, 1, 130, 3600000, pUser->GetId());
pUser->DoActiveSkill( SI_ASS_CHEER_HASTE, 20, 1, 130, 3600000, pUser->GetId());
pUser->DoActiveSkill( SI_ASS_CHEER_CATSREFLEX, 20, 1, 130, 3600000, pUser->GetId());
pUser->DoActiveSkill( SI_ASS_CHEER_CANNONBALL, 20, 1, 130, 3600000, pUser->GetId());
pUser->DoActiveSkill( SI_ASS_CHEER_MENTALSIGN, 20, 1, 130, 3600000, pUser->GetId());
pUser->DoActiveSkill( SI_ASS_CHEER_HEAPUP, 20, 1, 130, 3600000, pUser->GetId());
pUser->DoActiveSkill( SI_ASS_CHEER_BEEFUP, 20, 1, 130, 3600000, pUser->GetId());
pUser->DoActiveSkill( SI_ASS_CHEER_ACCURACY, 20, 1, 130, 3600000, pUser->GetId());
}
#endif
return TRUE;
}
anyone who could help me?