Ir para conteúdo

Featured Replies

Postado
Em 05/02/2016 13:37:54, xWhiteWolf disse:

não, isso não tem a ver kkk tenta reinstalar o evento e vê se vc não esqueceu nada. Vê se ao relogar dá algum erro tb

 

pior que não da erro e ta instalado certo

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

  • Respostas 175
  • Visualizações 19.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • só um adendo: Eu coloquei aquele mesmo efeito das shurikens que tem no vídeo (pelo que eu soube o fox fez essa atualização recentemente mas eu nunca entrei no server deles pra ver como é e resolvi faz

  • curtiu o evento? Se achar mais algum erro pode me falar que eu arrumo, to dando suporte pra esses meus scripts tb

  • troca a linha do broadcast por isso aqui:   if getPlayerGuildId(killer) >= 1 and getPlayerGuildName(killer) then         doBroadcastMessage("[Gran Tower] "..getCreatureName(killer).." just de

Posted Images

Postado

@xWhiteWolf então cara o script de verificar a storage esta funcionando, o unico problema é que quando outra pessoa mata o gran tower não remove a storage dos antigos caras que mataram o gran tower, teria como arrumar ?

 

function onStepIn(cid, item, pos, fromPosition)
	if not isPlayer(cid) then
		return true
	end 
  
	if getGlobalStorageValue(GRANTOWER.SAVELASTWINNER) == getCreatureName(cid) or getGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID) == getPlayerGuildId(cid) then
		doSendMagicEffect(pos, 14)
		doSendAnimatedText(pos, "Castle", 35)
	else
		doSendMagicEffect(pos, 2)
		doTeleportThing(cid, fromPosition, false)
		doPlayerSendCancel(cid, "[Mystical Castle] Você não pertence a guild dominante.")
	end
return true  
end

                                                       “Enquanto nos derem ao menos 1% de chance, seguiremos lutando.

                                                     E venceremos! Esse é o verdadeiro e único Clube da Fé! Vai São Paulo!”

                                                                                       spfc.png

Postado
Em 05/02/2016 13:37:54, xWhiteWolf disse:

não, isso não tem a ver kkk tenta reinstalar o evento e vê se vc não esqueceu nada. Vê se ao relogar dá algum erro tb

 

ja consegui arruma obg

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

Postado
  • Autor

Pessoal, dei uma modificada no creaturescript Gran Tower.lua, troquem pelos seus antigos e me digam se os erros sumiram, se melhorou, se piorou e oque aconteceu no sv de vcs.. quais erros ainda persistem, etc... 

 

Spoiler

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
	local killer = lastHitKiller[1]
	if isPlayer(killer) and (getCreatureName(cid) == "Gran Tower") then
		if (getGlobalStorageValue(GRANTOWER.FINALWINNER) ~= getCreatureName(killer)) then
			if getPlayerGuildId(killer) >= 1 then
				for index, creature in ipairs(getGranTowerPlayers()) do
					if getPlayerGuildId(creature) ~= getPlayerGuildId(killer) then
						doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)), true)
					end
				end
			else
				for index, creature in ipairs(getGranTowerPlayers()) do
					if getPlayerStorageValue(creature, GRANTOWER.AURA) ~= -1 then
						doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)), true)
					end              
				end
			end
			
			if (getPlayerGuildId(killer) >= 1) then
				setGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID, getPlayerGuildId(killer))
				for index, creature in ipairs(getGranTowerGuild(getPlayerGuildId(killer))) do
					setPlayerStorageValue(creature, GRANTOWER.AURA, 1)
				end
			else
				setGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID, -1)
			end
			setPlayerStorageValue(killer, GRANTOWER.AURA, 1)
			addEvent(changeOutfit, 0, killer)
			setGlobalStorageValue(GRANTOWER.SAVELASTWINNER, getCreatureName(killer))
			addEvent(doCreateMonster, 2 * 1000, "Gran Tower", GRANTOWER.TOWERPOSITION)
			setGlobalStorageValue(GRANTOWER.FINALWINNER, getCreatureName(killer))
			setGlobalStorageValue(GRANTOWER.DESTROYCOUNT, (getGlobalStorageValue(GRANTOWER.DESTROYCOUNT) + 1))
			doBroadcastMessage("[Gran Tower] The Gran Aura is with "..getCreatureName(killer)..", run to destroy the Grand Tower and take it.")
		end
	end
return true
end

function onTarget(cid, target)
 if isPlayer(cid) and isMonster(target) and (getCreatureName(target) == "Gran Tower") then
    if getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(cid) or getGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID) == getPlayerGuildId(cid) then
		doPlayerSendCancel(cid, "Você não pode atacar o Gran Tower, proteja ele!")
		return false
    end
 end
 return true
end

function onStatsChange(cid, attacker, type, combat, value)
	if (type == STATSCHANGE_HEALTHLOSS) and isMonster(cid) and isPlayer(attacker) and (getCreatureName(cid) == "Gran Tower") then
		if getGlobalStorageValue(GRANTOWER.FINALWINNER) == getCreatureName(attacker) or getGlobalStorageValue(GRANTOWER.SAVEWINNERGUILDID) == getPlayerGuildId(attacker) then
			return false
		end
	end
return true
end

 

 

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Postado

@xWhiteWolf cara você é de mais, script 100% funcional! muito obrigado ae cara.

                                                       “Enquanto nos derem ao menos 1% de chance, seguiremos lutando.

                                                     E venceremos! Esse é o verdadeiro e único Clube da Fé! Vai São Paulo!”

                                                                                       spfc.png

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