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

    • @l2naylondev Requiring a player to log in just for the sake of logging  seems exploitable. Someone could log in only to claim the reward and immediately leave, or repeatedly change their ip. So i guess  are there are additional protections in place ? such as locking the reward by account, character , and ip. It would also be useful to add a playtime requirement. For example, after logging in, the player would need to remain active for at least x playtime  before getting the reward or other parameters configurable by the xml.  I suggest improving the system before selling it. 
    • I saw a few similar systems and came up with this one to help keep players on the server. It simply grants daily items every 24 hours just for logging in. There’s also the daily mission system—which assigns different tasks each day—where if you don't complete them within that 24-hour window, you get a new set of missions the next day. Sometimes, when starting out on a low-rate server (like x3), that little bit of help comes in handy—especially if you're playing solo without a clan or friends. I know there are quests to earn adena, but imagine being able to create an item that provides minor buffs or potions—nothing that would affect base stats or unbalance the server, of course; everyone can use the system however they like. I’m not looking to argue about this, haha; if anyone is interested, feel free to reach out. I’m open to criticism, too—no worries there. I just thought I’d post it. Thanks for the advice; I’ll keep improving the system and the interface. Tomorrow—or whenever I can—I’ll upload a short video so you can get an idea of what it’s like. I simply looked at what others had done and wanted to create something different, that's all, my friend. Cheers!
  • 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..