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

Otclient Fast Attack

It is server related thing. If you change attack speed [xml or some wrong pare of sources]
, but not change 'think' interval [server sources] it will not attack faster when you do not move, but it will attack everytime you make step.
Client related thing that can increase attack speed is clicking fast 'attack/stop attack' [when fast attack is enabled on server, but 'think interval' is high - ~1 second], because it will attack everytime you click monster in game/on battle, BUT IF YOU FIX SOURCES OF SERVER THAT 'TRICK' WILL NOT CHANGE ATTACK SPEED (AS IT WILL BE ALWAYS 'FASTEST').
 
It is server related thing. If you change attack speed [xml or some wrong pare of sources]
, but not change 'think' interval [server sources] it will not attack faster when you do not move, but it will attack everytime you make step.
Client related thing that can increase attack speed is clicking fast 'attack/stop attack' [when fast attack is enabled on server, but 'think interval' is high - ~1 second], because it will attack everytime you click monster in game/on battle, BUT IF YOU FIX SOURCES OF SERVER THAT 'TRICK' WILL NOT CHANGE ATTACK SPEED (AS IT WILL BE ALWAYS 'FASTEST').
here all is good
vocation.xml
PHP:
<vocation id="4" clientid="1" name="Knight" description="a knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" manamultiplier="3.0" attackspeed="150" basespeed="220" soulmax="100" gainsoulticks="120" fromvoc="4">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.1"/>
        <skill id="1" multiplier="1.1"/>
        <skill id="2" multiplier="1.1"/>
        <skill id="3" multiplier="1.1"/>
        <skill id="4" multiplier="1.4"/>
        <skill id="5" multiplier="1.1"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
creature.h
PHP:
#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 100
#define EVENT_CHECK_CREATURE_INTERVAL (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT)

Gesior i need change source from otclient to fix this?
 
here all is good
vocation.xml
PHP:
<vocation id="4" clientid="1" name="Knight" description="a knight" gaincap="25" gainhp="15" gainmana="5" gainhpticks="3" gainhpamount="5" gainmanaticks="6" gainmanaamount="5" manamultiplier="3.0" attackspeed="150" basespeed="220" soulmax="100" gainsoulticks="120" fromvoc="4">
        <formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
        <skill id="0" multiplier="1.1"/>
        <skill id="1" multiplier="1.1"/>
        <skill id="2" multiplier="1.1"/>
        <skill id="3" multiplier="1.1"/>
        <skill id="4" multiplier="1.4"/>
        <skill id="5" multiplier="1.1"/>
        <skill id="6" multiplier="1.1"/>
    </vocation>
creature.h
PHP:
#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 100
#define EVENT_CHECK_CREATURE_INTERVAL (EVENT_CREATURE_THINK_INTERVAL / EVENT_CREATURECOUNT)

Gesior i need change source from otclient to fix this?
Try to change:
#define EVENT_CREATURE_THINK_INTERVAL 100
to:
#define EVENT_CREATURE_THINK_INTERVAL 30

but remember that it can lag a bit with many players online [use more CPU] and some LUA creaturescripts (that bases on number of 'onThing' calls) can work wrong.

EDIT:
Remember! Every change in .h file requires 'Rebuild All' on windows (on linux: rm *.o before make). Without recompiling all files (rebuild all) it may not work.

// of course you may know which files requires recompiling [not all] and list them or even your program got feature that detect which files require recompilation, but Rebuild All is best solution if you got no idea what requires recompilation and you modify .h file.
 
Last edited:
uz83iwutb
Try to change:
#define EVENT_CREATURE_THINK_INTERVAL 100
to:
#define EVENT_CREATURE_THINK_INTERVAL 30

but remember that it can lag a bit with many players online [use more CPU] and some LUA creaturescripts (that bases on number of 'onThing' calls) can work wrong.

EDIT:
Remember! Every change in .h file requires 'Rebuild All' on windows (on linux: rm *.o before make). Without recompiling all files (rebuild all) it may not work.

// of course you may know which files requires recompiling [not all] and list them or even your program got feature that detect which files require recompilation, but Rebuild All is best solution if you got no idea what requires recompilation and you modify .h file.

the same.
but now Only now it is more blows but the same distance
Screen_Shot_08_24_15_at_10_16_AM.png
 
uz83iwutb


the same.
but now Only now it is more blows but the same distance
Screen_Shot_08_24_15_at_10_16_AM.png
It's hard to understand what do you want. To show hits damage that appear on other hit damage? I don't know if it's possible. From some version of Tibia Client, it add damage, when server send too many values per second and show only one value with sum of damage.
 
It's hard to understand what do you want. To show hits damage that appear on other hit damage? I don't know if it's possible. From some version of Tibia Client, it add damage, when server send too many values per second and show only one value with sum of damage.
like fast attack
jak używam zwykłego klienta 7.6 (to działa) a na otcliencie już nie
Screen_Shot_04_23_15_at_01_01_PM.png

this work on client 7.6
but when i use otclient i se this: (jak używam otclienta to mam taki atak)
Screen_Shot_04_23_15_at_12_57_PM.png


yes i want see many value per second
 
Lines 121 to 146:
https://github.com/edubart/otclient...ee3b0016625a826dae64b/src/client/map.cpp#L121

Replace:
PHP:
            // this code will stack animated texts of the same color
            AnimatedTextPtr animatedText = thing->static_self_cast<AnimatedText>();
            AnimatedTextPtr prevAnimatedText;
            bool merged = false;
            for(auto other : m_animatedTexts) {
                if(other->getPosition() == pos) {
                    prevAnimatedText = other;
                    if(other->merge(animatedText)) {
                        merged = true;
                        break;
                    }
                }
            }
            if(!merged) {
                if(prevAnimatedText) {
                    Point offset = prevAnimatedText->getOffset();
                    float t = prevAnimatedText->getTimer().ticksElapsed();
                    if(t < Otc::ANIMATED_TEXT_DURATION / 4.0) { // didnt move 12 pixels
                        int y = 12 - 48 * t / (float)Otc::ANIMATED_TEXT_DURATION;
                        offset += Point(0, y);
                    }
                    offset.y = std::min<int>(offset.y, 12);
                    animatedText->setOffset(offset);
                }
                m_animatedTexts.push_back(animatedText);
            }
With this:
PHP:
                m_animatedTexts.push_back(animatedText);

I got no idea if it will work fine, but you can try. I'm not sure about calculation of offset [position] of text.
 
Last edited:
Lines 121 to 146:
https://github.com/edubart/otclient...ee3b0016625a826dae64b/src/client/map.cpp#L121

Replace:
PHP:
            // this code will stack animated texts of the same color
            AnimatedTextPtr animatedText = thing->static_self_cast<AnimatedText>();
            AnimatedTextPtr prevAnimatedText;
            bool merged = false;
            for(auto other : m_animatedTexts) {
                if(other->getPosition() == pos) {
                    prevAnimatedText = other;
                    if(other->merge(animatedText)) {
                        merged = true;
                        break;
                    }
                }
            }
            if(!merged) {
                if(prevAnimatedText) {
                    Point offset = prevAnimatedText->getOffset();
                    float t = prevAnimatedText->getTimer().ticksElapsed();
                    if(t < Otc::ANIMATED_TEXT_DURATION / 4.0) { // didnt move 12 pixels
                        int y = 12 - 48 * t / (float)Otc::ANIMATED_TEXT_DURATION;
                        offset += Point(0, y);
                    }
                    offset.y = std::min<int>(offset.y, 12);
                    animatedText->setOffset(offset);
                }
                m_animatedTexts.push_back(animatedText);
            }
With this:
PHP:
                m_animatedTexts.push_back(animatedText);

I got no idea if it will work fine, but you can try. I'm not sure about calculation of offset [position] of text.
1>..\src\client\map.cpp(121): error C2065: 'animatedText' : undeclared identifier
 
1>..\src\client\map.cpp(121): error C2065: 'animatedText' : undeclared identifier
Try to use this. It won't merge texts, but I'm not sure about text positions.
PHP:
            // this code will stack animated texts of the same color
            AnimatedTextPtr animatedText = thing->static_self_cast<AnimatedText>();
            AnimatedTextPtr prevAnimatedText;

            for(auto other : m_animatedTexts) {
                if(other->getPosition() == pos) {
                    prevAnimatedText = other;
                }
            }

            if(prevAnimatedText) {
                Point offset = prevAnimatedText->getOffset();
                float t = prevAnimatedText->getTimer().ticksElapsed();
                if(t < Otc::ANIMATED_TEXT_DURATION / 4.0) { // didnt move 12 pixels
                    int y = 12 - 48 * t / (float)Otc::ANIMATED_TEXT_DURATION;
                    offset += Point(0, y);
                }
                offset.y = std::min<int>(offset.y, 12);
                animatedText->setOffset(offset);
            }
            m_animatedTexts.push_back(animatedText);
 
Try to use this. It won't merge texts, but I'm not sure about text positions.
PHP:
            // this code will stack animated texts of the same color
            AnimatedTextPtr animatedText = thing->static_self_cast<AnimatedText>();
            AnimatedTextPtr prevAnimatedText;

            for(auto other : m_animatedTexts) {
                if(other->getPosition() == pos) {
                    prevAnimatedText = other;
                }
            }

            if(prevAnimatedText) {
                Point offset = prevAnimatedText->getOffset();
                float t = prevAnimatedText->getTimer().ticksElapsed();
                if(t < Otc::ANIMATED_TEXT_DURATION / 4.0) { // didnt move 12 pixels
                    int y = 12 - 48 * t / (float)Otc::ANIMATED_TEXT_DURATION;
                    offset += Point(0, y);
                }
                offset.y = std::min<int>(offset.y, 12);
                animatedText->setOffset(offset);
            }
            m_animatedTexts.push_back(animatedText);
teraz tak jakby bił ale strasznie szybko znikają zadane ciosy ss nie da się zrobić bo nie widać na ss zadanych ciosów
ps nie wygląda to w ogóle podobnie do tego pierwszego screena z tibia 7.6

now as if it were but terribly quickly disappear inflicted blows ss can not be done because you can not see the blows to ss
ps does not look at all like the first screenshot of the tibia 7.6
 
teraz tak jakby bił ale strasznie szybko znikają zadane ciosy ss nie da się zrobić bo nie widać na ss zadanych ciosów
ps nie wygląda to w ogóle podobnie do tego pierwszego screena z tibia 7.6

now as if it were but terribly quickly disappear inflicted blows ss can not be done because you can not see the blows to ss
ps does not look at all like the first screenshot of the tibia 7.6
It does not look like Tibia 7.6, because it was a bug in 7.6, so they fixed it in further version of Tibia. OTClient get what is the best in Tibia Client. They don't try to clone Cipsoft mistakes.

-----------------------
Na próbę możesz jeszcze wywalić ten fragment i zobaczyć jak wygląda animacja:
PHP:
            if(prevAnimatedText) {
                Point offset = prevAnimatedText->getOffset();
                float t = prevAnimatedText->getTimer().ticksElapsed();
                if(t < Otc::ANIMATED_TEXT_DURATION / 4.0) { // didnt move 12 pixels
                    int y = 12 - 48 * t / (float)Otc::ANIMATED_TEXT_DURATION;
                    offset += Point(0, y);
                }
                offset.y = std::min<int>(offset.y, 12);
                animatedText->setOffset(offset);
            }
 
It does not look like Tibia 7.6, because it was a bug in 7.6, so they fixed it in further version of Tibia. OTClient get what is the best in Tibia Client. They don't try to clone Cipsoft mistakes.

-----------------------
Na próbę możesz jeszcze wywalić ten fragment i zobaczyć jak wygląda animacja:
PHP:
            if(prevAnimatedText) {
                Point offset = prevAnimatedText->getOffset();
                float t = prevAnimatedText->getTimer().ticksElapsed();
                if(t < Otc::ANIMATED_TEXT_DURATION / 4.0) { // didnt move 12 pixels
                    int y = 12 - 48 * t / (float)Otc::ANIMATED_TEXT_DURATION;
                    offset += Point(0, y);
                }
                offset.y = std::min<int>(offset.y, 12);
                animatedText->setOffset(offset);
            }
with normal client cipsoft little possibilities. so I wanted to move on for otclient. I have a long time problem with changing fast attack on a similar client for CipSoft 7.6

wiem ze to był błąd ale chciałem zrobić taki serwer z tym błędem na wyższym/normalnym protokole

ok skompilowałem
dalej to samo ;]
 
with normal client cipsoft little possibilities. so I wanted to move on for otclient. I have a long time problem with changing fast attack on a similar client for CipSoft 7.6

wiem ze to był błąd ale chciałem zrobić taki serwer z tym błędem na wyższym/normalnym protokole

ok skompilowałem
dalej to samo ;]
Masz gdzies w silniku jest zdefiniowane:
ANIMATED_TEXT_DURATION
moze cos z tym mozesz pogrzebac, dobrze bylo by tez rozgryzc jaki powinien byc 'offset' pomiedzy tekstami i czy nie ma jakiegos limitu tekstow wyswietlanych na 1 tile.
Musial bys kogos innego znalezc do grzebania w tym, bo ja siedze w pracy i nie mam tu kompilatora, zeby testowac co i jak dziala.
 
Masz gdzies w silniku jest zdefiniowane:
ANIMATED_TEXT_DURATION
moze cos z tym mozesz pogrzebac, dobrze bylo by tez rozgryzc jaki powinien byc 'offset' pomiedzy tekstami i czy nie ma jakiegos limitu tekstow wyswietlanych na 1 tile.
Musial bys kogos innego znalezc do grzebania w tym, bo ja siedze w pracy i nie mam tu kompilatora, zeby testowac co i jak dziala.
w silniku niema ANIMATED_TEXT_DURATION
popróbuję (rozumiem,postaram się kogoś znaleźć ale wątpię) dzięki za pomoc.

tylko w otcliencie
Code:
namespace Otc
{
    enum {
        TILE_PIXELS = 32,
        MAX_ELEVATION = 24,

        SEA_FLOOR = 7,
        MAX_Z = 15,
        UNDERGROUND_FLOOR = SEA_FLOOR+1,
        AWARE_UNDEGROUND_FLOOR_RANGE = 2,

        INVISIBLE_TICKS_PER_FRAME = 500,
        ITEM_TICKS_PER_FRAME = 500,
        ANIMATED_TEXT_DURATION = 100,
        STATIC_DURATION_PER_CHARACTER = 60,
        MIN_STATIC_TEXT_DURATION = 3000,
        MAX_STATIC_TEXT_WIDTH = 200,
        MAX_AUTOWALK_STEPS_RETRY = 10,
        MAX_AUTOWALK_DIST = 127
 
Zmień w tym:
PHP:
         // this code will stack animated texts of the same colorAnimatedTextPtr animatedText = thing->static_self_cast<AnimatedText>();AnimatedTextPtr prevAnimatedText;bool merged = false;
 for(auto other : m_animatedTexts) {
 if(other->getPosition() == pos) {prevAnimatedText = other;
 if(other->merge(animatedText)) {merged = true;
 break;
 }
 }
 }
 if(!merged) {
 if(prevAnimatedText) {Point offset = prevAnimatedText->getOffset();float t = prevAnimatedText->getTimer().ticksElapsed();
 if(t < Otc::ANIMATED_TEXT_DURATION / 4.0) { // didnt move 12 pixelsint y = 12 - 48 * t / (float)Otc::ANIMATED_TEXT_DURATION;offset += Point(0, y);
 }offset.y = std::min<int>(offset.y, 12);animatedText->setOffset(offset);
 }m_animatedTexts.push_back(animatedText);
 }

Merged z true na false.
 
w silniku niema ANIMATED_TEXT_DURATION
popróbuję (rozumiem,postaram się kogoś znaleźć ale wątpię) dzięki za pomoc.

tylko w otcliencie
Code:
namespace Otc
{
    enum {
        TILE_PIXELS = 32,
        MAX_ELEVATION = 24,

        SEA_FLOOR = 7,
        MAX_Z = 15,
        UNDERGROUND_FLOOR = SEA_FLOOR+1,
        AWARE_UNDEGROUND_FLOOR_RANGE = 2,

        INVISIBLE_TICKS_PER_FRAME = 500,
        ITEM_TICKS_PER_FRAME = 500,
        ANIMATED_TEXT_DURATION = 100,
        STATIC_DURATION_PER_CHARACTER = 60,
        MIN_STATIC_TEXT_DURATION = 3000,
        MAX_STATIC_TEXT_WIDTH = 200,
        MAX_AUTOWALK_STEPS_RETRY = 10,
        MAX_AUTOWALK_DIST = 127
Chodziło mi o silnik klienta :p
Przy okazji mozesz zobaczyc w jakich miejscach ma to wplyw, wiec pewnie tam trzeba cos nagrzebac:
https://github.com/edubart/otclient/search?utf8=✓&q=ANIMATED_TEXT_DURATION
 
Chodziło mi o silnik klienta :p
Przy okazji mozesz zobaczyc w jakich miejscach ma to wplyw, wiec pewnie tam trzeba cos nagrzebac:
https://github.com/edubart/otclient/search?utf8=✓&q=ANIMATED_TEXT_DURATION
dobra dzięki zaraz pogrzebe ten orginalny kod przywrócić? czy zostać przy tym co zmieniłem ?

działa!!!! wcześniej grzebałem i miałem 100 zamiast 1000 haha.
wszystko później jak wrócę od nowa zrobię bo grzebałem wczoraj :D
Gesior wielkie dzięki za pomoc samemu bym pewnie się mordował jeszcze parę dni.
Margoth no dzięki wystarczyło z true na false bez usuwania kodu
Screen_Shot_08_24_15_at_02_51_PM.png
 
Last edited:
Back
Top