Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   [Share]Script to make db of your current drops (https://postpacific.mmorpg-game.online/showthread.php?t=4144)

pompinis 22.04.2006 19:27

[Share]Script to make db of your current drops
 
Here is the script to make db of drops from npcdata.txt is useful for website drop information

Step1:
Creat tables from npcedit[1].sql.gz work whit mysql

Step2:
Edit config.php
Insert your npcdata.txt in the same directory wher is the script

Step3:
Launche the script dropstomysql.php

And that is you have you current drops in mysql database.

Drops To Mysql

hel 22.04.2006 19:47

Deleted...

Your script is worked! Respect man! I start to work on sql->skillgrp.dat script, by modifing the Gaikotsu script. Thanks again!

-------

Use chance as int, lol... It must be an floating value!
(Just see in base. 0% of chance... lol...)

pompinis 22.04.2006 21:34

Quote:

Originally Posted by hel
Use only create table script, not full. Or php-script notice you, about 30 sec. executions:
Code:

CREATE TABLE `drops` (
  `npcid` int(50) NOT NULL,
  `servname` varchar(100) NOT NULL,
  `clname` varchar(100) NOT NULL,
  `min` int(50) NOT NULL,
  `max` int(50) NOT NULL,
  `chance` int(50) NOT NULL,
  `job` varchar(100) NOT NULL
) ENGINE=MyISAM;

CREATE TABLE `itemnames` (
  `id` int(12) NOT NULL,
  `clientname` varchar(100) character set ascii NOT NULL,
  `servername` varchar(100) character set ascii NOT NULL
) ENGINE=MyISAM;

Your script is worked! Respect man! I start to work on sql->skillgrp.dat script, by modifing the Gaikotsu script. Thanks again!

-------

Use chance as int, lol... It must be an floating value!
(Just see in base. 0% of chance... lol...)

If you not make full data base from npcedit[1].sql.gz you will not get client side names in drops table.

hel 22.04.2006 21:41

I understand it, after checking a script...
But why script is necessary turn to itemname-e.txt?
Are you forget about D.item_id?

pompinis 22.04.2006 22:13

Quote:

Originally Posted by hel
I understand it, after checking a script...
But why script is necessary turn to itemname-e.txt?
Are you forget about D.item_id?

With INT is my error fixed tnx hel.
And D.item_id is not needed whit my db look in the db if you creat two tables itemnames ant drops from this file, using the dropstomysql.php you will automaticly write npcid, item_name_server_side, item_name_client_side, min, max, chance, and type(spoil or drop), and this is all what you need for Gaikotsu script

hel 22.04.2006 23:09

mysql_query("SELECT * FROM drops as D JOIN itemnames as I ON (I.servername = D.servname AND npcid=$id) ORDER BY D.chance DESC");
I think here our problem... If I delete this green code, script is working, but incorrect. And break on 30 sec...

pompinis 23.04.2006 20:50

Quote:

Originally Posted by hel
mysql_query("SELECT * FROM drops as D JOIN itemnames as I ON (I.servername = D.servname AND npcid=$id) ORDER BY D.chance DESC");
I think here our problem... If I delete this green code, script is working, but incorrect. And break on 30 sec...

All fixes for your question is HERE

hel 24.04.2006 03:49

I'll check it tonight...
Sorry, Yesterday I was sleeping, and hasn't help you to finish it, hope you don't take offence about it? ;)
Anyway... THANK YOU!

logyati 03.05.2006 23:00

ty for the share :D

Fatal error: Call to undefined function: iconv() in c:\arquivos de programas\easyphp1-8\www\npc\dropstomysql.php on line 14

any help?

nemp 04.05.2006 07:26

Re: npcid
 
Quote:

Originally Posted by pompinis
Quote:

Originally Posted by nemp
Take only first npc.
Other npc is a copy of first npc :(

Make you shure you dont have spaces in your npcdata, all spaces in npcdata need to be tabs.

No spaces in npcdata.
I take first three npc and I start a script. All these three npc in data base are displayed under the id one.

Papa_Wader 05.05.2006 08:51

Here it is, made it just for test, consists of 1 goblin =)

pompinis 05.05.2006 15:18

Quote:

Originally Posted by Papa_Wader
Here it is, made it just for test, consists of 1 goblin =)

I have multiple your gremlint to make more npc's, and look here the result is working well. The script require iconv library make you sure you have it.

nemp 06.05.2006 08:08

libiconv
 
I have %subj%

Papa_Wader 07.05.2006 16:38

The 5th npc in result.htm is doubled, but that's not the problem, can delete it manually from the table. The problem is that spoil information is incorrect:
{[magic_ring];1;1;xx.xx03};{[stem];1;1;3.9799} - instead of this, script takes
Spoil:Adena [adena] 42 60 70 Apprentice\'s Shoes [apprentice's_shoes] 1 1 xx.xx519

Papa_Wader 07.05.2006 16:38

The 5th npc in result.htm is doubled, but that's not the problem, can delete it manually from the table. The problem is that spoil information is incorrect:
{[magic_ring];1;1;xx.xx03};{[stem];1;1;3.9799} - instead of this, script takes
Spoil:Adena [adena] 42 60 70 Apprentice\'s Shoes [apprentice's_shoes] 1 1 xx.xx519


All times are GMT. The time now is 21:46.