Jump to content
  • 0

[Help] Buy/sell Zone


Question

Posted

Hi maxcheaters,

I need your help...looking for a shop zone to buy, sell only there.

 

I mean players are only be able to sell, buy and ofc rec sell in giran harbor.

 

I hope you can help.

Thanks!

7 answers to this question

Recommended Posts

  • 0
Posted (edited)

Take a look in jail zone and use the same check (NOSTORE) for peaceful zones. I think Giran harbor it is not peaceful. But if is peaceful in your project, you can create a new zone, use the same checks, and just insert Giran Harbor as store zone. (like flag zone with locs).

 

Better option is to create a new store zone.

 

Incidentally, it is not rec sell but craft.

Edited by 'Baggos'
  • 0
Posted

Create for example zone type: OfflineShops.
Find function, which sets actor( player ) to shop, add check

if (actor.getZone() != ZoneType.OfflineShops)

{ send some kind of message;

return; }

 

Easiest solution.

 

P.s. class files in example are made up by me, so you need to know where stuff is in your pack.

  • 0
Posted

It's far easier to restain some zones to be nostore zones (around gms, stairs, etc) rather than the reverse. aCis got it implemented that way at least.

 

If your server must restrain every single zone except the ones you chose, it's basically a reverted nostore zone system (if not inside the zone you can't sell). Simply track nostore system to see which places to edit, they are similar.

  • 0
Posted (edited)

I edit now net.sf.l2j.gameserver.model.zone.type; L2TownZone

 @Override
 protected void onEnter(L2Character character)
 {
  if (character instanceof L2PcInstance)
  {
   // PVP possible during siege, now for siege participants only
   // Could also check if this town is in siege, or if any siege is going on
   if (((L2PcInstance) character).getSiegeState() != 0 && Config.ZONE_TOWN == 1)
    return;
  }
  
  if (_isPeaceZone && Config.ZONE_TOWN != 2)
   character.setInsideZone(ZoneId.PEACE, true);
  
  character.setInsideZone(ZoneId.TOWN, true);
  character.setInsideZone(ZoneId.NO_STORE, true); <--(ADDed)
 }
 
 @Override
 protected void onExit(L2Character character)
 {
  if (_isPeaceZone)
   character.setInsideZone(ZoneId.PEACE, false);
  
  character.setInsideZone(ZoneId.TOWN, false);
  character.setInsideZone(ZoneId.NO_STORE, false); <--(ADDed)
 }

All Townzones now " no store "

->Giran Harbor "store Zone"

 

thanks for tips and try to help me! :)

 

-> Topic can Lock!

Edited by Protein
  • 0
Posted

I think it is better to edit "peaceful" zones for no store and create a new zone.

 

Your giran harbor isn't peaceful and all players can kill everyone inside.

So, you need a new store zone and after make it peaceful.

When you will create the new zone check this.

Guest
This topic is now closed to further replies.


  • Posts

    • That's exactly how it’s designed — everything important is handled on the API server side, for example, processing requests to the game server. Each website has its own token/key for authentication; without it, there will be no interaction with the game server. Some data can be stored both on my side and on the server side to avoid making frequent requests to the server, which is logical.   Yes, there’s a lot of old, unused code that just needs to be cleaned up. It was used before, but after major rewrites it was left lying around. It doesn’t interfere with anything — it’s just there and doesn’t affect the system's operation.   Beaver meme kurwa is my favorite. Unfortunately, you don't know Russian — otherwise, you would’ve spotted even more Easter eggs. 😂   I said it’s been installed over 250 times on different domains. You can join my Telegram, there are almost 200 people there — and those are just the ones who entered the chat — and we’ll have a good laugh together at your doubts! 😂😂😂
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/qtkJASMbKV https://campsite.bio/utchihaamkt  
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/qtkJASMbKV https://campsite.bio/utchihaamkt  
    • i saw somewhere that: $var = (int) $_POST['some_id'] ?? string::error_class('text'); it was when i gave up and deleted the sources let him, he does not even understand what cross site or mitm means   still waiting for any client of yours so i can play with them     DUDE IM GONNA CALL YOU BoberKurwa FROM NOW ON!! rename your account aswell! BoberKurwa!   Note: what happend to your chatgpt answers boberkurwa did your subscription of $12.5/$20 ended?   it is PSR12 standard
    • if i was you i would check first argentinian developer team to learn and contribute then start my own project privatly and then practice in free coding for my self, then you would be ready to learn standards and code out of nothing, and if you fail means you are in good path, if you win you are in for higher level, whatever you do be persistent and focused, thats what i did when i had time.
  • Topics

×
×
  • Create New...