Jump to content

[ Dead Download Link ] Vanilla Core 2.4.1 [ We Need You ]


Vanilla

Recommended Posts

Vanilla can you add pet.is_mine() function? It was relased on Inya's thread on epvp.

 

Here it is (Thanks to xP3NG3Rx)

/*|------------------|*/
/*| questlua_pet.cpp |*/
/*|------------------|*/
int pet_is_mine(lua_State* L)
{
    CQuestManager& q = CQuestManager::instance();
    LPCHARACTER ch = q.GetCurrentCharacterPtr();
    LPCHARACTER pet = q.GetCurrentNPCCharacterPtr();

    lua_pushboolean(L, ch->IsPet() || pet && pet->GetOwner() == ch);
    return 1;
}

luaL_reg pet_functions[] =
{
    { "is_mine", pet_is_mine },
}
Link to comment
Share on other sites

  • Honorable Member

@Efyn That code is not correct. Because I'm wrote that code in Notepad++ and there is a lots of error what the Visual Studio shows.
 

Here is the correct code:

int pet_is_mine(lua_State* L)
{
	CQuestManager& q = CQuestManager::instance();
	LPCHARACTER ch = q.GetCurrentCharacterPtr();
	LPCHARACTER npc = q.GetCurrentNPCCharacterPtr();
	CPetSystem* petSystem = ch->GetPetSystem();
	CPetActor* petActor = petSystem->GetByVID(npc->GetVID());

	lua_pushboolean(L, npc->IsPet() && petSystem && petActor->GetOwner() == ch);
	return 1;
}

I tested on my WinServer and works.

  • Love 1
Link to comment
Share on other sites

Hey,

 

sorry but I'm not able to release 2.2 yet. There's much to do since all of you made some great ideas and I want to release a stable version with all the wishes you had. And since there are som stability issues and code optimizations left I decided to first finish the work before releasing a new version too early. But unfortunately I'm not able to continue my work this weekend so it'll take some time to release it. I guess I'll be finished within the beginning of next week. If you want I can upload dbcache for 2.2 so you can use the "no txt"-startup.

 

@Grantix:

No, 2.1 supports only text files. In 2.2 you can enable the alternative startup in you db conf.txt so it'll ignore text files and read everything from the database.

  • Love 1

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

Another idea of something to fix: the crash that happens when you "/reload q".

That reminds me, what about a feature where LOW_WIZARDs can have commands added? We can already restrict commands with the CMD file, but it would be nice to be able to customize exactly what commands each permission level has and whether or not they have a GM logo over their head and can be added to friends. The behavior would be similar to Metin2US, where they had MODs with abilities that LOW_WIZARD currently doesn't have but without the GM logo over their head or friend-adding restrictions.

 

To keep the CONFIG clean, maybe set this up in jSON format(or something else simple like lua) or something in a file that can be put somewhere near the core and have a symlink in each channel folder for it.

  • Love 1
Link to comment
Share on other sites

Since I'm unable to test it (same reason why I can't continue or release the core) I may ask you if you've encountered the guild war crash.

Please try it and tell me if there's a security issue so I can fix it until 2.2

Oh and cube should work well as it's intended. Even with floating points (there's a new issue related here but I managed to fix it in 2.2) it'd work now with 2.2

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

Since I'm unable to test it (same reason why I can't continue or release the core) I may ask you if you've encountered the guild war crash.

Please try it and tell me if there's a security issue so I can fix it until 2.2

Oh and cube should work well as it's intended. Even with floating points (there's a new issue related here but I managed to fix it in 2.2) it'd work now with 2.2

You can check older post for issues and other things ;) ..

Link to comment
Share on other sites

Got some good and bad news.

 

I've managed to get some work done on the source code.

There'd be again a slight boost to the performance (and less memory consume). I've removed unused variables and now I'm about to clean the rest of the code.

Every dependend library got a new cleanup. There are no errors left, only some small warnings with things I'm unable to change (since these libs are from YMIR and there's no source code to compile them). But they won't affect the stability so it's okay. Only small things.

 

If this code runs stable I'm about to install new stuff one by one so it'll keep being stable. I'm aware of the issues you posted here and I'm about to fix them ASAP.

 

And yes, some things YMIR did could possibly be exploited or leading into crashes you may have. It was a hard work but looking at the output of the compiler helps finding these lines (as mentioned earlier there's a floating point handling in the cube function but the output message uses %d which is clearly only for integer, not floating point -> crash). There are more things like this one and I'm about to find and eliminate them for 2.2

dbcache compiled clean without any errors. Even no unused variables anymore. If I can I'll make a test run of it and then as I mentioned earlier I'd release at least the dbcache.

We are the tortured.
We're not your friends.
As long as we're not visible.
We are unfixable.

Link to comment
Share on other sites

Vanilla, you would save mu Life if u posted what u target, which was causing certain error. It would really help developing that core. I remember that mainline get about 1k warnings which most od them have performence target, but u just said that some generates crashes. Will u find some time and do a quick list with this errors?

Link to comment
Share on other sites

Vanilla, you would save mu Life if u posted what u target, which was causing certain error. It would really help developing that core. I remember that mainline get about 1k warnings which most od them have performence target, but u just said that some generates crashes. Will u find some time and do a quick list with this errors?

As Vanilla says:

"Since the source code is written by YMIR and I respect their work I won't release the source code or give any peeks into it."

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.