mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-31 00:15:54 -04:00
29 lines
567 B
Plaintext
29 lines
567 B
Plaintext
|
|
include library.utils;
|
|
include library.minigame;
|
|
|
|
const string STF = "som/som_item";
|
|
|
|
commandHandler cmdFish()
|
|
{
|
|
if (!isIdValid (self))
|
|
return SCRIPT_CONTINUE;
|
|
|
|
string planetName = getCurrentSceneName();
|
|
|
|
if (planetName.startsWith("mustafar"))
|
|
{
|
|
sendSystemMessage(self, new string_id(STF, "cannot_fish"));
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
if ( minigame.isFishing(self) )
|
|
{
|
|
minigame.stopFishing(self);
|
|
queueCommand(self, ##"fish", null, "", COMMAND_PRIORITY_DEFAULT);
|
|
return SCRIPT_CONTINUE;
|
|
}
|
|
|
|
minigame.startFishing(self);
|
|
return SCRIPT_CONTINUE;
|
|
} |