![]() |
[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 :)
|
doesnt work for me... on change user parameters when i push go nothings happend.. on check char online and get nabe by id it gets me blank screen...
|
mastery:
What php and apache you're using? I heard that error appearing on easyphp. I was tested on standart builds of php (4.3.8, 5.0.1) and apache (1.33 and 2.0.52), which I'm using, it working perfectly... |
Quote:
Quote:
i signed integer (machine dependent size and byte order) V unsigned long (always 32 bit, little endian byte order) Option 'i' could give 64bit output, if php has been compiled in 64bit mode (i have 32bit php/apache/mysql binaries, thus it gives the same as 'V'). Option 'V' (in my opinion) is safer than 'i' (for future releases). |
Works DelItemPacket("ddddS")
$msql="SELECT amount FROM user_item WHERE item_id=$item_id"; $item=mssql_fetch_array(mssql_query($msql)); $command=pack("ciiii",13,$char_id,0,$item_id,$item[amount]); |
New build released, added readme.txt inside archive for russians.
|
New build 0.4.1 with some tested and fixed functions released.
|
Quote:
rus: спасиб, за русик. |
Warning: Cannot modify header information - headers already sent by (output started at C:\wwwroot\httpd-2.2_x64\htdocs\a\admin\index.php:2) in C:\wwwroot\httpd-2.2_x64\htdocs\a\admin\index.php on line 2
and i got blank page im using x64 versions of PHP-5.1.5-x64-2006-08-18 and apache 2.2.3_x64... everything else works.. do i require something else to be installed to get this working? im also chech this script on Cherokee webserver, same errors... on same machine... |
Try to delete "header(.......);" strings at top from all scripts...
As I understand 5.0.0+ php don't support this format of function... On 4.3.8 php it's working greatly... :-\ |
yes i fix that but anyway it doesnt work on my machine ((( also it doestn work with php 4.3.9
why i got blank page.. can it be becourse ajax u used? is it needet? |
Quote:
When PHP open page, it see "<!-- ... -->", and construct default header, and after that you try to construct you own header, when it's already exists. =) Delete "<!-- ... -->" or write after "header()" your comment and all bee good. =) |
I solved the header error by just putting it that way:
Code:
<?php header('Content-type: text/html; charset=windows-1251'); |
hm.. it works only on internet explorer... i was trying on firefox )...
can u add to function to reset all skills then vhanging class, and checkbox to set_skill_all command, it will be very nice... one thing, u need to change subjob0_class row then changing class row, or user will crash on login... anyway, thanx for your work.. |
yeah. Lets not over complicate things. I think we should remove any ajax or over complicated javascript, as it should be working with firefox.
|
Hello People, i have one problem:
Quote:
Thnx for the help, cya! EDIT: The CacheD returns error 997. Thnx for help |
| All times are GMT. The time now is 22:59. |