so how can help or tell me whare is the problem? i have test it all.
and code is this
Spoiler
// create party players
public void createPartyOfTeam(int teamId)
{
final List<PcInstance> _players = new ArrayList<>();
for (PcInstance p : players.keySet())
{
if (getTeam(p) == teamId)
{
if (p.isInParty())
{
p.getParty().removePartyMember(p, MessageType.EXPELLED);
}
System.out.println(p.getName() + " ");
_players.add(p);
}
}
if (_players.size() >= 2)
{
int i = 0;
PcInstance leader = _players.get(0);
Party party = new Party(leader, _players.get(1), LootRule.ITEM_RANDOM);
leader.setParty(party);
for (PcInstance player : _players)
{
if (i < 2)
{
i++;
}
else
{
party.addPartyMember(player);
player.setParty(party);
i++;
}
}
Announcement.announceToAll("i time run " + i);
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I had a similar problem once when I was setting up a custom shop system in a game. For me, the fix was buried in the database settings. I had to adjust the stack limit for the item in the MySQL database, which allowed bulk purchases without triggering errors. You might want to check the item_template or a similar table for stackable values.
As for inspiration, I once played around with a different setup for fun using https://themulligans.org. While it’s an online casino, their sleek inventory and transaction systems gave me some cool ideas for designing in-game economies.
Question
tazerman2
hello i have make a automatically party create for event's but i have big problem with
packets like i have open 6 box like 3vs3 in one team i see last player and have double add same player
like
1 tester
2 tester1
3 tester2
4 tester2
all is good on event he add 3 player pet party and in party.java use same 3 vs 3 add
i use threadpool if maybe have problem with fast add and with delay he make party good
as normal
image for hava a idea
so how can help or tell me whare is the problem? i have test it all.
and code is this
// create party players
public void createPartyOfTeam(int teamId)
{
final List<PcInstance> _players = new ArrayList<>();
for (PcInstance p : players.keySet())
{
if (getTeam(p) == teamId)
{
if (p.isInParty())
{
p.getParty().removePartyMember(p, MessageType.EXPELLED);
}
System.out.println(p.getName() + " ");
_players.add(p);
}
}
if (_players.size() >= 2)
{
int i = 0;
PcInstance leader = _players.get(0);
Party party = new Party(leader, _players.get(1), LootRule.ITEM_RANDOM);
leader.setParty(party);
for (PcInstance player : _players)
{
if (i < 2)
{
i++;
}
else
{
party.addPartyMember(player);
player.setParty(party);
i++;
}
}
Announcement.announceToAll("i time run " + i);
}
}
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.