Ir para conteúdo
  • Cadastre-se

Normal [Error] 'then' expected near '0'


Posts Recomendados

Galerinha,

Estou Com este Erro na Distro deste Script....

OTX 0.4 - 8.60

Citar

 [Error - LuaInterface::loadFile] data/talkactions/scripts/SBW.lua:21: 'then' expected near '0'
[27/9/2016 0:57:15] [Error - Event::checkScript] Cannot load script (data/talkactions/scripts/SBW.lua)
[27/9/2016 0:57:15] data/talkactions/scripts/SBW.lua:21: 'then' expected near '0'

E Aqui Está o Script...

Citar

function onSay(cid, words, param, channel)
local k = string.explode(param, ",")
if(k[1] ~= nil) then 
if(string.upper(k[1]) == 'INFO') then 
local score = {} 
local output = "Voce tem " .. getPlayerStorageValue(cid, SBW_SCORE) .. " pontos.\nVoce tem "..getPlayerStorageValue(cid, SBW_AMMO).."x municoes.\n------------------\nO maior matador:\n" 
for _, pid in ipairs(getPlayersOnline()) do 
if getPlayerStorageValue(pid, SBW_INEVENT) then 
table.insert(score, {getCreatureName(pid), getPlayerStorageValue(pid, SBW_SCORE)}) 
end 
end 
local lx = table.getn(score) if(lx > 3) then lx = 3 
end 
table.sort(score, function(a, b) return a[2] > b[2] end) for k = 1,lx do output = output .. k..". "..score[k][1] .." [".. score[k][2] .."].\n" 
end 
doPlayerPopupFYI(cid, output) 
end 
if (string.upper(k[1]) == 'ATIRAR') then 
if(getPlayerStorageValue(cid, SBW_INEVENT) == 1) and not 
getTileInfo(getThingPos(cid)).protection then 
if getPlayerStorageValue(cid, SBW_EXAUSTHED) 0) then 
if SBW_STATUS == 'on' then 
if(SBW_AMMOINFI == false) then 
doPlayerSetStorageValue(cid, SBW_AMMO, getPlayerStorageValue(cid, SBW_AMMO)-1) 
end 
doPlayerSetStorageValue(cid, SBW_EXAUSTHED, 2) 
lineAnimation(getPlayerLookDirection(cid),getCreaturePosition(cid),12,cid,1,0,1,0,0,0,1,0) 
addEvent(doPlayerSetStorageValue, SBW_SHOOTEXAUSTHED, cid, SBW_EXAUSTHED, 1) 
if (getPlayerStorageValue(cid, SBW_AMMO) ~= 1) then 
doPlayerSendTextMessage(cid, 27, "Restam "..getPlayerStorageValue(cid, SBW_AMMO).."x bolas de neve.") 
else doPlayerSendTextMessage(cid, 27, "ATENCAO Usando sua ultima bola de neve.") 
end
end
else doPlayerSendCancel(cid, "Voce esta sem bolas de neve, recarregue no centro do campo ou mate um inimigo.") 
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
end 
else doPlayerPopupFYI(cid, "Espere um pouco para atirar.") 
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
return false 
end 
else doPlayerPopupFYI(cid, "Voce precisa estar no evento ou fora do protection zone.") 
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
end 
end 
end 
return true 
end 
function lineAnimation(lookDir,playerPos,effect,cid,fvar,fpos,ffound,fposV,fcheck,fvcid,floopCounter,fvpid, name) 
local var = fvar 
local pos = fpos 
local found = ffound 
local posV = fposV 
local check = fcheck 
local vcid = fvcid 
local loopCounter = floopCounter 
local vpid = fvpid 
local storage = SBW_EXAUSTHED 
if var < 2 then vcid = cid 
end pos = playerPos 
if not isInWallArray(convert(lookDir,pos)) then 
isInWallArray({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z}) then 
isInArray(t.onShoot.misc.walls_id, getThingfromPos({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z, stackpos=0}).itemid) then 
doSendDistanceShoot(pos, convert(lookDir,pos),effect) pos = convert(lookDir,pos) var=var+1 posV = convertV(lookDir,playerPos) 
for _, pid in ipairs(getPlayersOnline()) do if (getCreaturePosition(pid).x == pos.x and getCreaturePosition(pid).y == pos.y and getCreaturePosition(pid).z == pos.z) then 
if loopCounter > 2 then vpid = pid 
end 
if (vpid ~= vcid) then if var > 2 then 
if (getCreaturePosition(pid).x == posV.x and getCreaturePosition(pid).y == posV.y and getCreaturePosition(pid).z == posV.z) then 
killPlayer(pid,pos,getCreatureName(vcid)) if (lookDir == 0) or (lookDir == 2) then var = 6 else var = 8 
end 
end 
end 
killPlayer(pid,pos,vcid) if (lookDir == 0) or (lookDir == 2) then var = 6 else var = 8 
end 
end 
end 
loopCounter = loopCounter +1 end if (lookDir == 0) or (lookDir == 2) then if var ~= 6 then 
addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) else var = 1 end else if var ~= 8 then 
addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) else var = 1 
end 
end 
else doSendMagicEffect(convert(lookDir,pos),2) var = 1
end 
end 
local ret = {} 
function convert(lookDir,pos) 
local positions = { [0] = {x = pos.x, y = pos.y-1, z = pos.z}, [1] = {x = pos.x+1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y+1, z = pos.z}, [3] = {x = pos.x-1, y = pos.y, z = pos.z} } 
ret = positions[lookDir] return ret 
end 
local ret = {} 
function convertV(lookDir,pos) 
local positions = { [0] = {x = pos.x, y = pos.y+1, z = pos.z}, [1] = {x = pos.x-1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y-1, z = pos.z}, [3] = {x = pos.x+1, y = pos.y, z = pos.z} } 
ret = positions[lookDir] return ret end 
function isInWallArray(pos) 
for k = 0, table.getn(SBW_WALLSID) do 
if getTileItemById(pos, SBW_WALLSID[k]).itemid == SBW_WALLSID[k] then 
return true 
end 
end 
return false 
end 
function killPlayer(cid, pos, killer) 
local t_l = SBW_AREA[1] 
local b_r = SBW_AREA[2] 
local posti = {} 
local isPossibleToTeleportPlayer = false 
while (isPossibleToTeleportPlayer == FALSE) do 
posti = Position(math.random(t_l.x,b_r.x), math.random(t_l.y, b_r.y), 7) if isInWallArray(posti) == FALSE then 
isPossibleToTeleportPlayer = TRUE 
end 
end 
doTeleportThing(cid, posti) 
doSendMagicEffect(pos,2) 
doSendMagicEffect(posti,6) 
doSendAnimatedText(pos, ""..getCreatureName(killer).." ", 55) 
doPlayerSendTextMessage(cid, 27, "Voce morreu para "..getCreatureName(killer)..".") 
doPlayerSetStorageValue(killer, SBW_SCORE, getPlayerStorageValue(killer, SBW_SCORE)+SBW_POINTSKILL) 
doPlayerSendTextMessage(killer, 27, "Voce Matou "..getCreatureName(cid)..".") if 
SBW_LOSTSCORE then 
doPlayerSetStorageValue(cid, SBW_SCORE, getPlayerStorageValue(cid, SBW_SCORE)-1) 
end 
if SBW_RESETAMMO then 
doPlayerSetStorageValue(cid, SBW_AMMO, SBW_MINAMMO) 
end 
end

VENHAM JOGAR O MELHOR BAIAK JÁ CRIADO DE 2022!!

 

CRIE SUA CONTA AGORA MESMO!

 

www.baiakudo.com

Link para o post
Compartilhar em outros sites

Corrigi a primeira parte do código (onde tava o bug) testa agora>

 

Spoiler

function onSay(cid, words, param, channel)
	local k = string.explode(param, ",")
	if(k[1] ~= nil) then 
		if(string.upper(k[1]) == 'INFO') then 
			local score = {} 
			local output = "Voce tem " .. getPlayerStorageValue(cid, SBW_SCORE) .. " pontos.\nVoce tem "..getPlayerStorageValue(cid, SBW_AMMO).."x municoes.\n------------------\nO maior matador:\n" 
			for _, pid in ipairs(getPlayersOnline()) do 
				if getPlayerStorageValue(pid, SBW_INEVENT) then 
					table.insert(score, {getCreatureName(pid), getPlayerStorageValue(pid, SBW_SCORE)}) 
				end 
			end 
			local lx = table.getn(score) 
			if(lx > 3) then 
				lx = 3 
			end 
			table.sort(score, function(a, b) return a[2] > b[2] end) 
			for k = 1,lx do 
				output = output .. k..". "..score[k][1] .." [".. score[k][2] .."].\n" 
			end 
			doPlayerPopupFYI(cid, output)
		return false
		end
		if (string.upper(k[1]) == 'ATIRAR') then 
			if(getPlayerStorageValue(cid, SBW_INEVENT) == 1) and not 
				getTileInfo(getThingPos(cid)).protection then 
				if getPlayerStorageValue(cid, SBW_EXAUSTHED 0) then 
					if SBW_STATUS == 'on' then 
						if(SBW_AMMOINFI == false) then 
							doPlayerSetStorageValue(cid, SBW_AMMO, getPlayerStorageValue(cid, SBW_AMMO)-1) 
						end 
						doPlayerSetStorageValue(cid, SBW_EXAUSTHED, 2) 
						lineAnimation(getPlayerLookDirection(cid),getCreaturePosition(cid),12,cid,1,0,1,0,0,0,1,0) 
						addEvent(doPlayerSetStorageValue, SBW_SHOOTEXAUSTHED, cid, SBW_EXAUSTHED, 1) 
						if (getPlayerStorageValue(cid, SBW_AMMO) >= 1) then 
							doPlayerSendTextMessage(cid, 27, "Restam "..getPlayerStorageValue(cid, SBW_AMMO).."x bolas de neve.") 
						elseif (getPlayerStorageValue(cid, SBW_AMMO) == 0)
							doPlayerSendTextMessage(cid, 27, "ATENCAO Usando sua ultima bola de neve.") 
						else 
							doPlayerSendCancel(cid, "Voce esta sem bolas de neve, recarregue no centro do campo ou mate um inimigo.") 
							doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
						end
					end 
				else 
					doPlayerPopupFYI(cid, "Espere um pouco para atirar.") 
					doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
					return false 
				end 
			else 
				doPlayerPopupFYI(cid, "Voce precisa estar no evento ou fora do protection zone.") 
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
			end 
		end 
	end 
return true 
end 

function lineAnimation(lookDir,playerPos,effect,cid,fvar,fpos,ffound,fposV,fcheck,fvcid,floopCounter,fvpid, name) 
local var = fvar 
local pos = fpos 
local found = ffound 
local posV = fposV 
local check = fcheck 
local vcid = fvcid 
local loopCounter = floopCounter 
local vpid = fvpid 
local storage = SBW_EXAUSTHED 
if var < 2 then vcid = cid 
end pos = playerPos 
if not isInWallArray(convert(lookDir,pos)) then 
isInWallArray({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z}) then 
isInArray(t.onShoot.misc.walls_id, getThingfromPos({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z, stackpos=0}).itemid) then 
doSendDistanceShoot(pos, convert(lookDir,pos),effect) pos = convert(lookDir,pos) var=var+1 posV = convertV(lookDir,playerPos) 
for _, pid in ipairs(getPlayersOnline()) do if (getCreaturePosition(pid).x == pos.x and getCreaturePosition(pid).y == pos.y and getCreaturePosition(pid).z == pos.z) then 
if loopCounter > 2 then vpid = pid 
end 
if (vpid ~= vcid) then if var > 2 then 
if (getCreaturePosition(pid).x == posV.x and getCreaturePosition(pid).y == posV.y and getCreaturePosition(pid).z == posV.z) then 
killPlayer(pid,pos,getCreatureName(vcid)) if (lookDir == 0) or (lookDir == 2) then var = 6 else var = 8 
end 
end 
end 
killPlayer(pid,pos,vcid) if (lookDir == 0) or (lookDir == 2) then var = 6 else var = 8 
end 
end 
end 
loopCounter = loopCounter +1 end if (lookDir == 0) or (lookDir == 2) then if var ~= 6 then 
addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) else var = 1 end else if var ~= 8 then 
addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) else var = 1 
end 
end 
else doSendMagicEffect(convert(lookDir,pos),2) var = 1
end 
end 
local ret = {} 

function convert(lookDir,pos) 
local positions = { [0] = {x = pos.x, y = pos.y-1, z = pos.z}, [1] = {x = pos.x+1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y+1, z = pos.z}, [3] = {x = pos.x-1, y = pos.y, z = pos.z} } 
ret = positions[lookDir] return ret 
end 

local ret = {} 

function convertV(lookDir,pos) 
local positions = { [0] = {x = pos.x, y = pos.y+1, z = pos.z}, [1] = {x = pos.x-1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y-1, z = pos.z}, [3] = {x = pos.x+1, y = pos.y, z = pos.z} } 
ret = positions[lookDir] return ret end 

function isInWallArray(pos) 
for k = 0, table.getn(SBW_WALLSID) do 
if getTileItemById(pos, SBW_WALLSID[k]).itemid == SBW_WALLSID[k] then 
return true 
end 
end 
return false 
end 

function killPlayer(cid, pos, killer) 
local t_l = SBW_AREA[1] 
local b_r = SBW_AREA[2] 
local posti = {} 
local isPossibleToTeleportPlayer = false 
while (isPossibleToTeleportPlayer == FALSE) do 
posti = Position(math.random(t_l.x,b_r.x), math.random(t_l.y, b_r.y), 7) if isInWallArray(posti) == FALSE then 
isPossibleToTeleportPlayer = TRUE 
end 
end 
doTeleportThing(cid, posti) 
doSendMagicEffect(pos,2) 
doSendMagicEffect(posti,6) 
doSendAnimatedText(pos, ""..getCreatureName(killer).." ", 55) 
doPlayerSendTextMessage(cid, 27, "Voce morreu para "..getCreatureName(killer)..".") 
doPlayerSetStorageValue(killer, SBW_SCORE, getPlayerStorageValue(killer, SBW_SCORE)+SBW_POINTSKILL) 
doPlayerSendTextMessage(killer, 27, "Voce Matou "..getCreatureName(cid)..".") if 
SBW_LOSTSCORE then 
doPlayerSetStorageValue(cid, SBW_SCORE, getPlayerStorageValue(cid, SBW_SCORE)-1) 
end 
if SBW_RESETAMMO then 
doPlayerSetStorageValue(cid, SBW_AMMO, SBW_MINAMMO) 
end 
end

 

 

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites

Agora esta dando este erro

Citar

[Error - LuaInterface::loadFile] data/talkactions/scripts/SBW.lua:26: ')' expected near '0'
[27/9/2016 13:52:31] [Error - Event::checkScript] Cannot load script (data/talkactions/scripts/SBW.lua)
[27/9/2016 13:52:31] data/talkactions/scripts/SBW.lua:26: ')' expected near '0'

 

VENHAM JOGAR O MELHOR BAIAK JÁ CRIADO DE 2022!!

 

CRIE SUA CONTA AGORA MESMO!

 

www.baiakudo.com

Link para o post
Compartilhar em outros sites
Spoiler

function onSay(cid, words, param, channel)
	local k = string.explode(param, ",")
	if(k[1] ~= nil) then 
		if(string.upper(k[1]) == 'INFO') then 
			local score = {} 
			local output = "Voce tem " .. getPlayerStorageValue(cid, SBW_SCORE) .. " pontos.\nVoce tem "..getPlayerStorageValue(cid, SBW_AMMO).."x municoes.\n------------------\nO maior matador:\n" 
			for _, pid in ipairs(getPlayersOnline()) do 
				if getPlayerStorageValue(pid, SBW_INEVENT) then 
					table.insert(score, {getCreatureName(pid), getPlayerStorageValue(pid, SBW_SCORE)}) 
				end 
			end 
			local lx = table.getn(score) 
			if(lx > 3) then 
				lx = 3 
			end 
			table.sort(score, function(a, b) return a[2] > b[2] end) 
			for k = 1,lx do 
				output = output .. k..". "..score[k][1] .." [".. score[k][2] .."].\n" 
			end 
			doPlayerPopupFYI(cid, output)
		return false
		end
		if (string.upper(k[1]) == 'ATIRAR') then 
			if(getPlayerStorageValue(cid, SBW_INEVENT) == 1) and not 
				getTileInfo(getThingPos(cid)).protection then 
				if getPlayerStorageValue(cid, SBW_EXAUSTHED) <= 1 then 
					if SBW_STATUS == 'on' then 
						if(SBW_AMMOINFI == false) then 
							doPlayerSetStorageValue(cid, SBW_AMMO, getPlayerStorageValue(cid, SBW_AMMO)-1) 
						end 
						doPlayerSetStorageValue(cid, SBW_EXAUSTHED, 2) 
						lineAnimation(getPlayerLookDirection(cid),getCreaturePosition(cid),12,cid,1,0,1,0,0,0,1,0) 
						addEvent(doPlayerSetStorageValue, SBW_SHOOTEXAUSTHED, cid, SBW_EXAUSTHED, 1) 
						if (getPlayerStorageValue(cid, SBW_AMMO) >= 1) then 
							doPlayerSendTextMessage(cid, 27, "Restam "..getPlayerStorageValue(cid, SBW_AMMO).."x bolas de neve.") 
						elseif (getPlayerStorageValue(cid, SBW_AMMO) == 0)
							doPlayerSendTextMessage(cid, 27, "ATENCAO Usando sua ultima bola de neve.") 
						else 
							doPlayerSendCancel(cid, "Voce esta sem bolas de neve, recarregue no centro do campo ou mate um inimigo.") 
							doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
						end
					end 
				else 
					doPlayerPopupFYI(cid, "Espere um pouco para atirar.") 
					doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
					return false 
				end 
			else 
				doPlayerPopupFYI(cid, "Voce precisa estar no evento ou fora do protection zone.") 
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
			end 
		end 
	end 
return true 
end 

function lineAnimation(lookDir,playerPos,effect,cid,fvar,fpos,ffound,fposV,fcheck,fvcid,floopCounter,fvpid, name) 
local var = fvar 
local pos = fpos 
local found = ffound 
local posV = fposV 
local check = fcheck 
local vcid = fvcid 
local loopCounter = floopCounter 
local vpid = fvpid 
local storage = SBW_EXAUSTHED 
if var < 2 then vcid = cid 
end pos = playerPos 
if not isInWallArray(convert(lookDir,pos)) then 
isInWallArray({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z}) then 
isInArray(t.onShoot.misc.walls_id, getThingfromPos({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z, stackpos=0}).itemid) then 
doSendDistanceShoot(pos, convert(lookDir,pos),effect) pos = convert(lookDir,pos) var=var+1 posV = convertV(lookDir,playerPos) 
for _, pid in ipairs(getPlayersOnline()) do if (getCreaturePosition(pid).x == pos.x and getCreaturePosition(pid).y == pos.y and getCreaturePosition(pid).z == pos.z) then 
if loopCounter > 2 then vpid = pid 
end 
if (vpid ~= vcid) then if var > 2 then 
if (getCreaturePosition(pid).x == posV.x and getCreaturePosition(pid).y == posV.y and getCreaturePosition(pid).z == posV.z) then 
killPlayer(pid,pos,getCreatureName(vcid)) if (lookDir == 0) or (lookDir == 2) then var = 6 else var = 8 
end 
end 
end 
killPlayer(pid,pos,vcid) if (lookDir == 0) or (lookDir == 2) then var = 6 else var = 8 
end 
end 
end 
loopCounter = loopCounter +1 end if (lookDir == 0) or (lookDir == 2) then if var ~= 6 then 
addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) else var = 1 end else if var ~= 8 then 
addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) else var = 1 
end 
end 
else doSendMagicEffect(convert(lookDir,pos),2) var = 1
end 
end 
local ret = {} 

function convert(lookDir,pos) 
local positions = { [0] = {x = pos.x, y = pos.y-1, z = pos.z}, [1] = {x = pos.x+1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y+1, z = pos.z}, [3] = {x = pos.x-1, y = pos.y, z = pos.z} } 
ret = positions[lookDir] return ret 
end 

local ret = {} 

function convertV(lookDir,pos) 
local positions = { [0] = {x = pos.x, y = pos.y+1, z = pos.z}, [1] = {x = pos.x-1, y = pos.y, z = pos.z}, [2] = {x = pos.x, y = pos.y-1, z = pos.z}, [3] = {x = pos.x+1, y = pos.y, z = pos.z} } 
ret = positions[lookDir] return ret end 

function isInWallArray(pos) 
for k = 0, table.getn(SBW_WALLSID) do 
if getTileItemById(pos, SBW_WALLSID[k]).itemid == SBW_WALLSID[k] then 
return true 
end 
end 
return false 
end 

function killPlayer(cid, pos, killer) 
local t_l = SBW_AREA[1] 
local b_r = SBW_AREA[2] 
local posti = {} 
local isPossibleToTeleportPlayer = false 
while (isPossibleToTeleportPlayer == FALSE) do 
posti = Position(math.random(t_l.x,b_r.x), math.random(t_l.y, b_r.y), 7) if isInWallArray(posti) == FALSE then 
isPossibleToTeleportPlayer = TRUE 
end 
end 
doTeleportThing(cid, posti) 
doSendMagicEffect(pos,2) 
doSendMagicEffect(posti,6) 
doSendAnimatedText(pos, ""..getCreatureName(killer).." ", 55) 
doPlayerSendTextMessage(cid, 27, "Voce morreu para "..getCreatureName(killer)..".") 
doPlayerSetStorageValue(killer, SBW_SCORE, getPlayerStorageValue(killer, SBW_SCORE)+SBW_POINTSKILL) 
doPlayerSendTextMessage(killer, 27, "Voce Matou "..getCreatureName(cid)..".") if 
SBW_LOSTSCORE then 
doPlayerSetStorageValue(cid, SBW_SCORE, getPlayerStorageValue(cid, SBW_SCORE)-1) 
end 
if SBW_RESETAMMO then 
doPlayerSetStorageValue(cid, SBW_AMMO, SBW_MINAMMO) 
end 
end

 

 

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites

Agora Esta Dando este Erro

Citar

[Error - LuaInterface::loadFile] data/talkactions/scripts/SBW.lua:37: 'then' expected near 'doPlayerSendTextMessage'
[27/9/2016 23:11:45] [Error - Event::checkScript] Cannot load script (data/talkactions/scripts/SBW.lua)
[27/9/2016 23:11:45] data/talkactions/scripts/SBW.lua:37: 'then' expected near 'doPlayerSendTextMessage'
[27/9/2016 23:11:45] (done).

 

VENHAM JOGAR O MELHOR BAIAK JÁ CRIADO DE 2022!!

 

CRIE SUA CONTA AGORA MESMO!

 

www.baiakudo.com

Link para o post
Compartilhar em outros sites
Spoiler

function onSay(cid, words, param, channel)
	local k = string.explode(param, ",")
	if(k[1] ~= nil) then 
		if(string.upper(k[1]) == 'INFO') then 
			local score = {} 
			local output = "Voce tem " .. getPlayerStorageValue(cid, SBW_SCORE) .. " pontos.\nVoce tem "..getPlayerStorageValue(cid, SBW_AMMO).."x municoes.\n------------------\nO maior matador:\n" 
			for _, pid in ipairs(getPlayersOnline()) do 
				if getPlayerStorageValue(pid, SBW_INEVENT) then 
					table.insert(score, {getCreatureName(pid), getPlayerStorageValue(pid, SBW_SCORE)}) 
				end 
			end 
			local lx = table.getn(score) 
			if(lx > 3) then 
				lx = 3 
			end 
			table.sort(score, function(a, b) return a[2] > b[2] end) 
			for k = 1,lx do 
				output = output .. k..". "..score[k][1] .." [".. score[k][2] .."].\n" 
			end 
			doPlayerPopupFYI(cid, output)
		return false
		end
		if (string.upper(k[1]) == 'ATIRAR') then 
			if(getPlayerStorageValue(cid, SBW_INEVENT) == 1) and not 
				getTileInfo(getThingPos(cid)).protection then 
				if getPlayerStorageValue(cid, SBW_EXAUSTHED) <= 1 then 
					if SBW_STATUS == 'on' then 
						if(SBW_AMMOINFI == false) then 
							doPlayerSetStorageValue(cid, SBW_AMMO, getPlayerStorageValue(cid, SBW_AMMO)-1) 
						end 
						doPlayerSetStorageValue(cid, SBW_EXAUSTHED, 2) 
						lineAnimation(getPlayerLookDirection(cid),getCreaturePosition(cid),12,cid,1,0,1,0,0,0,1,0) 
						addEvent(doPlayerSetStorageValue, SBW_SHOOTEXAUSTHED, cid, SBW_EXAUSTHED, 1) 
						if (getPlayerStorageValue(cid, SBW_AMMO) >= 1) then 
							doPlayerSendTextMessage(cid, 27, "Restam "..getPlayerStorageValue(cid, SBW_AMMO).."x bolas de neve.") 
						elseif (getPlayerStorageValue(cid, SBW_AMMO) == 0) then
							doPlayerSendTextMessage(cid, 27, "ATENCAO Usando sua ultima bola de neve.") 
						else 
							doPlayerSendCancel(cid, "Voce esta sem bolas de neve, recarregue no centro do campo ou mate um inimigo.") 
							doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
						end
					end 
				else 
					doPlayerPopupFYI(cid, "Espere um pouco para atirar.") 
					doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
					return false 
				end 
			else 
				doPlayerPopupFYI(cid, "Voce precisa estar no evento ou fora do protection zone.") 
				doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) 
			end 
		end 
	end 
return true 
end 

function lineAnimation(lookDir,playerPos,effect,cid,fvar,fpos,ffound,fposV,fcheck,fvcid,floopCounter,fvpid, name) 
	local var = fvar 
	local pos = fpos 
	local found = ffound 
	local posV = fposV 
	local check = fcheck 
	local vcid = fvcid 
	local loopCounter = floopCounter 
	local vpid = fvpid 
	local storage = SBW_EXAUSTHED 
	if var < 2 then 
		vcid = cid 
	end 
	pos = playerPos 
	if not isInWallArray(convert(lookDir,pos)) then 
		isInWallArray({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z}) then 
		isInArray(t.onShoot.misc.walls_id, getThingfromPos({x=convert(lookDir,pos).x, y=convert(lookDir,pos).y,z=convert(lookDir,pos).z, stackpos=0}).itemid) then 
		doSendDistanceShoot(pos, convert(lookDir,pos),effect) pos = convert(lookDir,pos) var=var+1 posV = convertV(lookDir,playerPos) 
		for _, pid in ipairs(getPlayersOnline()) do
			if (getCreaturePosition(pid).x == pos.x and getCreaturePosition(pid).y == pos.y and getCreaturePosition(pid).z == pos.z) then 
				if loopCounter > 2 then 
					vpid = pid 
				end 
				if (vpid ~= vcid) then 
					if var > 2 then 
						if (getCreaturePosition(pid).x == posV.x and getCreaturePosition(pid).y == posV.y and getCreaturePosition(pid).z == posV.z) then 
							killPlayer(pid,pos,getCreatureName(vcid)) 
							if (lookDir == 0) or (lookDir == 2) then 
								var = 6 
							else 
								var = 8 
							end 
						end 
					end 
					killPlayer(pid,pos,vcid) 
					if (lookDir == 0) or (lookDir == 2) then 
						var = 6 
					else 
						var = 8 
					end 
				end 
			end 
			loopCounter = loopCounter +1 
		end 
		
		if (lookDir == 0) or (lookDir == 2) then 
			if var ~= 6 then 
				addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) 
			else 
				var = 1 
			end 
		else 
			if var ~= 8 then 
				addEvent(lineAnimation, SBW_BALLSPEED, lookDir,pos,effect,nil,var,pos,found,posV,check,vcid,loopCounter,vpid) 
			else 
				var = 1 
			end 
		end 
	else 
		doSendMagicEffect(convert(lookDir,pos),2)
		var = 1
	end 
end 

local ret = {} 
function convert(lookDir,pos) 
	local positions = {
		[0] = {x = pos.x, y = pos.y-1, z = pos.z},
		[1] = {x = pos.x+1, y = pos.y, z = pos.z},
		[2] = {x = pos.x, y = pos.y+1, z = pos.z}, 
		[3] = {x = pos.x-1, y = pos.y, z = pos.z}
	} 
ret = positions[lookDir] 
return ret 
end 

local ret = {} 
function convertV(lookDir,pos) 
local positions = { 
		[0] = {x = pos.x, y = pos.y+1, z = pos.z}, 
		[1] = {x = pos.x-1, y = pos.y, z = pos.z}, 
		[2] = {x = pos.x, y = pos.y-1, z = pos.z}, 
		[3] = {x = pos.x+1, y = pos.y, z = pos.z}
	} 
ret = positions[lookDir] 
return ret 
end 

function isInWallArray(pos) 
	for k = 0, table.getn(SBW_WALLSID) do 
		if getTileItemById(pos, SBW_WALLSID[k]).itemid == SBW_WALLSID[k] then 
			return true 
		end 
	end 
return false 
end 

function killPlayer(cid, pos, killer) 
	local t_l = SBW_AREA[1] 
	local b_r = SBW_AREA[2] 
	local posti = {} 
	local isPossibleToTeleportPlayer = false 
	while (isPossibleToTeleportPlayer == FALSE) do 
		posti = Position(math.random(t_l.x,b_r.x), math.random(t_l.y, b_r.y), 7) 
		if not isInWallArray(posti) then 
			isPossibleToTeleportPlayer = true 
		end 
	end 
	doTeleportThing(cid, posti) 
	doSendMagicEffect(pos,2) 
	doSendMagicEffect(posti,6) 
	doSendAnimatedText(pos, ""..getCreatureName(killer).." ", 55) 
	doPlayerSendTextMessage(cid, 27, "Voce morreu para "..getCreatureName(killer)..".") 
	doPlayerSetStorageValue(killer, SBW_SCORE, getPlayerStorageValue(killer, SBW_SCORE)+SBW_POINTSKILL) 
	doPlayerSendTextMessage(killer, 27, "Voce Matou "..getCreatureName(cid)..".") 
	if SBW_LOSTSCORE then 
		doPlayerSetStorageValue(cid, SBW_SCORE, getPlayerStorageValue(cid, SBW_SCORE)-1) 
	end 
	if SBW_RESETAMMO then 
		doPlayerSetStorageValue(cid, SBW_AMMO, SBW_MINAMMO) 
	end 
end

 

 

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo