Compare commits
10 commits
master
...
VERSION_00
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0490610ef5 | ||
|
|
331a11efa2 | ||
|
|
d7180433cf | ||
|
|
1aeb5ee647 | ||
|
|
42cbb952e2 | ||
|
|
d7fe3de44e | ||
|
|
df6feb5dcb | ||
|
|
94711681f2 | ||
|
|
d2504c4852 | ||
|
|
453205546a |
19 changed files with 129 additions and 47 deletions
|
|
@ -39,12 +39,12 @@ Java is included in most Linux distributions. Both Sun Java and OpenJDK are supp
|
|||
|
||||
Please download Stendhal from http://arianne.sourceforge.net
|
||||
Then unzip the client zip into a new folder.
|
||||
You can double click on stendhal-0.90.5.jar and the client will run.
|
||||
You can double click on stendhal-0.91.jar and the client will run.
|
||||
|
||||
If you prefer to run from command line, then just execute this command
|
||||
in the stendhal folder:
|
||||
|
||||
java -jar stendhal-0.90.5.jar
|
||||
java -jar stendhal-0.91.jar
|
||||
|
||||
Alternatively you can run it using Java Webstart technology at:
|
||||
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ updates_server = http://arianne.sourceforge.net/stendhal/updates
|
|||
version_server = http://arianne.sourceforge.net/stendhal.version
|
||||
|
||||
# current version of stendhal
|
||||
version.old = 0.89.7
|
||||
version = 0.90.5
|
||||
version.old = 0.90
|
||||
version = 0.91
|
||||
|
||||
# javac options
|
||||
javac.deprecation = true
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
set STENDHAL_VERSION=0.90.5
|
||||
set STENDHAL_VERSION=0.91
|
||||
set LOCALCLASSPATH=.;data\script;data\conf;stendhal-server-%STENDHAL_VERSION%.jar;marauroa.jar;mysql-connector.jar;log4j.jar;commons-lang.jar;h2.jar
|
||||
java -Xmx400m -cp "%LOCALCLASSPATH%" marauroa.server.marauroad -c server.ini -l
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
STENDHAL_VERSION="0.90.5"
|
||||
STENDHAL_VERSION="0.91"
|
||||
|
||||
LOCALCLASSPATH=.:data/script/:data/conf/:stendhal-server-$STENDHAL_VERSION.jar:marauroa.jar:mysql-connector.jar:log4j.jar:commons-lang.jar:h2.jar
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ package games.stendhal.client.update;
|
|||
public class Version {
|
||||
|
||||
/** Version Number. */
|
||||
private static final String VERSION = "0.90.5";
|
||||
private static final String VERSION = "0.91";
|
||||
|
||||
/**
|
||||
* Extract the specified number of parts from a version-string.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class Debug {
|
|||
|
||||
/** version. */
|
||||
// Note: This line is updated by build.xml using a regexp so be sure to adjust it in case you modify this line.
|
||||
public static final String VERSION = "0.90.5";
|
||||
public static final String VERSION = "0.91";
|
||||
|
||||
public static final String PRE_RELEASE_VERSION = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ public class GenerateINI {
|
|||
out.println();
|
||||
out.println("server_typeGame=" + gameName);
|
||||
out.println("server_name=" + gameName + " Marauroa server");
|
||||
out.println("server_version=0.90.5");
|
||||
out.println("server_version=0.91");
|
||||
out.println("server_contact=https://sourceforge.net/tracker/?atid=514826&group_id=66537&func=browse");
|
||||
out.println();
|
||||
out.println("# Extensions configured on the server. Enable at will.");
|
||||
|
|
|
|||
|
|
@ -125,4 +125,16 @@ public class Cat extends Pet {
|
|||
return Arrays.asList("chicken", "trout", "cod", "mackerel", "char",
|
||||
"perch", "roach", "surgeonfish", "clownfish");
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this domestic animal take part in combat?
|
||||
*
|
||||
* @return true, if it can be attacked by creatures, false otherwise
|
||||
*/
|
||||
@Override
|
||||
protected boolean takesPartInCombat() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,12 +89,21 @@ public abstract class DomesticAnimal extends Creature {
|
|||
this.owner = owner;
|
||||
if (owner != null) {
|
||||
wasOwned = true;
|
||||
if (getZone() != null) {
|
||||
if (takesPartInCombat() && getZone() != null) {
|
||||
getZone().addToPlayersAndFriends(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this domestic animal take part in combat?
|
||||
*
|
||||
* @return true, if it can be attacked by creatures, false otherwise
|
||||
*/
|
||||
protected boolean takesPartInCombat() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Player getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ public class CompoundName extends ArrayList<String> {
|
|||
*/
|
||||
public boolean matches(AbstractList<Expression> expressions, int idx) {
|
||||
for(int i=0; i<size(); ++idx,++i) {
|
||||
if (idx >= expressions.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Expression curr = expressions.get(idx);
|
||||
String word = get(i);
|
||||
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ public final class SentenceImplementation extends Sentence {
|
|||
if (verb.isGerund) {
|
||||
w.setType(new ExpressionType(verb.entry.getTypeString() + ExpressionType.SUFFIX_GERUND));
|
||||
wordFound = true;
|
||||
} else if (verb.entry.getType().isVerb()) {
|
||||
} else if ((verb.entry.getType() != null) && verb.entry.getType().isVerb()) {
|
||||
w.setType(verb.entry.getType());
|
||||
wordFound = true;
|
||||
} else if (!verb.isPast) { // avoid cases like "rounded"
|
||||
|
|
|
|||
|
|
@ -786,6 +786,7 @@ final public class WordList {
|
|||
|
||||
if (entry == null) {
|
||||
entry = new WordEntry();
|
||||
entry.setType(new ExpressionType(""));
|
||||
|
||||
// add the new entry
|
||||
entry.setNormalized(key);
|
||||
|
|
|
|||
|
|
@ -2004,7 +2004,7 @@ public class Player extends RPEntity {
|
|||
* @return true if the buddy has been added
|
||||
*/
|
||||
public boolean addBuddy(String name, boolean online) {
|
||||
boolean isNew = !getMap("buddies").containsKey(name);
|
||||
boolean isNew = !hasMap("buddies") || !getMap("buddies").containsKey(name);
|
||||
|
||||
put("buddies", name, online);
|
||||
|
||||
|
|
|
|||
|
|
@ -22,11 +22,14 @@ import games.stendhal.server.entity.npc.ConversationPhrases;
|
|||
import games.stendhal.server.entity.npc.ConversationStates;
|
||||
import games.stendhal.server.entity.npc.EventRaiser;
|
||||
import games.stendhal.server.entity.npc.SpeakerNPC;
|
||||
import games.stendhal.server.entity.npc.action.IncrementQuestAction;
|
||||
import games.stendhal.server.entity.npc.action.ProcessReachedQuestAchievementsAction;
|
||||
import games.stendhal.server.entity.npc.action.IncreaseKarmaAction;
|
||||
import games.stendhal.server.entity.npc.action.IncreaseXPDependentOnLevelAction;
|
||||
import games.stendhal.server.entity.npc.action.IncrementQuestAction;
|
||||
import games.stendhal.server.entity.npc.action.MultipleActions;
|
||||
import games.stendhal.server.entity.npc.action.ProcessReachedQuestAchievementsAction;
|
||||
import games.stendhal.server.entity.npc.action.SayTimeRemainingAction;
|
||||
import games.stendhal.server.entity.npc.action.SetQuestAction;
|
||||
import games.stendhal.server.entity.npc.action.SetQuestToTimeStampAction;
|
||||
import games.stendhal.server.entity.npc.condition.AndCondition;
|
||||
import games.stendhal.server.entity.npc.condition.KilledForQuestCondition;
|
||||
import games.stendhal.server.entity.npc.condition.NotCondition;
|
||||
|
|
@ -241,30 +244,6 @@ public class DailyMonsterQuest extends AbstractQuest {
|
|||
*/
|
||||
}
|
||||
|
||||
static class DailyQuestCompleteAction implements ChatAction {
|
||||
|
||||
public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
|
||||
final String questInfo = player.getQuest(QUEST_SLOT);
|
||||
String questCount = null;
|
||||
String questLast = null;
|
||||
|
||||
//logger.info("Inside DailyQuestCompleteAction");
|
||||
final String[] tokens = (questInfo + ";0;0").split(";");
|
||||
//questLast = tokens[1];
|
||||
questCount = tokens[2];
|
||||
if (questCount.equals("null")) {
|
||||
questCount = "0";
|
||||
}
|
||||
|
||||
new IncreaseXPDependentOnLevelAction(5, 95.0).fire(player, sentence, raiser);
|
||||
raiser.say("Good work! Let me thank you in the name of the people of Semos!");
|
||||
player.addKarma(5.0);
|
||||
questCount = "" + (Integer.valueOf(questCount) + 1);
|
||||
questLast = "" + (new Date()).getTime();
|
||||
player.setQuest(QUEST_SLOT, "done" + ";" + questLast + ";" + questCount);
|
||||
}
|
||||
}
|
||||
|
||||
static class DailyQuestAbortAction implements ChatAction {
|
||||
|
||||
public void fire(final Player player, final Sentence sentence, final EventRaiser raiser) {
|
||||
|
|
@ -469,11 +448,14 @@ public class DailyMonsterQuest extends AbstractQuest {
|
|||
new QuestNotCompletedCondition(QUEST_SLOT),
|
||||
new KilledForQuestCondition(QUEST_SLOT, 0)),
|
||||
ConversationStates.ATTENDING,
|
||||
null,
|
||||
"Good work! Let me thank you in the name of the people of Semos!",
|
||||
new MultipleActions(
|
||||
new DailyQuestCompleteAction(),
|
||||
new IncreaseXPDependentOnLevelAction(5, 95.0),
|
||||
new IncreaseKarmaAction(5.0),
|
||||
new ProcessReachedQuestAchievementsAction(),
|
||||
new IncrementQuestAction(QUEST_SLOT, 2, 1)
|
||||
new IncrementQuestAction(QUEST_SLOT, 2, 1),
|
||||
new SetQuestToTimeStampAction(QUEST_SLOT,1),
|
||||
new SetQuestAction(QUEST_SLOT,0,"done")
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,7 +117,10 @@ public class MithrilCloak extends AbstractQuest {
|
|||
}
|
||||
final String questState = player.getQuest(QUEST_SLOT);
|
||||
res.add("I met Ida in her sewing room in Ados.");
|
||||
|
||||
if (questState.equals("rejected")) {
|
||||
res.add("I am not interested in helping Ida.");
|
||||
return res;
|
||||
}
|
||||
res.add("Ida's sewing machine is broken and she has asked me to find the missing part.");
|
||||
if (questState.startsWith("machine")) {
|
||||
// optionally could fetch item name from quest slot
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
***************************************************************************/
|
||||
package games.stendhal.server.maps.quests;
|
||||
|
||||
import games.stendhal.common.Grammar;
|
||||
import games.stendhal.server.entity.npc.ChatAction;
|
||||
import games.stendhal.server.entity.npc.ConversationPhrases;
|
||||
import games.stendhal.server.entity.npc.ConversationStates;
|
||||
|
|
@ -26,13 +27,13 @@ import games.stendhal.server.entity.npc.action.SayTextAction;
|
|||
import games.stendhal.server.entity.npc.action.SetQuestAction;
|
||||
import games.stendhal.server.entity.npc.action.SetQuestAndModifyKarmaAction;
|
||||
import games.stendhal.server.entity.npc.condition.AndCondition;
|
||||
import games.stendhal.server.entity.npc.condition.GreetingMatchesNameCondition;
|
||||
import games.stendhal.server.entity.npc.condition.LevelGreaterThanCondition;
|
||||
import games.stendhal.server.entity.npc.condition.NotCondition;
|
||||
import games.stendhal.server.entity.npc.condition.QuestActiveCondition;
|
||||
import games.stendhal.server.entity.npc.condition.QuestCompletedCondition;
|
||||
import games.stendhal.server.entity.npc.condition.QuestInStateCondition;
|
||||
import games.stendhal.server.entity.npc.condition.QuestNotStartedCondition;
|
||||
import games.stendhal.server.entity.npc.condition.GreetingMatchesNameCondition;
|
||||
import games.stendhal.server.entity.player.Player;
|
||||
import games.stendhal.server.util.ItemCollection;
|
||||
|
||||
|
|
@ -90,8 +91,11 @@ public class MixtureForOrtiv extends AbstractQuest {
|
|||
final String questState = player.getQuest(QUEST_SLOT);
|
||||
if ("rejected".equals(questState)) {
|
||||
res.add("I don't want to help Ortiv at the moment. He should go out and take the ingredients by himself.");
|
||||
}
|
||||
if ("done".equals(questState)) {
|
||||
} else if (!"done".equals(questState)) {
|
||||
final ItemCollection missingItems = new ItemCollection();
|
||||
missingItems.addFromQuestStateString(questState);
|
||||
res.add("I still need to bring Ortiv " + Grammar.enumerateCollection(missingItems.toStringList()) + ".");
|
||||
} else {
|
||||
res.add("I helped Ortiv. Now he can sleep safe again in his bed. He rewarded me with some XP and an assassin dagger for my use.");
|
||||
}
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -153,7 +153,11 @@ public class ObsidianKnife extends AbstractQuest {
|
|||
if (questState.startsWith("reading")) {
|
||||
return res;
|
||||
}
|
||||
res.add("Alrak says if I kill a black dragon and find a cod and an obsidian he will make me a knife.");
|
||||
res.add("Alrak said that the book had taught him how to make a knife, it sounded pretty good.");
|
||||
if (questState.equals("book_read")) {
|
||||
return res;
|
||||
}
|
||||
res.add("Alrak says if I kill a black dragon and find a cod and an obsidian he will make me the knife.");
|
||||
if (questState.equals("knife_offered")
|
||||
&& !player.hasKilled("black dragon")) {
|
||||
return res;
|
||||
|
|
|
|||
63
src/games/stendhal/server/script/SaveTheCats.java
Normal file
63
src/games/stendhal/server/script/SaveTheCats.java
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/* $Id$ */
|
||||
/***************************************************************************
|
||||
* (C) Copyright 2003 - Marauroa *
|
||||
***************************************************************************
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
package games.stendhal.server.script;
|
||||
|
||||
import games.stendhal.server.core.engine.StendhalRPWorld;
|
||||
import games.stendhal.server.core.engine.StendhalRPZone;
|
||||
import games.stendhal.server.core.events.TurnListener;
|
||||
import games.stendhal.server.core.events.TurnNotifier;
|
||||
import games.stendhal.server.core.scripting.ScriptImpl;
|
||||
import games.stendhal.server.entity.RPEntity;
|
||||
import games.stendhal.server.entity.creature.Cat;
|
||||
import games.stendhal.server.entity.player.Player;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import marauroa.common.game.IRPZone;
|
||||
|
||||
/**
|
||||
* saves cats (workaround for https://sourceforge.net/support/tracker.php?aid=3149889 )
|
||||
*
|
||||
* @author hendrik
|
||||
*/
|
||||
public class SaveTheCats extends ScriptImpl implements TurnListener {
|
||||
|
||||
@Override
|
||||
public void execute(Player admin, List<String> args) {
|
||||
TurnNotifier.get().notifyInTurns(1, this);
|
||||
}
|
||||
|
||||
public void onTurnReached(int currentTurn) {
|
||||
TurnNotifier.get().notifyInTurns(1, this);
|
||||
StendhalRPWorld world = StendhalRPWorld.get();
|
||||
for (IRPZone zone : world) {
|
||||
List<RPEntity> friends = ((StendhalRPZone) zone).getPlayerAndFriends();
|
||||
Iterator<RPEntity> itr = friends.iterator();
|
||||
while (itr.hasNext()) {
|
||||
RPEntity entity = itr.next();
|
||||
if (entity instanceof Cat) {
|
||||
itr.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unload(Player admin, List<String> args) {
|
||||
super.unload(admin, args);
|
||||
TurnNotifier.get().dontNotify(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ Some of these people are NPC, they will give you tasks to accomplish and hints t
|
|||
</security>
|
||||
<resources>
|
||||
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+" /> <!-- max-heap-size="120" -->
|
||||
<jar href="http://arianne.sourceforge.net/jws/stendhal-starter-0.90.5.jar" download="eager" main="true" />
|
||||
<jar href="http://arianne.sourceforge.net/jws/stendhal-starter-0.91.jar" download="eager" main="true" />
|
||||
</resources>
|
||||
<application-desc/>
|
||||
</jnlp>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue