Postado Setembro 17, 2017 7 anos Em 21/08/2016 em 03:16, Farathor disse: Olá, este é um script que adiciona todas as bless em jogadores que tiverem o level menor que o configurado em creaturescripts/scripts crie um arquivo chamado autoBless.lua e cole isso: local blessings = {1, 2, 3, 4, 5} local level = 150 function onLogin(cid) if getPlayerLevel(cid) <= level then for cont = 1, table.maxn(blessings) do doPlayerAddBlessing(cid, blessings[cont]) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você recebeu todas as blessings por causa que é nivel menor que "..level.."!") end end em creaturescripts.xml adicione a seguinte tag: <event type="death" name="autoBless" event="script" value="autoBless.lua"/> em creaturescripts/scripts no arquivo login.lua adicione a seguinte tag registerCreatureEvent(cid, "autoBless") Aparece este erro na distro: TFS 0.4 [19:13:10.592] [Warning - Event::loadScript] Event onDeath not found (data/creaturescripts/scripts/autoBless.lua) Não existe outra função?
Postado Setembro 17, 2017 7 anos 1 hora atrás, FearWar disse: Aparece este erro na distro: TFS 0.4 [19:13:10.592] [Warning - Event::loadScript] Event onDeath not found (data/creaturescripts/scripts/autoBless.lua) Não existe outra função? No seu login.lua abaixo disso: if(loss ~= nil) then adicione isso if (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then return true end if getPlayerLevel(cid) < 250 then doCreatureSay(cid, "you have blessings free to level 250!", TALKTYPE_ORANGE_1) for i = 1, 5 do doPlayerAddBlessing(cid, i) end (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Setembro 17, 2017 7 anos 13 minutos atrás, jNo disse: No seu login.lua abaixo disso: if(loss ~= nil) then adicione isso if (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then return true end if getPlayerLevel(cid) < 250 then doCreatureSay(cid, "you have blessings free to level 250!", TALKTYPE_ORANGE_1) for i = 1, 5 do doPlayerAddBlessing(cid, i) end Não tem no meu login: if(loss ~= nil) then Estou usando : local freeBlessMaxLevel = 150 function onLogin(cid) if(getPlayerLevel(cid) <= freeBlessMaxLevel and not getPlayerBlessing(cid,1)) then for b=1, 5 do doPlayerAddBlessing(cid, b) end doCreatureSay(cid, 'You got free bless, because your level lower than 150!', TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPosition(cid), CONST_ME_HOLYDAMAGE) elseif(getPlayerBlessing(cid,1)) then doCreatureSay(cid, 'You are bleesed!', TALKTYPE_ORANGE_1) else doCreatureSay(cid, 'You are not bleesed. type !bless', TALKTYPE_ORANGE_1) end return true end Teria como colocar para essa script não usar em Account manager e também em GM, Gods?
Postado Setembro 18, 2017 7 anos local freeBlessMaxLevel = 150 function onLogin(cid) if(getPlayerLevel(cid) <= freeBlessMaxLevel and not getPlayerBlessing(cid,1)) then if not (string.find(tostring(getCreatureName(cid)),"Account Manager")) or getPlayerGroupId(cid) >= 3 then for b=1, 5 do doPlayerAddBlessing(cid, b) end doCreatureSay(cid, 'You got free bless, because your level lower than 150!', TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPosition(cid), CONST_ME_HOLYDAMAGE) elseif(getPlayerBlessing(cid,1)) then doCreatureSay(cid, 'You are bleesed!', TALKTYPE_ORANGE_1) else doCreatureSay(cid, 'You are not bleesed. type !bless', TALKTYPE_ORANGE_1) end return true end teste. Editado Setembro 18, 2017 7 anos por Dragon Ball Hiper (veja o histórico de edições)
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.