Ir para conteúdo

Featured Replies

Postado
  • 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.

 

  • Respostas 14
  • Visualizações 594
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @Vodkart o !joinguild funcionou perfeitamente só que quando vou kikar,deletar ou sair da guild pelos comandos !kick (nome) | !leaveguild |  /disband ele deleta a guild normal mas a fras

  • deu nao, msm coisa    

  • use os scripts assim:   creaturescript     guildremove.lua function onLogin(cid) registerCreatureEvent(cid, "GuildRemoveThink") return true end function onThink(cid, int

Posted Images

Postado

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

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
  • 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 <3

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

Postado

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!!

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
  • 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.

143638768_Semttulo.png.60f444a7c284f1f87f23798ede74f13b.png





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.
145489316_Semttulo1.png.1fdc8fcdea0a7569b97bc49818d2e95e.png


fiz algo errado?:thinking:

Editado 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.

Visitante
Responder

Quem Está Navegando 0

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

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.9k

Informação Importante

Confirmação de Termo