javaishard
03-27-2008, 11:08 AM
I am new to java today i no this is a very easy error but i just can't find where to place the ; thanx for any help
/tmp/21605/fightpick.java:110: ';' expected
^
1 error
public class fightpick extends Methods
{
public fightpick(mudclient mc){super(mc);}
public void MainBody(String Args[])
{
Display("Fighter with pickup - QuikSilverBlade");
int NpcID = StrToInt(Args[0]);
int FightMode = StrToInt(Args[1]);
int pick1 = Integer.parseInt(Args[2]);
int pick2 = Integer.parseInt(Args[3]);
int pick3 = Integer.parseInt(Args[4]);
int startx = GetX();
int starty = GetY();
while(Running())
{
/*
Fight Method.
*/
if (GetMode() != FightMode)
SetMode(FightMode);
{
int[] Npc = GetNpcById(NpcID);
if(Npc[0] != -1)
{
AttackNpc(Npc[0]);
Wait(Rand(3,600));
}
int[] item1 = GetItemById(pick1);
if(item1[0] != -1)
{
PickupItemById(item1);
Wait(Rand(200,500));
}
int[] item2 = GetItemById(pick2);
if(item2[0] != -1)
{
PickupItemById(item2);
Wait(Rand(200,500));
}
int[] item3 = GetItemById(pick3);
if(item3[0] != -1)
{
PickupItemById(item3);
Wait(Rand(200,500));
}
}
int[] Npc = GetNpcById(NpcID);
if(!InCombat() & Running() & Npc[0] == -1 & (GetX() != startx || GetY() != starty))
{
WalkTo(startx,starty);
Wait(400);
}
else
Wait(Rand(10,20));
if(GetFatigue() > 95 && Running())
{
while(!Sleeping() && Running())
{
UseItem(GetItemPos(1263));
Wait(Rand(1000,2000));
}
while(Sleeping() && Running())
Wait(1000);
}
}
End();
}
public void OnChatMessage(String sender, String message)
{
/*
Chat Message Mod Protection.
*/
if((sender.substring(4).equalsIgnoreCase("mod ") || sender.equalsIgnoreCase("andrew") || sender.equalsIgnoreCase("paul")) && Running())
{
Display("A mod was detected!");
Wait(Rand(2000,5000));
Speak("Hey " + sender + " back soon, dinner :P");
Wait(Rand(2000,5000));
LogOut();
End();
}
}
public void OnPrivateMessage(String sender, String message)
{
/*
Private Message Mod Protection.
*/
if((sender.substring(4).equalsIgnoreCase("mod ") || sender.equalsIgnoreCase("andrew") || sender.equalsIgnoreCase("paul")) && Running())
{
Display("A mod was detected!");
LogOut();
End();
}
}
public void OnServerMessage(String message)
}
/tmp/21605/fightpick.java:110: ';' expected
^
1 error
public class fightpick extends Methods
{
public fightpick(mudclient mc){super(mc);}
public void MainBody(String Args[])
{
Display("Fighter with pickup - QuikSilverBlade");
int NpcID = StrToInt(Args[0]);
int FightMode = StrToInt(Args[1]);
int pick1 = Integer.parseInt(Args[2]);
int pick2 = Integer.parseInt(Args[3]);
int pick3 = Integer.parseInt(Args[4]);
int startx = GetX();
int starty = GetY();
while(Running())
{
/*
Fight Method.
*/
if (GetMode() != FightMode)
SetMode(FightMode);
{
int[] Npc = GetNpcById(NpcID);
if(Npc[0] != -1)
{
AttackNpc(Npc[0]);
Wait(Rand(3,600));
}
int[] item1 = GetItemById(pick1);
if(item1[0] != -1)
{
PickupItemById(item1);
Wait(Rand(200,500));
}
int[] item2 = GetItemById(pick2);
if(item2[0] != -1)
{
PickupItemById(item2);
Wait(Rand(200,500));
}
int[] item3 = GetItemById(pick3);
if(item3[0] != -1)
{
PickupItemById(item3);
Wait(Rand(200,500));
}
}
int[] Npc = GetNpcById(NpcID);
if(!InCombat() & Running() & Npc[0] == -1 & (GetX() != startx || GetY() != starty))
{
WalkTo(startx,starty);
Wait(400);
}
else
Wait(Rand(10,20));
if(GetFatigue() > 95 && Running())
{
while(!Sleeping() && Running())
{
UseItem(GetItemPos(1263));
Wait(Rand(1000,2000));
}
while(Sleeping() && Running())
Wait(1000);
}
}
End();
}
public void OnChatMessage(String sender, String message)
{
/*
Chat Message Mod Protection.
*/
if((sender.substring(4).equalsIgnoreCase("mod ") || sender.equalsIgnoreCase("andrew") || sender.equalsIgnoreCase("paul")) && Running())
{
Display("A mod was detected!");
Wait(Rand(2000,5000));
Speak("Hey " + sender + " back soon, dinner :P");
Wait(Rand(2000,5000));
LogOut();
End();
}
}
public void OnPrivateMessage(String sender, String message)
{
/*
Private Message Mod Protection.
*/
if((sender.substring(4).equalsIgnoreCase("mod ") || sender.equalsIgnoreCase("andrew") || sender.equalsIgnoreCase("paul")) && Running())
{
Display("A mod was detected!");
LogOut();
End();
}
}
public void OnServerMessage(String message)
}