Jump to content
  • 0

Question

Posted

se ena comand pou exw m vgazi ena error kai den 3erw pos to fix :) (freya pack)

 

activeChar.setIsImobilised(true);

 

 

ama 3eri aknis pio einai to prob. pite m ty :P

 

 

 

7 answers to this question

Recommended Posts

  • 0
Posted

σου λέει ότι το setisimobilised δεν είναι imported.

Δοκίμασε το γρήγορο fix που σου δείνει το eclipse.

  • 0
Posted

/*

* This program is free software; you can redistribute it and/or modify

* it under the terms of the GNU General Public License as published by

* the Free Software Foundation; either version 2, or (at your option)

* any later version.

*

* This program is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

* GNU General Public License for more details.

*

* You should have received a copy of the GNU General Public License

* along with this program; if not, write to the Free Software

* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA

* 02111-1307, USA.

*

* http://www.gnu.org/copyleft/gpl.html

*/

 

package handlers.voicedcommandhandlers;

 

import com.l2jserver.Config;

import com.l2jserver.gameserver.handler.IVoicedCommandHandler;

import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;

import com.l2jserver.gameserver.network.serverpackets.SetupGauge;

import com.l2jserver.gameserver.ThreadPoolManager;

 

public class FarmPvPCmd implements IVoicedCommandHandler

{

private static final String[] VOICED_COMMANDS =

{

"farm1"

};

 

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)

{

int placex;

int placey;

int placez;

String message;

 

if(command.equalsIgnoreCase("farm1") && Config.Allow_Farm1_Command)

{

placex = Config.Farm1_X;

placey = Config.Farm1_Y;

placez = Config.Farm1_Z;

message = Config.Farm1_Custom_Meesage;

}

 

if(activeChar.isInJail())

{

activeChar.sendMessage("Sorry,you are in Jail!");

return false;

}

else if(activeChar.isInOlympiadMode())

{

activeChar.sendMessage("Sorry,you are in the Olympiad now.");

return false;

}

else if(activeChar.atEvent)

{

activeChar.sendMessage("Sorry,you are in an event.");

return false;

}

else if(activeChar.isInDuel())

{

activeChar.sendMessage("Sorry,you are in a duel!");

return false;

}

else if(activeChar.inObserverMode())

{

activeChar.sendMessage("Sorry,you are in the observation mode.");

return false;

}

else if(activeChar.isFestivalParticipant())

{

activeChar.sendMessage("Sorry,you are in a festival.");

return false;

}

else if(!Config.ALT_GAME_KARMA_PLAYER_CAN_USE_GK && activeChar.getKarma() > 0)

{

activeChar.sendMessage("Sorry,you are PK");

return false;

}

 

SetupGauge sg = new SetupGauge(SetupGauge.BLUE, 15000);

activeChar.sendPacket(sg);

sg = null;

activeChar.setIsImobilised(true);

 

ThreadPoolManager.getInstance().scheduleGeneral(new teleportTask(activeChar, placex, placey, placez, message), 15000);

 

return true;

}

 

public String[] getVoicedCommandList()

{

return VOICED_COMMANDS;

}

 

class teleportTask implements Runnable

{

private final L2PcInstance _activeChar;

private final int _x;

private final int _y;

private final int _z;

private final String _message;

 

teleportTask(L2PcInstance activeChar, int x, int y, int z, String message)

{

_activeChar = activeChar;

_x = x;

_y = y;

_z = z;

_message = message;

}

 

public void run()

{

if(_activeChar == null)

return;

 

_activeChar.teleToLocation(_x, _y, _z);

_activeChar.sendMessage(_message);

_activeChar.setIsImobilised(false);

}

}

}

 

  • 0
Posted

Profanos o kodikas einai asimbatos. An ayto to komati to pires apo allo pack, profanos ekeino to pack mporei na min exei tin setIsImobilised mesa sto pcinstance. Kalo tha itan na mas doseis kai to error. Diladi ti grafei otan bazeis ton kersora pano stin kokkinh leksei. Logika tha leei kati san :

 

 

No such method in L2PcInstance : Create method , fix project setup bla bla.

  • 0
Posted

Profanos o kodikas einai asimbatos. An ayto to komati to pires apo allo pack, profanos ekeino to pack mporei na min exei tin setIsImobilised mesa sto pcinstance. Kalo tha itan na mas doseis kai to error. Diladi ti grafei otan bazeis ton kersora pano stin kokkinh leksei. Logika tha leei kati san :

 

 

No such method in L2PcInstance : Create method , fix project setup bla bla.

to patisa afto m eftia3e sto L2Pcinstance ena alo codika kai efige to error malon li8ike pistevo :)
  • 0
Posted

Den lithike tipota. I sinartisi ou sou eftiakse einai adia, den kanei tipota. Mporei o kodikas na leitourgisei alla tah exei problimata afou den kanei imobilize ton player.

[/quteo]exis dikeo :)

 

 

afta einai ta 2 komatia ap to l2pcinstance pou xriazome malon :P

 

public void startFishing(int _x, int _y, int _z)
{
	stopMove(null);
	setIsImobilised(true);
	_fishing = true;
	_fishx = _x;
	_fishy = _y;
	_fishz = _z;
	broadcastUserInfo();
	//Starts fishing
	int lvl = GetRandomFishLvl();
	int group = GetRandomGroup();
	int type = GetRandomFishType(group);
	List<FishData> fishs = FishTable.getInstance().getfish(lvl, type, group);
	if(fishs == null || fishs.size() == 0)
	{
		sendMessage("Error - Fishes are not definied");
		EndFishing(false);
		return;
	}


public void EndFishing(boolean win)
{
	ExFishingEnd efe = new ExFishingEnd(win, this);
	broadcastPacket(efe);
	efe = null;
	_fishing = false;
	_fishx = 0;
	_fishy = 0;
	_fishz = 0;
	broadcastUserInfo();

	if(_fishCombat == null)
	{
		sendPacket(new SystemMessage(SystemMessageId.BAIT_LOST_FISH_GOT_AWAY));
	}

	_fishCombat = null;
	_lure = null;
	//Ends fishing
	sendPacket(new SystemMessage(SystemMessageId.REEL_LINE_AND_STOP_FISHING));
	setIsImobilised(false);
	stopLookingForFishTask();
}

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...