Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Scripts not working

10 years ago

In my game I have it that the player trains their skills at one point. I had it so the skills take a certain amount of time to level and then gave them a certain amount of time to train. This is the script I have on a certain link

IF %TRAINTIME < 9 THEN
BEGIN
%PRS := %PER + 1
%TRAINTIME := %TRAINTIME + 3
END
ELSE 
BEGIN
%PRS := %PER + 1
$DEST := @P27
END

Traintime is 0 to 12, the player has 12 hours to train (from noon to midnight). PRS takes three hours to train. No matter what i do, PRS won't increase past 1 (the variable is 0 to 2). Can someone please tell me what's going wrong?

also, the training starts on a separate page whose script is just

%PRS := %PRS + 1
%TRAINTIME := %TRAINTIME + 3

but I still can only get PRS to 1 and not 2 even if I train another skill on the first page

Scripts not working

10 years ago

So they have 8 hours to train 8 skills? 

Scripts not working

10 years ago

I solved the problem. It was just my stupidity. Thanks anyway

Scripts not working

10 years ago

Okay. So make it like this:

%HOUR := 12 < Put this in the link before the four links.

Then make 4 links titled as:

ATK < In this link put this script: %ATK := %ATK + 1 %HOUR := %HOUR - 1 

IF %HOUR = 0 THEN

BEGIN

$DEST := @P2

END

DEF< In this link put this script: %DEF := %DEF + 1 %HOUR := %HOUR - 1

IF %HOUR = 0 THEN

BEGIN

$DEST := @P2

END

PRS < In this link put this script: %PRS := %PRS + 1 %HOUR := %HOUR - 1

IF %HOUR = 0 THEN

BEGIN

$DEST := @P2

END

TEQ < In this link put this script: %TEQ := %TEQ + 1 %HOUR := %HOUR - 1

IF %HOUR = 0 THEN

BEGIN

$DEST := @P2

END

That brings you to the current page. So set the destination of those four links to the current page.