Jump to content
  • 0

L2j (pride pack) Auto Flag Pvp Zone


Question

Recommended Posts

  • 0
Posted
1 hour ago, Kara said:

Not working because the code he gave you is trash 

The guy's code first broadcast the packet and then change the flag.

 

Check setPvPFlag and similar methods and check which method simple change the flag (asign the variable you want) without add object to the PvPTaskManager. You want avoid that cause flag will be removed afterwards. 

 

In addition those who try help by giving codes at least CODE IT PROPERLY. Do not share a random trash code please.

True and even if those codes were correct, even then they could possibly not suit your case. You need to find a way for the flag to stay even if players attack each other 

  • 0
Posted
7 hours ago, JaharakaL said:

There is a shared pack with all these features and somehow you still want someone to send you the code and the implementation of it

the pack u share have nothing about pvp zone "hunters" i go there and no flag nothing

  • 0
Posted (edited)
protected void onEnter(Creature creature)
	{
		creature.setInsideZone(ZoneId.PVP_FLAG, true);
		creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
		if (creature instanceof PlayerInstance)
		{
			((PlayerInstance) creature).sendMessage("You have entered a flag zone.");
			((PlayerInstance) creature).leaveParty();
			((PlayerInstance) creature).setPvpFlag(1);
			((PlayerInstance) creature).broadcastUserInfo();
		}
	}
	
	@Override
	protected void onExit(Creature creature)
	{
		creature.setInsideZone(ZoneId.PVP_FLAG, false);
		creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
		if (creature instanceof PlayerInstance)
		{
			((PlayerInstance) creature).sendMessage("You have left a flag zone.");
			((PlayerInstance) creature).setPvpFlag(0);
			((PlayerInstance) creature).broadcastUserInfo();
		}
	}

 

this is a part from multifunction zone shared here in MxC. adapted to L2jmobius. works 100%. this part alone tho is not enough for everything to work. u need some some additions and some changes in your files. like "PVP_FLAG"(zone name for me)  you need to add to zonetypes etc.

 

after this You need to change your desired zone like PI from "town" "arena" or w/e it is to PVP_FLAG(my case) just code is not enough

 

you can ignore ".leaveParty();" mine is a no party - no res zone.

 

P.S. dont judge my code. i learn alone and since it works 100% of the time im ok with it. i try to improve.

Edited by Drazeal
Guest
This topic is now closed to further replies.


  • Posts

    • This is L2Etina’s first opening under our new team, and it’s off to a great start! We’re thrilled with the strong player turnout, the warm feedback, and your response to the major updates. We’re continuing to improve the server and would love to see you in game! ⚔️
    • I dont sell anything and i got scammed kiddo, if you noticed rookie just scammed me and blocked me. so asking this make you immature.
    • @Maxtor @Dragic @Celestine Why you unban this rat, it's will give very negative review if you will try sell something or provide service this very actually should be for @Dragic and his L2Forge sales.
    • Αχ ναι; τοτε γιατι με παρακαλουσες για κωδικες και οτι σου εδινα ελεγες τελεια και wow σαγαπαω? Ε ψευτρακο; Γιατι οτι πηρες λειτουργει οπως το ηθελες ακομη και σε λεπτομερεια που κανας αλλος θα σου ελεγε αντε κ γα*?   Σε τσουξανε οι τιμουλες μου στη τσεπουλα σου; κ βρηκες κανα new chatgpt dev? Φτωχομπινε του κερατα που κανεις παζαρια για 40-50 ευρω κωδικες.   Δεν ασχολουμε αλλο απλα ενημερωνω @Celestineτο παιδακι χρωσταει λεφτα για κωδικα που ελαβε και λειτουργει και το επιβεβαιωσε και με μπλοκαρε κ ολας. Ban η οχι δεν ασχολουμε αλλο. καλη τυχη 
    • den tha asxolithw allo mazi sou randoma,kserei olo to forum ti  eisai
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..