Hello, I recently created a model to edit my config in xml, but I have a doubt, to restore the status of the players after restart you will have to create a loop? Because I don't think it would be a good idea to do that, I would like your opinion.
for (Vip vip : VipData.getInstance().getVip())
{
if (player.getMemos().getLong(vip.getType().toString(), 0) > 0)
{
long now = Calendar.getInstance().getTimeInMillis();
long endDay = player.getMemos().getLong(vip.getType().toString());
if (now > endDay)
player.deleteVip(vip.getType());
else
{
player.setVip(vip);
if (!vip.getMessage().isEmpty())
World.announceToOnlinePlayers(player.getClan() != null ? vip.getMessageClan().replace("%player%", player.getName()).replace("%clan%", player.getClan().getName()) : vip.getMessage().replace("%player%", player.getName()), true);
player.broadcastUserInfo();
}
}
}
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.
Hello everyone!
I have a problem with editing mobs. I took some Mobs from here without sound and added them,
they looked good !!! BUT BUT !
When I hit him it does generate the effect, but when he hits it it doesn't.
Is this effect controlled from Npcgrp.dat?
PD_ I add capture of the event / effect I mention.
I await your answers, thank you!
Alguém que saiba trabalhar com Engine.dll e Core.dll? Tenho hwid no servidor o código adaptado, mas não tenho parte do cliente, pois meu cliente é c4.. Alguém que faça esse tipo de serviço
Question
Williams
Hello, I recently created a model to edit my config in xml, but I have a doubt, to restore the status of the players after restart you will have to create a loop? Because I don't think it would be a good idea to do that, I would like your opinion.
for (Vip vip : VipData.getInstance().getVip()) { if (player.getMemos().getLong(vip.getType().toString(), 0) > 0) { long now = Calendar.getInstance().getTimeInMillis(); long endDay = player.getMemos().getLong(vip.getType().toString()); if (now > endDay) player.deleteVip(vip.getType()); else { player.setVip(vip); if (!vip.getMessage().isEmpty()) World.announceToOnlinePlayers(player.getClan() != null ? vip.getMessageClan().replace("%player%", player.getName()).replace("%clan%", player.getClan().getName()) : vip.getMessage().replace("%player%", player.getName()), true); player.broadcastUserInfo(); } } }
5 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.