• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How many own items on server? who is first owner?

Azi

Banned User
Joined
Aug 12, 2007
Messages
1,167
Reaction score
53
Location
Włocławek
Hello, recently I wrote a script which I decided to share with you! The script requires OTS SQL database and PHP version 5 or higher. The script is displaying how much the server is currently at things in the houses in the inventories of players and their deposits and who was the first this thing and what time
Ersiu is my current nickname, in this forum have an old, used once.

Installation:
1. Download a the rar pack with script.
2. Unpack all to your htdocs folder.
3. Copy to htdocs folder your items.xml.
4. Edit config.php and set your database info.
5. http://127.0.0.1/install_items.php to install new table in our server database.
6. goto http://127.0.0.1/itemsconventer.php and pull values and convert items to sql database!
7. http://127.0.0.1/itemscan.php and rename itemscan.php to other name for safe! and add cron job on this file to auto-update item count!
8. Delete install_items.php and itemsconverter.php From htdocs.

Link: RapidShare: Easy Filehosting

Your,
ersiu!
 
Whooah

SELECT count(`itemtype`) FROM `player_items`? ;O

Downloading.. ;>
 
slawkens, whats wrong? There's not any error. i might.;p
 
http://127.0.0.1/install_items.php

Doesnt load.. blank screen!!


http://127.0.0.1/itemsconventer.php
Get this error
Code:
[B]Warning[/B]:  simplexml_load_file() [[URL="http://127.0.0.1/items/function.simplexml-load-file"]function.simplexml-load-file[/URL]]: I/O warning : failed to load external entity "items.xml" in [B]C:\Documents and Settings\Administrator.TECH-LABSERVER\Desktop\xampp\htdocs\items\itemsconventer.php[/B] on line [B]9[/B]

Then no idea what to put in for
ITEMS.XML TO SQL DB CONVERT!


From ID:
To ID:


http://127.0.0.1/itemscan.php

is also a blank screen...

Nice idea but theres a few bugs.. ill look over code.. but im not a coder but i can normaly find a few mistakes! anyways any ideas?
 
Found out that when i edit this part it dies..
Code:
 require('items_class.php');
 $items = new Ersiu_Items;
echo $items->updateItems()
i put it as
Code:
 require('items_class.php');
 $items = new Ersiu_Items;
echo $items->updateItems() or die ('Maybe Something is Wrong!');;

and i got
Maybe Something is Wrong! on the webpage!
 
yeah it doesnt load only blank page. But i tried to add it manually and i get the error:

Code:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''CREATE TABLE IF NOT EXISTS `server_items` (
  `id` bigint(255) NOT NULL,
  `n' at line 1

add this:
Code:
ERROR: Niezamknięty cudzysłów @ 0
STR: '
SQL: 'CREATE TABLE IF NOT EXISTS `server_items` (
  `id` bigint(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `onserver` bigint(255) NOT NULL,
  `firstowner` varbinary(255) NOT NULL,
  `firstdate` bigint(255) NOT NULL,
  `inequip` bigint(255) NOT NULL,
  `indepot` bigint(255) NOT NULL,
  `inhouse` bigint(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8

someone could help me ?
 
Back
Top