23 horas atrás, Drazyn1291 disse:No final do login.lua anes do ultimo return true coloque isso:
local config = { sto = 213124, speed = 300 } if getCreatureStorage(cid, config.sto) >= 1 then doChangeSpeed(cid, getCreatureSpeed(cid)+config.speed) end
Gente vocês fizeram um linguajar que eu nao entendi kk...
oque eu fiz foi:
em login.lua, depois do ultimo "return true" eu adicionei:
local config = {
sto = 213124,
speed = 300
}
if getCreatureStorage(cid, config.sto) >= 1 then
doChangeSpeed(cid, getCreatureSpeed(cid)+config.speed)
end
e assim ficou o script:
local config = {
sto = 213124,
speed = 300
}
function doRegainSpeed(cid) --alterado v1.9 \/
if not isCreature(cid) then return true end
local speed = PlayerSpeed
if isMonster(cid) then
speed = getSpeed(cid)
elseif isPlayer(cid) and isInArray({4, 5, 6}, getPlayerGroupId(cid)) then
speed = 200*getPlayerGroupId(cid)
end
doChangeSpeed(cid, -getCreatureSpeed(cid))
if getCreatureCondition(cid, CONDITION_PARALYZE) == true then
doRemoveCondition(cid, CONDITION_PARALYZE)
addEvent(doAddCondition, 10, cid, paralizeArea2)
end
if getCreatureStorage(cid, config.sto) >= 1 then
speed = speed+config.speed
end
doChangeSpeed(cid, speed)
return speed
end
E no distro fica dando esse erro:
v[15/05/2016 19:02:54] [Warning - Event::loadScript] Event onUse not found (data/actions/scripts/botinas.lua)
[15/05/2016 19:02:54] [Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/login.lua:229: 'end' expected (to close 'function' at line 6) near 'local'
[15/05/2016 19:02:54] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/login.lua)
[15/05/2016 19:02:54] data/creaturescripts/scripts/login.lua:229: 'end' expected (to close 'function' at line 6) near 'local'






info
Grupo: Marquês
Registrado: 23/09/12
Posts: 1k
Reputação: +87
Gênero: Masculino
@Drazyn1291 obrigado funfando 100%