-
Posts
52 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by 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.
- 4
-
can u put ur pet.is_mine() function please newja?
http://metin2dev.org/board/index.php?/topic/2795-c-some-usefull-stuffs/
-
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; }
+ Quest
Regards,
newja
- 1
- 1
-
and which one should I use?Why use f*ing sh*t Vannila?
Your own of course.
-
It's all good, I don't know, upload your whole file in pastebin, i'll correct for you.
http://pastebin.com/hCCQE23C
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());
-
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:
dem ymir coders, everything so complicated
Regards,
newja
-
Go to the pack you have the .GR2 model for the armor and look for this
sura_pwahuang1_lod_03.gr2
IF you try to open it with granny you will see is blank now delete it and instaid of it make a copy of
sura_pwahuang1_lod_02.gr2
and rename it to
sura_pwahuang1_lod_03.gr2
pack it again and done
Why would you need both same lods?
Isn't it better to delete 03 and leave the rest as it is?
-
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.
-
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.
-
And if I want to make more than one tag for each GM level?
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)
- 1
-
Try that
void LoadExpTable(char* name) { std::ifstream f(name); printf("EXP_TABLE load: %s n", name); if (!f.is_open()) { printf("EXP_TABLE load: FILE %s OPEN ERROR", name); return; } int level = 0; long long int exp = 0; int line = 0; while (!f.eof()) { f>>level; f>>exp; line++; if (level <= 0 || exp <= 0) printf("EXP_TABLE load !ERROR!: LINE %d LEVEL %d EXP %lld n", line, level, exp); else if (level > PLAYER_EXP_TABLE_MAX) printf("EXP_TABLE load !ERROR!: LINE %d LEVEL %d > MAX EXP LEVEL %dn", line, level, PLAYER_EXP_TABLE_MAX); else { printf("EXP_TABLE load: LINE %d LEVEL %d EXP %lld n", line, level, exp); exp_table_common[level] = exp; } } printf("EXP_TABLE load: done n"); }
There shouldn't be any problems unless your EXP table exceed this number 9223372036854775807 which I think won't happen.
//Forgot to mention.. When you get bigger numbers in your EXP table than 4294967295, this line will start to make errors:
exp_table_common[level] = exp;
so be cautious.
-
@Cataclismo:
Error in putty:
EXP_TABLE load: LINE 100 LEVEL 100 EXP -2144967296EXP_TABLE load: LINE 101 LEVEL 101 EXP -2084967296It'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
-
Console spam annoys me so I had to make it look like this.
Anyway, thank you for your hard work, guess I wouldn't toy with *.txt tables if I hadn't seen your script.
It's clean, readable and really easy modifiable.
Regards,
newja
- 1
-
What program do you use for making gif?
Whats that texture for level 70 armour?
Yep, it's not an armour, it's costume.
Program is GifCam.
- 1
- 1
-
Works fine. Thank you very much for the nice tutorial.
-
I discovered that problem is in every quest and isnt in Mijago system. Any ideas?
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. -
I discovered that problem is in every quest and isnt in Mijago system. Any ideas?
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
- 1
-
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.
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.
C++ get Hp from a mob/npc, is possible?
in Community Support - Questions & Answers
Posted
What do you mean by saying
which one?
##############################
To see pet level you must go to PetSystem.cpp
find
and replace whole function with this
If you want to know how to set pet name, look into this
Regards,
newja