Postado Março 17, 2021 4 anos Roda esse código aqui e mostra a print com valor do storage que vai aparecer na sua distro. @KR33 local cfg = { storage = 259005, effect = { [1] = {number = 1002, offset = {x = 1, y = 0}, delay = 5000}, --[2] = {number = 1002, offset = {x = 1, y = 0}, delay = 5000}, -- etc... } } local function startEffectCycle(cid) if (isCreature(cid)) then print("Valor do storage: "..getCreatureStorage(cid, cfg.storage)) local t = cfg.effect[getCreatureStorage(cid, cfg.storage)] if (t) then local position = getThingPosition(cid) position.x = position.x + t.offset.x position.y = position.y + t.offset.y doSendMagicEffect(position, t.number) addEvent(startEffectCycle, t.delay, cid) else addEvent(startEffectCycle, 1000, cid) end end end function onLogin(cid) if (getCreatureStorage(cid, cfg.storage) < 1) then doCreatureSetStorage(cid, cfg.storage, 1) end startEffectCycle(cid) return true end Editado Março 17, 2021 4 anos por 139 (veja o histórico de edições)
Postado Março 17, 2021 4 anos Autor 8 horas atrás, 139 disse: Roda esse código aqui e mostra a print com valor do storage que vai aparecer na sua distro. @KR33 local cfg = { storage = 259005, effect = { [1] = {number = 1002, offset = {x = 1, y = 0}, delay = 5000}, --[2] = {number = 1002, offset = {x = 1, y = 0}, delay = 5000}, -- etc... } } local function startEffectCycle(cid) if (isCreature(cid)) then print("Valor do storage: "..getCreatureStorage(cid, cfg.storage)) local t = cfg.effect[getCreatureStorage(cid, cfg.storage)] if (t) then local position = getThingPosition(cid) position.x = position.x + t.offset.x position.y = position.y + t.offset.y doSendMagicEffect(position, t.number) addEvent(startEffectCycle, t.delay, cid) else addEvent(startEffectCycle, 1000, cid) end end end function onLogin(cid) if (getCreatureStorage(cid, cfg.storage) < 1) then doCreatureSetStorage(cid, cfg.storage, 1) end startEffectCycle(cid) return true end
Postado Março 17, 2021 4 anos 2 horas atrás, KR33 disse: me envia seu showvoc cara... eu já mexo com otserver de nto, eu sei como posso te ajudar! Have no idea! freelance? go to my discord: sun#8860
Postado Março 17, 2021 4 anos Autor 1 hora atrás, Sun disse: me envia seu showvoc cara... eu já mexo com otserver de nto, eu sei como posso te ajudar! Showvoc Spoiler function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) then local type = getPlayerStorageValue(thing.uid, 259005) doPlayerSetSpecialDescription(thing.uid, "\n "..(getPlayerSex(cid) == 0 and "She" or "He").." are "..(type < 0 and "Shinobi" or type == 1 and "Genin" or type == 2 and "Chunin" or type == 3 and "Jounin" or type == 4 and "Akatsuki Member" or type == 5 and "Captain Anbu" or type == 6 and "Anbu")) end return true end
Postado Março 17, 2021 4 anos 5 horas atrás, KR33 disse: Você tem que adicionar na tabela o efeito pra cada valor de storage, exemplo: [1] = {number = 1002, offset = {x = 1, y = 0}, delay = 5000}, -- efeito 1002 pra quem tiver o storage de valor [1] [2] = {number = 1003, offset = {x = 1, y = 0}, delay = 5000}, -- efeito 1003 pra quem tiver o storage de valor [2] [3] = {number = 1004, offset = {x = 1, y = 0}, delay = 5000}, -- efeito 1004 pra quem tiver o storage de valor [3] -- etc..
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.