User talk:Kymara: Difference between revisions

From Arianne
Jump to navigation Jump to search
imported>Kymara
imported>Kymara
(No difference)

Revision as of 14:30, 7 February 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

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;

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?

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.

Get code

  • File> Import ... Git> Projects from Git
  • Clone ... and add :
URI ssh://USERNAME@arianne.git.sourceforge.net/gitroot/arianne/marauroa.git
changing your username to your own
  • If you have trouble at this stage try restarting eclipse and try again
  • Select all branches (fast anyway)
  • initial branch is master with remote name origin
  • let it import everything
  • select the repository you just cloned .. Next>
  • Method for project creation: use the new projects wizard. Don't know about the team sharing option I did the default.
  • Finish this part
  • new Project Wizard will open
  • Select Java Project, Net>
  • give it a name (marauroa will do)
  • I think the other defaults are okay
  • Finish

elfy

create table temp_elf_princess select timedate, source from gameEvents where event='quest' and param1= 'elf_princess' and param2 = 'flower_brought' and id < 58379295;
Query OK, 562 rows affected (6.22 sec)
Records: 562  Duplicates: 0  Warnings: 0

-- yeah I could have done a union but I wanted to know counts and have more control 
insert into temp_elf_princess 
select timedate, source from gameEvents_2009_08_17 
where event='quest' and param1= 'elf_princess' and param2 = 'flower_brought';
Query OK, 346 rows affected (5.67 sec)
Records: 346  Duplicates: 0  Warnings: 0

insert into temp_elf_princess 
select timedate, source from gameEvents_2009_02_19 
where event='quest' and param1= 'elf_princess' and param2 = 'flower_brought';
Query OK, 393 rows affected (6.40 sec)
Records: 393  Duplicates: 0  Warnings: 0

insert into temp_elf_princess 
select timedate, source from gameEvents_2008_08_21 
where event='quest' and param1= 'elf_princess' and param2 = 'flower_brought';
Query OK, 131 rows affected (49.79 sec)
Records: 131  Duplicates: 0  Warnings: 0

select count(*) from temp_elf_princess;
+----------+
| count(*) |
+----------+
|     1432 | 
+----------+

loots for achievements

create table looted_all_items 
select 
 i1.id, 
 i1.itemid, 
 i1.param1, 
 i1.timedate, 
 cast('' as char(32)) as name, 
 cast(0 as unsigned) as nextid 
from itemlog i1  
where event = 'register' 
and (param1 like 'golden %' or param1 like 'black %' or  param1 like 'chaos %' or param1 like 'shadow %');

delete from looted_all_items 
where param1 IN ('golden arrow', 'golden chainmail', 'golden mace', 'golden hammer', 'black apple', 'black pearl', 'black book');

alter table looted_all_items 
 add primary key (id), 
 add index Index_looted_itemid(itemid);

-- actually for all but one item, nextid = id+1 - but I didn't want to assume this!
update looted_all_items l 
set nextid = (select i1.id from itemlog i1 
              where i1.itemid=l.itemid and i1.id>l.id 
              order by i1.id 
              limit 1);

update looted_all_items 
join itemlog on nextid = itemlog.id 
set name = source 
where event = 'slot-to-slot' 
 and itemlog.param2 = 'content' 
 and source = param3;

flour

create table temp_milled_flour
select source, substring_index(param2,';',1) as count, id as gameEvents_id, timedate from gameEvents 
where event ='quest' and param1 = 'jenny_mill_flour' and param2 <> 'done' and timedate < '2010-11-24';

-- if they didn't pick it up then delete it - oh and they might pick it up between now and the next release too.
delete FROM stendhal.temp_milled_flour  where (select id from gameEvents where event ='quest' and param1 = 
'jenny_mill_flour' and param2 = 'done' and temp_milled_flour.source=gameEvents.source and gameEvents.id > gameEvents_id limit 1) is null;

-- repeat? but checking the pickup gets harder.

tortoise git

Downloaded http://code.google.com/p/tortoisegit/downloads/detail?name=TortoiseGit-1.6.3.0-32bit.msi&can=2&q=

Accepted all defaults, including using the putty based ssh client (said it was better with windows) rather than openssh. Note: puttygen was therefore included.

Opened new folder, right click, Git clone .. error that something hasn't installed properly, asked me if i want to open settings dialog to fix it. (something about msysgit and a path) don't know what to do next