Daniel Braga
New Member
- Joined
- Mar 17, 2018
- Messages
- 53
- Reaction score
- 1
Speak my brothers, I would like some help from the community.
On my server I have the talkactions of character transformations, I would like to be able to change the X.Y position of the effect that comes out of each player when they say ''' transform'''
Is this possible? does anyone have any idea about this? can anyone help me?
I'll leave the script with just 1 transformation so it doesn't get too long.
local config = {
--[vocation id] = { level, nova voc, looktype, efeito}
-- Goku
[1] = { 50, 2, 4, 118},
[2] = { 100, 3, 5, 114},
[3] = { 150, 4, 7, 114},
[4] = { 200, 5, 9, 467},
[6] = { 50, 7, 11, 490},
[7] = { 100, 8, 12, 490},
[8] = { 150, 9, 13, 490},
[9] = { 200, 10, 14, 125},
[10] = { 400, 11, 817, 628},
[11] = { 600, 12, 819, 662}
}
function onSay(cid, words, param, channel)
local voc = config[getPlayerVocation(cid)]
if voc then
if getPlayerLevel(cid) >= voc[1] then
doPlayerSetVocation(cid, voc[2])
doCreatureSay(cid, "Transformar", 19)
local outfit = {lookType = voc[3]}
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid), voc[4])
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Voce precisa estar no level " .. voc[1] .. " para transformar.")
end
else
doPlayerSendCancel(cid, "Nao é possível se transformar.")
end
return true
end
remembering that I only want to be able to change the position x or y that the effect comes out with each transformation.
On my server I have the talkactions of character transformations, I would like to be able to change the X.Y position of the effect that comes out of each player when they say ''' transform'''
Is this possible? does anyone have any idea about this? can anyone help me?
I'll leave the script with just 1 transformation so it doesn't get too long.
local config = {
--[vocation id] = { level, nova voc, looktype, efeito}
-- Goku
[1] = { 50, 2, 4, 118},
[2] = { 100, 3, 5, 114},
[3] = { 150, 4, 7, 114},
[4] = { 200, 5, 9, 467},
[6] = { 50, 7, 11, 490},
[7] = { 100, 8, 12, 490},
[8] = { 150, 9, 13, 490},
[9] = { 200, 10, 14, 125},
[10] = { 400, 11, 817, 628},
[11] = { 600, 12, 819, 662}
}
function onSay(cid, words, param, channel)
local voc = config[getPlayerVocation(cid)]
if voc then
if getPlayerLevel(cid) >= voc[1] then
doPlayerSetVocation(cid, voc[2])
doCreatureSay(cid, "Transformar", 19)
local outfit = {lookType = voc[3]}
doCreatureChangeOutfit(cid, outfit)
doSendMagicEffect(getCreaturePosition(cid), voc[4])
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Voce precisa estar no level " .. voc[1] .. " para transformar.")
end
else
doPlayerSendCancel(cid, "Nao é possível se transformar.")
end
return true
end
remembering that I only want to be able to change the position x or y that the effect comes out with each transformation.