Jump to content
  • 0

Fences (Colosseum Fence-Walls)


Question

Posted (edited)

Hello , i tried and tested different codes from KKnD and l2jserver forums .. commands and everything works but when i try spawn fence  the command //spawnfence is same like //spawn .. work in same way... other command work normaly
if i use //spawnfence npcid lwill spawn the npc .. Do you guys have any working visible Fence? 

Edited by Kelrzher

10 answers to this question

Recommended Posts

  • 0
Posted (edited)

i get all debugs but i cannot get the catch exception
also when i use //spawnfence 1 150 150 150 150 it spawns monster ids for example.. no fences... 

if (command.startsWith("admin_spawnfence"))
{
//works  activeChar.sendMessage("I read the command but i cannot move forward");
StringTokenizer st = new StringTokenizer(command, " ");
try
{
st.nextToken(); // command
int type = Integer.parseInt(st.nextToken());
int width = Integer.parseInt(st.nextToken());
int length = Integer.parseInt(st.nextToken());
int height = 1;
if (st.hasMoreTokens())
height = Math.min(Integer.parseInt(st.nextToken()), 3);
for (int i = 0; i < height; i++)
{
L2FenceInstance fence = new L2FenceInstance(IdFactory.getInstance().getNextId(), type, width, length);
fence.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());
activeChar.sendMessage("Spawned fence with id " + fence.getObjectId());
_fences.add(fence);
//activeChar works activeChar.sendMessage("I work fine motherfuckers.");
}
//works activeChar.sendMessage("I work as a command but not functional");
}
catch (Exception e)
{
activeChar.sendMessage("Usage: //spawnfence <type> <width> <length> [<height>]");
}
}
Edited by Kelrzher
  • 0
Posted (edited)

Put it one level higher than //spawn command. startsWith don't bother, it picked the first found command. If it begin by spawn, it uses then //spawn.

 

Correct

if (spawnfence)
else if (spawnall)
else if (spawnnone)
else if (spawnblabla)
else if (spawn)
else if ...

Wrong

if (spawn)
else if (spawnall)
else if (spawnnone)
else if (spawnblabla)
else if (spawnfence)
else if ...
Edited by Tryskell
  • 0
Posted

I updated the code , now i use only spawnfence i got it from jserver before janiii or someone update..i have it on top of all but now nothing happens.. I will post the code soon

  • 0
Posted (edited)

My packet: http://pastebin.com/JAPNxhH1

My fence instance : http://pastebin.com/cP3RfFcj

My command: http://pastebin.com/7HbNG65T

 

 

nothing shows up  , command does nothing .. i want  the only to be visually for fancy events nothing else

Edited by Kelrzher
  • 0
Posted

equals means you already StringTokenizer and test the cutted command, otherwise whatever command with parameter would fail.

ye my first try was equals , anyway i changed the code as the links but still nothing comes up , no more monsters spawn .. but no fences aswell :D

  • 0
Posted

Ok reverted to old code , commands working thanks tryskell , //listfence shows me that thy are spawned alright? .. But not visible fence i dont see any fence

Guest
This topic is now closed to further replies.


  • Posts

    • so whitch plan is it? because in here is one price and in ur websit is another...
    • Ты настолько смешон, что создал специально для этого левый аккаунт?)))  ты не стоишь даже капли с моего члена что бы я ради тебя писал что-то на анг)  Человек видимо облажался с запуском, слил бабки в помойку теперь с горящей жопой бегает по форуму и не знает кого обвинить))))) перечитай что я тебе написал, мне насрать на тебя на твой сервер и на то что ты там выложил)  это все дерьмо неактуально уже давно, скажу тебе если твоя тупая голова это не поняла, АКТУАЛЬНОЕ НИКТО НЕ ПРОДАЕТ, потому что любая продажа это = шара, все что продается ЭТО ОТЪЕЗЖЕННОЕ ГОВНО которое не нужно хозяину, старое как твои обвисшие от гнева сиськи    
    • L2 HARMONY - BANNERS & ICONS       L2 COLD - NPC ANIMATED BANNER
    • LA ERA DE EINHASAD - Lineage 2 en Castellano Lineage II Crónica 4: Vástagos del Destino x5 - Main Class - Full Craft ───────────────────────────── La diosa Einhasad ha despertado... Una nueva era comienza para los verdaderos aventureros. Un mundo completamente traducido al español, fiel al Lineage II original, creado para una comunidad hispanohablante unida por la nostalgia y la pasión. ───────────────────────────── APERTURA OFICIAL: 14 de NOVIEMBRE - 20:00hs (GMT-3) ───────────────────────────── INFORMACIÓN PRINCIPAL Rates: x5 Tipo: Main Class Sistema: Full Craft Idioma: 100% Español (traducción completa del juego) Comunidad hispanohablante Balance original con mínimas modificaciones Buffer Offline, los jugadores pueden crear sus tiendas de buffs Progresión de crónicas cada 4 meses aprox. Economía estable - Sin Pay to Win - No venta de items/adena por donación Comunidad de 1.000 personas Anterior versión x1 duro casi 3 años con 952 IPs distintas de pico ───────────────────────────── CARACTERÍSTICAS DESTACADAS Experiencia fiel al Lineage II clásico, sin alteraciones invasivas Interfaz, diálogos y objetos completamente en español Ventana de comunidad con servicios personalizados y comercio por Monedas de Oro Olimpiadas, Épicos y Asedios originales Recompensas por votación, Eventos TVT con 3 arenas diferentes. Participan todos sin importar el nivel, pero dentro de la arena solo se atacan por rango cercano Soporte activo y presencia constante del administrador Tickets de soporte con atención rápida en Discord ante cualquier problema ───────────────────────────── ENLACES OFICIALES Website: La Era de Einhasad Discord: https://discord.com/invite/A6PtCCN2SF ───────────────────────────── Una comunidad unida por el idioma, la pasión y la nostalgia. Redescubrí Aden… en tu propio idioma. Bienvenido a La Era de Einhasad.  
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock