Sie sind nicht angemeldet.

manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

1

Freitag, 3. Dezember 2004, 21:34

script problem (i don't know where)

Hi,

No that the idea as been used by someone else i won't keep it secret (i thought it was my best script idea so i didn't want to talk it to anyone :traurig:). So i have a problem with this script:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
INITBLOCK() 
{
QUESTLOG_SHOW( "HUMAN01", "montreal_01", TRUE );
QUESTLOG_SHOW( "HUMAN01", "montreal_02", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_03", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_04", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_05", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_06", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_07", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_08", FALSE );
}
SET OBJ1 = FALSE;
SET OBJ2 = FALSE;
SET OBJ3 = FALSE;
SET OBJ4 = FALSE;
SET OBJ5 = FALSE;
SET OBJ6 = FALSE;
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 4999 && OBJ1 == FALSE THEN
{
OBJ1 = TRUE;
MONEY_ADD("HUMAN01", 50000);
QUESTLOG_SHOW( "HUMAN01", "montreal_02", TRUE );
QUESTLOG_DRAW();
}
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 24999 && OBJ2 == FALSE THEN
{
MONEY_ADD("HUMAN01", 1000000);
OBJ2 = TRUE;
QUESTLOG_SHOW( "HUMAN01", "montreal_03", TRUE);
QUESTLOG_DRAW();
}
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 49999 && OBJ3 == FALSE THEN
{
OBJ3 = TRUE;
QUESTLOG_SHOW( "HUMAN01", "montreal_04", TRUE);
QUESTLOG_DRAW();
}
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 74999 && OBJ4 == FALSE THEN
{
OBJ4 = TRUE;
QUESTLOG_SHOW( "HUMAN01", "montreal_05", TRUE);
QUESTLOG_DRAW();
}
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 99999 && OBJ5 == FALSE THEN
{
OBJ5 = TRUE;
QUESTLOG_SHOW( "HUMAN01", "montreal_06", TRUE);
QUESTLOG_DRAW();
}
IF PLAYER "HUMAN01" INHABITANT_COUNT "ADEL" > 24999 && OBJ6 == FALSE THEN
{
OBJ6 = TRUE;
QUESTLOG_SHOW( "HUMAN01", "montreal_07", TRUE);
QUESTLOG_DRAW();
}
IF OBJ3 == TRUE THEN
{
CHEAT("MONTREAL", "HOLZ", 1);
}
IF OBJ4 == TRUE THEN
{
CHEAT("MONTREAL", "ZIEGEL", 1);
}
IF OBJ5 == TRUE THEN
{
CHEAT("MONTREAL", "WERKZEUG", 1);
}
IF OBJ6 == TRUE THEN
{
CHEAT("MONTREAL", "NAHRUNG", 1);
}


The problem is that the scripts with OBJ3, OBJ4, OBJ5, OB6 don't work. The problem seemed to be a part of these variables because if i use this script it works:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
INITBLOCK() 
{
QUESTLOG_SHOW( "HUMAN01", "montreal_01", TRUE );
QUESTLOG_SHOW( "HUMAN01", "montreal_02", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_03", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_04", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_05", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_06", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_07", FALSE );
QUESTLOG_SHOW( "HUMAN01", "montreal_08", FALSE );
}
SET OBJ1 = FALSE;
SET OBJ2 = FALSE;
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 4999 && OBJ1 == FALSE THEN
{
OBJ1 = TRUE;
MONEY_ADD("HUMAN01", 50000);
QUESTLOG_SHOW( "HUMAN01", "montreal_02", TRUE );
QUESTLOG_DRAW();
}
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 24999 && OBJ2 == FALSE THEN
{
MONEY_ADD("HUMAN01", 1000000);
OBJ2 = TRUE;
QUESTLOG_SHOW( "HUMAN01", "montreal_03", TRUE);
QUESTLOG_DRAW();
}
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 49999 THEN
{
CHEAT("MONTREAL", "HOLZ", 1);
QUESTLOG_SHOW( "HUMAN01", "montreal_04", TRUE);
}
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 74999 THEN
{
CHEAT("MONTREAL", "ZIEGEL", 1);
QUESTLOG_SHOW( "HUMAN01", "montreal_05", TRUE);
}
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 99999 THEN
{
CHEAT("MONTREAL", "WERKZEUG", 1);
QUESTLOG_SHOW( "HUMAN01", "montreal_06", TRUE);
}
IF PLAYER "HUMAN01" INHABITANT_COUNT "ADEL" > 24999 THEN
{
CHEAT("MONTREAL", "NAHRUNG", 1);
QUESTLOG_SHOW( "HUMAN01", "montreal_07", TRUE);
}


strange no?
I also tried to substitude the lines

Quellcode

1
IF OBJx == TRUE THEN

by

Quellcode

1
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > x THEN

but it do not work too... :scratch:

I know it's a big script so it's not easy to understand at the first sight, but please help me. Actually i use the second script to do my test (to be sure that there are no problem with the fact that i use values > 32767) but it's not what i would prefer because player don't understand why their wood stock don't decrease anymore :rolleyes:

Thanks for help

drkohler

Master of Editor

Beiträge: 1 578

Registrierungsdatum: 18. Juni 2003

  • Nachricht senden

2

Freitag, 3. Dezember 2004, 21:51

RE: script problem (i don't know where)

Zitat

Original von manfried
Hi,

No that the idea as been used by someone else i won't keep it secret (i thought it was my best script idea so i didn't want to talk it to anyone :traurig:). So i have a problem with this script:

Quellcode

1
2
3
4
5
6
7
8
SET OBJ3 = FALSE;
SET OBJ4 = FALSE;
SET OBJ5 = FALSE;
SET OBJ6 = FALSE;
IF OBJ3 == TRUE THEN
{
CHEAT("MONTREAL", "HOLZ", 1);
}

The problem is that the scripts with OBJ3, OBJ4, OBJ5, OB6 don't work. The problem seemed to be a part of these variables because if i use this script it works:


Thanks for help
Think about what is happening once OBJ3 becomes TRUE..

You are forever cheating wood into Montreal ! The script hangs because the condition IF OBJ3 ==TRUE is forever true (I'd suppose the game hangs, but apparently something recognizes the problem and does not execute the IF if I understand you correctly)..

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »drkohler« (3. Dezember 2004, 21:52)


manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

3

Freitag, 3. Dezember 2004, 21:57

Yes, i'm agree with this and i thought about it, and that's why i substituted

IF OBJx == TRUE THEN
by
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > x THEN

This instruction is not forever true, but the problem is still present :scratch:
That's why I also supposed that the game doesn't what to execute 2 times the same IF instruction, but i think at this point it makes a lot of supposition, and this last one seems strange no?

drkohler

Master of Editor

Beiträge: 1 578

Registrierungsdatum: 18. Juni 2003

  • Nachricht senden

4

Freitag, 3. Dezember 2004, 22:33

Zitat

Original von manfried
Yes, i'm agree with this and i thought about it, and that's why i substituted

IF OBJx == TRUE THEN
by
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > x THEN

This instruction is not forever true, but the problem is still present :scratch:
That's why I also supposed that the game doesn't what to execute 2 times the same IF instruction, but i think at this point it makes a lot of supposition, and this last one seems strange no?
Huh? This IF is equally true forever, unless you immediately destroy some houses once you achieve x inhabitants...

manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

5

Freitag, 3. Dezember 2004, 22:35

but in these conditions why would this be a good script? (because this one works)

Quellcode

1
2
3
4
5
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 49999 THEN
{
CHEAT("MONTREAL", "HOLZ", 1);
QUESTLOG_SHOW( "HUMAN01", "montreal_04", TRUE);
}

drkohler

Master of Editor

Beiträge: 1 578

Registrierungsdatum: 18. Juni 2003

  • Nachricht senden

6

Freitag, 3. Dezember 2004, 22:50

Zitat

Original von manfried
but in these conditions why would this be a good script? (because this one works)

Quellcode

1
2
3
4
5
IF PLAYER "HUMAN01" INHABITANT_AMOUNT > 49999 THEN
{
CHEAT("MONTREAL", "HOLZ", 1);
QUESTLOG_SHOW( "HUMAN01", "montreal_04", TRUE);
}
It works in what way? I've never intentionally created a "wrong" script, so I don't really know what Anno does with that. I'd guess you'd get your city filled with wood with this kind of construct in no time..

manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

7

Freitag, 3. Dezember 2004, 22:54

[quoteI'd guess you'd get your city filled with wood with this kind of construct in no time..[/quote]

Well, that's exactly what i want to do, full and unlimited stock of wood, tools and stone as a reward for the player when he reached a special number of inhabitants. A can assure you that it works the stock of these ressources are full, and the game doesn't crash or slow down.

annokrat

Schatzjäger

Beiträge: 4 772

Registrierungsdatum: 15. November 2003

  • Nachricht senden

8

Samstag, 4. Dezember 2004, 14:32

did you try to cheat one time 1000 t into stock? maybe 1503 will fill up stocks to max. of capacity without crashing :D
to keep stock up use a script like this:
if less than 100 t in stock cheat 200t into stock.

annokrat
  anno 1503, das beste anno aller zeiten.
anno 1701, das anno für ewige anfänger.

manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

9

Samstag, 4. Dezember 2004, 18:04

i confirm that the game can fill up the stock to max without crashing. My problem is to understand why one script works and the other doesn't work, and thoses script are both fulling up the stocks