Jump to content

Question

Posted

hey guys can you tell me what is wrong with this  it gives basicly everywhere reward

if(isInsideZone(ZoneId.CUSTOMPVP))
				{
					sendMessage("is it working?");
					return;
				}
				else if (Config.ENABLE_PVP_FEATURES)
				{
					pvpReward();
				}

 

Recommended Posts

  • 0
Posted
if(Config.ENABLE_PVP_FEATURES && isInsideZone(ZoneId.CustomPvPZone))
	pvpReward();

 

 

Go ahead

  • 0
Posted (edited)
24 minutes ago, haskovo said:

hey guys can you tell me what is wrong with this  it gives basicly everywhere reward

if(isInsideZone(ZoneId.CUSTOMPVP))
				{
					sendMessage("is it working?");
					return;
				}
				else if (Config.ENABLE_PVP_FEATURES)
				{
					pvpReward();
				}

 

 

if(Config.ENABLE_PVP_FEATURES && isInsideZone(ZoneId.CUSTOMPVP) )       
  {                     

pvpReward();            
   }               
 

Edited by Irrelevant
  • 0
Posted
1 hour ago, haskovo said:

it doesnt give anything now

make sure that you have create your custom zone in xml , if you dont know how you can check this : 

  

if  you want you can add this code  for easier creation :       

 

 

                                                                  

 

otherwise use the first guide and create your zone by hand.

 

 

also make sure that you have create your customzone.java in zone type to read your new zone properly. the path in java may be gameserver.model.zone.type.   depends your pack.

 

if you dont know how to do this, you can take example by :  

 

to see how you can add a zone in java + datapack.

 

 

 

  • Like 1
  • 0
Posted (edited)

i have zone and it working it is respawning me gives me nobless etc

i think the problem is that its not checking who is in that zone which player

Edited by haskovo
  • 0
Posted (edited)
2 hours ago, haskovo said:

i have zone and it working it is respawning me gives me nobless etc

i think the problem is that its not checking who is in that zone which player

Player.java , method ---> onKillUpdatePvPKarma()

		/* 
		 * Basic antidual box check to avoid dual box farming pvp rewards
		 */
		Boolean checkIP = getClient().getConnection().getInetAddress().getHostAddress().equals(targetPlayer.getClient().getConnection().getInetAddress().getHostAddress());

		if(Config.ENABLE_PVP_FEATURES) {
		if (isInsideZone(ZoneId.CUSTOMPVP) && targetPlayer.isInsideZone(ZoneId.CUSTOMPVP) && !checkIP)
		{
			pvpReward();
		}else 
			return;
		}

 

Edited by LordPanic
  • 0
Posted
23 hours ago, haskovo said:

hey guys can you tell me what is wrong with this  it gives basicly everywhere reward

if(isInsideZone(ZoneId.CUSTOMPVP))
				{
					sendMessage("is it working?");
					return;
				}
				else if (Config.ENABLE_PVP_FEATURES)
				{
					pvpReward();
				}

 

 

21 hours ago, haskovo said:

i have zone and it working it is respawning me gives me nobless etc

i think the problem is that its not checking who is in that zone which player

Can you please explain your issue in plain English? Also consider mentioning the pack that you are using.

 

  • 0
Posted
if(isInsideZone(ZoneId.CUSTOMPVP)&&(Config.ENABLE_PVP_FEATURES))
{
 pvpReward();
 }
 else if (isInsideZone(ZoneId.CUSTOMPVP)&&(!Config.ENABLE_PVP_FEATURES))
{
sendMessage("Reward Disabled"); 
return

}

 

  • 0
Posted (edited)
1 hour ago, arm4729 said:
if(isInsideZone(ZoneId.CUSTOMPVP)&&(Config.ENABLE_PVP_FEATURES))
{
 pvpReward();
 }
 else if (isInsideZone(ZoneId.CUSTOMPVP)&&(!Config.ENABLE_PVP_FEATURES))
{
sendMessage("Reward Disabled"); 
return

}

 

not working i want when they are inside the pvp zone only then to get reward im using acis

Edited by haskovo
  • 0
Posted
On 7/1/2021 at 9:31 PM, haskovo said:

hey guys can you tell me what is wrong with this  it gives basicly everywhere reward

if(isInsideZone(ZoneId.CUSTOMPVP))
				{
					sendMessage("is it working?");
					return;
				}
				else if (Config.ENABLE_PVP_FEATURES)
				{
					pvpReward();
				}

 

It works everywhere cause your ifs are bad

On 7/1/2021 at 9:54 PM, Irrelevant said:

if(Config.ENABLE_PVP_FEATURES && isInsideZone(ZoneId.CUSTOMPVP) )       
  {                     

pvpReward();            
   }               

This is the correct way

  • 0
Posted (edited)

the pvpreward call is in pcInstance where is setting +1 pvp

 

private void pvpReward()
    {
        for (PvpReward pvpFeatures : PvpFeaturesTable.getInstance().getPvpRewardsTable())
        {
            if (Rnd.nextDouble() < pvpFeatures.getChance())
                addItem("Pvp Reward", pvpFeatures.getItemId(), pvpFeatures.getItemCount(), this, true);
        }
    }

Edited by haskovo
  • 0
Posted

Assuming your reward table is not empty, the problem is located at your zone file. Perhaps there is no setIsInsideZone(ZoneId.CUSTOMPVP) (onEnter method of the zone). Check it ...

System.out.println(String.format("Player is inside zone %s, Config: %s", isInsideZone(ZoneId.CUSTOMPVP),Config.ENABLE_PVP_FEATURES));
if(Config.ENABLE_PVP_FEATURES && isInsideZone(ZoneId.CUSTOMPVP))
	pvpReward();

 

Guest
This topic is now closed to further replies.


  • Posts

    • Mod: Saudação Real para Dono de Castelo Sistema inspirado no comportamento do Lineage II Classic (Kamael), que adiciona imersão e respeito ao líder do clã que controla um castelo.   🔍 Descrição Esse mod cria uma animação automática de reverência (/socialbow) para todos os jogadores próximos ao líder do clã dono de um castelo, quando ele estiver presente na vila. Além disso, mensagens de saudação personalizadas são exibidas no chat e na tela para todos os jogadores ao redor. Ideal para servidores que querem adicionar um toque de imersão realista e respeito ao poder dos clãs.   💡 Funcionalidades Leitura de dados por XML (GreetingData.xml) Configuração por castelo, zona, animação, mensagem e tempo Reação automática de jogadores próximos ao líder Cooldown configurável para evitar spam Totalmente compatível com aCis 409 / DreamV2 Suporte a expansão futura com mais zonas ou ações   <?xml version="1.0" encoding="UTF-8"?> <!--   Configuração do sistema de Saudação Real (Reverência ao Líder de Castelo)   Quando o líder do clã que possui um castelo estiver presente na vila correspondente, jogadores próximos   automaticamente fazem uma reverência (social ID definido) e recebem uma mensagem de saudação na tela.   -----------------------------------------   Atributos de <greeting>:   • castleId  → ID do castelo (ex: 1 = Gludio, 2 = Dion)   • zone      → "TOWN" (apenas dentro da vila atualmente)   • actionId  → ID da animação (7 = reverência)   • msg       → Mensagem exibida na tela e chat   • time      → Tempo mínimo em segundos entre cada saudação --> <list>     <greeting castleId="1" zone="TOWN" actionId="7" msg="Salve o Rei de Gludio!" time="60" />     <greeting castleId="2" zone="TOWN" actionId="7" msg="Honrem o Senhor de Dion!" time="30" /> </list> 📌 Observações Técnicas A checagem ocorre a cada 10 segundo via GreetingManager. Gatilho: líder do castelo está na zona de paz da vila. Jogadores próximos (em raio configurável) executam a animação e recebem mensagem. 🧠 Requisitos Servidor aCis ou derivado compatível (testado no DreamV2 e aCis 409) Path DreamV2: AQUI Path aCis 409: AQUI PasteBin: AQUI
    • You've been downnvoting me on a daily basis.   I told you, 'stop, I can downvote harder', you didn't stop   For each downvote, I downvoted you 5 times. I only downvote you after you downvote me.  Lol. https://maxcheaters.com/topic/252983-serverextenderscriptsclient-c4-cumulative-one-click/#findComment-2836853 Not to mention that you EXPLICITLY said, 'if I get more downvotes, I'll share more stuff', where shares?
    • something strange happens, the 62 downvotes are distributed among 3 users including you. ... there are only 3 users in maxcheaters?... strange...   99.9% of maxcheaters don't say the same as you... there are only 3 people who fill my posts with hate... can you explain the reason for the community. thanks.   or do you think you represent the entire maxcheaters community?   I need an explanation from @Maxtor why he allows certain users to flood downvotes to hurt certain users, and if you downvote them it doesn't add up. I need an explanation @Maxtor That's what you are doing with the rest of the community? that's why you have the forum 20 years ago? to end this way?.... a pity...
    • even in your images you are toxic, thats what you get when you build a toxic account answering toxic in a community i thought it was obvious apparently not.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock