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
Minimal Lumberjacking
Author Message
Rostok
Apprentice
*

Posts: 31
Likes Given: 6
Likes Received: 2 in 1 posts
Joined: Mar 2016
Reputation: 0



Post: #11
RE: Minimal Lumberjacking
(03-03-2017 02:17 AM)darksun84 Wrote:  After we change the amount, this happens:

How did you change it? In which trigger?

I have sources(scp) of old server(Sphere55) and there <ARGO.AMOUNT> *=2 in trigger @ResourceFound is working fine.

But with Sphere 56d it fails =((
03-03-2017 03:14 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #12
RE: Minimal Lumberjacking
In the @ResourceFound trigger,

Code:
ON=@ResourceFound
serv.log ResourceFound Trigger old amount: <argo.amount>
argo.amount += 5
serv.log ResourceFound Trigger new amount: <argo.amount>

19:02:(sphere_region.scp,130)ResourceFound Trigger old amount: 1
19:02:(sphere_region.scp,132)ResourceFound Trigger new amount: 6

Anyway the point is that the worldgem bit aren't actually using the amount property.

The amount displayed is different.

EDIT:
Did some test, <amount> must be used instead of <argo.amount> and the correct trigger is @ResourceTest

Code:
ON=@ResourceTest
serv.log ResourceTest Old value <amount>
amount += 5
serv.log ResourceTest New value <amount>
19:20:(sphere_region.scp,130)ResourceTest Old value 15
19:20:(sphere_region.scp,132)ResourceTest New value 20
(This post was last modified: 03-03-2017 04:23 AM by darksun84.)
03-03-2017 04:05 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes darksun84's post
Rostok
Apprentice
*

Posts: 31
Likes Given: 6
Likes Received: 2 in 1 posts
Joined: Mar 2016
Reputation: 0



Post: #13
RE: Minimal Lumberjacking
Are you sure about @ResourceTest ?
Thank you, it works with @Resourcetest, but :
I have many RegionResources at point, so every resource-test(creaetion) some function will be executed for every regionresource...

I really don't want to test for luck-chance some resource, which in 90% cases will not be created at all...


I believe there is some another way to change amount value after worldgembit creation.

ON=@RegionResourceFound (Char)
<ARGO.AMOUNT> failed , <AMOUNT> failed

ON=@ResourceTest
SRC.SYSMESSAGE You got <AMOUNT> logs before luck!
AMOUNT = <EVAL <AMOUNT> + <SRC.GETLUCK>>

As i can see - <AMOUNT> in this case changes AMOUNT of all regionresources with this type . So next time i chop willow, there will be raised amount, not default...
(This post was last modified: 03-03-2017 07:17 AM by Rostok.)
03-03-2017 06:54 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #14
RE: Minimal Lumberjacking
Yes you are right, i think there is no way actually to override the amount without messing with the global amount of the regionresource.

What about just adding the bonus resource with a newloot/newitem directly to the player.
03-03-2017 07:46 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes darksun84's post
Rostok
Apprentice
*

Posts: 31
Likes Given: 6
Likes Received: 2 in 1 posts
Joined: Mar 2016
Reputation: 0



Post: #15
RE: Minimal Lumberjacking
(03-03-2017 07:46 AM)darksun84 Wrote:  Yes you are right, i think there is no way actually to override the amount without messing with the global amount of the regionresource.

How do you think - is it a bug? Because in Sphere 55i there was a way to change this amount normally in @ResourceFound - <ARGO.AMOUNT> ...

(03-03-2017 07:46 AM)darksun84 Wrote:  What about just adding the bonus resource with a newloot/newitem directly to the player.

If no chance to do that another way, then i will choose this solution. I guess i can do that with SERV.NEW <ARGO.REAP> / NEW.AMOUNT = RANDOM(luck) or smth like that...

Thank You very much!
03-03-2017 06:10 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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