Jump to content
  • 0

Store Skull


PapaZola

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

hello

can i have a script auto storeall skull[7420] when player enter map payg_cas04??

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

There's no script command for storing specific items into the storage.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

ok thx for the info

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

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);

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...