|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 07, 2021 08:46 AM |
|
|
I know we did this before but I can't find an example that isn't mixed with a ton of code I still can't follow trough. Please, make a script giving something/anything to a visiting hero, with a timer that resets everyday and uses the window vars.
____________
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 07, 2021 09:45 AM |
|
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 07, 2021 10:02 AM |
|
|
Salamandre said: What is window var? You mean hero variables, (w1-w200)?
Yes, that's what I am not getting to work. w vars. Couldn't remember the name.
Ops, is for the timer to reset everyday for every hero, not to work once a day.
____________
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 07, 2021 10:21 AM |
|
|
ZVSE
; object giving a purse of gold to every hero visiting, but only once a day for each hero
!#TM99:S1/999/1/255; runs each day for each player
!?TM99&1000;
!!DO12345/0/155/1:P; loop all heroes
!?FU12345;
!!IF:Wx16; initiate hero vars
!!VRw199:S0; reset w199
!?OBx/y/z&1000;
!!HE-1:B0/?z2; get hero name
!!IF:W-1; initiate hero variables
!!IF&w199>0:M^You got your purse for today, don't be greedy^;
!!FU&w199>0:E; exit if already got the purse
!!IF:Q1/8/115/1^Hello %Z2, I have a gift for you, come back tomorrow for another one^;
!!HE-1:A115; give artifact
!!VRw199:S1; set w 199 to 1 so this hero can't visit again until tomorrow
____________
Era II mods and utilities
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 07, 2021 10:47 AM |
|
|
Thanks, it's perfect.
____________
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 09, 2021 06:51 AM |
|
|
The "script 58 - week of monsters" has a terrible bug I already reported here but it's even worst then I thought, cause an addiction it looks for creatures present in some player's army.
It doesn't store the actual parameters of the selected creature (that someone has in his army), it restores the original ones. So, if you've been enhancing a creature trough Emerald Towers all those changes are gone.
I thought I knew how to fix this but the script is confusing and messes with a lot of global vars, so even if succeed I won't dare to publish the fix...
____________
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 09, 2021 09:40 AM |
|
|
I don't think that is hard to fix, you need a SN:W var to flag each creature being improved in the emerald tower, then ignore this creature in week of monsters. Do you use custom scripts for tower and week of monsters or regular ones?
____________
Era II mods and utilities
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 09, 2021 09:43 AM |
|
|
"Week of monsters" is still regular, the Emerald Tower I customized it to work every week.
If someone credited does that, there is a test in the Emerald Tower that stops being useful. It tests is you are trying to improve the creature of the week...
____________
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 09, 2021 10:04 AM |
|
|
I looked at, it isn't a quick fix, flagging all the instances in week of the monsters, compare them with the tower pick then test if no crap happens would require several hours.
____________
Era II mods and utilities
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 09, 2021 10:10 AM |
|
|
Why not store the values of the creature in W vars and restore after the week is over? This was my initial idea and I think it would solve the problem. But to restore it without problems you need to be able to follow the script and check if nothing is missing and I'm still too rusty not to screw that up... (from experience)
____________
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 09, 2021 10:15 AM |
|
|
Week of the monster script doesn't have one line where creature stats are modified, it parses them through 250 lines and you have to flag them all. This is what is tedious, maybe someone else has a brighter idea, try asking Rerry or Bersy. Russian forums for final solution.
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 11, 2021 02:14 AM |
|
|
How does one check if players choice is a certain town? I thought it was on !!OW but if it is I don't get what to use.
Sal: If I mess with the alignment of towns AI starts with, will that affect BAI creature growth?
____________
|
|
fred79

      
Disgraceful
Undefeatable Hero
|
posted November 11, 2021 03:10 AM |
|
|
hey sal, have one small issue:

not sure why this issue exists, the part of the script you last added doesn't have "ARENA" in it...
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 11, 2021 06:26 AM |
|
|
Can we make an hero always start with a certain artifact the first time he is hired? (in the case the Orb of the Firmament)
____________
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 11, 2021 10:13 AM |
|
|
fred, replace:
!!VRz941:S^Nest^;
!!OB1&y1<>18:Hz940;
!!OB1&y1=18:Hz941;
With
!!VRz942:S^Nest^;
!!OB1&y1<>18:Hz940;
!!OB1&y1=18:Hz942;
I forgot z941 was assigned to utopias.
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 11, 2021 10:42 AM |
|
|
bloodsucker said: Can we make an hero always start with a certain artifact the first time he is hired? (in the case the Orb of the Firmament)
Instructions? (!#HEx:A...)
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 11, 2021 11:08 AM |
|
|
So, I can give an artifact to an hero in the heroes poll, at the start of the game, is that it? I thought I couldn't do that but now that you mention it, I managed to give them to an hero in a prison and that one isn't owned either.
Can you answer the previous one, please?
____________
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 11, 2021 12:45 PM |
|
|
No, because I don't understand the question. Player town choice is always made in pregame actions, where erm doesn't work.
|
|
bloodsucker 

 
     
Legendary Hero
|
posted November 11, 2021 01:28 PM |
|
|
So, let me explain. Mod is mostly about Castle but I want to make some changes to other towns too, namely auto improve creatures in general and one for town in particular (let's say it's the Fierce Thunderbirds from Emerald Tower but this one gets a ton of bonus not one).
So, I want to enforce players choice to be Castle. If mod checks player isn't Red or Castle exits, only if these two conditions are filled can the mod be used.
You say this can't be done?
____________
|
|
Salamandre

     
       
Admirable
Omnipresent Hero
Wog refugee
|
posted November 11, 2021 01:34 PM |
|
|
Why not simply tell player (message start game) to play castle if he wants better creatures?
|
|
|