IG

Resolvido!

Por igor6, 24 de jan. de 2012 em Scripts

7
1.3k
igor6I
24 de janeiro de 2012 às 16:31

Boa Tarde, bom pessoal nunca vi nada falando sobre isso, não sei se é possível mas gostaria de saber se tem como colocar a função de aumentar cap em 1 item EX: Knight level 200 = 5000 Cap / usando o item = 8000.

 

 

E outra coisa, quando logo de GOD e falo /a não ta funcionando, e da erro no talkactions/teleportstiles.lua, já substitui por um backup que tinha, mas não resolve.

 

Grato desde já.

 

Vale REP +

Editado Janeiro 27 por Igor6

VincV
25 de janeiro de 2012 às 12:19

n existe função para mudar a cap,daria pra mudar pela sqlite,mas o player teria que reloga toda ves que colocase o item ou tirase

então é inviavel faser isso,teria que primeiro criar uma função que mudase a cap nas sourcers

igor6I
25 de janeiro de 2012 às 17:56

bom, alguém pode me ajudar com a segunda dúvida?

 

att

25 de janeiro de 2012 às 18:12

Se pudesse mandar o erro seria mais fácil...

 

Tenta esse:

function onSay(cid, words, param, channel)
local t = {}
if(param ~= '') then
	t = string.explode(param, ",")
end

local n = tonumber(t[1])
if(not n) then
	n = 1
end

local pid = cid
if(t[2]) then
	pid = getPlayerByNameWildcard(t[2])
	if(not pid or (isPlayerGhost(pid) and getPlayerAccess(pid) > getPlayerAccess(cid))) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
		return true
	end
end

local pos = getClosestFreeTile(pid, getPosByDir(getCreaturePosition(pid), getCreatureLookDirection(pid), n), false, false)
if(not pos or isInArray({pos.x, pos.y}, 0)) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.")
	return true
end

local tmp = getCreaturePosition(pid)
if(doTeleportThing(pid, pos, true) and not isPlayerGhost(pid)) then
	doSendMagicEffect(tmp, CONST_ME_POFF)
	doSendMagicEffect(pos, CONST_ME_TELEPORT)
end

return true
end

 

Se não pegar você bugou a função.

Editado Janeiro 25 por fireelement

igor6I
27 de janeiro de 2012 às 15:24

Aqui ta a imagem do erro, alguem sabe o que pode ser?

aaagac.png

 

alguém?

Editado Janeiro 27 por Igor6

bepokemonB
27 de janeiro de 2012 às 16:02

Vai em: data/lib/050-function.lua e coloca essa função dentro:

function getPosByDir(position, direction, size)
local n = size or 1
if(direction == NORTH) then
position.y = position.y - n
elseif(direction == SOUTH) then
position.y = position.y + n
elseif(direction == WEST) then
position.x = position.x - n
elseif(direction == EAST) then
position.x = position.x + n
elseif(direction == NORTHWEST) then
position.y = position.y - n
position.x = position.x - n
elseif(direction == NORTHEAST) then
position.y = position.y - n
position.x = position.x + n
elseif(direction == SOUTHWEST) then
position.y = position.y + n
position.x = position.x - n
elseif(direction == SOUTHEAST) then
position.y = position.y + n
position.x = position.x + n
end

return position
end

igor6I
27 de janeiro de 2012 às 16:38

[Resolvido] Funcionou, já dei seu REP+,

Obrigado.