NW Time in script
Zephirius
Member Posts: 419
Trying to randomly fire a wandering monster script at different times. It is on the OnEnter handler for area properties.
This is what I have and I don't think I know what I'm doing...
I haven't tested this yet. I'm hoping you guys have something clever to add to this. Thx in advance.
This is what I have and I don't think I know what I'm doing...
void main() { object oPC = GetEnteringObject(); if (!GetIsPC(oPC)) return; int nRandom = 10; int nTime = GetTimeHour(); if (nTime>=12) { if (nRandom>=7) ExecuteScript("wm_table_05"); } else return; FALSE; }
I haven't tested this yet. I'm hoping you guys have something clever to add to this. Thx in advance.
0
Comments
Anyway, FWIW I have tidied your original script up a bit -
BTW, if you are struggling with scripting you might find the small series of tutorials I wrote just for beginners useful. First one is here and there are links to the other volumes on that page.
TR
I know what data types and operators are now!