![]() |
[Share]L2 admin on php
L2 Admin 0.4.1 - Lineage2 administration tool, writen on php by hel.
---------------------------Changelog--------------------------- fixed: -- DeleteItem (not fully tested) -- A lot of optimizing in code, since last version (tested) -- Tested and fixed some modules added: -- see specifications list from 10 to 14, and 16. -- Basic ip-security. ---------------------------Specifications list--------------------------- 1. Check user, online or not (tested) 2. Change user nickname (tested) 3. Kicking user (tested) 4. Add item with enchant (tested) 5. Delete item from user (not tested ingame, but theoreticaly working) 6. Modify user face, hairs, race, class, etc (tested) 7. Punish user (tested) 8. Move user to another account (tested) 9. Change clan owner to selected user (not working) 10. Increasing user sp, exp, karma, pk, pvp (tested) 11. Setting user sp, exp, karma, pk, pvp (tested) 12. Show announce (tested) 13. Set user sociality (be care with it, it's crashing cached!) 14. Set GM rights to user (not tested ingame, but theoreticaly working) 15. Getting char id by char name, directly from db. (tested) 16. Showing char invertory and warehouse by char id, directly from db. (tested) ---------------------------Tips--------------------------- "not tested ingame, but theoreticaly working" - it's mean, that's cached return OK (1). But not tested ingame. ---------------------------Other--------------------------- *. Basic ip security. For change - open functions.php via notepad and edit: -- $list_allow=array("127.0.0.1","1xx.xx8.0.1"); ---------------------------How to install--------------------------- You must have Apache newer than 1.3.32 version and PHP newer than 4.0.1 version, with uncommented module php_mssql.dll. 1. Extract archive L2_Admin_0.4.rar in any folder on web-server. 2. Edit white list of IPs, for allow view L2Admin page, in functions.php (see --other-- section in readme). 3. Edit file "config.php". 4. Now you can use this script, for do it you can go on http://www.myhost.ru/path_to_script/index.php. ---------------------------Thanks--------------------------- Thanks to all contributors and helpers. Especially to Barabashka, Astrid, ZeonDi, Kenjiro and others, actively helping... Any bug reports and solutions will be very nice... Вложения из исходного сообщения (сами файлы в копии отсутствуют): L2_Admin_0.4.1.zip — 69906 байт |
You also expecting problems with "delete item from user" packet?
Which packet are you used? I'm used 54 DelItem2Packet("ddS"), and didn't get any results. Cached returns "01", item not deleted. |
Majesty:
Same problem as your... But I'm using DelItemPacket [13]... But if player online, and I'm using that packet - it returns me 1, but don't delete item. 8( |
Quote:
For really working, tested functions return are "1". (kick_char, etc) |
Quote:
But if char online, script returns 1 and don't delete item. |
Quote:
Two packets, two functions - and same errors... |
Well, I use 54 DelItem2Packet also, but sometimes it delete item, sometime not :(
why - dunno. hel, if you wanna help - contact me. Have a desire to write normal L2-admin :) |
13 DeleteItemPacket works fine. but when function return error, just repeat sending packet 1-2 times.
|
4. Add item with enchant (adding item, when user offline) (tested)
5. Delete item from user (deleting item) (bugged?) not work :-( return 01 |
2 hel:
PHP Code:
|
Intresting program =D
I'm having problems with the add item code though. It just wont do it. Cached shows a connection then throws out error 997 everytime i try. |
hel, you use item id (item type 57 for adena f.e.) or item uid (unique identity from user_item table) in del item packet?
it should be item uid from database and user must be offline in time of use this packet. |
Quote:
|
nevermind my post i got it workin (i'm an idiot and didn't load itemcache hehe)
|
poltomb:
It's not StopCharPacket? astrid: O_O Wasn't know it earlier... Do you know, how to get unique id, using itemdata id (or item_pch)? But... Additem uses item_id from itemdata? |
Hel can u make kick before send command.
Rus: Можешь сделать чтобы перед каждой командой кикало принудительно и банило на 1-2 минуты? И когда используешь модифицировать перса выбераешь ID чара - далее вылетает окно которое щас вылетает и там сразу показывается имя чара его тип волос его класс далее меняешь что надо и далее жмешь применить и всё меняется? или если я оставляю поле пустым оно не меняется? допустим мне надо сменить только класс перса вбиваю только class остальное пустое оставляю - поменяется только класс? |
Quote:
|
Quote:
Посмотрю... Но только после того, как отдохну после написания этого скрипта. |
Quote:
|
Quote:
something like: Code:
SELECT user_item.item_id as uid FROM user_item INNER JOIN user_data ON user_item.char_id = user_data.char_id WHERE (user_item.item_type = "+itemid+") AND (user_data.char_id = "+charid+") and user_item.warehouse="+warehouse//rus с моим английским хрен что поймешь наверно :) короче просто нужно сделать запрос что я привел выше (синтаксис не пхпшный но я думаю понятна суть). если используешь часто заведи сторед процедуру в БД. additem2 использует просто итемид (тип предмета) 57 для адена например. |
it would be better if we could ad a user/pass field with ip verification so none can exploit the scripts
|
Quote:
|
Working delete2 function:
Code:
function l2_delitem2 ( $item_id, $amount ) { |
Quote:
Will add this function in the next build! PS: Got it from L2z? ;) Could anyone explain, how different "V" and "i" in pack() function? :wave: |
Ready to test new build :)
|
| All times are GMT. The time now is 21:46. |