Help needed for dropcalc testing.

If something doesn't fit in any other forum then post it here.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Locked
Hexa
L2j Veteran
L2j Veteran
Posts: 1217
Joined: Mon Nov 14, 2005 1:25 am

Post by Hexa »

quite a few alterations to tables need to be done when the server is offline... its troublesome but not much that can be done about it. Not sure if there is a hard and fast rule about what tables can be manipulated safely when the server is online.... need to get one of the senior devs in here to comment :)

Maybe for things that need to be done offline... dropcalc can just spit out SQL statements in a text box and the server admin can copy-n-paste to manually run on next reboot. Another choice to make things more complex is to have dropcalc update a server launch script that does whatever is required (though this might be a bit dodgy if contradicting queries get queued for before a reboot happens).
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

Some very good points, HeXa.

I've had a think on it, and even if the gameserver is down, the dropcalc isn't.

Rather than queue possibly contradictory statements, it might be better that when the gameserver is down, that the admins then use the dropcalc to make the changes; if I manage to design it right, it should be more convenient than editing the SQL. (also, if they want to make the changes before the server is down, then they can do and it is at their own risk, for things like shop items and stuff.)

If they are admining a server, then they should be responsible enough to read the user instructions that I'm going to make when I've got the whole thing sorted.

Once I've found out about the object_id issue, then I'll go ahead with adding to a warehouse. It isn't too much trouble for a player to relog to get items an admin has given; especially for the complete set gives.

I'll probably add the ability to give a pet as well; that is just a blank pet linked in to a caller that is also put in the warehouse. If anyone has the initials stats for new pets of all the types (kookaburra, buffalo, etc. included) that would be great; or is the level 1 stats in the pets_stats table the initial level? (that would be great if it was, because I could dynamically just pull the names of all the pets at level 1 and the list would thus update whenever new pets were added)

I'm concerned with finding the lowest available number to insert in to the items table, rather than just tag a next higher one on to the end, as presumably as games progress with large populations, these numbers are just going to get bigger and bigger unless there is a technique for reusing them; it's only an 11 digit integer, and the default numbers already seem to be in the 9 digit range.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

O.K. - New version uploaded that is kinder to gameservers that haven't yet updated to day/night mobs (if it doesn't find the column, it assumes permanent spawns) and also it now has the ability to edit shops, although a reboot is required fof the changes to work.

Also, some more variables added to the config.php section, but that should be about it for the config.php changes. Some more general coding bugs have been found and flattened.

I'm also working on a user guide.

EDIT - also added a path to the logon server directory, if it is available, so that the logon server logs can be watched.
Last edited by msknight on Thu Aug 17, 2006 1:05 pm, edited 1 time in total.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

very nice , one feature request. I already have it on my server, a button in server tools to stop the server. Sometimes i need this so should not be bad.

And why cant i give a item to a players who is offline but to a player who is online ? I think it must be the other way round
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

law wrote:very nice , one feature request. I already have it on my server, a button in server tools to stop the server. Sometimes i need this so should not be bad.
You can issue the shutdown command by using the freeform telnet command. I didn't add it as a button because for remote servers, it could too easily be accidentally hit by a GM, and then the admins have got the trouble of restarting.

Just go to the freeform telnet and issue the command "shutdown 1"
law wrote:And why cant i give a item to a players who is offline but to a player who is online ? I think it must be the other way round
I need the answer to the question about the unique id's before I feel safe in adding an item to an off line characters warehouse. It may not be safe to add them while the server is up.

I don't know of a way to take an item from a player who is online. Telnet allows to give, but not remove. Adjusting the database directly when the player is on line doesn't work; the player has to re-log first. Same with skills, they can be removed from the database, but if the player is still on-line, then they are still using them ... and if they increase the skill while on line, then it stays.

It is just like adjusting shops in the database, the server has to be restarted to see the changes.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
law
Posts: 33
Joined: Wed Aug 02, 2006 8:21 pm

Post by law »

Yes , the limited telnet command pool is a problem , but if you need any feature for l2j telnet , say it and i will do it.

When we got this stuff together i would post the code to l2j user contribs maybe someone puts it into svn ^^
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

I think the answer to that one, Law, is what do you want.

If it is possible to program telnet to remove an item from a player who is on line, then that would solve a lot of problems. Personally, I would pass it the character ID, the item id and the location of the item (warehouse, inventory, etc. in the case of freight, you might also want the freighthouse location in case they've got the same item in different freights.)

If you wanted to go the extra mile, then adding a quantity would make it more flexible ... then you could delete so much adena, or soulshot, from them, without destroying it all.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

It seems to be my day for stupid questions!

How do I work out what colour recipe icon goes with which recipe? Originally, I was looking at the fifth element in the recipe csv file (ranges from 1 to 9) but I then found no corelation between the number shown, and the colour at which the icons were displayed in the game.

Help!
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
Hexa
L2j Veteran
L2j Veteran
Posts: 1217
Joined: Mon Nov 14, 2005 1:25 am

Post by Hexa »

that sounds right... using soulshot recs as an example

Code: Select all

dwarven;mk_comp_soulshot_d;480;5153;2;[1463(300)]
dwarven;mk_comp_soulshot_c;481;5154;4;[1464(300)]
dwarven;mk_comp_soulshot_b;482;5155;6;[1465(300)]
dwarven;mk_comp_soulshot_a;483;5156;7;[1466(300)]
dwarven;mk_comp_soulshot_s;484;5157;8;[1467(300)]
the 5th element signifies the recipe lvl and that in turn is linked to the icon displayed. The client keeps track of which icon to display for whichever ID it is given.

Use the recipe section of www.l2wh.com to get the colours of the actual rec scroll for each level (currently 1-8 ).
Last edited by Hexa on Sat Aug 19, 2006 4:15 pm, edited 3 times in total.
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

Yep, that is what I thought, but it doesn't seem to work.

Tarbar is 3, Leather boots are 2. Give both to my Dwarf in game, and they both come up blue.

(that's nearly a poem)

Tarbar is 3,
Leather boots are 2.
Give both to my Dwarf
and they both come up blue.

... that's a bit better
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
Hexa
L2j Veteran
L2j Veteran
Posts: 1217
Joined: Mon Nov 14, 2005 1:25 am

Post by Hexa »

thats coz both lvl2 & lvl3 recs use the same icon :)

forget whether you had a copy of all the icons or not... this might be of use to you

http://www.l2wh.com/down/l2whdb-c4-1.1.zip

has the icon images and some spreadsheets with info decrypted from client files.
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

Skull Graver and War Pick are both listed as level 4 items. One comes out blue and the other yellow :-(

I do know one other thing ... the icons for the drop calc are all to pieces !!! Still, it is only an icon colour; the stats are right.

Checking in that l2wh download, the sql there has them both at level 4 as well.

If I can find out what colours are supposed to match which levels, then I can just program the drop calc for that and have done with it ... but I have a feeling it can't be as simple as that level number; or else it should match.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
Hexa
L2j Veteran
L2j Veteran
Posts: 1217
Joined: Mon Nov 14, 2005 1:25 am

Post by Hexa »

msknight wrote:Skull Graver and War Pick are both listed as level 4 items. One comes out blue and the other yellow :-(
strange.... client files says both those recs (2302 & 2303) are lvl4 and meant to display icon.etc_recipe_yellow_i00 :?

not looking at Skull Breaker are you?
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

dwarven;mk_war_pick;195;2302;4;[2064(8)],...
dwarven;mk_skull_graver;196;2303;4;[2065(8)],...

War pick is recipe, item number 2279, and Skull graver is recipe, item number 2303. Give one of each to the character in-game and Skull Graver shows as a yellow icon, while War Pick shows as a blue icon in the characters inventory. (item 2302 in the dropcalc is recipe: silver axe)
dwarven;mk_hammer_in_flames;172;2279;3;[2041(7)],

Also, how do I determine the starting level for giving a pet? They start at level 1 in the db, but if I do the quests, I get pets that are somewhere around level 30ish.

Also, the system can now give pets and also give complete sets of armor, weapons and accessories, based on player level; so if you're running a fun server, it saves a lot of agro giving characters this or that. It can now also give items whilst the characters are on or off line.

The character display can also show the registered recipes on a character, as well as the items and skills, and now it has opened the door for the recipe calculator, which I'm going to program today, and then I'll upload the code.

After that will come a pet manager to track and correct lost pets, and I've also made a few more icons for items and skills. I'll also make it possible to remove a recipe for a character; but like removing skills, it will probably need a characer relog before the change is seen.
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
msknight
Advanced User
Advanced User
Posts: 308
Joined: Wed May 10, 2006 11:40 am
Location: U.K.

Post by msknight »

So if I get this right ...
1 - White
2 - blue
3 - Blue
4 - Yellow
5 - Yellow
6 - red
7 - red
8 - purple
9 - black
...but isn't there a green somewhere?
My friend is a paranoid schizophrenic ... she'll take over the world, as long as nobody minds.
Locked