-
Posts
174 -
Joined
-
Last visited
-
Days Won
13 -
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by Alina
-
-
ccache also does some weird things on my VM. When I'm doing small changes, ccache will just ignore them (maybe because it thinks the files are unchanged or something). Even after cleaning, I was not able to compile a gamefile with changes. Only after waiting for a while or disabling ccache at compilation, the new gamefile worked as intended
Also you'd note that people will have to change the Makefile, otherwise the source won't be compiled with ccache as far as I know, especially not if you're doing things like:
CC = gcc49
Instead, if you want to use ccache then, just use:
CC = ccache gcc49
-
Make sure that in cmd.h you have changed the SendNotice definition like this:
extern void SendNotice(const char * c_pszBuf, bool IsBig = false);
questlua_global.cpp refers to SendNotice() function in cmd.h which in your case may have the bool variable set to true and therefore displays it like it's a big notice which isn't the case
-
It's not a problem with the py-files, it's a problem with the source. Did you do that too?
-
No, belt_inventory does not cause this error.
It's the inventory size clientside, not only the py-part but also the binary.
Equipment is normally stored at the end of your normal inventory. The server now has 135 as the inventory size (45 more than the prior 90) so the equipment starts with index 136 there. But the client still thinks that the inventory size is just 90, so the equipment starts at 91 there. That's the mismatch you can see. When equipping something, the server will move the item to the proper index, so it's at 136+, not 91+ like the client has it
In GameType.h change
const DWORD c_Inventory_Page_Count = 2;
to
const DWORD c_Inventory_Page_Count = 3;
and make sure you've recompiled everything after raising the inventory size serverside to 135. Then everything should work
-
1)
The error is clearly a failed assertion.
assertion means that you declare a statement that must be true, otherwise the game crashes. In your code, it's the assert(iSlot < SQL_MAX_NUM) part.
So, the argument iSlot is bigger than SQL_MAX_NUM. SQL_MAX_NUM is defined in DBManager.h
enum eSQL_SLOT{SQL_PLAYER,SQL_ACCOUNT,SQL_COMMON,SQL_HOTBACKUP,SQL_MAX_NUM,};I guess that should help you find the error. you can trace it back and fix it thenIf you're using source, make sure that all the packets are in sync, that'll also fix the header mismatch errors mainline_released serverside + novaline clientside does work (or one of those clean client sources) without those errors- 1
-
Why do you even want that exe? It's no use at all, if you compile your binary it'll work without the need of additional files :/
Sadly I don't know exactly what the exe does, so I don't know if it bypasses anything, etc.. I also don't recommend using it
-
You shouldn't mess up with the cache. That's no good ideat :/
- 1
-
libserverkey can't be found that's what causing the linker to print out an error.
You may have the source (that's why the compiler does indeed work) but you don't have the lib (that's why the linker errs). Try compiling it It's the folder called "libserverkey"
-
The problem happens when you're doing something like a infinite loop. That's the point where the game can't update the tics because it's busy doing the loop over and over. The error you see is just a kinda security check to make sure the game instance doesn't eat up your whole resources and instead kills itself. So yeah, you better find that flaw, most likely it's a quest that's causing problems like this (I did the same mistake once too )
-
You must do the following:
First open packet.h
Search for SPacketGGNotice and add the following variable:
bool bIsBig;Maybe you just missed it
-
Did you write the pet_is_mine_function into the pet function table?
In the same file (questlua_pet.cpp) scroll down and check if you made an entry. The error is caused due to the server not knowing what 'is_mine' from the pet-class actually is. So I guess you just forgot to add it
- 1
-
0330 19:33:32667 :: File "uiToolTip.py", line 1650, in __AppendMetinSlotInfo0330 19:33:32667 :: IndexError0330 19:33:32667 :: :0330 19:33:32667 :: list index out of range0330 19:33:32667 ::The error appears when you call an array with an index that's out of it's array bound. For example your array has size of 3 and you're calling it with index 10.I've looked up for the function where this happens:
for i in xrange(player.METIN_SOCKET_MAX_NUM): self.__AppendMetinSlotInfo_AppendMetinSocketData(i, metinSlot[i])
These are most likely the lines that cause the error. Note that our for loop goes until it hits METIN_SOCKET_MAX_NUM, which is increased to fit the new sockets. metinSlot is called with the current loop value - so that could be the culprit. metinSlot is extracted from the item data. So if the item data is still constructed with the old socket size, it could be the reason your code isn't running. Hope this helps
-
extern void BroadcastNotice(const char * c_pszBuf, bool IsBig = true);
Why aren't you setting IsBig to true ??
Because if you do that then all notices will be sent as big, even the notices sent with /n. We need the default value to be false, and only when we send notices with /b to tell the function that we want a big one.
Quite correct. It's about defining it in the headers. We want to make it compatible with older function calls. There are several examples where the source calls our changed functions. If we'd change it to true, then every message would be in big notice style, not our small notice-style. Of course you can do so. But then you'd have to change your /n command to give "false" to your argument. So server messages and /b would be big notice and /n would be small notice. That's also a way you'd do it. It depends on your needs Feel free to adapt the source changes to your needs
-
in the BroadcastNotice-function change
SendNotice(c_pszBuf);
to
SendNotice(c_pszBuf, IsBig);
Otherwise the bool variable won't be given to the struct so people will only receive the normal shouts
- 5
-
According to your error description I guess you missed a step or made a small mistake maybe. You told us that other players are getting the /b announces. So the only error is the bool variable. There something is not correct and that's why you don't see the /b board If you want, you can make screens of the changed functions and I can help you with that.
- 1
-
Thank you very much for sharing!
You can also run the gamefile with gdb.
This all requires that you're building your gamefile with debug support of course Otherwise backtracing can produce bad results.
gdb game
run
Then you can reproduce the bug and see what happens. gdb can help a lot when fixing game crashes
-
Can you provide us with some logfiles? Maybe we can find something there..
-
Good idea, Ken You can also replace
std::auto_ptr<SQLMsg> pMsg(DBManager::Instance().DirectQuery("UPDATE player.player SET title = '%s' WHERE id = %u",c_szRankName,GetPlayerID()));
with
DBManager::Instance().Query("UPDATE player.player SET title = '%s' WHERE id = %u",c_szRankName,GetPlayerID());
Since you aren't storing the result in a variable. It's better to not use DirectQuery unless you're selecting
- 3
-
Maybe your error is no problem with the source
You can find a quest called game_option.quest
Is it running on your server?
quest game_option begin state start begin when login begin local val=0 local msg = "Blocked function: " if pc.getqf("block_exchange") == 1 then msg = msg.."Trade " val = val + 1 end if pc.getqf("block_guild_invite") == 1 then val = val + 4 msg = msg.."Guild " end if pc.getqf("block_messenger_invite") == 1 then msg = msg.."Messenger " val = val + 16 end if pc.getqf("block_party_invite") == 1 then msg = msg.."Party invitation " val = val + 2 end if pc.getqf("block_party_request") == 1 then msg = msg.."Party Joining " val = val + 32 end if pc.getqf("block_whisper") == 1 then msg = msg.."Short message " val = val + 8 end if val != 0 then syschat(msg) end pc.send_block_mode(val) end end end
- 2
-
You don't have to create a new topic for this
If you need a source solution, I'll help you. Other than that you'll have to wait for someone to create a dif.
Oh, and he can only create the dif if he gets the gamefile from you. The size differs in every rev so they can't speculate where the restrictions are in your gamefile
Humm, can you add me on skype ?
Read my signature, I don't have that and it won't help you. I can't edit the gamefile, if you want me to help you, just tell me where the source is and I'll post you the changes needed to remove the protection
-
Wellp, we already stated that he should add that to his CONFIG files but he didn't know where they are or what he has to do in detail. I showed him how to find the CONFIG files, adding a line shouldn't be a problem at all.
-
You don't have to create a new topic for this
If you need a source solution, I'll help you. Other than that you'll have to wait for someone to create a dif.
Oh, and he can only create the dif if he gets the gamefile from you. The size differs in every rev so they can't speculate where the restrictions are in your gamefile
Why you don't use you old account?
What old account?
Oh and private questions should be asked by pm, we don't want to go OT here
-
Don't blame him, he's maybe new to this
Make sure you get to know your environment. The serverfiles consist of a dbcache, an auth-server and the cores (share directory is not important for this case). db and auth are usually in a folder called "common". The rest is splitted.
Normally you have channel-directories like channel1, channel2, channel3, etc...
If you just follow them you'll get the structure of your serverfile. Every channel consists of at least one core. Also there's one directory called game99, it's usually outside the channel directories because it's seperated and meant for special instances like wedding or OX.
Feel free to experiment with them
dbcache uses the db file. The db-file reads conf.txt, so that's not what you're looking for.
Every gamefile uses CONFIG to read it's settings. There you go
So remember: dbcache uses the db file, everything else is using a gamefile. And every gamefile needs a CONFIG to read it's settings. There just add the BIND_IP and you'd be ready to go
- 1
-
string.find does not return bool!
It returns the position where it found the pattern. Also it returns nil if the pattern is not found within the string.
Try it with that:
if string.find(pc.get_name(), "[%s]") != nil then
This should do the trick
The ""..pc.get_name().."" has no use. You're just concatenating an empty string with the player name and then an empty string again. The result is the same as you'd get it when you just use pc.get_name()
Horse Appearance via Database
in Features & Metin2 Systems
Posted
M2 Download Center
Hey everybody,
I have something special for you. This time I'm gonna show you how to change the appearance of your horses on the fly!
1) Which files do we need to edit?
- char.h
- char.cpp
- char_horse.cpp
- questlua_horse.cpp
- tables.h (in common)
- ClientManagerPlayer.cpp (in db)
2) What are we planning to do?
Simple problem: I for myself hate it to use thousands of seals, switch between them, maybe have bugs and I think it's not that good solved to use an additional "system" to let players ride pets.
So what do we want to do? We want to make the appearance of horses variable, so players can for example use seals to change the appearance of their horses instead of mounting an additional "horse".
So. How are we going to do this? Simple! We can just add a variable to our character class, so the gamefile will know what appearance the players horse is like. We only need to change a bit here and there and the magic will apply!
3) Adding the new variable and make it work
First let's add a new variable to store the horse appearance. We'll do it with SQL, so when the player sets a horse appearance, it'll be saved. This is the "horse-variable" (yeah damn, I can invent cool and catchy names!). Open tables.h and add the following line into the struct of SPlayerTable (you can add it anywhere, I just added it beyond the declaration of sRandomSP)
Now we already can close tables.h and save it.
Next open ClientManagerPlayer.cpp and find:
and add below:
Then scroll a little bit down and you'll find
Add below:
Next search for:
And change this line to
Then search for:
And add below:
Then search for exactly this:
and replace it with:
And a few lines down to that we can find
There we add:
You can close ClientManagerPlayer.cpp now and open char.h.
There we search for struct character_point and add below
the following line:
Let's close char.h and open char.cpp. Find
tab.sRandomSP = m_points.iRandomSP;
and add below:
tab.sHorse_appearance = m_points.horse_appearance;
Next find
and add below again:
That's all for the source part in this stage!
You'll only have to add a new column called horse_appearance to your player-table (and player_deleted of course! ). Data type is unsigned int(6) default 0.
You'd now be able to compile the gamefile and run it without any flaws. Nothing has changed yet, but this will come in the next part
4) Use our new variable
In this part we'll create two functions, one gets the horse appearance and one sets it. Also we'll change our horse appearance function so the source will now redirect it to our new variable - if we set it. So the trick on this is, that normally the default value is 0. So if no vnum has been set the gamefile will instead use the normal horse_table like it did before. But if we set a vnum, it'll instead use that.
Let's begin with the two new functions. Open char.h and add anywhere in public section (I added it below the GetHP() function):
These are our new functions.
We'll use them in the GetMyHorseVnum() function, but first we need to remove it's constness.
In the same file find:
and remove the const. So it looks like:
That's all we need now, we can just close char.h and move on to char_horse.cpp.
Find
and remove it's constness:
and at the beginning of the function we just add:
Save it and close it. That's all Now, if you change the horse_appearance in your database, you'll notice the new horse appearance ingame!
5) Adding the questfunctions
At last we want to be able to edit the horse appearance on the fly so we can use items like seals to set it.
Open questlua_horse.cpp and add the following functions:
At last we add the new funcions to the horse_functions table at the end of the file:
That's all! Close questlua_horse.cpp and compile! Now we can use the following quest functions:
horse.set_appearance(DWORD vnum) = changes the horse apperance to the vnum provided
horse.get_apperance() = returns a lua number representing the current horse appearance vnum
Have fun playing with it!