| Registruotis Prisijungti Forumas Ieškoti DUK |
Galite padėti?
1 pranešimas
• Puslapis 1 iš 1
Galite padėti?
Sveiki taigi man niekaip nesigauna įdėti flood protektor kodo kaip sakė Dreikas,kad galima butu .res komandą daryti kas 60sekundžių. Gal galyte padėti kaip reikia padaryti jog .res komandą būtų galyma naudoti kas 60sec? Štai mano skriptas ačiū labai tas kas padės gal yra šiek tiek žmonių geru dar Lietuvoje,labai dėkui.
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
/**
*
*
*/
public class Res implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS = { \\\\\\\\\\\\\\\"res\\\\\\\\\\\\\\\" };
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (command.equalsIgnoreCase(\\\\\\\\\\\\\\\"res\\\\
\\\\\\\\\\\")
)
{
В &n
bsp;if (!activeChar.isAlikeDead())
В &n
bsp;{
В &n
bsp; activeChar.sendMessage(\\\\\\\\\\\\\\\"You cannot be ressurected while alive.\\\\\\\\\\\\\\\");
В &n
bsp; return false;
В &n
bsp;}
if(activeChar.isInOlympiadMode())
{
В &n
bsp;activeChar.sendMessage(\\\\\\\\\\\\\\\"You cannot use this feature during olympiad.\\\\\\\\\\\\\\\");
return false;
}
if(activeChar.getInventory().getItemByItemId(3470) == null)
{
В &n
bsp;activeChar.sendMessage(\\\\\\\\\\\\\\\"You need 1 or more Gold Bars to use the ressurection system.\\\\\\\\\\\\\\\");
return false;
}
В &n
bsp;activeChar.sendMessage(\\\\\\\\\\\\\\\"You have been ressurected!\\\\\\\\\\\\\\\");
activeCh
ar.getInventory().destroyItemByItemId(\\\\\\\\\\\\\\\
"RessSystem
\\\\
4;, 3470, 1, activeChar, activeChar.getTarget());
В &n
bsp;activeChar.doRevive();
В &n
bsp;activeChar.broadcastUserInfo();
В &n
bsp;activeChar.sendMessage(\\\\\\\\\\\\\\\"One GoldBar has dissapeared! Thank you!\\\\\\\\\\\\\\\");
}
return true;
}
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
}
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
/**
*
*
*/
public class Res implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS = { \\\\\\\\\\\\\\\"res\\\\\\\\\\\\\\\" };
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (command.equalsIgnoreCase(\\\\\\\\\\\\\\\"res\\\\
\\\\\\\\\\\")
)
{
В &n
bsp;if (!activeChar.isAlikeDead())
В &n
bsp;{
В &n
bsp; activeChar.sendMessage(\\\\\\\\\\\\\\\"You cannot be ressurected while alive.\\\\\\\\\\\\\\\");
В &n
bsp; return false;
В &n
bsp;}
if(activeChar.isInOlympiadMode())
{
В &n
bsp;activeChar.sendMessage(\\\\\\\\\\\\\\\"You cannot use this feature during olympiad.\\\\\\\\\\\\\\\");
return false;
}
if(activeChar.getInventory().getItemByItemId(3470) == null)
{
В &n
bsp;activeChar.sendMessage(\\\\\\\\\\\\\\\"You need 1 or more Gold Bars to use the ressurection system.\\\\\\\\\\\\\\\");
return false;
}
В &n
bsp;activeChar.sendMessage(\\\\\\\\\\\\\\\"You have been ressurected!\\\\\\\\\\\\\\\");
activeCh
ar.getInventory().destroyItemByItemId(\\\\\\\\\\\\\\\
"RessSystem
\\\\
4;, 3470, 1, activeChar, activeChar.getTarget());
В &n
bsp;activeChar.doRevive();
В &n
bsp;activeChar.broadcastUserInfo();
В &n
bsp;activeChar.sendMessage(\\\\\\\\\\\\\\\"One GoldBar has dissapeared! Thank you!\\\\\\\\\\\\\\\");
}
return true;
}
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
}
-

Platinum - Dažnas dalyvis
- Pranešimai: 119
- Užsiregistravo: Sausis 31st, 2012, 2:20 pm
- Miestas: Kaunas
- Karma:
- Karma:
1 pranešimas
• Puslapis 1 iš 1
Grįžti į L2j serverio kūrimo klausimai
Dabar prisijungę
Vartotojai naršantys šį forumą: Registruotų vartotojų nėra ir 0 svečių


EN









