The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom function to get MORE1L / MORE1H from MORE1
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #1
Custom function to get MORE1L / MORE1H from MORE1
As anyone know, a single MORE1 can be distingued in 2 parts: MORE1L and MORE1H
I have an item that store "MORE1" tags from many itens, and I need to separate these tags into MORE1L and MORE1H. How I can do this using custom formulas?

its something like this:
Code:
[ITEMDEF i_lol]
NAME=lol
TAG.ITEM1.Durability="1741087418" //this is the more1 stored on a tag
TAG.ITEM2.Durability="1741087418"
TAG.ITEM3.Durability="1741087418"
TAG.ITEM4.Durability="1741087418"
I need separate these tags into L / H like the MORE1, how I can do this?

PS: obviously the easy way is store it directly on the tag like TAG.ITEM1.Durability=<MORE1>,<MORE1L>,<MORE1H>
but it doesnt make sense as I can store a simple and shorter tag to calculate the value later only when its necessary. For 20.000+ items with more than 100.000 tags this thing will make a big difference
11-15-2012 05:26 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: Custom function to get MORE1L / MORE1H from MORE1
Since TAGs are strings, it will end up being just as complicated and I doubt there is any computational "savings" to be had by storing the two numeric values as one string... I would use TAG.ItemX.Durability=LOW,HIGH and then distinctly access the two values in the TAG using STREAT and STRARG, and access the respective values on the item using MORE1L and MORE1H. There is probably no value in storing the combined value in the TAG (though not knowing your code, I could be wrong)
11-15-2012 05:48 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)