• 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] The Forgotten [WAR] Server v1.1 (UPDATED 17/12/15)

Fix #1 - Player:eek:nLook (so you can see the frags when you look at players)
This fix should prevent the issue when looking at things other than players.

Again, note that I am at work and cannot test this fix.

Step 1: OPEN /data/events/scripts/player.lua
Step 2: FIND function Player:eek:nLook(thing, position, distance)
Step 3: At the end of this function, a line has been added that looks like "self:sendTextMessage(MESSAGE_INFO_DESCR, "" .. description ~~~ "
Step 4: Surround the above statement with if thing:isCreature() and if thing:isPlayer() then

That should work.


It should now look like this:
Code:
  if thing:isCreature() then
    if thing:isPlayer() then
      self:sendTextMessage(MESSAGE_INFO_DESCR, "" .. description .. " Kills: " .. thing:getStorageValue(fragStor) .. " Deaths: " .. thing:getStorageValue(deathStor) .. "")
    end
  end

the above replaces the single line self:sendTextMessage only.
Everything else around it is retained.

Hello when look at items and the ground does not appear
 
Try this instead?

The below code will replace only the code I previously posted
Code:
self:sendTextMessage(MESSAGE_INFO_DESCR, "" .. description .. "")
  if thing:isCreature() then
    if thing:isPlayer() then
      self:sendTextMessage(MESSAGE_INFO_DESCR, "Kills: " .. thing:getStorageValue(fragStor) .. " Deaths: " .. thing:getStorageValue(deathStor) .. "")
    end
  end
 
Looks amazing , sadly havent pc would defently try this :)
 
I never got around to fixing all the little issues because I never ran the server in production - if you do come across any problems feel free to post here and I will do my best to fix them for you.

UPDATE 17-12-15: VERSION 1.1 IS READY - DOWNLOAD LINKS HAVE BEEN UPDATED.

Change Log:
V1.1
- GM/GOD characters can now log in
- onLook frags/deaths now works correctly and doesn't interfere with other 'looks'
- Shops/DP added to map with teleporter from each temple
- Original Simple War OT map added to the new map
- Other minor issues fixed

Live Game Server:
Thanks to Don Daniello and spigu.net we have a live game server. Although the primary purpose of the live server is simply for the enjoyment of the community, it will also be used as a production testing environment.
An advertisement thread will be created shortly and linked at the top of this post, but for now you can find the game server at DOMINADO.ORG.
The website is currently using Znote AAC with the widnet theme converted by Znote and an awful banner created by me. If design is your thing and you want to help out...please start with a banner!
I have not bothered putting this on any server list yet, so don't expect to see players online. I'll sort all that out once I've fixed all the known issues and released the latest update.
 
Last edited by a moderator:
EP8pJ3p.png


When i try log in with a normal character, o a god character, i got this error.

I use the last rev compiled TFS 1.2
 
Last edited by a moderator:
It looks like you have not put the war_config.lua where it needs to be (same place as config.lua)
As for the other errors I am not sure - i'll take a look at what changes have happened in TFS1.2 lately. My datapack has no changes in login.lua or logout.lua.
For reference, I am using this exact datapack on a live server right now without any console errors.

Edit:
No significant changes in TFS 1.2 lately. I am going to compile master now under windows and test the exact datapack to be sure.

@Deckard
Sorry for taking so long, but I finally got around to compiling on windows and giving the datapack a try - sure enough it had problems! Somehow I omitted some files when I ZIP'ed it.
I've fixed this now and will update the main post. You can also use this download link:

The Forgotten [WAR] Server v1.1 PL1

e439bcd43f.png
 
Last edited by a moderator:
I'm sorry but I don't have time to work on this at the moment =[
i found one bug
i add storages for vip user and work for sorc, druid and paladin
but with knight character received level and skills but dont login
Code:
Lua Script Error: [CreatureScript Interface] 
data/creaturescripts/scripts/tfws_creaturescripts/warlogin.lua:onLogin
...reaturescripts/scripts/tfws_creaturescripts/warlogin.lua:235: attempt to concatenate a nil value
stack traceback:
        [C]: in function '__concat'
        ...reaturescripts/scripts/tfws_creaturescripts/warlogin.lua:235: in function <...reaturescripts/scripts/tfws_creaturescripts/warlogin.lua:3>

@mdwilliams sorry, received level, not skills
 
Last edited by a moderator:
@xLosT
I haven't tested this, but it looks like it's just a case-sensitivity issue in one of the variables.

- Open your war_login.lua
- Find "KnightMeleeUp1 = 110"
- Change to "knightMeleeUp1 = 110"
- Save & Close

I hope this helps
Merry Christmas & Happy New Year!

A bug was reported in my frag reward script, here is the new one:

Code:
dofile("war_config.lua")

-- CREDIT TO NINJA @ OTLAND FOR THE BASE SCRIPT
-- REF: https://otland.net/threads/tfs-1-0-experience-from-killing-higher-level-players.212691/#post-2039964

function onKill(cid, target, lastHit)

    local attackPlayer = Player(target)

    local reward = {
            item = rewardItem,
            count = rewardCount
            }

    if not attackPlayer then
        return true
    end

    for id, damage in pairs(attackPlayer:getDamageMap()) do
        local player = Player(id)
        if player then
            if player:getIp() ~= target:getIp() then
                local experience = attackPlayer:getExperience()
                local expFormula = (experience * expMultiplier)
                local bonusExpFormula = (experience * bonusExpMultiplier)

                if player:getLevel() <= maximumLevel then
                    player:addExperience(math.floor(expFormula), true)
                    if player:getStorageValue(extraExpStor) >= 1 then
                        player:addExperience(math.floor(bonusExpFormula), true)
                        player:setStorageValue(extraExpStor, player:getStorageValue(extraExpStor) - 1)
                        player:sendTextMessage(MESSAGE_INFO_DESCR, "Bonus frag EXP added! " .. player:getStorageValue(extraExpStor) .. " bonus frags remaining!")
                    end
                end
   
                player:addItem(reward.item, reward.count)
                player:setStorageValue(fragStor, player:getStorageValue(fragStor) + 1)

                if player:getStorageValue(doubleFragRewardStor) >= 1 then
                    player:addItem(reward.item, reward.count)
                    player:setStorageValue(doubleFragRewardStor, player:getStorageValue(doubleFragRewardStor) -1)
                    player:sendTextMessage(MESSAGE_INFO_DESCR, "Bonus frag reward added! " .. player:getStorageValue(doubleFragRewardStor) .. " bonus frags remaining!")
                end
            end
        end
    end
end
 
Last edited by a moderator:
When I compile the SRC in the main post I open the TFS machine and the error is:

Code:
A newer version of items.otb is required

Then I replace from the SRC the items.otb and it does not start with the level 80 and shit.

Some help?
 
My apologies @Imereth Popis, the source I have linked in the main post is for the master branch of the forgotten server project (Which was correct at the time of release, but has now moved passed compatibility with this datapack)
The sources you will require for everything to 'just work' will be here: GitHub - otland/forgottenserver at 1.2

@Imereth Popis also just to make sure you are following the correct procedure here:
- Download this datapack
- Compile the source to get your binary/exe
- Move the binary/exe to the parent directory of the datapacks 'data' directory (the binary/exe should be with the config.lua, war_config.lua)
- Execute the binary/exe

It shouldn't be too hard to get this running with the latest versions of TFS either. Follow the same procedure but with the latest source code / nightly build. You may have to change out some assets in the databack to be compatible though (e.g. the data/items/items.otbm & items.xml files)
 
Last edited by a moderator:
My apologies @Imereth Popis, the source I have linked in the main post is for the master branch of the forgotten server project (Which was correct at the time of release, but has now moved passed compatibility with this datapack)
The sources you will require for everything to 'just work' will be here: GitHub - otland/forgottenserver at 1.2

Thanks you for answering that fast

@Imereth Popis also just to make sure you are following the correct procedure here:
- Download this datapack
- Compile the source to get your binary/exe
- Move the binary/exe to the parent directory of the datapacks 'data' directory (the binary/exe should be with the config.lua, war_config.lua)
- Execute the binary/exe

It shouldn't be too hard to get this running with the latest versions of TFS either. Follow the same procedure but with the latest source code / nightly build. You may have to change out some assets in the databack to be compatible though (e.g. the data/items/items.otbm & items.xml files)

That's the move. I tried with the 1.2 TFS, thanks It worked. The problem is when I replace the items.otbm and items.xml, the characters does not appear with the item set's. I don't want to change a lot of code cause I want no errors.

I have to say that it's a perfect server, but I want to make it working it out 100%.

Thanks you in advance.
 
If the item ID's in the different items.xml you are using do not match the original (official) - there will be issues.

To fix the specific issue of characters not getting their item sets (provided it is due to item id's being incompatible) it should be as simple as updating the item ID's as seen in war_config.lua

Code:
.. extract
----FIRST ITEMS------------------------------------------------
commonItems = {
                ---------ALL VOCATIONS---------
  {itemid=1988, count=1},     -- backpack
  {itemid=2120, count=1},     -- rope
  {itemid=5710, count=1},     -- shovel
  {itemid=2420, count=1},     -- machete
  {itemid=2789, count=10},    -- brown mushrooms
  {itemid=2305, count=1},     -- fire bomb rune  
  {itemid=2261, count=1},     -- destroy field rune
}

firstItems = {
              
  {                 ---------SORCERER ITEMS---------
    {itemid=2323, count=1},     -- hat of the mad           
    {itemid=8871, count=1},     -- focus cape               
    {itemid=7730, count=1},     -- blue legs               
    {itemid=2195, count=1},     -- boots of haste           
    {itemid=8902, count=1},     -- spellbook of mind control
    {itemid=2187, count=1},     -- wand of inferno         
                              
    {itemid=2268, count=1},     -- sd
    {itemid=2273, count=1},     -- uh
    {itemid=7590, count=1},     -- gmp
    {itemid=2293, count=1},     -- mw
  },
  {                 ---------DRUID ITEMS---------
    {itemid=2323, count=1},     -- hat of the mad
    {itemid=8871, count=1},     -- focus cape
    {itemid=7730, count=1},     -- blue legs
    {itemid=2195, count=1},     -- boots of haste
    {itemid=8902, count=1},     -- spellbook of mind control
    {itemid=2183, count=1},     -- hailstorm rod 

    {itemid=2268, count=1},     -- sd
    {itemid=2273, count=1},     -- uh
    {itemid=7590, count=1},     -- gmp
    {itemid=2293, count=1},     -- mw
    {itemid=2269, count=1},     -- wg
    {itemid=2278, count=1},     -- para
  },
  {                 ---------PALADIN ITEMS---------
    {itemid=2493, count=1},     -- demon helmet
    {itemid=8891, count=1},     -- paladin armor
    {itemid=7730, count=1},     -- blue legs
    {itemid=2195, count=1},     -- boots of haste
    {itemid=2514, count=1},     -- mastermind shield
    {itemid=7368, count=1},     -- assassin stars

    {itemid=2268, count=1},     -- sd
    {itemid=2273, count=1},     -- uh
    {itemid=8472, count=1},     -- gsp
    {itemid=7589, count=1},     -- smp
    {itemid=7588, count=1},     -- shp
    {itemid=2293, count=1},     -- mw
  },
  {                 ---------KNIGHT ITEMS---------
    {itemid=2493, count=1},     -- demon helmet
    {itemid=2472, count=1},     -- magic plate armor
    {itemid=2470, count=1},     -- golden legs
    {itemid=2195, count=1},     -- boots of haste
    {itemid=2514, count=1},     -- mastermind shield
    {itemid=2400, count=1},     -- magic sword

    {itemid=7620, count=1},     -- mp
    {itemid=7591, count=1},     -- ghp
    {itemid=8473, count=1},     -- uhp
    {itemid=2273, count=1},     -- uh
    {itemid=2293, count=1},     -- mw
  }
}
extract ..
 
If the item ID's in the different items.xml you are using do not match the original (official) - there will be issues.

To fix the specific issue of characters not getting their item sets (provided it is due to item id's being incompatible) it should be as simple as updating the item ID's as seen in war_config.lua

Code:
.. extract
----FIRST ITEMS------------------------------------------------
commonItems = {
                ---------ALL VOCATIONS---------
  {itemid=1988, count=1},     -- backpack
  {itemid=2120, count=1},     -- rope
  {itemid=5710, count=1},     -- shovel
  {itemid=2420, count=1},     -- machete
  {itemid=2789, count=10},    -- brown mushrooms
  {itemid=2305, count=1},     -- fire bomb rune 
  {itemid=2261, count=1},     -- destroy field rune
}

firstItems = {
             
  {                 ---------SORCERER ITEMS---------
    {itemid=2323, count=1},     -- hat of the mad          
    {itemid=8871, count=1},     -- focus cape              
    {itemid=7730, count=1},     -- blue legs              
    {itemid=2195, count=1},     -- boots of haste          
    {itemid=8902, count=1},     -- spellbook of mind control
    {itemid=2187, count=1},     -- wand of inferno        
                             
    {itemid=2268, count=1},     -- sd
    {itemid=2273, count=1},     -- uh
    {itemid=7590, count=1},     -- gmp
    {itemid=2293, count=1},     -- mw
  },
  {                 ---------DRUID ITEMS---------
    {itemid=2323, count=1},     -- hat of the mad
    {itemid=8871, count=1},     -- focus cape
    {itemid=7730, count=1},     -- blue legs
    {itemid=2195, count=1},     -- boots of haste
    {itemid=8902, count=1},     -- spellbook of mind control
    {itemid=2183, count=1},     -- hailstorm rod

    {itemid=2268, count=1},     -- sd
    {itemid=2273, count=1},     -- uh
    {itemid=7590, count=1},     -- gmp
    {itemid=2293, count=1},     -- mw
    {itemid=2269, count=1},     -- wg
    {itemid=2278, count=1},     -- para
  },
  {                 ---------PALADIN ITEMS---------
    {itemid=2493, count=1},     -- demon helmet
    {itemid=8891, count=1},     -- paladin armor
    {itemid=7730, count=1},     -- blue legs
    {itemid=2195, count=1},     -- boots of haste
    {itemid=2514, count=1},     -- mastermind shield
    {itemid=7368, count=1},     -- assassin stars

    {itemid=2268, count=1},     -- sd
    {itemid=2273, count=1},     -- uh
    {itemid=8472, count=1},     -- gsp
    {itemid=7589, count=1},     -- smp
    {itemid=7588, count=1},     -- shp
    {itemid=2293, count=1},     -- mw
  },
  {                 ---------KNIGHT ITEMS---------
    {itemid=2493, count=1},     -- demon helmet
    {itemid=2472, count=1},     -- magic plate armor
    {itemid=2470, count=1},     -- golden legs
    {itemid=2195, count=1},     -- boots of haste
    {itemid=2514, count=1},     -- mastermind shield
    {itemid=2400, count=1},     -- magic sword

    {itemid=7620, count=1},     -- mp
    {itemid=7591, count=1},     -- ghp
    {itemid=8473, count=1},     -- uhp
    {itemid=2273, count=1},     -- uh
    {itemid=2293, count=1},     -- mw
  }
}
extract ..

This evening I will try this. Thank you a lot. I'll tell you some when done. +rep to the post
 
Back
Top