Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 22.04.2006, 19:27   #1
pompinis
Архивный участник
 
Join Date: Mar 2006
Posts: 30
Default [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
pompinis is offline  
Old 22.04.2006, 19:47   #2
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

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...)
hel is offline  
Old 22.04.2006, 21:34   #3
pompinis
Архивный участник
 
Join Date: Mar 2006
Posts: 30
Default

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.
pompinis is offline  
Old 22.04.2006, 21:41   #4
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

I understand it, after checking a script...
But why script is necessary turn to itemname-e.txt?
Are you forget about D.item_id?
hel is offline  
Old 22.04.2006, 22:13   #5
pompinis
Архивный участник
 
Join Date: Mar 2006
Posts: 30
Default

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
pompinis is offline  
Old 22.04.2006, 23:09   #6
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

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...
hel is offline  
Old 23.04.2006, 20:50   #7
pompinis
Архивный участник
 
Join Date: Mar 2006
Posts: 30
Default

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
pompinis is offline  
Old 24.04.2006, 03:49   #8
hel
Архивный участник
 
Join Date: Apr 2006
Posts: 729
Default

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!
hel is offline  
Old 03.05.2006, 23:00   #9
logyati
Архивный участник
 
Join Date: May 2006
Posts: 3
Default

ty for the share

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

any help?
logyati is offline  
Old 04.05.2006, 07:26   #10
nemp
Архивный участник
 
Join Date: May 2006
Posts: 4
Default 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.
nemp is offline  
Old 05.05.2006, 08:51   #11
Papa_Wader
Архивный участник
 
Join Date: Nov 2005
Posts: 23
Default

Here it is, made it just for test, consists of 1 goblin =)
Papa_Wader is offline  
Old 05.05.2006, 15:18   #12
pompinis
Архивный участник
 
Join Date: Mar 2006
Posts: 30
Default

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.
pompinis is offline  
Old 06.05.2006, 08:08   #13
nemp
Архивный участник
 
Join Date: May 2006
Posts: 4
Default libiconv

I have %subj%
nemp is offline  
Old 07.05.2006, 16:38   #14
Papa_Wader
Архивный участник
 
Join Date: Nov 2005
Posts: 23
Default

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 is offline  
Old 07.05.2006, 16:38   #15
Papa_Wader
Архивный участник
 
Join Date: Nov 2005
Posts: 23
Default

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 is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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