• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Debugowanie GRACZY (nowy sposob)

Status
Not open for further replies.

Drakos1337

Ubuntu :*
Joined
Apr 5, 2010
Messages
159
Reaction score
1
Witam , mam pewien problem na moim otsie gracze debuguja innych graczy pewnym sposobem otóż jeśli jakis gracz ma szybki internet bp 15 mega i zacznie się obracać botem tak szybko jak tylko można to gracze z slabym internetem dostają debuga . Wymyśliłem jak to naprawić , trzeba nadać na obracanie się exhunated , miałem kiedys taki skrypt lecz na starą wersje silnika . Szukałem troszkę w game.cpp wiem że tam coś się zmieniało lecz nie pamiętam przy jakiej funkcji , jeśli ktoś by mógł napisać taki skrypt na obracanie się z exhuanded to bardzo proszę , a jeśli nie to chociaż podpowiecie jaka funkcja odpowiada za obracanie

Silnik TFS 0.4

Pozdrawiam

// BARDZO Proszę za szybko nie usuwać tematu :)
 
jaka wersja silnika? możliwe że w skrypcie masz dodanego wayfarer outfit a silnik go nie czyta sprawdź :P
 
Dzięki chojrak mam tą funkcje ale teraz nie wiem za bardzo jak dodać exhuanded na obracanie się (taniec)

Code:
bool Game::playerTurn(uint32_t playerId, Direction dir)
{
	Player* player = getPlayerByID(playerId);
	if(!player || player->isRemoved())
		return false;

	if(internalCreatureTurn(player, dir))
	{
		player->setIdleTime(0);
		return true;
	}

	if(player->getDirection() != dir || !player->hasCustomFlag(PlayerCustomFlag_CanTurnhop))
		return false;

	Position pos = getNextPosition(dir, player->getPosition());
	Tile* tile = map->getTile(pos);
	if(!tile || !tile->ground)
		return false;

	player->setIdleTime(0);
	ReturnValue ret = tile->__queryAdd(0, player, 1, FLAG_IGNOREBLOCKITEM);
	if(ret != RET_NOTENOUGHROOM && (ret != RET_NOTPOSSIBLE || player->hasCustomFlag(PlayerCustomFlag_CanMoveAnywhere))
		&& (ret != RET_PLAYERISNOTINVITED || player->hasFlag(PlayerFlag_CanEditHouses)))
		return internalTeleport(player, pos, false, FLAG_NOLIMIT, false);

	player->sendCancelMessage(ret);
	return false;
}

//Jeśli ktoś by był tak miły i by zrobił to , były by zajebiście . bardzo proszę :)


Mi sie zdaje że tutaj muszę dodać exhu
Code:
if(internalCreatureTurn(player, dir))
{
player->setIdleTime(0);
[B]<exhu>[/B]
return true;
}

Jeśli myślę dobrze to co tam dopisać zamiast <exhu> , jak sie nazywa taka funkcja na exhu ?
 
Last edited:
w sumie to od 2 dni u mnie też jeden chojrak się tak bawi.


##edit

Code:
local exhaust = {
    storage = 2152,
    seconds = 5
}
 
function onDirection(cid, old, current)
    if isPlayer(cid) then 
        if current ~= old and exhaustion.check(cid, exhaust.storage) then
            doPlayerSendCancel(cid, 'Don\'t saturate the server making flood.')
            return false
        else
            exhaustion.set(cid, exhaust.storage, exhaust.seconds)
        end
    end
    return true
end
znalazłem coś takiego, możesz przetestować i dać znak ;)
 
Last edited by a moderator:
Czy możliwe że to coś debuguje wszystkich ;d? czy tylko tych którzy są w polu widzenia?
 
Status
Not open for further replies.
Back
Top