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] Item Search (PHP) (https://postpacific.mmorpg-game.online/showthread.php?t=2822)

Domzelan 18.12.2005 09:53

[Share] Item Search (PHP)
 
This script help you find items from users.

How it works? - just find (where item_type = 4640) where 4640 - ItemId. ItemId you can find in Itemdata.txt.

From Russia.

Dmytro 18.12.2005 13:01

Hm, i am take the query from ASP files:
[php:1:bb801b48bb]$result=mssql_query("SELECT TmpD.sumamount,user_data.char_name,user_data.gende r,user_data.account_name,user_data.lev,user_data.b uilder FROM (SELECT char_id, SUM(amount) AS sumamount FROM user_item WHERE item_type = $id GROUP BY char_id) TmpD INNER JOIN user_data ON TmpD.char_id = user_data.char_id WHERE account_id>0 ORDER BY TmpD.sumamount DESC");
[/php:1:bb801b48bb]
Where $id - Item type. Work fine, i see all who has that item (or items).

In your code some mistakes:
[php:1:bb801b48bb]for($x=0;$online_users[$x]=mssql_fetch_assoc($result);$x++){
$online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h";
};
[/php:1:bb801b48bb]
$online_users[$x]['use_time_h']=round($online_users[$x]['use_time']/3600,1)."h"; - it is not necessary
And you don't write this in query - "account_id>0", all deleted chars will are shown, if they have item.

Thx for share. ;)

Metalmurphy 18.12.2005 14:37

whats wrong with query analizer? oO

Domzelan 18.12.2005 19:44

It was online status - i did item search :)

2Rain 20.12.2005 04:20

Domzelan:
<rus>Хороший скриптик для отлова читерюг! ;)
А доделать можешь так, чтобы ИД итема не намертво вбит был в тексте скрипта, а через форму назначался переменной и по кнопочке искал по введённому в форму ИД?
Бывает часто нужно искать по самым разным итемам.</rus>

Good job, but can be better! :)

Domzelan 20.12.2005 09:38

Yes - it easy, 5 minutes - and form is done :) i share ver0.1 lately...


All times are GMT. The time now is 22:13.