SweetyBerriiz Posted August 19, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 18 Reputation: 0 Joined: 07/22/13 Last Seen: October 31, 2013 Share Posted August 19, 2013 (edited) i want to count item in my server like countitem npc script Edited August 19, 2013 by SweetyBerriiz Quote Link to comment Share on other sites More sharing options...
Emistry Posted August 20, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: Yesterday at 12:58 PM Share Posted August 20, 2013 it should be like this...http://upaste.me/raw/54d5fb and..you are unable to do a realtime count since saving data into database required some time or event to trigger it. 1 Quote Link to comment Share on other sites More sharing options...
Patskie Posted August 20, 2013 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 6 hours ago Share Posted August 20, 2013 Only inventory? or also includes items in storage, mail, auction and so on. Quote Link to comment Share on other sites More sharing options...
SweetyBerriiz Posted August 20, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 18 Reputation: 0 Joined: 07/22/13 Last Seen: October 31, 2013 Author Share Posted August 20, 2013 Only inventory? or also includes items in storage, mail, auction and so on. yes includes all Quote Link to comment Share on other sites More sharing options...
x13th Posted August 20, 2013 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 206 Reputation: 14 Joined: 11/20/11 Last Seen: April 9, 2024 Share Posted August 20, 2013 (edited) You need SQL statement. prontera,157,95,4 script ahue 602,{ query_sql ("SELECT SUM(nameid) FROM `auction` WHERE `nameid` = '569'", @auction); query_sql ("SELECT SUM(amount) FROM `inventory` WHERE `nameid` = '569'", @inventory); query_sql ("SELECT SUM(amount) FROM `storage` WHERE `nameid` = '569'", @storage); query_sql ("SELECT SUM(amount) FROM `cart_inventory` WHERE `nameid` = '569'", @cartinventory); query_sql ("SELECT SUM(amount) FROM `mail` WHERE `nameid` = '569'", @mail); set sum, @inventory + @storage + @cartinventory + @mail + @auction; mes sum; close; } Edited August 20, 2013 by x13th Quote Link to comment Share on other sites More sharing options...
SweetyBerriiz Posted August 20, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 18 Reputation: 0 Joined: 07/22/13 Last Seen: October 31, 2013 Author Share Posted August 20, 2013 i write like this already but it's not realtime you can try 1. @item 4001 5ea 2. relogin 3. click your npc, npc will return 5 to you 4. @item 4001 5ea again 5. click your npc , npc will return 5 same before it's not realtime, npc must return 10 not 5 when i @item again and not relogin Quote Link to comment Share on other sites More sharing options...
x13th Posted August 20, 2013 Group: Members Topic Count: 55 Topics Per Day: 0.01 Content Count: 206 Reputation: 14 Joined: 11/20/11 Last Seen: April 9, 2024 Share Posted August 20, 2013 because your account is not yet save in your db unless you log out or wait for a minute. Quote Link to comment Share on other sites More sharing options...
SweetyBerriiz Posted August 20, 2013 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 18 Reputation: 0 Joined: 07/22/13 Last Seen: October 31, 2013 Author Share Posted August 20, 2013 ahh , i already know why not recommend to make server function like this because it's must query item every table if item have a lot server will work heavily Quote Link to comment Share on other sites More sharing options...
Question
SweetyBerriiz
i want to count item in my server like countitem npc script
Edited by SweetyBerriizLink to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.