Ir para conteúdo

Erro no script


Posts Recomendados

@theodorogobi

 

local config = {
storage = 41651651, -- storage necessária para o script funcionar, aquele do npc.
outfit_normal = {510, 511}, -- Male, Female
outfit_mergulhador = {1034, 1035}, -- Male, Female
speed = {320, 300, 100}, -- Normal, Player, Loss
random = = math.random(1, 150), -- para randomizar a cor dos outfits.
}

function onStepIn(cid)

	if isRiderOrFlyOrSurf(cid) then
		doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[3])
	end

	if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then
		if getPlayerSex(cid) == 1 then
			doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
		elseif getPlayerSex(cid) == 0 then
			doSetCreatureOutfit(cid, {lookType = config.outfit_mergulhador[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
		return true
		end
		if getCreatureOutfit(cid).lookType == config.outfit_mergulhador[1] or getCreatureOutfit(cid).lookType == config.outfit_mergulhador[2] then
			doChangeSpeed(cid, getCreatureSpeed(cid)+config.speed[2])
		else
			doChangeSpeed(cid, getCreatureSpeed(cid)-config.speed[3])
		end
	end
 return true
 end
 
 function onStepOut(cid)
 
	if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then
		if getPlayerSex(cid) == 1 then
			doSetCreatureOutfit(cid, {lookType = config.outfit_normal[1], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
			doChangeSpeed(cid, config.speed[1])
		elseif getPlayerSex(cid) == 0 then
			doSetCreatureOutfit(cid, {lookType = config.outfit_normal[2], lookHead = config.random, lookBody = config.random, lookLegs = config.random, lookFeet = config.random}, -1)
			doChangeSpeed(cid, config.speed[1])
		return true
		end
	end
 return true
 end

 

Link para o comentário
Compartilhar em outros sites

Pra ajudar agora isso: Ja tentei refazer a linha 1 ate a 4 e continua nesse erro

[17/04/2019 19:42:47] [Error - LuaScriptInterface::loadFile] data/movements/scripts/nadinha.lua:1: unexpected symbol near 'ï'
[17/04/2019 19:42:47] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/nadinha.lua)
[17/04/2019 19:42:47] data/movements/scripts/nadinha.lua:1: unexpected symbol near 'ï'
[17/04/2019 19:42:47] [Error - LuaScriptInterface::loadFile] data/movements/scripts/nadinha.lua:1: unexpected symbol near 'ï'
[17/04/2019 19:42:47] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/nadinha.lua)
[17/04/2019 19:42:47] data/movements/scripts/nadinha.lua:1: unexpected symbol near 'ï'

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...