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

Action - speed attack

Alaa Adel

Basic Mapper
Joined
Mar 2, 2014
Messages
231
Reaction score
8
Hello everybody :)
does anyone knows how to make no exhaust to a weapon?
i've tryied to change the attack speed at vocations.xml but it was a little bugged and it wasn't so fast.
so if anyone knows that please post it here!
 
What do you mean by no exhaust to a weapon? There should be time between the hits else you will instant kill everything.
You can set attackspeed to 500 if you want it really fast.
 
I think he means how to reduce the attack speed of one weapon instead of all weapons.
I'd like to know this too so bump. :)
 
TFS 0.3 (Crying Damson) you can add attackspeed to the item in items.xml
Code:
<attribute key="attackspeed" value="500" />
TFS 0.2 (Mystic Spirit) doesn't have this option.

You could make this effect in a Lua script though, by executing the combat 2x, second one 0.5 seconds later if you have attackspeed 1000 for example.
 
Okok :) ... I don't actually know my tfs version ... but its okay I will check it out later.
but, do you know how to make spells/magic effects on a weapon?

You know ... a weapon that makes flames around him (on the 8 squares).
 
Last edited by a moderator:
Wand, melee or distance weapon?

You can also look at explosive_arrow script in data/weapons/scripts for example.
 
:/ my tfs version is 0.2.11 ... but I dont wqnt the attack speed now I just want the effects, ok I will check the explosion arrow

Ok now i have the spell of the weapon... but it doesn't hit any damage!!! what to do? ( i want it to hit holy damage )
 
Last edited by a moderator:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_BLOCKSHIELD, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HolyDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 2, 1, 2)

local area = createCombatArea( { {1, 1, 1},{1, 3, 1},{1, 1, 1} } )
setCombatArea(combat, area)

function onUseWeapon(cid, var)
return doCombat(cid, combat, var)
end

maybe there isn't something called holydamage so i can change it to ice damage? maybe thats the reason that its not attacking.

Yup! thats it, it worked when i changed the HOLYDAMAGE to ICEDAMAGE but there isn't another way to hit with holy damage?
 
Last edited by a moderator:
The constant name is
Code:
COMBAT_HOLYDAMAGE

For other constant names you can go to global.lua. There you can find all constant names for spells/magic effects you can use.
 
LOOOL THANKS LIMOS! you are perfect! :p

but one last thing haha :D do you know how to make a teleport scroll for my tfs version? cuz all scripts doesn't work
 
If you found one that gives errors or other problems. You can often just change a few things to make it work on your server.
Post the script and the errors you get.
 
Code:
function countDown(number, pos, effect, msgonend, effectonend)
local n = number
for i = 1, number do
addEvent(doSendAnimatedText,i* 1000, pos, n > 1 and n.."" or msgonend .."", n < 6 and TEXTCOLOR_RED or TEXTCOLOR_GREEN)
addEvent(doSendMagicEffect,i* 1000, pos, n > 1 and effect or effectonend )

n = n -1
end
n = number
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayerPzLocked(cid) then
doPlayerSendCancel(cid,"You Cannot Teleport Right After A Battle!.")
else
countDown(10, getThingPos(cid), 5, "Warped!", 2)
doCreatureSetNoMove(cid, 1)
addEvent(doTeleportThing,10000,cid,getTownTemplePosition(getPlayerTown(cid)),FALSE)
addEvent(doCreatureSetNoMove,10000,cid, 0)
addEvent(doSendMagicEffect,10004,getTownTemplePosition(getPlayerTown(cid)), 10)
end
return true
end
 
Last edited by a moderator:
You forgot to post the errors.

Change doCreatureSetNoMove to mayNotMove.
Animated text doesn't exist anymore in client 9.1+ servers because it's not possible anymore with those clients.

You can use doCreatureSay Instead.
Code:
doCreatureSay(cid, text, type)

In the function addEvent
Code:
addEvent(doCreatureSay, i * 1000, cid, n, TALKTYPE_ORANGE_1)
 
Back
Top