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

Solved Problems when someone CAST "Stronghaste" on CTF.

Ryxy

SYN - Morta8.6
Joined
Jul 23, 2013
Messages
97
Reaction score
7
Location
Spain (Barcelona)
As topic say.

When someone use the Spell "Utani tempo hur", "Utani Gran Hur" and take the "Flag" he get really slow. Like 25-30seconds/SQM. Normally when someone take the "Flag" without Strong Haste its works perfectly.

Thanks.

Code:
http://wklej.org/id/1536707/
 
Last edited:
Post the full script, imposible to see what it could be. Ex. what is the releaseRF(cid) function?
 
You can also just add this to the haste spells.
Code:
if isInRange(getPlayerPosition(cid), {x = 100, y = 100, z = 7}, {x = 200, y = 300, z = 7}) then -- event area
    doPlayerSendCancel(cid, "You can't use this here.")
    return false
end
 
Last edited:
PHP:
if isInRange(getPlayerPosition(cid), {x = 31958, y = 32417, z = 7}, {x = 32040, y = 32496, z = 7}) then
-- event area
    doPlayerSendCancel(cid, "You can't use this here.")
    return false
end

You forget "then" I think.

Edit: No, it still doenst work.
#Error/
QO88XhX.png
 
Last edited:
Oh ye I did :p
Replace this function in data/lib/032-position.lua
Code:
function isInRange(position, fromPosition, toPosition)
   return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z)
end
 
@Limos

I already replaced:
PHP:
function isInRange(position, fromPosition, toPosition)
   return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z)
end

Same error:
iBL1uyt.png


Edit: Thinking about remove all doChangeSpeed functions..
 
@Limos Doenst work. I've tried with "getCreaturePosition", getThingPos, getPlayerPosition.

NVM, I'll doChangeSpeed functions when player take "Flag". And it should works 100%.
Thanks anyway!
 
Did you maybe not restart the server after you made the changes in the lib? Incase you like to keep the speed.
The error says position is nil so it's wrong in the function or the first parameter is nil.
 
Well I already fix it, and now its works perfectly. I've removed few doChangeSpeed(cid, getTheSpeed(getPlayerLevel(cid)) - getCreatureSpeed(cid)) and now its works.
Thanks anyway. <3
 
Back
Top