Ir para conteúdo

Featured Replies

Postado

fiz esse script so que storage não salva!

function onKill(cid, target, lastHit)

if isPlayer(target) then
trofeutatus1 = getPlayerStorageValue(cid,10129) 
elseif getPlayerFrags(cid) == 500 and trofeutatus1 == -1 then
local quest = doPlayerAddItem(cid,10129,1)
doItemSetAttribute(quest,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
setPlayerStorageValue(cid,10129,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)

trofeutatus2 = getPlayerStorageValue(cid,10128)
elseif getPlayerFrags(cid) == 1000 and trofeutatus2 == -1 then
local quest = doPlayerAddItem(cid,10128,1)
doItemSetAttribute(quest,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
setPlayerStorageValue(cid,10128,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)

trofeutatus3 = getPlayerStorageValue(cid,10127)
elseif getPlayerFrags(cid) == 2000 and trofeutatus3 == -1 then
local quest = doPlayerAddItem(cid,10127,1)
doItemSetAttribute(quest,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
setPlayerStorageValue(cid,10127,1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)
end
return true
end

Editado por loreal (veja o histórico de edições)

I like

  • Respostas 5
  • Visualizações 327
  • Created
  • Última resposta

Top Posters In This Topic

Postado

tenta isso

 

function onKill(cid, target, lastHit)

if isPlayer(target) then
	trofeutatus1 = getPlayerStorageValue(cid,10129) 
	if getPlayerFrags(cid) == 500 and trofeutatus1 == -1 then
		local quest = doPlayerAddItem(cid,10129,1)
		doItemSetAttribute(quest,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
		setPlayerStorageValue(cid,10129,1)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)

		trofeutatus2 = getPlayerStorageValue(cid,10128)
	elseif getPlayerFrags(cid) == 1000 and trofeutatus2 == -1 then
		local quest = doPlayerAddItem(cid,10128,1)
		doItemSetAttribute(quest,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
		setPlayerStorageValue(cid,10128,1)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)

		trofeutatus3 = getPlayerStorageValue(cid,10127)
	elseif getPlayerFrags(cid) == 2000 and trofeutatus3 == -1 then
		local quest = doPlayerAddItem(cid,10127,1)
		doItemSetAttribute(quest,"description","Esse item foi obtido por "..getPlayerName(cid)..".")
		setPlayerStorageValue(cid,10127,1)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)
	end
end
return true
end
Postado

function onKill(cid, target, lastHit)
    if isPlayer(cid) and isPlayer(target) then
        if getPlayerFrags(cid) == 500 and getPlayerStorageValue(cid, 10129) == -1 then
            local quest = doPlayerAddItem(cid, 10129, 1)
            doItemSetAttribute(quest, "description", "Esse item foi obtido por "..getPlayerName(cid)..".")
            setPlayerStorageValue(cid, 10129, 1)
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)
        elseif getPlayerFrags(cid) == 1000 and getPlayerStorageValue(cid, 10128) == -1 then
            local quest = doPlayerAddItem(cid, 10128, 1)
            doItemSetAttribute(quest, "description", "Esse item foi obtido por "..getPlayerName(cid)..".")
            setPlayerStorageValue(cid, 10128, 1)
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)
        elseif getPlayerFrags(cid) == 2000 and getPlayerStorageValue(cid, 10127) == -1 then
            local quest = doPlayerAddItem(cid, 10127, 1)
            doItemSetAttribute(quest, "description", "Esse item foi obtido por "..getPlayerName(cid)..".")
            setPlayerStorageValue(cid, 10127, 1)
            doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYAREA)
        end           
    end
    return true
end

não respondo pms solicitando suporte em programação/scripting

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo