|
Thread: [erm] briber script | |
|
anh1984
Tavern Dweller
|
posted November 25, 2003 12:46 AM |
|
|
[erm] briber script
Hi!
I have finished my 1st script Task, which it do:
1) "briber-man" in the cave (OB63/60), who can claim to us mines for fee
2) he takes only the last offer but
3) if the offer will be in the last day, he takes gold and do nothing
4) the last player, who did deal, has claimed garnison near mines (it is known to everybody, who is it)
It need some improvments:
1) naming of the OB63/60 and one garnison
2) AI improvments...
maybe someone...
Quote:
[code]
ZVSE;
ERMS_ScriptName=briber
ERMS_ScriptAuthor=anh1984
ERMS_ScriptVersion=1.0.0
ERMS_ScriptDate=03-11-25
ERMS_ScriptERMVersion=2.70
ERMS_ScriptLanguage=Polish or polski (native) [with english translations]
ERMS_ScriptUsedVariables=v2300;v2301;v2302
ERMS_ScriptUsedFlags=232;233
ERMS_ScriptUsedTimers=23;24
ERMS_ScriptUsedFunctions=2300
_WARNING_#1=IMPORTANT! This file is not in a plain text format. NEVER use any editor except ERM_S for making any kind of changes!
ERMS_PoweredBy=ERM Scripter v. 2003.5.19.2212
; initialization of variables
!#VRv2300:S-1;
!#VRv2301:S-1;
!#FU2300999; ;[FIXME] why it doesn't work?
; timers
!#TM23:S8/999/7/255; ; on first day claim to player
!#TM24:S7/999/7/255; ; on last day save last player
; on visit briber's cave
!?OB63/60;
!!HE-1?v2300; ; save current player in v2300
!!FU23002/v2300; ; show him all mines
!!FU230010; ; turn on flag 231 if current player is owner
; if the human player and isn't the owner ask for deal
!!IF&1000/-231:Q230/6/10000/2^{Przekupny Straznik Nautis}
Przekupny Straznik Nautis moze przejac dla Ciebie pokazny zestaw surowcowni pierwszego dnia, o ile dasz mu lapowke (jedyne {10000 zlota}).
Zgadzasz sie na to?^;
;;; in english: {Nautis the Briberly Guardian}
;;; Nautis the Briberly Guardian can claim to you big pack of resources-makers on the first day - if you bribe him (only {10000 gold}).
;;; Do you agree?
; if the human player and is the owner tell him, that all is fine
!!IF&1000/231:M^{Przekupny Straznik Nautis}
Szefie, bez nerwow, postaram sie wyrobic w terminie^;
;;; in english: {Nautis the Briberly Guardian}
;;; Boss, easy, all is fine
!!OW:Rv2300/6/?v2302; ; save gold amount of the current player in v2302
; if the human player isn't the owner and he said yes,
; and he have not enought gold tell him he is poor
!!IF&1000/-231/230/v2302<10000:M^Nie stac Cie na lapowke^;
;;; in english: You are poor for bribing Nautis
; if the human player isn't the owner and he said yes,
; and he have enought gold -- take 10000 gold and give him ownership
!!OW&1000/-231/230/v2302>=10000:Rv2300/6/d-10000;
!!FU2300&1000/-231/230/v2302>=100001/v2300;
; if the ai player isn't the owner and have 5000+ gold
; -- take 2000 gold and give him ownership
!!OW&-1000/-231/v2302>=5000:Rv2300/6/d-2000;
!!FU2300&-1000/-231/v2302>=50001/v2300;
; saving the owner at the begining of day 7
!?TM24;
!!VRv2301&-232:Sv2300; ; save current owner in v2301 if flag 232 is off
!!IF:V232/1; ; set flag 232 on (we are ready to claim)
!!IF:V233/0; ; set flag 233 off (don't say everyone, that Nautis failed)
; claiming the resources-makers
!?TM23;
; if old owner is actual one and we can claim -> we do it
!!FU2300&v2300=v2301/2320/v2300;
; if old owner isn't the acutal one and we can claim
; -> we do it (but for player "-1")
; -> we set flag 233 on (say everyone, that Nautis failed)
!!FU2300&v2300<>v2301/2320/-1;
!!IF&v2300<>v2301/232:V233/1;
; if Nautis failed and we can say about it -> we do it
!!IF&233:M^Z powodu zamieszania, przekupny Nautis nie robi nic^;
;;; in english: Nautis the Briberly Guardian has failed and he do nothing
!!VRv2300&232:S-1; ; prepare for next bribing
!!VRv2301:S-1; ; -''-
!!FU2300&2321/-1; ; set garnison of Nautis to nobody
!!IF:V232/0; ; we have just claimed -> we wait for next possibility
;usefull function with subfunctions
;### BIG FAT WARNING: adjust lines with x/y/l to YOUR settings
;### note: instead of "MN" there can be other objects
!?FU2300;
; x1=0 -> claim resources-makers to x2 - the new owner
!!MN16/27/0&x1=0x2;
!!MN16/26/0&x1=0x2;
!!MN18/25/0&x1=0x2;
!!MN20/25/0&x1=0x2;
!!MN22/26/0&x1=0x2;
!!MN22/27/0&x1=0x2;
!!MN19/27/0&x1=0x2;
; x1=1 -> claim garnison of Nautis to x2 - the new owner
!!GR17/24/0&x1=1x2;
; x1=2 -> show the garnison and the resource-makers to x2
!!UN&x1=2:S16/27/0/x2/2;
!!UN&x1=2:S16/26/0/x2/2;
!!UN&x1=2:S18/25/0/x2/2;
!!UN&x1=2:S20/25/0/x2/2;
!!UN&x1=2:S22/26/0/x2/2;
!!UN&x1=2:S22/27/0/x2/2;
!!UN&x1=2:S19/27/0/x2/2;
!!UN&x1=2:S17/24/0/x2/2;
; x1=10 -> turn on flag 231 if current player is owner
!!GR17/24/0&x1=10?y1;
!!IF&x1=10:V231/0;
!!IF&x1=10/v2300=y1:V231/1;
;### x1=999 -> initialization... why it doesn't work?
!!VRz-1&x1=999:S^Ostatni lapowkodawca^;
;;; in english: the last bribe-giver;
!!OB17/24/0&x1=999:H-1;
!!VRz-1&x1=999:S^Grota przekupnego straznika Nautisa^;
;;; in english: cave of the Nautis the briberly guardian
!!OB63/60&x1=999:H-1;
[/code]
greetings
-a
|
|
fnord
Promising
Famous Hero
|
posted November 25, 2003 01:18 AM |
|
|
[quote
!#FU2300999; ;[FIXME] why it doesn't work?
If you call a function from an instruction (!#), the function code MUST come before the function call.
If you call a function from a receiver (!!), the function code can come anywhere.
____________
|
|
anh1984
Tavern Dweller
|
posted November 25, 2003 10:44 AM |
|
|
Quote:
Quote:
!#FU2300999; ;[FIXME] why it doesn't work?
If you call a function from an instruction (!#), the function code MUST come before the function call.
If you call a function from a receiver (!!), the function code can come anywhere.
I remember, i read this My memory is very good... 'cos it is short
greetings
-a
p.s. everybody can feel free to use and change the script without any fee
|
|
anh1984
Tavern Dweller
|
posted November 25, 2003 12:51 PM |
|
|
Quote: Hi!
I have finished my 1st script
--cut--
Does anyone know, where can i publish my test map?
greetings
-a
|
|
|
|