Skip to content
#2625
Auto-translated
Please help:smile45:. I wrote what seemed like a simple script, but it doesn't work as expected. The idea is simple: if there are creatures in the region, the script does nothing. But if they are killed, the script generates new ones, and this calculation happens every 2 days of the week.
function new_day()
local day = GetDate(DAY_OF_WEEK)
if day == 2 and IsObjectInRegion('kan','kopt')
elseif day == 2 then
CreateMonster( 'kan', 49, 5,81, 122, 0, MONSTER_MOOD_WILD, MONSTER_COURAGE_CAN_FLEE_JOIN, 0)

end

end
Trigger(NEW_DAY_TRIGGER,'new_day')