![]() |
PHP add adena to a character
Guys is there any way of adding adena to a character via php ?
I know it will need restart server to take effect but this is no prob. Any help appreciated Thanks |
Of course it s possible man, and the fact is it s really easy :) Go to google and search some php course, check out some code with JOIN command and some basic code, and u done. Believe me, anyone can make it :D . Good luck dude!
|
When im working on my php page today ill see if i can make u a quick input page based off chracter ID
|
I'd like to get my hands on this as well :D
|
I know php, and I know sql the problem is that I don't know l2 databases schema that's why I'm asking
|
i dont know the schema either, but its something like this:
(i'd add it to warehouse, dont think server will need to reboot then) query=select from warehouse where itemname = adena && user = $user if(query) update warehouse set amount = amount + $newamount where '' else insert into warehouse (user, item, amount) values ($user, adena, $newamount) something like this should be working i guess, but i'd have to look at sql tables to check it |
then server running adding exp and items to character not work, caching works, and changes in db dont affect on character until you dont stop server -> make changes -> start server
|
SQL-lin2world-...
User_data : check out the character ID User_item : in this table, there is a field of character ID, and a field of item ID ( Adena' ID is 57 ). Join these two tables, and put some query and blah, blah, blah :) Hope it will help... And 2 Riane , data og item in warehouse also in user_item ( in that table there is a field name warehouse , and his value is the number of the item in warehouse ) P/s : Sometimes i can add item and modify my data without restart my server. Dun know why :D |
if info cached - your changes to mssql database will be reverted
query must be something like this if exists (select * from user_item where char_id = @char_id and item_type = 57 and warehouse = 1) update user_item set amount = amount+1000000 where char_id = @char_id and item_type = 57 and warehouse = 1) else insert into user_item (char_id, item_type, amount, enchant, eroded, bless, ident, wished, warehouse) values (@char_id, 57, 1000000, 0, 0, 0, 0, 0, 1) |
so there isn't a way to enforce sql changes at all ?
|
the player gotta be logged off the server, then it should work too, shouldnt it?
(you could just kick the player out before the query ;P ) |
Quote:
|
Here is the php script for adding adena to a character
Code:
<? |
and here is the stored procedure which you should add in lin2_world
Code:
/******************************************** |
it would be great if anyone can find a way to enforce sql changes
|
U can use L2atl.
|
Can anyone post manual how can i use l2atl and for what this? Sorry for my dumb question. But in my server i write my own admin panel in PHP and all changes have effect if i reboot server... it is really not comfortable
|
https://postpacific.loc-online.com/f...pic.php?p=3520
Here's some info... |
| All times are GMT. The time now is 15:25. |