Jump to content

Question

5 answers to this question

Recommended Posts

Posted

Test in SQL

if(!countitem(7420))end;
query_sql("SELECT `amount`,`id` FROM `storage` WHERE (`account_id` = "+getcharid(3)+"&&`nameid`=7420)",.@a,.@id);
if(.@a==0)
 query_sql "INSERT `storage` VALUES ( NULL,"+getcharid(3)+",7420,"+countitem(7420)+",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)";
else
 query_sql "UPDATE `storage` set amount = "+(.@a+countitem(7420))+" where id = "+.@id;
delitem 7420,countitem(7420);

Posted

Goddameit, does that work without relogging? From what I've tested in the past, none of my SQL queries on active characters are applied until I log off.

Posted (edited)

Goddameit, does that work without relogging? From what I've tested in the past, none of my SQL queries on active characters are applied until I log off.

yes, it's need re-login so you can't take back your skull before you re-login

there is other ways can do it, but I don't like it

here is how that works:

first record all you have (getinventorylist;)

and delete all item except skull

now use '@storeall' to storage all you item, cause you only have skull now, target complete

after all, take back all your others item (getitem) and clean variable.

but there is a problem on cart (but you can set that skull can't be put into cart).

Edited by goddameit

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...