• 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!

Level needed to write on channel and weird magic wall timer

okurde

New Member
Joined
Jan 28, 2009
Messages
134
Reaction score
1
Hello, I have 2 problems.

First:
I have in channels.xml for example:
Code:
<channel id="5" name="Game-Chat" level="10"/>
Is it possible to make exactly the same for private message channels? (not private chat channel :P)


Second:
Problem with magic wall rune
Code:
    <item id="1497" article="a" name="magic wall">
        <attribute key="type" value="magicfield"/>
        <attribute key="decayTo" value="0"/>
        <attribute key="duration" value="20"/>
        <attribute key="blocksolid" value="1"/>
    </item>
When there is duration value="20" then magic wall disappears too late, if there is value 19 then magic wall disappears too early. 19.5 and 19,5 is not accepted because there is no result. Can it be solved in any way?
 
Why does it need to be 19.5 seconds?
Because when any player uses bot which shows when magic wall will disappear then:
duration: 20 - magic wall disappears too late (compared to bot's counter),
duration: 19 - magic wall disappears too early (compared to bot's counter).
So I think that 19.5 will be perfect value

What do you mean by private message channels?
Player X sends private message to player Y -> when player X has level < 10 then he wouldn't be able to send message (like in game-chat above)

What server are you using?
TFS 0.3.7 (0.4)

Thanks in advance
 
Because when any player uses bot which shows when magic wall will disappear then:
duration: 20 - magic wall disappears too late (compared to bot's counter),
duration: 19 - magic wall disappears too early (compared to bot's counter).
So I think that 19.5 will be perfect value


Player X sends private message to player Y -> when player X has level < 10 then he wouldn't be able to send message (like in game-chat above)


TFS 0.3.7 (0.4)

Thanks in advance
dont use 0.x series, just sayin
 
dont use 0.x series, just sayin
TFS 1.x series does not support floating numbers.

I don't think 0.x series supports floating numbers so you would have to edit that.

About the messages, depending on you have the ability to modify chat functions in lua(as in 1.x series) then you can do that with a simple getPlayerLevel(cid) < 10 etc.
Otherwise source edit.
 
The magic wall timer cannot be a floating number it has to be an integer. 19.5 <- float | integer -> 20
So your best option is to either source edit to allow floating numbers, or change your bots checking interval.

For chat messages like stated above, you can add a check for players level using ' getPlayerLevel(cid) < 10 ' if 0.37/0.4 allows you to do so, otherwise another source edit will need to be made.
 
Last edited by a moderator:
The magic wall timer cannot be a floating number it has to be an integer. 19.5 <- float | integer -> 20
So your best option is to either source edit to allow floating numbers, or change your bots checking interval.
So I should edit one line in sources - change int to float, right? Where and which variable should be edited?

For chat messages like stated above, you can add a check for players level using ' getPlayerLevel(cid) < 10 ' if 0.37/0.4 allows you to do so, otherwise another source edit will need to be made.
if getPlayerLevel(cid) < 10 then
do not allow to open chat...

Any idea how can it be done?
 
Back
Top