• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

How do i enter the night only?

chucky91

Advanced OT User
Joined
Apr 8, 2010
Messages
431
Solutions
14
Reaction score
249
Location
MS - Brazil
GitHub
RCP91
I do not understand these functions, neither works, does not check if it's daylight.o_O


getWorldLight() == false

getTibianTime() >= 18
getTibianTime() <= 6


Code:
if player:getStorageValue(EnterFalcons) >= 1 and isNight() == true then
        target:getPosition():sendMagicEffect(CONST_ME_POFF)
        player:teleportTo(config.positions)
        player:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Once more you mix the chalk with a drop of your blood and bit of water and renew the symbol on the floor...")
        else
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Nothing happens. Maybe it's still too early in the day to do something like this.")
        end
 
Solution
getWorldLight() == false == means equal to or in this case check the function change it to true
getTibianTime() >= 18
getTibianTime() <= 6


< , <=Relational less than/less than or equal toleft-to-right
> , >=Relational greater than/greater than or equal toleft-to-right
== , !=Relational is equal to/is not equal toleft-to-right
This code is not written in c++ but in lua so link to lua operators (yes they vary)
getWorldLight() == false == means equal to or in this case check the function change it to true
getTibianTime() >= 18
getTibianTime() <= 6


< , <=Relational less than/less than or equal toleft-to-right
> , >=Relational greater than/greater than or equal toleft-to-right
== , !=Relational is equal to/is not equal toleft-to-right
 
the functions do not work, it simply ignores time and light and passes straight through,
it seems that the distro thinks it's a storage
getTibianTime() and getWorldLight()
 
getWorldLight() == false == means equal to or in this case check the function change it to true
getTibianTime() >= 18
getTibianTime() <= 6


< , <=Relational less than/less than or equal toleft-to-right
> , >=Relational greater than/greater than or equal toleft-to-right
== , !=Relational is equal to/is not equal toleft-to-right
This code is not written in c++ but in lua so link to lua operators (yes they vary)
 
Solution
Back
Top