-
Posts
52 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Everything posted by newja
-
C++ get Hp from a mob/npc, is possible?
newja replied to ѕeмa™'s topic in Community Support - Questions & Answers
What do you mean by saying which one? ############################## To see pet level you must go to PetSystem.cpp find void CPetActor::SetName(const char* name) and replace whole function with this void CPetActor::SetName(const char* name) { std::string petName = ""; if (0 != m_pkOwner && 0 == name && 0 != m_pkOwner->GetName()) { petName += ""; } else petName += name; if (true == IsSummoned()) m_pkChar->SetName(petName); m_name = petName; } If you want to know how to set pet name, look into this quest pet begin state start begin when seal_id.use begin level = 99 -- here, you can insert a variable or anything you want vnum = 53008 -- pet ID name = "Petty-chan" -- pet Name pet.summon(vnum, "[Lv."..level.."] - "..name, false) end end end Regards, newja -
if (CBattleArena::instance().IsBattleArenaMap(pkAttacker->GetMapIndex()) == false) { if (pkAttacker->IsPC()) { item->SetOwnership(pkAttacker); } else if (pkAttacker->IsPet()) { for (CPetSystem::TPetActorMap::iterator go = pkAttacker->GetPetSystem()->m_petActorMap.begin();go != pkAttacker->GetPetSystem()->m_petActorMap.end(); ++go) { CPetActor* petActor = go->second; if (NULL != petActor) { LPCHARACTER own = petActor->GetOwner(); if (own) { item->SetOwnership(own); } } } } } I'm not using pet attack system so I can't test it. I'm 50% sure it works. Include must be added: #include "PetSystem.h" Regards, newja #Edit Works.
-
C++ get Hp from a mob/npc, is possible?
newja replied to ѕeмa™'s topic in Community Support - Questions & Answers
[Hidden Content] -
C++ get Hp from a mob/npc, is possible?
newja replied to ѕeмa™'s topic in Community Support - Questions & Answers
int npc_get_hp_by_vid(lua_State* L) { lua_Number vid = lua_tonumber(L, 1); LPCHARACTER npc = CHARACTER_MANAGER::instance().Find(vid); if(npc) { lua_pushnumber(L, npc->GetHP()); } else { lua_pushnumber(L, 0); } return 1; } int npc_get_max_hp_by_vid(lua_State* L) { lua_Number vid = lua_tonumber(L, 1); LPCHARACTER npc = CHARACTER_MANAGER::instance().Find(vid); if(npc) { lua_pushnumber(L, npc->GetMaxHP()); } else { lua_pushnumber(L, 0); } return 1; } Regards, newja -
understand all the kingdoms [Vanilla core]
newja replied to Phantasia's topic in Community Support - Questions & Answers
and which one should I use? Your own of course. -
[Hidden Content] You've lost your bracket here if (m_pkChar->Attack(pkVictim)) { m_pkChar->SendMovePacket(FUNC_ATTACK, 0, rkPetPos.x, rkPetPos.y, 0, get_dword_time()); m_pkChar->SetLastAttacked(get_dword_time());
-
Sura dissipate hab bug cause lag
newja replied to serex's topic in Community Support - Questions & Answers
Yay, managed to fix it, though I made some new functions based on the original ones but it doesn't matter now. If you want to fix lag issues you must go to char_affect.cpp and find this: bool CHARACTER::RemoveAffect(CAffect * pkAff) Not gonna post a complete fix so have fun with it! The rest of the functions that are linked to that one (and would be nice to do something with them): void CHARACTER::ComputeAffect(CAffect * pkAff, bool bAdd) bool CHARACTER::RemoveAffect(DWORD dwType) void CHARACTER::RemoveGoodAffect() Proof here: Regards, newja -
Why would you need both same lods? Isn't it better to delete 03 and leave the rest as it is?
-
Sura dissipate hab bug cause lag
newja replied to serex's topic in Community Support - Questions & Answers
I assume there's no fix for that unless you rebuild skill or Compute() function by yourself. In short, when Sura uses his skill --> game is checking and fixing every stat on your character, it happens as many times as many buffs you have on. I know, it's so sad. -
@lolor2 Actually I don't know C++ as much as you do, but let's try again with your help. switch(ch->GetGMLevel()) { case GM_IMPLEMENTOR: { strlcpy(buf, LC_TEXT("Implementor"), sizeof(buf)); break; } case GM_HIGH_WIZARD: { strlcpy(buf, LC_TEXT("High_Wizard"), sizeof(buf)); break; } case GM_LOW_WIZARD: { strlcpy(buf, LC_TEXT("Low_Wizard"), sizeof(buf)); break; } case GM_GOD: { strlcpy(buf, LC_TEXT("God"), sizeof(buf)); break; } std::string staff_color = "|cFFFF5C5C|H|h["; staff_color += buf; staff_color += "]|cFFA7FFD4|H|h"; sprintf(chatbuf_global, "%s %s", staff_color.c_str(), chatbuf); } Could it work? Atleast I hope so. // @galet srsly wtf man, I don't have to be C++ master to know that your code won't work.
-
if (ch->GetGMLevel() == GM_IMPLEMENTOR) else if (ch->GetGMLevel() == GM_HIGH_WIZARD) else if (ch->GetGMLevel() == GM_LOW_WIZARD) else if (ch->GetGMLevel() == GM_GOD)
-
It's not an error, it's more like display problem (in game everything should work). When your DWORD has same size as int (clearly has) you can go to config.cpp and change DWORD exp = 0; to long int exp =0; if you need bigger size you can use long long int but then you'll have to replace every %ld with %lld
-
Yep, it's not an armour, it's costume. Program is GifCam.
-
Works fine. Thank you very much for the nice tutorial.
-
If you're using 34k game you can apply this diff: 0017F637: 89 90 0017F638: 5C 90 0017F639: 24 90 0017F63A: 04 90 0017F63B: 89 90 0017F63C: 04 90 0017F63D: 24 90 0017F63E: E8 90 0017F63F: 9D 90 0017F640: DC 90 0017F641: 00 90 0017F642: 00 90 Thank you so much, now its worked normal (y) No problem. Besides I don't recommend using 34k game. It has many, many bugs.
-
If you're using 34k game you can apply this diff: 0017F637: 89 90 0017F638: 5C 90 0017F639: 24 90 0017F63A: 04 90 0017F63B: 89 90 0017F63C: 04 90 0017F63D: 24 90 0017F63E: E8 90 0017F63F: 9D 90 0017F640: DC 90 0017F641: 00 90 0017F642: 00 90
-
Everything's ok now. Once again thank you for the amazing work, it's really easy to edit which is why I find it very usefull.
-
Hello @Denis! Your quest gives me no errors although it's not working (pets arent summoning). Any thoughts? Btw, really good job. I would like to use it, if you know what can be wrong please message me. Regards.