• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

TFS 1.X+ Where Are distance effects?

gritness

Member
Joined
May 26, 2021
Messages
33
Reaction score
5
Hey Guys !

I added some new ammo to my tfs, shoot types work great, but when i would to assign a script to new bolt i it's not working (is without shoot animation) I should to add new CONST_ANI to distance effects but idk where is it..

"combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SANBOLT)" - PARAM_DISTANCEEFFECT do not see a CONST_ANI_SANBOLT


Someone know where are distance effects list in lua/cpp ??
 

Xikini

I whore myself out for likes
Senator
Joined
Nov 17, 2010
Messages
6,245
Solutions
545
Reaction score
4,482
Hey Guys !

I added some new ammo to my tfs, shoot types work great, but when i would to assign a script to new bolt i it's not working (is without shoot animation) I should to add new CONST_ANI to distance effects but idk where is it..

"combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SANBOLT)" - PARAM_DISTANCEEFFECT do not see a CONST_ANI_SANBOLT


Someone know where are distance effects list in lua/cpp ??
const.h
 
OP
OP
gritness

gritness

Member
Joined
May 26, 2021
Messages
33
Reaction score
5
i've done it before

"
enum ShootType_t : uint8_t {
CONST_ANI_NONE,

CONST_ANI_SPEAR = 1,
CONST_ANI_BOLT = 2,
CONST_ANI_ARROW = 3,
CONST_ANI_FIRE = 4,
CONST_ANI_ENERGY = 5,
CONST_ANI_POISONARROW = 6,
CONST_ANI_BURSTARROW = 7,
CONST_ANI_THROWINGSTAR = 8,
CONST_ANI_THROWINGKNIFE = 9,
CONST_ANI_SMALLSTONE = 10,
CONST_ANI_DEATH = 11,
CONST_ANI_LARGEROCK = 12,
CONST_ANI_SNOWBALL = 13,
CONST_ANI_POWERBOLT = 14,
CONST_ANI_POISON = 15,
CONST_ANI_INFERNALBOLT = 16,
CONST_ANI_HUNTINGSPEAR = 17,
CONST_ANI_ENCHANTEDSPEAR = 18,
CONST_ANI_REDSTAR = 19,
CONST_ANI_GREENSTAR = 20,
CONST_ANI_ROYALSPEAR = 21,
CONST_ANI_SNIPERARROW = 22,
CONST_ANI_ONYXARROW = 23,
CONST_ANI_PIERCINGBOLT = 24,
CONST_ANI_WHIRLWINDSWORD = 25,
CONST_ANI_WHIRLWINDAXE = 26,
CONST_ANI_WHIRLWINDCLUB = 27,
CONST_ANI_ETHEREALSPEAR = 28,
CONST_ANI_ICE = 29,
CONST_ANI_EARTH = 30,
CONST_ANI_HOLY = 31,
CONST_ANI_SUDDENDEATH = 32,
CONST_ANI_FLASHARROW = 33,
CONST_ANI_FLAMMINGARROW = 34,
CONST_ANI_SHIVERARROW = 35,
CONST_ANI_ENERGYBALL = 36,
CONST_ANI_SMALLICE = 37,
CONST_ANI_SMALLHOLY = 38,
CONST_ANI_SMALLEARTH = 39,
CONST_ANI_EARTHARROW = 40,
CONST_ANI_EXPLOSION = 41,
CONST_ANI_CAKE = 42,

CONST_ANI_TARSALARROW = 44,
CONST_ANI_VORTEXBOLT = 45,

CONST_ANI_PRISMATICBOLT = 48,
CONST_ANI_CRYSTALLINEARROW = 49,
CONST_ANI_DRILLBOLT = 50,
CONST_ANI_ENVENOMEDARROW = 51,

CONST_ANI_GLOOTHSPEAR = 53,
CONST_ANI_SIMPLEARROW = 54,

CONST_ANI_LEAFSTAR = 56,
CONST_ANI_DIAMONDARROW = 57,
CONST_ANI_SPECTRALBOLT = 58,
CONST_ANI_ROYALSTAR = 59,
CONST_ANI_SANBOLT = 60,

CONST_ANI_LAST = CONST_ANI_SANBOLT,

// for internal use, don't send to client
CONST_ANI_WEAPONTYPE = 0xFE, // 254
};
"

shootTypes looks ok but cant add this to COMBAT_PARAM_DISTANCEEFFECT.

if can i find COMBAT_PARAM_DISTANCEEFFECT in const.h say me where xd
 

Xikini

I whore myself out for likes
Senator
Joined
Nov 17, 2010
Messages
6,245
Solutions
545
Reaction score
4,482
i've done it before

"
enum ShootType_t : uint8_t {
CONST_ANI_NONE,

CONST_ANI_SPEAR = 1,
CONST_ANI_BOLT = 2,
CONST_ANI_ARROW = 3,
CONST_ANI_FIRE = 4,
CONST_ANI_ENERGY = 5,
CONST_ANI_POISONARROW = 6,
CONST_ANI_BURSTARROW = 7,
CONST_ANI_THROWINGSTAR = 8,
CONST_ANI_THROWINGKNIFE = 9,
CONST_ANI_SMALLSTONE = 10,
CONST_ANI_DEATH = 11,
CONST_ANI_LARGEROCK = 12,
CONST_ANI_SNOWBALL = 13,
CONST_ANI_POWERBOLT = 14,
CONST_ANI_POISON = 15,
CONST_ANI_INFERNALBOLT = 16,
CONST_ANI_HUNTINGSPEAR = 17,
CONST_ANI_ENCHANTEDSPEAR = 18,
CONST_ANI_REDSTAR = 19,
CONST_ANI_GREENSTAR = 20,
CONST_ANI_ROYALSPEAR = 21,
CONST_ANI_SNIPERARROW = 22,
CONST_ANI_ONYXARROW = 23,
CONST_ANI_PIERCINGBOLT = 24,
CONST_ANI_WHIRLWINDSWORD = 25,
CONST_ANI_WHIRLWINDAXE = 26,
CONST_ANI_WHIRLWINDCLUB = 27,
CONST_ANI_ETHEREALSPEAR = 28,
CONST_ANI_ICE = 29,
CONST_ANI_EARTH = 30,
CONST_ANI_HOLY = 31,
CONST_ANI_SUDDENDEATH = 32,
CONST_ANI_FLASHARROW = 33,
CONST_ANI_FLAMMINGARROW = 34,
CONST_ANI_SHIVERARROW = 35,
CONST_ANI_ENERGYBALL = 36,
CONST_ANI_SMALLICE = 37,
CONST_ANI_SMALLHOLY = 38,
CONST_ANI_SMALLEARTH = 39,
CONST_ANI_EARTHARROW = 40,
CONST_ANI_EXPLOSION = 41,
CONST_ANI_CAKE = 42,

CONST_ANI_TARSALARROW = 44,
CONST_ANI_VORTEXBOLT = 45,

CONST_ANI_PRISMATICBOLT = 48,
CONST_ANI_CRYSTALLINEARROW = 49,
CONST_ANI_DRILLBOLT = 50,
CONST_ANI_ENVENOMEDARROW = 51,

CONST_ANI_GLOOTHSPEAR = 53,
CONST_ANI_SIMPLEARROW = 54,

CONST_ANI_LEAFSTAR = 56,
CONST_ANI_DIAMONDARROW = 57,
CONST_ANI_SPECTRALBOLT = 58,
CONST_ANI_ROYALSTAR = 59,
CONST_ANI_SANBOLT = 60,

CONST_ANI_LAST = CONST_ANI_SANBOLT,

// for internal use, don't send to client
CONST_ANI_WEAPONTYPE = 0xFE, // 254
};
"

shootTypes looks ok but cant add this to COMBAT_PARAM_DISTANCEEFFECT.

if can i find COMBAT_PARAM_DISTANCEEFFECT in const.h say me where xd
mmm, might be in tools.cpp

I think that's where you setup ammo stuff alongside const.h
 
OP
OP
gritness

gritness

Member
Joined
May 26, 2021
Messages
33
Reaction score
5
mmm, might be in tools.cpp

I think that's where you setup ammo stuff alongside const.h

I added here :

ShootTypeNames shootTypeNames = {
{"arrow", CONST_ANI_ARROW},
{"bolt", CONST_ANI_BOLT},
{"burstarrow", CONST_ANI_BURSTARROW},
{"cake", CONST_ANI_CAKE},
{"crystallinearrow", CONST_ANI_CRYSTALLINEARROW},
{"drillbolt", CONST_ANI_DRILLBOLT},
{"death", CONST_ANI_DEATH},
{"energy", CONST_ANI_ENERGY},
{"enchantedspear", CONST_ANI_ENCHANTEDSPEAR},
{"etherealspear", CONST_ANI_ETHEREALSPEAR},
{"eartharrow", CONST_ANI_EARTHARROW},
{"explosion", CONST_ANI_EXPLOSION},
{"earth", CONST_ANI_EARTH},
{"energyball", CONST_ANI_ENERGYBALL},
{"envenomedarrow", CONST_ANI_ENVENOMEDARROW},
{"fire", CONST_ANI_FIRE},
{"flasharrow", CONST_ANI_FLASHARROW},
{"flammingarrow", CONST_ANI_FLAMMINGARROW},
{"greenstar", CONST_ANI_GREENSTAR},
{"gloothspear", CONST_ANI_GLOOTHSPEAR},
{"huntingspear", CONST_ANI_HUNTINGSPEAR},
{"holy", CONST_ANI_HOLY},
{"infernalbolt", CONST_ANI_INFERNALBOLT},
{"ice", CONST_ANI_ICE},
{"largerock", CONST_ANI_LARGEROCK},
{"leafstar", CONST_ANI_LEAFSTAR},
{"onyxarrow", CONST_ANI_ONYXARROW},
{"redstar", CONST_ANI_REDSTAR},
{"royalspear", CONST_ANI_ROYALSPEAR},
{"spear", CONST_ANI_SPEAR},
{"sniperarrow", CONST_ANI_SNIPERARROW},
{"smallstone", CONST_ANI_SMALLSTONE},
{"smallice", CONST_ANI_SMALLICE},
{"smallholy", CONST_ANI_SMALLHOLY},
{"smallearth", CONST_ANI_SMALLEARTH},
{"snowball", CONST_ANI_SNOWBALL},
{"suddendeath", CONST_ANI_SUDDENDEATH},
{"shiverarrow", CONST_ANI_SHIVERARROW},
{"simplearrow", CONST_ANI_SIMPLEARROW},
{"poisonarrow", CONST_ANI_POISONARROW},
{"powerbolt", CONST_ANI_POWERBOLT},
{"poison", CONST_ANI_POISON},
{"prismaticbolt", CONST_ANI_PRISMATICBOLT},
{"piercingbolt", CONST_ANI_PIERCINGBOLT},
{"throwingstar", CONST_ANI_THROWINGSTAR},
{"vortexbolt", CONST_ANI_VORTEXBOLT},
{"throwingknife", CONST_ANI_THROWINGKNIFE},
{"tarsalarrow", CONST_ANI_TARSALARROW},
{"whirlwindsword", CONST_ANI_WHIRLWINDSWORD},
{"whirlwindaxe", CONST_ANI_WHIRLWINDAXE},
{"whirlwindclub", CONST_ANI_WHIRLWINDCLUB},
{"diamondarrow", CONST_ANI_DIAMONDARROW},
{"spectralbolt", CONST_ANI_SPECTRALBOLT},
{"royalstar", CONST_ANI_ROYALSTAR},
{"sanbolt", CONST_ANI_SANBOLT},
};

and here :

AmmoTypeNames ammoTypeNames = {
{"arrow", AMMO_ARROW},
{"bolt", AMMO_BOLT},
{"poisonarrow", AMMO_ARROW},
{"burstarrow", AMMO_ARROW},
{"enchantedspear", AMMO_SPEAR},
{"etherealspear", AMMO_SPEAR},
{"eartharrow", AMMO_ARROW},
{"flasharrow", AMMO_ARROW},
{"flammingarrow", AMMO_ARROW},
{"huntingspear", AMMO_SPEAR},
{"infernalbolt", AMMO_BOLT},
{"largerock", AMMO_STONE},
{"onyxarrow", AMMO_ARROW},
{"powerbolt", AMMO_BOLT},
{"piercingbolt", AMMO_BOLT},
{"royalspear", AMMO_SPEAR},
{"snowball", AMMO_SNOWBALL},
{"smallstone", AMMO_STONE},
{"spear", AMMO_SPEAR},
{"sniperarrow", AMMO_ARROW},
{"shiverarrow", AMMO_ARROW},
{"throwingstar", AMMO_THROWINGSTAR},
{"throwingknife", AMMO_THROWINGKNIFE},
{"diamondarrow", AMMO_ARROW},
{"spectralbolt", AMMO_BOLT},
{"sanbolt", AMMO_BOLT},

};




But still now work with other action like Distance Effects :/
 

Silba

is stephany, the josh wife
Joined
Aug 22, 2013
Messages
436
Solutions
9
Reaction score
348
resolved :

"combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, 60)"
You should mark Xikini as correct answer, tools.cpp and const.h both contain the effects you were looking for and are where you would add your own. The 60 you have represents one of those effects as defined in const.h.
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLSTONE) = combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, 10)
 
Top