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

TFS 0.X Place that blocks MC

metiu11

Member
Joined
Mar 26, 2011
Messages
94
Solutions
2
Reaction score
5
Hello,
I have a script that gives all players rewards for hitting a boss.
This boss spawn now 2 times a day.
The problem is when people shoot 1 time this boss, then log in few MC accounts and do the same.
I dont wanna blocked MC in my server i just wanna create some place when they cannot be with few MC.
I got 2 ideas. First - Server check IP player when he want to in to place then back him when the same IP is on the server.
Check IP player - 127.0.0.1
if IP player is the same then
dont let in to place
Second idea - edit this script which gives all players rewards to check IP player when he gives loot.
If ip is the same give only 1 reward to first character with this ip.

Have you seen such a script somewhere?
Or are you able to help me create it?
Thank you for help :)
 
Solution
@Xikini Well its problem now for real x.x @Xikini have u idea how to block some place for only 1 player with the same ip?
An accompanying login script should suffice.
Just check if they are within the area past that square when they login, and teleport them in front of the antymc square.
Lua:
local restricted_areas = {
  --{    {top left corner},         {bot right corner},         {teleport_location}     },
    {{x = 990, y = 990, z = 7}, {x = 1010, y = 1010, z = 7}, {x = 1111, y = 2222, z = 7}},
    {{x = 990, y = 990, z = 7}, {x = 1010, y = 1010, z = 7}, {x = 1111, y = 2222, z = 7}},
    {{x = 990, y = 990, z = 7}, {x = 1010, y = 1010, z = 7}, {x = 1111, y = 2222, z = 7}}
}

function onLogin(cid)
    local...
Well i didnt know that i could. :D
I created a script that does what I wanted:
Movements.xml
Lua:
<movevent type="StepIn" actionid="1997" event="script" value="antymc.lua"/>

Lua:
local toPos = {x=1135, y=1103, z=7}
function onStepIn(cid, item, pos)
        if #getPlayersByIp(getPlayerIp(cid)) >= 2 then
                doTeleportThing(cid, toPos, true)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sorry, you need to log out of the Multi Account if you want to enter.")
        end
        return TRUE
end

tested TFS 0.3.6 and works. :)
 
Well i didnt know that i could. :D
I created a script that does what I wanted:
Movements.xml
Lua:
<movevent type="StepIn" actionid="1997" event="script" value="antymc.lua"/>

Lua:
local toPos = {x=1135, y=1103, z=7}
function onStepIn(cid, item, pos)
        if #getPlayersByIp(getPlayerIp(cid)) >= 2 then
                doTeleportThing(cid, toPos, true)
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sorry, you need to log out of the Multi Account if you want to enter.")
        end
        return TRUE
end

tested TFS 0.3.6 and works. :)
Just wanted to give you a heads up that someone could potentially go through that square, log out, login the next character, walk through, log out, repeat repeat, then log back into all of the characters.

Of course, this depends entirely upon how the map is setup.
It may not be possible in your specific scenario, just letting you know of the possibility.
 
@Xikini Well its problem now for real x.x @Xikini have u idea how to block some place for only 1 player with the same ip?
An accompanying login script should suffice.
Just check if they are within the area past that square when they login, and teleport them in front of the antymc square.
Lua:
local restricted_areas = {
  --{    {top left corner},         {bot right corner},         {teleport_location}     },
    {{x = 990, y = 990, z = 7}, {x = 1010, y = 1010, z = 7}, {x = 1111, y = 2222, z = 7}},
    {{x = 990, y = 990, z = 7}, {x = 1010, y = 1010, z = 7}, {x = 1111, y = 2222, z = 7}},
    {{x = 990, y = 990, z = 7}, {x = 1010, y = 1010, z = 7}, {x = 1111, y = 2222, z = 7}}
}

function onLogin(cid)
    local player_position = getThingPosition(cid)
    for i = 1, #restricted_areas do
        if player_position.z <= restricted_areas[i][1].z and player_position.z >= restricted_areas[i][2].z then
            if player_position.y >= restricted_areas[i][1].y and player_position.y <= restricted_areas[i][2].y then
                if player_position.z >= restricted_areas[i][1].z and player_position.z <= restricted_areas[i][2].z then
                    doTeleportThing(cid, restricted_areas[i][3])
                    return true
                end
            end
        end
    end
    return true
end
 
Solution
But we have no information regarding his server save, we don't know if his kicks players or not.
Sure, maybe his server save doesn't kick players.
But what if the server crashes, get's closed, computer shuts down for updates or a power outage?

The login event is a fail-safe in case something unexpected occurs, while also preventing a known issue.
 
Yea i thinking about area in RME. So if i create place which tp player to city when they log off there it will be works. It can be possible? I have 1 question more now :D Why servers kick all players when server save. Protect to clone items or something?

EDIT:
Oh i didnt see u create it thank you so much i will try this when back to home. :) Thank you
 
Hello,

my suggestion here is following: Stop trying to fight organized crime, there's no way to get rid of it, just lower the rewards and be a happy lad with loads of time not wasted into this.

Best Wishes,
Okke
 
Back
Top