View Full Version : [Share]Script to make db of your current drops
pompinis
22.04.2006, 19:27
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 (https://postpacific.mmorpg-game.online/forum/download.php?id=1226)
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
Use only create table script, not full. Or php-script notice you, about 30 sec. executions:
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.
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
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
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
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 (https://postpacific.mmorpg-game.online/forum/viewtopic.php?t=4324&start=15)
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!
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?
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
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.
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