BF
script

storage script aura

Por bfs102030, 27 de fev. de 2016 em Scripts

storage script aura
3
1.1k
bfs102030B
27 de fevereiro de 2016 às 21:49

Ola galera, boa Noite estou precisando uma ajudinha nesse script,ele esta funcionando perfeitamente.eu gostaria apenas de acrecentar storage's nele.irei usa-lo da seguinte forma.quando o player completar todas as quests do meu servidor ele ira ganhar esta aura..OBS: nao gostaria que fosse mudado nada no script apenas que fosse acrecentado storage's.na verdade eu irei colocar as minhas storage's preciso apenas que acrecentem a tag nele e me ensine a colocar o resto. desde ja agradeco e REP+ pra quem solucionar...

 

Aura System

 

 

 

function sendEffect(cid)
if isCreature(cid) and isPremium(cid) then
local pos = getCreaturePosition(cid)
local x = math.random(pos.x-1,pos.x+1)
local y = math.random(pos.y-1,pos.y+1)
doSendMagicEffect({x=x,y=y,z=pos.z}, 4)
doSendMagicEffect({x=x,y=y,z=pos.z}, 34)
addEvent(sendEffect,2000,cid)
end
end
function onLogin(cid)
if getPlayerLevel(cid) >= 300 then
sendEffect(cid)
end
registerCreatureEvent(cid, "AdvEffect")
return TRUE
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newLevel == 300 then
sendEffect(cid)
end
return TRUE
end

 

 

Yan LiimaY
27 de fevereiro de 2016 às 22:26

Tenta assim amigo:

local config = {
storage = 3482201
}

function sendEffect(cid)
        if isCreature(cid) and isPremium(cid) then
		if getPlayerStorageValue(cid, config.storage) == 1 then
                local pos = getCreaturePosition(cid)
                local x = math.random(pos.x-1,pos.x+1)
                local y = math.random(pos.y-1,pos.y+1)
                doSendMagicEffect({x=x,y=y,z=pos.z}, 4)
                doSendMagicEffect({x=x,y=y,z=pos.z}, 34)
		setPlayerStorageValue(cid, config.storage, 1)
                addEvent(sendEffect,2000,cid)
        end
end

Editado Fevereiro 27 por nedroesdoksdja

bfs102030B
28 de fevereiro de 2016 às 20:36

mais ae eu junto com a ultima parti ali neh ?

ficando assim ? e com relacao as storages..pois cada quest tem uma storage ,com faco paa ir add 1 por 1 ?

 

 

 

local config = {
storage = 3482201
}

function sendEffect(cid)
if isCreature(cid) and isPremium(cid) then
if getPlayerStorageValue(cid, config.storage) == 1 then
local pos = getCreaturePosition(cid)
local x = math.random(pos.x-1,pos.x+1)
local y = math.random(pos.y-1,pos.y+1)
doSendMagicEffect({x=x,y=y,z=pos.z}, 4)
doSendMagicEffect({x=x,y=y,z=pos.z}, 34)
setPlayerStorageValue(cid, config.storage, 1)
addEvent(sendEffect,2000,cid)
end
end

 

function onLogin(cid)

if getPlayerLevel(cid) >= 300 then
sendEffect(cid)
end
registerCreatureEvent(cid, "AdvEffect")
return TRUE
end
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL and newLevel == 300 then
sendEffect(cid)
end
return TRUE
end


up