Postado Agosto 20, 2018 6 anos Autor deu nao, msm coisa Spoiler 11:00 You see Druid Dlc (Level 100). He is an Shaman The guild has 2 total members, 2 of them online. He is Member of the Test. 11:01 Druid Dlc has left the guild. 11:02 You see Druid Dlc (Level 100). He is an Shaman The guild has 2 total members, 2 of them online.
Postado Agosto 21, 2018 6 anos use os scripts assim: creaturescript guildremove.lua function onLogin(cid) registerCreatureEvent(cid, "GuildRemoveThink") return true end function onThink(cid, interval) local storage = 5752485 if getPlayerGuildId(cid) > 0 and getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) doPlayerSave(cid) elseif getPlayerGuildId(cid) == 0 and getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) doPlayerSave(cid) end return true end TAG <event type="think" name="GuildRemoveThink" event="script" value="guildremove.lua"/> <event type="login" name="GuildRemoveLogin" event="script" value="guildremove.lua"/> E O SCRIPT DO LOOK deixa assim: function CountGuildMembers(id) -- function by vodkart local count = 0 local lista = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. id .. ");") if(lista:getID() ~= -1) then repeat count = count + 1 until not lista:next() lista:free() end return count end function onLook(cid, thing, position, lookDistance) local storage = 5752485 if isPlayer(thing.uid) then doPlayerSave(thing.uid) if getPlayerStorageValue(thing.uid, storage) > 0 then local guildID,amount = getPlayerGuildId(thing.uid),0 local total = CountGuildMembers(guildID) for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) ~= 0 and getPlayerGuildId(cid) == guildID then amount = amount+1 end end doPlayerSetSpecialDescription(thing.uid,"\nThe guild has "..total.." total members, "..amount.." of them online") end end return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Agosto 21, 2018 6 anos Autor mesma coisa ainda vodkartzera =CC 12 horas atrás, poko360 disse: 11:00 You see Druid Dlc (Level 100). He is an Shaman The guild has 2 total members, 2 of them online. He is Member of the Test. 11:01 Druid Dlc has left the guild. 11:02 You see Druid Dlc (Level 100). He is an Shaman The guild has 2 total members, 2 of them online. obg por ta tentando ajudar ainda Editado Agosto 21, 2018 6 anos por poko360 (veja o histórico de edições)
Postado Agosto 21, 2018 6 anos Deleta o seu script de LOOK e usa somente o script do creaturescript guildremove.lua function onLogin(cid) registerCreatureEvent(cid, "GuildRemoveThink") return true end function CountGuildMembers(id) -- function by vodkart local count = 0 local lista = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. id .. ");") if(lista:getID() ~= -1) then repeat count = count + 1 until not lista:next() lista:free() end return count end function onThink(cid, interval) local playerGuild = getPlayerGuildId(cid) if playerGuild > 0 and getPlayerStorageValue(cid, storage) <= 0 then setPlayerStorageValue(cid, storage, 1) doPlayerSave(cid) local amount = 0 local total = CountGuildMembers(playerGuild) for _, cid in pairs(getPlayersOnline()) do if getPlayerGuildId(cid) ~= 0 and getPlayerGuildId(cid) == playerGuild then amount = amount+1 end end doPlayerSetSpecialDescription(cid,"\nThe guild has "..total.." total members, "..amount.." of them online") elseif not playerGuild or playerGuild == 0 and getPlayerStorageValue(cid, storage) > 0 then setPlayerStorageValue(cid, storage, 0) doPlayerSave(cid) doPlayerSetSpecialDescription(cid,"") end return true end Você já tem a TAG ne? testei aqui e funcionou!! [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Agosto 21, 2018 6 anos Autor @Vodkartdeletei o outro script (o primeiro) e deixei só o outro, dai bugou outra coisa deixei somente o guild remove como vc falou <event type="think" name="GuildRemoveThink" event="script" value="guildremove.lua"/> <event type="login" name="GuildRemoveLogin" event="script" value="guildremove.lua"/> bug look Spoiler Eu criei a guild (Leader) e invitei meu maker pra guild (Membro) dai eu dou look do leader no maker e aparece normal✅The guild has 2 total members, 2 of them online. He is Member of the Test.so que quando dou look do membro pro leader (ao contrario) aparece:❌The guild has 1 total members, 1 of them online. He is Leader of the Test. Bug relogar Spoiler testei relogar com os 2 char (dentro da guild) ai a frase dos dois desaparece , msm sendo dentro da guild❌The guild has 2 total members, 2 of them online.❌The guild has 1 total members, 1 of them online. fiz algo errado? Editado Agosto 21, 2018 6 anos por poko360 (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.