• 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 Player position

Caio Cesar

Member
Joined
Nov 23, 2014
Messages
60
Reaction score
6
Location
Brazil - Goiânia
creature:getPosition():sendMagicEffect(74)

How i add +1 in x or y or z in tfs1.0?
Like this:

local pos = getPlayerPosition(cid)
local pos2 = {x = pos.x + 1, y = pos.y, z = pos.z}

I want the script get the creatureposition and add the effect from the position +1 in x
 
Code:
casterTargetOrDirection="1"
I'm unsure of how to do what your asking, but this part in spells.xml might be what your looking for.
It would cast the spell in the direction that the caster is facing, or on the target I guess.
 
I think he mean like dat :p

Code:
local playerPos = player:getPosition()
local position = Position(playerPos.x + 1, playerPos.y, playerPos.z)
 
Yeah, though, you can perform arithmetic operations between Position userdatas.

If he wants to get fancy and try to put everything in one line
Code:
Position(creature:getPosition() + Position(1, 0, 0)):sendMagicEffect(74)
 
Yeah, though, you can perform arithmetic operations between Position userdatas.

If he wants to get fancy and try to put everything in one line
Code:
Position(creature:getPosition() + Position(1, 0, 0)):sendMagicEffect(74)

This doesn't work... I've tried it..
I hade to make it like this to make it work.
Code:
Position(getCreaturePosition(cid) + Position(1, 0, 0)):sendMagicEffect(CONST_ME_HITBYFIRE)
Why? I'm running TFS 1.0
 
Back
Top