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

Feature Attack Speed, break default attackSpeed limit, FIX doesn't display hits.

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,837
Solutions
18
Reaction score
615
Location
Poland
Hello, i wanna release a little feature for Dragon Ball/Naruto/Bleach or custom servers.​

[video=youtube_share;07wn0NIuKOY]http://youtu.be/07wn0NIuKOY[/video]​

Description:
This C++ modification allows you to set attack speed lower than -1. You can add attack speed skill for ex. axe_skill (that's what i got).
Every skill your attackSpeed will decrease by X points - it's making your attackSpeed faster - you attack faster.
If you know when your attackSpeed is lower than 0 your hits doesn't appear in Tibia window - now it appears and you can attack faster! - break!
What i mean:
In default TFS when you get in vocations.xml attackSpeed = 2000 (1hit/2s), SKILL_AXE = 150 you have 155 *13 = 2015 (in my script in C++),
you got 2000 - 2015 = -15 attackSpeed (2hits/1 second). In default TFS hits doesn't display. Why? Because if you got attackSpeed under 0 , you "stop attack".
In this script hits will be displayed and interval will be set correctly - break default TFS limitations.
Ex. 10hits/1 second.

Credits:
- PhoOwned / Gesior.pl - help me with break attackSpeed limit part and fixing hit display
- Me (Fresh) - Idea

Installation:

This will allow you to display more than 20hits/second!:
Find in files (creature.h): `#define EVENT_CREATURECOUNT` and `#define EVENT_CREATURE_THINK_INTERVAL` and change it to:
PHP:
#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 50

AttackSpeed decreasing by SKILL_AXE (increasing attack speed):
Find in files, function (player.cpp): `uint32_t Player::getAttackSpeed()` and change this function (remove old function getAttackSpeed()) to:
PHP:
uint32_t Player::getAttackSpeed()
{
	Item* weapon = getWeapon();
	// nie 'attackSpeed', bo taka zmienna juz moze istniec w klasie Creature/Player
	int32_t attackSpeedzik;
	if(weapon && weapon->getAttackSpeed() != 0)
		attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13) - weapon->getAttackSpeed();
	else
		attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13);

	if(attackSpeedzik > 0)
		return (uint32_t) attackSpeedzik;
	else
		return 1;
}

Information:

vocation->getAttackSpeed() <--- this is interval from vocations.xml
getSkill(SKILL_AXE, SKILL_LEVEL) <--- this is level of axe fighting
* 13 <--- this is my custom quotient


Little tip how to configure this:

You put in vocations.xml , attackSpeed = 2000 - 1 hit/2 seconds
You have 150 axe fighting = 150 * 13 (you can set this 13 to something else, what you prefer) = 1950

2000 - 1950 (150 axe fighting*13) = 50 ms (milisecond)
It will give you 1 hit per 50 milisecond.

After adding my script into sources you can put under than 0 ms ex.
2000 - 2500 = -500 ms
It will give you ~2 hits per 0,5 second
In default TFS settings, when you have attackSpeed under ~0ms, your hits doesn't display.
Now, Hits will be displayed! :)

That's all,
If you like it (maybe using it), don't forget to give Like!.​
 
Last edited:
did you tested your code with more than 50 players? :) onthink events with such a small interval might lag server so much...also iterating 1 creature per round is not the best solution aswell.
 
I understand the creature event think interval, but can you explain what this does?
Code:
#define EVENT_CREATURECOUNT 1
 
#define EVENT_CREATURE_THINK_INTERVAL 200 ---Not lower then 200! many reasons~
 
with knights working fine but what about sorcs and ed palis? because they have slow attack only knight have a fast attack
 
@Bloody-War You can set that sorcerers, paladins, and druids skilling that skill very slow so they will never get that level like knight, by the way scripts like this are more dedicated to servers like dragon ball etc.
 
@Bloody-War You can set that sorcerers, paladins, and druids skilling that skill very slow so they will never get that level like knight, by the way scripts like this are more dedicated to servers like dragon ball etc.


how to set fast attack 8.6 in sources?
 
Find the part inside sources where the attackspeed is loaded from vocations.xml?
 
Find the part inside sources where the attackspeed is loaded from vocations.xml?
creatures.h

#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 50


uint32_t Player::getAttackSpeed()
{Item* weapon = getWeapon();// nie 'attackSpeed', bo taka zmienna juz moze istniec w klasie Creature/Playerint32_t attackSpeedzik;
if(weapon && weapon->getAttackSpeed() != 0)attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13) - weapon->getAttackSpeed();
elseattackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13);

if(attackSpeedzik > 0)
return (uint32_t) attackSpeedzik;
else
return 1;
}

and i put this but only knight have fast attack i dont know how to put on sorc and other vocs
 
@Bloody-War In this code, attack speed depends on character skill axe, if higher then you're attacking faster.
In vocations.xml you can set default attack speed:
Code:
attackspeed="2000"
2000 = 1 attack per two second
1000 = 1 attack per second
500 = 1 attack per half second
so conclusion is that if lower this number, then you're attacking faster.
 
@Bloody-War In this code, attack speed depends on character skill axe, if higher then you're attacking faster.
In vocations.xml you can set default attack speed:
Code:
attackspeed="2000"
2000 = 1 attack per two second
1000 = 1 attack per second
500 = 1 attack per half second
so conclusion is that if lower this number, then you're attacking faster.
if i put 100 than more fast right?
 
Hello, i wanna release a little feature for Dragon Ball/Naruto/Bleach or custom servers.

[video=youtube_share;07wn0NIuKOY]

Description:
This C++ modification allows you to set attack speed lower than -1. You can add attack speed skill for ex. axe_skill (that's what i got).
Every skill your attackSpeed will decrease by X points - it's making your attackSpeed faster - you attack faster.
If you know when your attackSpeed is lower than 0 your hits doesn't appear in Tibia window - now it appears and you can attack faster! - break!
What i mean:
In default TFS when you get in vocations.xml attackSpeed = 2000 (1hit/2s), SKILL_AXE = 150 you have 155 *13 = 2015 (in my script in C++),
you got 2000 - 2015 = -15 attackSpeed (2hits/1 second). In default TFS hits doesn't display. Why? Because if you got attackSpeed under 0 , you "stop attack".
In this script hits will be displayed and interval will be set correctly - break default TFS limitations.
Ex. 10hits/1 second.

Credits:
- PhoOwned / Gesior.pl - help me with break attackSpeed limit part and fixing hit display
- Me (Fresh) - Idea

Installation:

This will allow you to display more than 20hits/second!:
Find in files (creature.h): `#define EVENT_CREATURECOUNT` and `#define EVENT_CREATURE_THINK_INTERVAL` and change it to:
PHP:
#define EVENT_CREATURECOUNT 1
#define EVENT_CREATURE_THINK_INTERVAL 50

AttackSpeed decreasing by SKILL_AXE (increasing attack speed):
Find in files, function (player.cpp): `uint32_t Player::getAttackSpeed()` and change this function (remove old function getAttackSpeed()) to:
PHP:
uint32_t Player::getAttackSpeed()
{
    Item* weapon = getWeapon();
    // nie 'attackSpeed', bo taka zmienna juz moze istniec w klasie Creature/Player
    int32_t attackSpeedzik;
    if(weapon && weapon->getAttackSpeed() != 0)
        attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13) - weapon->getAttackSpeed();
    else
        attackSpeedzik = vocation->getAttackSpeed() - (getSkill(SKILL_AXE, SKILL_LEVEL) * 13);

    if(attackSpeedzik > 0)
        return (uint32_t) attackSpeedzik;
    else
        return 1;
}

Information:




Little tip how to configure this:


In default TFS settings, when you have attackSpeed under ~0ms, your hits doesn't display.
Now, Hits will be displayed! :)

That's all,
If you like it (maybe using it), don't forget to give Like!.​

it works but the problem is if axe is

17:06 You see a mythril axe (Atk:48, Def:28 +2).
It weighs 55.00 oz.

this axe deal 3000 -5000 hp on players how i can put max 300 etc?
 
Back
Top