• 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 1.3] [8.6] Not working Skull and PZ System

ivvanek

New Member
Joined
Mar 24, 2009
Messages
99
Best answers
0
Reaction score
1
Players can attack you without skull and go inside depo because they dont have pz.

Config.lua
Code:
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 1
killsToRedSkull = 3
killsToBlackSkull = 6
pzLocked = 60000
removeChargesFromRunes = true
removeChargesFromPotions = true
removeWeaponAmmunition = true
removeWeaponCharges = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
How i can fix this ?
 

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
931
Best answers
23
Reaction score
119
Players can attack you without skull and go inside depo because they dont have pz.

Config.lua
Code:
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 1
killsToRedSkull = 3
killsToBlackSkull = 6
pzLocked = 60000
removeChargesFromRunes = true
removeChargesFromPotions = true
removeWeaponAmmunition = true
removeWeaponCharges = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
How i can fix this ?
try
Code:
worldType = "open"
 

Lessaire

Omniscient Hypervisor
Premium User
Joined
Dec 29, 2009
Messages
1,265
Best answers
46
Reaction score
396
Location
Oregon
seems your initial value was correct.
 
Last edited:
OP
ivvanek

ivvanek

New Member
Joined
Mar 24, 2009
Messages
99
Best answers
0
Reaction score
1
Guys, it is TFS 1.3 and when changing to "open" or "open-pvp" server won't startup.

Code:
-- Combat settings
-- NOTE: valid values for worldType are: "pvp", "no-pvp" and "pvp-enforced"
worldType = "pvp"
hotkeyAimbotEnabled = true
protectionLevel = 1
killsToRedSkull = 3
killsToBlackSkull = 6
pzLocked = 60000
removeChargesFromRunes = true
removeChargesFromPotions = true
removeWeaponAmmunition = true
removeWeaponCharges = true
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
Code:
> ERROR: > ERROR: Unknown world type: open, valid world types are: pvp, no-pvp and pvp-enforced.
>> No services running. The server is NOT online.
 

Lessaire

Omniscient Hypervisor
Premium User
Joined
Dec 29, 2009
Messages
1,265
Best answers
46
Reaction score
396
Location
Oregon
Then change it back to "pvp" and back to your original problem.

Do you have any C++ source mods or Lua scripts that modify onCombat onAttack ?
 
OP
ivvanek

ivvanek

New Member
Joined
Mar 24, 2009
Messages
99
Best answers
0
Reaction score
1
Then change it back to "pvp" and back to your original problem.

Do you have any C++ source mods or Lua scripts that modify onCombat onAttack ?
Yes, i am using TFS 1.3 for 8.6 downgraded
nekiro/forgottenserver (https://github.com/nekiro/forgottenserver/tree/8.6-downgrade)

I have real map + NPCs + scripts from other datapacks, everything is working well, just Skull and PZ not working... Everything was working well but some my changes must destroy Combat system. I am looking for a solution where to find the problem.
I can put my codes here but tell me which one :)
 

Lessaire

Omniscient Hypervisor
Premium User
Joined
Dec 29, 2009
Messages
1,265
Best answers
46
Reaction score
396
Location
Oregon
This is why people should use git. You can take snapshots before changes that way, and create a change history and show diffs between versions. Git does not have to be just for programmers.

There are two ways you can solve this.

1.)
| a.) Rebuild the server. Start with source dataset from Nekiro. Test.
| b.) If working add another thing you added before. Test again.
| c.) Repeat step b until you find thing you added that broke stuff.

2.) (presuming Linux install)
| a.) install "spot" OR know RegEx and use plain grep
| b.) search your sources and lua scripts to find anything that touched how combat / PVP works.

Basically, something you've done is effecting if attacking is considered hostile or that the tile the player is on is a forced pvp zone.

Does it happen with all players?
All weapons? Or certain ones? How about no weapon using fists?
All spells?
 
OP
ivvanek

ivvanek

New Member
Joined
Mar 24, 2009
Messages
99
Best answers
0
Reaction score
1
This is why people should use git. You can take snapshots before changes that way, and create a change history and show diffs between versions. Git does not have to be just for programmers.

There are two ways you can solve this.

1.)
| a.) Rebuild the server. Start with source dataset from Nekiro. Test.
| b.) If working add another thing you added before. Test again.
| c.) Repeat step b until you find thing you added that broke stuff.

2.) (presuming Linux install)
| a.) install "spot" OR know RegEx and use plain grep
| b.) search your sources and lua scripts to find anything that touched how combat / PVP works.

Basically, something you've done is effecting if attacking is considered hostile or that the tile the player is on is a forced pvp zone.

Does it happen with all players?
All weapons? Or certain ones? How about no weapon using fists?
All spells?
All spells and runes i can use without skull.
Something is broken but console didnt tell me anything... any error.
It is disabled maybe in lua files? you know maybe on which one?
 

Morrison

Well-Known Member
Joined
Mar 15, 2009
Messages
187
Best answers
2
Reaction score
53
Location
Exive me
you have a fork of TFS distro in github, u can push your changes and we can see the diferences, so we can help u.. easy
 

Lessaire

Omniscient Hypervisor
Premium User
Joined
Dec 29, 2009
Messages
1,265
Best answers
46
Reaction score
396
Location
Oregon
specifically, what creaturescripts did you change?
 
OP
ivvanek

ivvanek

New Member
Joined
Mar 24, 2009
Messages
99
Best answers
0
Reaction score
1
specifically, what creaturescripts did you change?
Code:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
    <event type="login" name="PlayerLogin" script="login.lua" />
    <event type="logout" name="PlayerLogout" script="logout.lua" />
    <event type="login" name="FirstItems" script="firstitems.lua" />
<!--    <event type="login" name="OfflineTraining" script="offlinetraining.lua" /> -->
    <event type="login" name="RegenerateStamina" script="regeneratestamina.lua" />
    <event type="death" name="PlayerDeath" script="playerdeath.lua" />
    <event type="death" name="DropLoot" script="droploot.lua" />
    <event type="extendedopcode" name="ExtendedOpcode" script="extendedopcode.lua" />
</creaturescripts>
 

Lessaire

Omniscient Hypervisor
Premium User
Joined
Dec 29, 2009
Messages
1,265
Best answers
46
Reaction score
396
Location
Oregon
that's just your creaturescript index. not an answer.

which lua files did you change?
 
OP
ivvanek

ivvanek

New Member
Joined
Mar 24, 2009
Messages
99
Best answers
0
Reaction score
1
that's just your creaturescript index. not an answer.

which lua files did you change?
My last change was in these files but i dont know if this files respond to skull system
npc/lib/npcsystem/modules.lua
npc/lib/npcsystem/npchandler.lua
npc/lib/npcsystem/npcsystem.lua

I am looking for files which respond to skull system and battle, because it is PZ issue too, i can go to pz without battle.
 

Nekiro

Legendary OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,143
Best answers
94
Reaction score
1,008
Did you check if that happens on clean files from repository? It might be downgrade issue.
 
OP
ivvanek

ivvanek

New Member
Joined
Mar 24, 2009
Messages
99
Best answers
0
Reaction score
1
Did you check if that happens on clean files from repository? It might be downgrade issue.
I have dowloaded your clean repo from github like 2 weeks ago and it is work perfectly. Yesterday i saw update on your github and downloaded source again because i think maybe it will fix my problem but i have errors with compiling and i cannot check this update :)
Code:
/home/debian/tfs13/src/combat.cpp: In static member function ‘static void Combat::doAreaCombat(Creature*, const Position&, const AreaCombat*, CombatDamage&, const CombatParams&)’:
/home/debian/tfs13/src/combat.cpp:851:11: error: variable ‘playerCombatReduced’ set but not used [-Werror=unused-but-set-variable]
      bool playerCombatReduced = false;
           ^~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
CMakeFiles/tfs.dir/build.make:226: recipe for target 'CMakeFiles/tfs.dir/combat.cpp.o' failed
make[2]: *** [CMakeFiles/tfs.dir/combat.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tfs.dir/all' failed
make[1]: *** [CMakeFiles/tfs.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Anyway i am looking for another way to find the problem and maybe fix this. Which LUA files are related with combat or skull & pz system?
 
Last edited:

Lessaire

Omniscient Hypervisor
Premium User
Joined
Dec 29, 2009
Messages
1,265
Best answers
46
Reaction score
396
Location
Oregon
👉 cc1plus: all warnings being treated as errors
👉 -Werror=unused-but-set-variable


Expecting perfect code out of a protocol backport fork is too much to ask. Turn off all -Werror and/or -Wall
 

snollez

New Member
Joined
Jan 22, 2019
Messages
35
Best answers
1
Reaction score
0
i've got the same problem, also using 7.72 downgrade by nekrio
 
Top