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

is this normal?

Cris2387

Member
Joined
Dec 30, 2013
Messages
177
Reaction score
9
i added a war system to my server and it works, you can invite people to guild and do wars, but when a person with a green shield attacks someone with a red shield, the green person gets pk :l, i want people to just get pz lock and not skull so how can i fix this? or is it normal?
 
What war system? The reason you add / modify the war system is to (as the name says) change the war SYSTEM.
So depending on what you added, you might have to modify it (or modify already existing TFS code) to make it fully work as you wish.
 
what should i look for? does it have to do with the sources? im willing to edit that

The combat codes, creature.cpp, player.cpp, combat.cpp is where I would probbly start.
And yes it is due to your source code, I highly doubt 0.4 can handle things like that in Lua.
 
okay i did this : i copied this line of code :
Code:
player->addInFightTicks(pzLock);
and i put it here
PHP:
    bool success = true;
     CreatureEventList combatAreaEvents = const_cast<Creature*>(caster)->getCreatureEvents(CREATURE_EVENT_COMBAT_AREA);
     for(CreatureEventList::iterator it = combatAreaEvents.begin(); it != combatAreaEvents.end(); ++it)
     {
       if(!(*it)->executeCombatArea(const_cast<Creature*>(caster), const_cast<Tile*>(tile), isAggressive) && success)
         success = false;
     }

     if(!success)
       return RET_NOTPOSSIBLE;

     if(caster->getPosition().z < tile->getPosition().z)
       return RET_FIRSTGODOWNSTAIRS;

     if(caster->getPosition().z > tile->getPosition().z)
       return RET_FIRSTGOUPSTAIRS;

     if(!isAggressive)
       player->addInFightTicks(pzLock);
       return RET_NOERROR;
i put it after agressive, :) but then when i was compiling i got this error :
Code:
Error   1   error C2065: 'player' : undeclared identifier   C:\Users\Chris\Desktop\sources\combat.cpp   248   1   Hero Biba
Error   2   error C2227: left of '->addInFightTicks' must point to class/struct/union/generic type   C:\Users\Chris\Desktop\sources\combat.cpp   248   1   Hero Biba
Error   3   error C2065: 'pzLock' : undeclared identifier   C:\Users\Chris\Desktop\sources\combat.cpp   248   1   Hero Biba
help
 
Back
Top