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-nmm6 (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-nmm6 (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-nmm6 (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
HELP WITH sphere.ini
Author Message
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #11
RE: HELP WITH sphere.ini
(05-26-2014 04:56 AM)kn4tseb Wrote:  Xun, looking at the new variable list posted by Khaos i see "DURABILITY <INT>% DURABILITY INCREASE" included, but it seems not to be hardcoded yet...
so, if i had the actual durability as a "HitPoints,MaxHitPoints" how could i code something like "extra Durability in porcent"... so if i set on the Create Trigger a value like: Durability 100
i get the actual Maxpoints + extra durability%

Example:
ON=@Create
HITPOINTS={100}

if "Durability = 50
hitpoints would be 100 + (100*50)/100) and that would be 100 hitpoints plus a 50% of its maxhitpoints

so tooltips should be showing when you click at the item, the "Extradurability" that would be 50 in this case and the maxhitpoints shall make the sum of both variables...

Puedes ayudarme con ésto?
If I did understand, the 'durability' property is the bonus in durability (hitpoints in that case)

Example:
If you have something with hitpoints 100 and durability 50, when it is created, its hitpoints will be 150.

Tooltips are showed only if you mouse over the item and you have the tooltips things enabled.
It will not show if you simple click on item. You can use a trigger to do that.

Code:
ON=@ItemClick
ACT.MESSAGE <ACT.HITS>/<ACT.MAXHITS>

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 05-26-2014 09:54 AM by Extreme.)
05-26-2014 06:11 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #12
RE: HELP WITH sphere.ini
yes but this bonus should be in porcentages, so, if you have 50 of hitpoints and 50 of durability it would be the 50% of 50 and thats 25, so 50 + 25 = 75, thats what i understood from the variables.

but in any case i will do as you say and change it depending on my needs, thank you so very much.
05-26-2014 06:25 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #13
RE: HELP WITH sphere.ini
Yeah, you're right BUT you have to create something to apply the durability bonus.

If you do nothing, it will show only hitpoints (value) and durability (%).

Create and event for items and on @create, check if have durability property and increase the hitpoints.
Something like:

PHP Code:
ON=@CREATE
IF <DURABILITY>
 
MAXHITS += <EVAL (<DURABILITY>*<MAXHITS>)/100>
 
HITS <MAXHITS>
ENDIF 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
(This post was last modified: 05-26-2014 09:55 AM by Extreme.)
05-26-2014 06:31 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #14
RE: HELP WITH sphere.ini
Will check if <DURABILITY> property exists Wink ty
05-26-2014 07:47 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #15
RE: HELP WITH sphere.ini
Yes, there is.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
05-26-2014 08:41 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #16
RE: HELP WITH sphere.ini
Worked perfectly, i just need one more thing, i need to add a clicloc, would you help me? this is what i have
SRC.ADDCLILOC 1151780,<Durability> //ExtraDurability "dunnowhatvaluetoset" %

Thanks ;>
05-27-2014 02:57 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #17
RE: HELP WITH sphere.ini
(05-27-2014 02:57 AM)kn4tseb Wrote:  Worked perfectly, i just need one more thing, i need to add a clicloc, would you help me? this is what i have
SRC.ADDCLILOC 1151780,<Durability> //ExtraDurability "dunnowhatvaluetoset" %

Thanks ;>
Try this one:
SRC.ADDCLILOC 1060410,<Durability>

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
05-27-2014 04:59 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #18
RE: HELP WITH sphere.ini
Perfect, thank you!
05-27-2014 05:53 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #19
RE: HELP WITH sphere.ini
You're welcome!

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
05-27-2014 06:45 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #20
RE: HELP WITH sphere.ini
Last question Big Grin ... if i dont want to set the code for each itemdef and i want it to check for all at once, similar to an event... how can i do it?
05-27-2014 07:11 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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