Page 1 of 1
No sound in game at all- Ubuntu Oneiric [solved]
Posted: 02 Nov 2011, 20:17
by Derpella
From a some time I don't have sound at all both in official client and manaplus. Both music and SFX.
Volume is set OK. Every other app's sound is working.
Other SDL applications have sound working well.
The problem could have started
a) after upgrading Ubuntu to 11.10
b) after compiling manually all libraries to compile some custom mana client. Debian-based systems are putting files in other places than different distros, so I had to compile SDL, guichan, everything. (Compilation wasn't finished successfully because of "fatal error: SDL_ttf.h: No such file or directory" even if I compiled SDL_ttf...)
These two events happened in similar time, so I don't know what could had caused the problem. Any ideas?
Re: No sound in game at all- Ubuntu Oneiric
Posted: 02 Nov 2011, 20:33
by 4144
I not sure is it possible in 11.10, but try disable pulse audio.
Re: No sound in game at all- Ubuntu Oneiric
Posted: 02 Nov 2011, 20:46
by Derpella
I would have to remove it completely... I'll ask friend if it's safe and worth it.
Re: No sound in game at all- Ubuntu Oneiric
Posted: 02 Nov 2011, 23:52
by o11c
You shouldn't've had to recompile any system libraries in order to build a client; in fact it is very easy to mess things up that way ... did you do: apt-get build-dep mana ?
As far as I can tell, the dependencies of the mana client are not affected by Debian's multiarch support; that only affects system packages.
Re: No sound in game at all- Ubuntu Oneiric
Posted: 03 Nov 2011, 07:06
by Derpella
Wow! That "apt-get build-dep mana" did many things and I almost achieved compiling this alternative client, but suddenly "emoteshortcut.cpp:29:1: error: ‘EmoteShortcut::EmoteShortcut’ names the constructor, not the type", which ended my journey to explore the unknown. (I will remember the command, useful one).
Sound still doesn't work though.
Re: No sound in game at all- Ubuntu Oneiric
Posted: 03 Nov 2011, 15:23
by o11c
Huh? That error should only occur if you are using the ancient TMW package ... or more likely manabot, in which case we will not help you.
Re: No sound in game at all- Ubuntu Oneiric
Posted: 04 Nov 2011, 09:31
by Derpella
If there were some stats, I think I would win as a slowest levelling character

And I wouldn't bot, because there are too few players and too many posts in Court

I believe everyone who bots would be sooner or later caught, and it's just not worth it. I just had some fun and not-evil ideas I wanted to test, and there are gm test servers that I could safely use for this purpose. Despite of my motives, asking a dev to help compiling a botting program would be somehow rude, I only admitted it because I was afraid messing with libraries could broke my sound.
BTW, yes, sound still doesn't work

Re: No sound in game at all- Ubuntu Oneiric
Posted: 11 Nov 2011, 10:05
by i
Derpella wrote:I believe everyone who bots would be sooner or later caught,
Nope. I got a bot with decent "AI" chatting module.

- Croovka block diagram.png (98.54 KiB) Viewed 3887 times
Shaney.py - Markov Chain Library
Code: Select all
import sys
import random
import string
def run(filename=''):
file = open( filename, 'r')
text = file.read()
file.close()
words = string.split(text)
end_sentence = []
dict = {}
prev1 = ''
prev2 = ''
for word in words:
if prev1 != '' and prev2 != '':
key = (prev2, prev1)
if dict.has_key(key):
dict[key].append(word)
else:
dict[key] = [word]
if prev1[-1:] == '.':
end_sentence.append(key)
prev2 = prev1
prev1 = word
if end_sentence == []:
answers = ['Sorry, but I don\'t know anything about it!',
'Are you talking to me?',
'Why should I answer?',
'Oh, that\'s sad...',
'Well, I don\'t think I know anything about it']
print random.choice(answers)
return
key = ()
count = 2
while 1:
if dict.has_key(key):
word = random.choice(dict[key])
print word,
key = (key[1], word)
if key in end_sentence:
print
count = count - 1
if count <= 0:
break
else:
key = random.choice(end_sentence)
if __name__ == '__main__':
run(sys.argv[1])
Getpage.sh - based on Lfamtuff's google chat bot (Kate)
Code: Select all
#!/bin/sh
# run marvelous text browser LYNX in special dump mode
# dump output to temp-file
/usr/bin/lynx \
-cfg=/dev/null \
-dump \
-accept_all_cookies \
-anonymous \
-assume_charset=utf-8 \
-assume_unrec_charset=utf-8 \
-connect_timeout=5 \
-cookie_file=lynx_cookies \
-cookie_save_file=lynx_cookies \
-display_charset=utf-8 \
-force_html \
-nobrowse \
-nolist \
-nostatus \
-ftp \
-telnet \
-rlogin \
-tagsoup \
-width=10000 \
-nomargins \
-nonumbers\
"$1" > temp-file
# Step .: Expand common problematic abbreviations
# Step 1: Remove all leading and trailing spaces.
# Step 2: Convert invalid punctuation by adding a space.
# Step 3: Remove extra leading spaces on some punctuation.
# Step 4: Remove extra trailing spaces on some punctuation.
# Step 5: Split lines at end of sentences.
# Step 6: Remove [] text, compact spaces, compact pauses.
# Step 7: Select only sentences resembling legal text.
# Step 8: Elliminate broken brackets.
# Step 9: Homogenize quotes.
# Step A: Remove broken quotes.
# Step B: Remove Google search phrases and code fragments.
# Step C: Remove dates.
# Step D: Remove repeated dots.
cat temp-file | \
sed -e 's/\([dD]\)r. /\1octor /g;s/\([Pp]\)rof. /\1rofessor /g;s/\([Aa]\)pprox. /\1pproximately /g;s/est. /established /g' | \
sed -e 's/^[ ]*//g;s/[ ]*$//g' | \
sed -e 's/\([^A-Z]\)\([.!?:,;)]\)\([A-Z]\)/\1\2 \3/g' | \
sed -e 's/[ ]*\([.!?:,;)]\)/\1/g' | \
sed -e 's/([ ]*/)/g' | \
sed -e 's/\([.!?]\) /\1\
/g' | \
sed -e 's/\[[^[]*\]//g;s/[ ][ ]*/ /g;s/-[-]*/-/g' | \
grep -I '^[A-Z].* .*[a-z][a-z][a-z].*[.!?]$' | \
grep -vE '\([^)]*$|^[^(]*\)' | \
sed -e 's/``/"/g;s/'"''"'/"/g;s/,,/"/g' | \
grep -vE '"[^"]*$|^[^"]*"' | \
sed 's/</{/g;s/>/}/g' | \
sed -e 's/\([^A-Z]\)\([.!?:,;)][.!?:,;)]*\)\([A-Za-z]\)/\1\2 \3/g' | \
grep -vE ':.*:|}.*}|{.*{' | \
grep -viE '^Subject[^a-z]|^Re:|^From:|^To:|^Fwd:|^Temat:|^Wpis:' | \
grep -viE '2011 Google' | \
grep -viE 'Search within results ' | \
grep -vie 'Groups View all web results' | \
grep -vie 'nav_[a-z]*gif' | \
grep -vE '([A-Z][a-z]{2} [0-9]{1,2} [0-9]{1,4})|([A-Z][a-z]{2} by)' | \
grep -vE '([0-9]{1,2}/){2,3}' | \
grep -vE '[.]{3}@[a-z]*' | \
grep -ve '[A-Z][a-z]{2} [0-9]{1,2}, [0-9]{1,4}' | \
sed -e 's/\.\././g' | \
sed -e 's/\.\././g' | \
sort -u > output-file
# remove temporary file
rm -f temp-file
# execute Mark V Shaney with sentences database
python shaney.py output-file
# remove temporary file
rm -f output-file
I will not present full game client code. If someone understand this code surely don't need the bot because that person is most likely dev team member. I did this module a long time ago, I needed it on my studies.
Re: No sound in game at all- Ubuntu Oneiric
Posted: 15 Nov 2011, 12:58
by Derpella
I am very happy for you , but I don't think it's necessary. I think a loud noise or automatic disconnect/stop when green nick types would be enough.
And I would take seriously the smart saying, that you can't find the difference between a read stupid person and someone pretending to be stupid. Pretending a being a more normal internet guy using a robot is hard and never perfect, unless you build a database like cleverbot. Taking sentences from google... If gm asks "Hello" on the botcheck and you will start writing sophisticated sentences, it will be pretty obvious to find out after few tries.
And if you'll make a bot "hi", "ur a gm" "me not speak english" "wat" "sell florest bow 15k ok?" it will be undistinguishable from many players, easier to code, elegant and no one would even think about asking you anything else.
The sane answer to "How are you?" can be only "ok thx wbu?" If someone would answer "Serious question. So you're enjoying your viewing" I would only wait for him to add CHEAP FEMALE HANDBAGS DOLCE AND GABBANA<
www.virus.es> PROZAC VIAGRA<
http://wesnortedatflourandselltosukce.rs>
Ekhm, and by the way... SOUND STILL DON'T WORK. I WOULD LIKE FOR IT TO WORK.
Edit:
Yay

Yes, it was compiling libraries manually which broke the sound. I went to the directory with SDL_mixer source code (the one I was compiling from) and made make uninstall.
The music is so sweet...
And the sound of Tulim music and noobs killing squeaking maggots made me cry with happiness and nostalgy.