Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: AnnoZone Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

1

Freitag, 20. August 2004, 12:39

searching for script functions

Hi,

I'm searching how to check the amount of money a players own. I'd to like to make a script which would seems like this:
IF PLAYER "SpAlias" MONEY > amount
Is it possible and could you told me how to do please?

drkohler

Master of Editor

Beiträge: 1 578

Registrierungsdatum: 18. Juni 2003

  • Nachricht senden

2

Freitag, 20. August 2004, 13:14

RE: searching for script functions

Zitat

Original von manfried
Hi,

I'm searching how to check the amount of money a players owns. I'd to like to make a script which would seems like this:
IF PLAYER "SpAlias" MONEY > amount
Is it possible and could you tell me how to do it please?
This command does not exist. Script.txt lists all commands that are defined... there are no more commands "not yet discovered".

manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

3

Freitag, 20. August 2004, 13:22

There's no way to know how many money the player own? :( Well, whatever, i'll try do do without it, thanks for your answer

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »manfried« (20. August 2004, 13:23)


manfried

Ausguck

  • »manfried« ist der Autor dieses Themas

Beiträge: 71

Registrierungsdatum: 1. April 2004

  • Nachricht senden

4

Freitag, 20. August 2004, 13:57

Well, i juste see a big problem for one of my scenarios:
I'd like to cheat a city to get all the food she needs, so i made this script:

[OBJECT_DEFINE]
OBJECT_STADT "VENISE" 1

[SCRIPT_KERNEL]
IF PLAYER "HUMAN01" WARECOUNT "NAHRUNG" < 50 THEN
{
CHEAT("VENISE", "NAHRUNG", 100);
}

The problem is that my food stock is less that 20 but there's no food going in my stock, i should get 100, or at less more that 50 ! I put 1 for the city ID because it is build on the island first the first id and there's no more city on it. Can you see what's wrong please? If you need more informations tell me want you need and you'll get it

There's no INITBLOC because at this time i don't need it (i tryed to put one to see if it stopped the problem but it didn't)

drkohler

Master of Editor

Beiträge: 1 578

Registrierungsdatum: 18. Juni 2003

  • Nachricht senden

5

Freitag, 20. August 2004, 14:33

Zitat

Original von manfried
Well, i juste see a big problem for one of my scenarios:
I'd like to cheat a city to get all the food she needs, so i made this script:

[OBJECT_DEFINE]
OBJECT_STADT "VENISE" 1

[SCRIPT_KERNEL]
IF PLAYER "HUMAN01" WARECOUNT "NAHRUNG" < 50 THEN
{
CHEAT("VENISE", "NAHRUNG", 100);
}

The problem is that my food stock is less that 20 but there's no food going in my stock, i should get 100, or at less more that 50 ! I put 1 for the city ID because it is build on the island first the first id and there's no more city on it. Can you see what's wrong please? If you need more informations tell me want you need and you'll get it

There's no INITBLOC because at this time i don't need it (i tryed to put one to see if it stopped the problem but it didn't)
I don't quite understand what ou mean by
"because it is build on the island first the first id and there's no more city on it"
also, if that line actually worked, I don't know what happens if your warehouse capacity is less than 150 tons..

Maybe you try out:
OBJECT_STADT "VENISE1" 0 // the very first island in the list
OBJECT_STADT "VENISE2" 1 // the second island in the list
OBJECT_STADT "VENISE3" 2 etc // third island
and then test in the init_block
CHEAT("VENISE1", "SEILE", 20);
CHEAT("VENISE2", "HOLZKOHLE", 20);
CHEAT("VENISE3", "SEIDE", 20); etc
and then check what you actually have in your city after starting the game if you cant figure out the correct ID.

Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von »drkohler« (20. August 2004, 14:56)


annokrat

Schatzjäger

Beiträge: 4 772

Registrierungsdatum: 15. November 2003

  • Nachricht senden

6

Freitag, 20. August 2004, 18:39

manfried,

how many islands do HUMAN01 have? may be there is another city of HUMAN01 with plenty of food, or a ship containig food??
btw what version do you use? 1.04? or addon?

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

7

Freitag, 20. August 2004, 20:43

Thanks to both of you, i understand my problem now, i thought the city id was the same that the island id, but seeing what drkohler wrote i think that the city on the island number 1 has a id = 0. Changing with OBJECT_STADT "VENISE" 0 the script works.
Thanks to you

Bomi

Meister der Kleintools

Beiträge: 3 175

Registrierungsdatum: 2. Mai 2003

  • Nachricht senden

8

Samstag, 21. August 2004, 02:36

Zitat

Original von manfried
i thought the city id was the same that the island id, but seeing what drkohler wrote i think that the city on the island number 1 has a id = 0. Changing with OBJECT_STADT "VENISE" 0 the script works.

When it comes to islands IDs best is to have a look at the island overview in the main window - it has a column "New ID" (the value is mostly the same than in "Orig ID") - this is what you have to use in your script...
  ATH, Bomi

Contests: 2008 BEC BOC 1602 | 2007 BEC BOC | 2006 BEC BOC | 2005 BEC BOC | 2004 BEC

ANNOTunesANNOToolsMetropolaris, Georgolaris1602-Zeugs1503-SzenarienDieter's 1503-Editor