User talk:Kymara: Difference between revisions

From Arianne
Jump to navigation Jump to search
Content deleted Content added
imported>Kymara
imported>Kymara
Line 205: Line 205:
* Click Next > and follow through clicking Next > until finished.
* Click Next > and follow through clicking Next > until finished.
* Restart Eclipse when prompted
* Restart Eclipse when prompted

== getting marauroa source from git ==

Configuration

* First you need to tell Git about yourself, click Preferences > Team > Git > Configuration
* Click New Entry and enter
:Key: user.name
:value: your sourceforge username, e.g. kymara
* Click New Entry again and enter
:Key: user.email
:value: your sourceforge email address, e.g. kymara@users.sourceforge.net

* This information is stored in ~/.gitconfig and will be used by Git to identify who did change the history of the repository whenever you are the user logged on to your computer.

* Now you can add the rest of the file as in the example. You'll see Configuration and the file location, click open and edit it directly in Eclipse.

Revision as of 13:18, 2 January 2011

converting xml path nodes to java

sed 's|</parameter>|));|' node > node2
sed 's|<parameter name="node[0-9]*">|nodes.add(new Node(|' node2 > node3

cleanup postman table

<source lang="sql"> CREATE TABLE IF NOT EXISTS temp_postman ( source VARCHAR(64),

target     VARCHAR(64),
message    TEXT);

LOAD DATA LOCAL INFILE '/home/katie/workspace/stendhal/postmantable.csv' INTO TABLE temp_postman FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';


insert into postman (source, target, message, timedate, messagetype, delivered) select source, target, message, '2010-07-20 00:00:00', 'P', 0 from temp_postman;

-- yes thats a lie about the message type, some came from npcs update postman set messagetype = 'N' where source in ('MrTaxman','Dagobert','Harold','Wilfred');


-- add indices on target and delivered (combined?)

-- remove messages where the target does not correspond to an existing character name delete postman from postman left join characters on characters.charname = postman.target where characters.charname is null;

-- remove messages where the target account.username is permanently banned (why do this first? it might get more?) delete postman from postman join account on account.username = postman.target where account.status='banned';

-- remove messages where the target character has an account which is is permanently banned delete postman from postman join characters on characters.charname = postman.target join account on account.id = characters.player_id where account.status='banned';

-- remove any uncaught spam? delete from postman where source = 'Harold' and length(message)>1000;

-- postman used to be case sensitive on target and so there were some really ancient messages in there delete postman from postman join characters ON characters.charname = postman.target where characters.charname not like binary postman.target;

-- empty messages (1 was delivered was from new version) delete from postman where message = and delivered =0;

</source>

Stuff to do, over time

  • Correct some of the warnings in findbugs:
    • Blackjack
    • Help tomi string append
    • Portal cast
  • Review golden orc sword quest that's in feature requests
  • Create quests pointing to dungeons
  • Postman on website
  • one player area access portals in banks
  • equipment refactoring (right click equip, swapping items over existing items in slots)
  • Stendhal Quest Histories - can we get some smart default methods in? or use existing actions?

npc to lend kitchen tools

games.stendhal.server.maps.semos.baker.ShopAssistantNPC

Idea: have erna lend out pestle and mortar or sugar mill and expect them back after a certain time. If you don't bring them back but want to borrow another thing, you have to pay for the previous.

I did this without an ide so not all functions or conditions might be right ... will check

<source lang = "java"> // define a COST int 3000 ? // String QUEST_SLOT = "borrow_kitchen_equipment"; // List<String> ITEMS of the items;

addOffer("Our pizza delivery team can #borrow some kitchen equipment from me.");

add(ConversationStates.ATTENDING, "borrow",

   new LevelLessThanCondition(6), 
   ConversationStates.ATTENDING, 
   "Oh sorry, I don't lend equipment to people with so little experience as you.",
   null);

add(ConversationStates.ATTENDING, "borrow",

   new AndCondition(new LevelGreaterThanCondition(5), new QuestNotCompletedCondition("pizza_delivery")),  
   ConversationStates.ATTENDING, 
   "You'll have to speak to Leander and ask if you can help with the pizza before I'm allowed to lend you anything.",
   null);

add(ConversationStates.ATTENDING, "borrow",

   new AndCondition(
       new LevelGreaterThanCondition(5), 
       new QuestCompletedCondition("pizza_delivery"),
       new QuestNotActiveCondition(QUEST_SLOT)), 
   ConversationStates.ATTENDING, 
   // that grammar method or one close to it
   "I lend out " + Grammar.enumerateCollectionWithHash(ITEMS) + ".", 
   null);

// player already has borrowed something it didn't return and will pay for it add(ConversationStates.ATTENDING, "borrow",

   new AndCondition(new QuestActiveCondition(QUEST_SLOT), new NotCondition(new PlayerHasRequiredItemWithHimCondition(QUEST_SLOT))),  
   ConversationStates.QUESTION_1, 
   "You didn't #return what I last lent you! Do you want to pay for it at a cost of " + COST + " money?",
   null);

// player already has borrowed something it didn't return and will return it add(ConversationStates.ATTENDING, "borrow",

   new AndCondition(new QuestActiveCondition(QUEST_SLOT), new PlayerHasRequiredItemWithHimCondition(QUEST_SLOT)),  
   ConversationStates.QUESTION_2, 
   "You didn't #return what I last lent you! Do you want to return it now?",
   null);

// player wants to pay for previous item final List<ChatAction> payment = new LinkedList<ChatAction>(); payment.add(new DropItemAction("money", COST)); payment.add(new SetQuestAction(QUEST_SLOT, "done")); payment.add(new DecreaseKarmaAction(10)); add(ConversationStates.QUESTION_1,

   ConversationPhrases.YES_MESSAGES, 
   new PlayerHasItemWithHimCondition("money", COST),  
   ConversationStates.ATTENDING, 
   "Thanks. Just let me know if you want to #borrow any tools again.",
   new MultipleActions(payment));

// player already has borrowed something and wants to return it final List<ChatAction> return = new LinkedList<ChatAction>(); return.add(new DropRequiredItemAction(QUEST_SLOT)); return.add(new SetQuestAction(QUEST_SLOT, "done")); add(ConversationStates.QUESTION_2,

   ConversationPhrases.YES_MESSAGES, 
   new PlayerHasRequiredItemWithHimCondition(QUEST_SLOT)),  
   ConversationStates.ATTENDING, 
   "Thank you! Just let me know if you want to #borrow any tools again.",
   new MultipleActions(return));

// don't want to pay for it now add(ConversationStates.QUESTION_1,

   ConversationPhrases.NO_MESSAGES, 
   null,  
   ConversationStates.ATTENDING, 
   "No problem. Take as long as you need, but you can't borrow other tools till you return the last, or pay for it.",
   new MultipleActions(payment))

// don't want to return it now add(ConversationStates.QUESTION_2,

   ConversationPhrases.NO_MESSAGES, 
   null,  
   ConversationStates.ATTENDING, 
   "No problem. Take as long as you need, but you can't borrow other tools till you return the last, or pay for it.",
   null)


// saying the item name and storing that item name into the quest slot, and giving the item

// TODO: give the item and store it in the quest slot as item name, or itemname = 1 if you feel better about that add(ConversationStates.ATTENDING,

   new TriggerInListCondition(ITEMS),
   new AndCondition(
       new LevelGreaterThanCondition(5), 
       new QuestCompletedCondition("pizza_delivery"),
       new QuestNotActiveCondition(QUEST_SLOT))
   ConversationStates.ATTENDING, 
   "Here you are! Don't forget to #return it or you have to pay!",
   null);
   

// TODO: say the item name when not in correct conditions should give some appropriate message - or use null condition for a generic message about the item?

// player asks about pay from attending state add(ConversationStates.ATTENDING, "pay",

   new QuestActiveCondition(QUEST_SLOT)),  
   ConversationStates.QUESTION_1, 
   "If you lost what I lent you, you can pay " + COST + " money. Do you want to pay now?",
   null);

// player asks about return from attending state add(ConversationStates.ATTENDING, "return",

   new QuestActiveCondition(QUEST_SLOT)),  
   ConversationStates.QUESTION_2, 
   "Do you want to return what you borrowed now?",
   null);

</source>

stats

File:Bug age 20101127.ods or picture:

https://sourceforge.net/tracker/reporting/index.php?atid=101111&what=aging&span=30&period=month&group_id=1111

installing egit plugin

   * Open Help->Install New Software. 
   * Are there any sites already in a drop list list to work with? If not then click Add...
   * Add the Helios update site: Name: helios Location: http://download.eclipse.org/releases/helios/
   * type egit into the filter text box
   * Eclipse Egit should come up, mark that by clicking the small box next to it
   * Click Next > and follow through clicking Next > until finished. 
   * Restart Eclipse when prompted

getting marauroa source from git

Configuration

  • First you need to tell Git about yourself, click Preferences > Team > Git > Configuration
  • Click New Entry and enter
Key: user.name
value: your sourceforge username, e.g. kymara
  • Click New Entry again and enter
Key: user.email
value: your sourceforge email address, e.g. kymara@users.sourceforge.net
  • This information is stored in ~/.gitconfig and will be used by Git to identify who did change the history of the repository whenever you are the user logged on to your computer.
  • Now you can add the rest of the file as in the example. You'll see Configuration and the file location, click open and edit it directly in Eclipse.