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

[10.77][TFS 1.2] ORTS, a real map project

this may not belong here but since this packaging is using tfs1.1..
could you tell me where in the sources i can find the scripts for offline training and for pvp (frags/skulls/ban) ?
 
the ancient tombs boss teleports don't work. Had a look and cant seem to solve.
 
hi, first thanks very much for this datapack, it's awesome.
i've had a couple of errors with some scripts, i've fixed most, but now for i'm trying to fix the !buyhouse command.
i've got the 1.1 tfs engine, and the latest datapack.
here is the error, when i try to buy a house, the script doesnt get the correct tile to check for a house, instead it does this on the player's current position, so there's no house.

mostly, i'm looking to find a way to get the players next position based on their direction, so the script can check for a house on that posisition instead of the current one.
any help is appreciated, tips and howto's too

thanks to you all, Danat

here is the part where i think its the error, followed by the full script.

Code:
local position = player:getPosition()
    position:getNextPosition(player:getDirection())

    local tile = Tile(position)
    if not tile then
        player:sendCancelMessage("You have to be looking at the door of the house you would like to buy.")
        return false
    end

    local house = tile:getHouse()
    if not house then
        player:sendCancelMessage("You have to be looking at the door of the house you would like to buy.")
        return false
    end

Code:
function onSay(player, words, param)
    local housePrice = configManager.getNumber(configKeys.HOUSE_PRICE)
    if housePrice == -1 then
        return true
    end

    if player:getPremiumDays() <= 0 then
        player:sendCancelMessage("You need a premium account.")
        return false
    end

    local position = player:getPosition()
    position:getNextPosition(player:getDirection())

    local tile = Tile(position)
    if not tile then
        player:sendCancelMessage("You have to be looking at the door of the house you would like to buy.")
        return false
    end

    local house = tile:getHouse()
    if not house then
        player:sendCancelMessage("You have to be looking at the door of the house you would like to buy.")
        return false
    end

    if house:getOwnerGuid() > 0 then
        player:sendCancelMessage("This house already has an owner.")
        return false
    end

    if player:getHouse() then
        player:sendCancelMessage("You are already the owner of a house.")
        return false
    end

    local price = house:getTileCount() * housePrice
    if not player:removeMoney(price) then
        player:sendCancelMessage("You do not have enough money.")
        return false
    end

    house:setOwnerGuid(player:getGuid())
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully bought this house, be sure to have the money for the rent in the bank.")
    return false
end
 
I need help with one script doens't work correct :/ if fix my script we can use in the printer data pack, msg in my profile
 
Hey again, turns out i figured out, wasnt too complicated just had to try a couple of different things.
now the !buyhouse works great.
here is what i changed to fix it:
change those lines:
Code:
    local position = player:getPosition()
    position:getNextPosition(player:getDirection())

to these:
Code:
    local position = player:getPosition()
    position:getNextPosition()

done. now it works.
 
oops!
its still not fully working, with that fix i can only buy houses on one direction... hahaha
guess i still need some help with the "getdirection".. also i dont know how to edit previous post my bad for keep posting nonsense
 
Tried to run the server and it said

MySQL Error Message: Access denied for user 'otserv'@'localhost' (using password: YES)
Error: Falied to connect to database

here's my config,lua (without my password)

-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
hotkeyAimbotEnabled = "yes"
protectionLevel = 1
killsToRedSkull = 3
killsToBlackSkull = 6
pzLocked = 60000
removeChargesFromRunes = "yes"
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2000
experienceByKillingPlayers = "no"
expFromPlayersLevelRange = 75

-- Connection Config
-- NOTE: maxPlayers set to 0 means no limit
ip = "127.0.0.1"
bindOnlyGlobalAddress = "no"
loginProtocolPort = 7171
gameProtocolPort = 7172
statusProtocolPort = 7171
maxPlayers = 0
motd = "Welcome to The Forgotten Server!"
onePlayerOnlinePerAccount = "yes"
allowClones = "no"
serverName = "Forgotten"
statusTimeout = 5000
replaceKickOnLogin = "yes"
maxPacketsPerSecond = 25

-- Deaths
-- NOTE: Leave deathLosePercent as -1 if you want to use the default
-- death penalty formula. For the old formula, set it to 10. For
-- no skill/experience loss, set it to 0.
deathLosePercent = -1

-- Houses
-- NOTE: set housePriceEachSQM to -1 to disable the ingame buy house functionality
housePriceEachSQM = 1000
houseRentPeriod = "never"

-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 1000

-- Map
-- NOTE: set mapName WITHOUT .otbm at the end
mapName = "forgotten"
mapAuthor = "Komic"

-- Market
marketOfferDuration = 30 * 24 * 60 * 60
premiumToCreateMarketOffer = "yes"
checkExpiredMarketOffersEachMinutes = 60
maxMarketOffersAtATimePerPlayer = 100

-- MySQL
mysqlHost = "127.0.0.1"
mysqlUser = "otserv"
mysqlPass = "***************"
mysqlDatabase = "otserv"
mysqlPort = 3306
mysqlSock = ""

-- Misc.
allowChangeOutfit = "yes"
freePremium = "no"
kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
emoteSpells = "no"
classicEquipmentSlots = "no"

-- Rates
-- NOTE: rateExp is not used if you have enabled stages in data/XML/stages.xml
rateExp = 5
rateSkill = 3
rateLoot = 2
rateMagic = 3
rateSpawn = 1

-- Monsters
deSpawnRange = 2
deSpawnRadius = 50

-- Stamina
staminaSystem = "yes"

-- Scripts
warnUnsafeScripts = "yes"
convertUnsafeScripts = "yes"

-- Startup
-- NOTE: defaultPriority only works on Windows and sets process priority.
defaultPriority = "high"
startupDatabaseOptimization = "no"

-- Status server information
ownerName = ""
ownerEmail = ""
url = "http://otland.net/"
location = "Sweden"

PS: I already made a database named otserver and an user with the same name.
 
bro, you need to remove all messages with -, exemple, -- Status server information
... if have not will work ...
remove all and try again
 
well, in all tutorials that I've see they say to remove all coments...
 
@Printer retired a few days ago. I dont think there will be any updates until @Ninja decides what to do with the project.
 
Back
Top