Server Help

Misc User Apps - MervBot See low game DLL

hellzlaker - Mon Mar 31, 2008 7:35 pm
Post subject: MervBot See low game DLL
This plays the see low game

(its a dice game, roll 3 dice until 2 of dice are the same number, then you ignore the 2 dice that are the same and the one thats different then you compare to your friends roll)

Problem is that it takes a long time to genorate the number so i included source biggrin.gif so if you know how to speed it up, do it icon_wink.gif (if you feel like it)

PS: my first DLL
Bak - Mon Mar 31, 2008 8:56 pm
Post subject:
for logical or in if statements use || instead of |

also for the source just include commands.cpp and spawn.cpp and spawn.h instead of just a snippet

also it seems like there's no way for the player to win.
hellzlaker - Tue Apr 01, 2008 3:58 pm
Post subject:
Its 50% chance to win, k but what is a difference between bit wise OR and logical OR ?
Bak - Tue Apr 01, 2008 5:13 pm
Post subject:
well I mean the bot never prints out "you win", only "I win"

a bitwise or does an or on all the bits of a variable, so If I do 4 | 2 , the result is 6

Code: Show/Hide

4 (decimel) = 100 (binary)
2 (decimel) = 010 (binary)
4|2         = 110 (binary) = 6(decimel)


4 (decimel) = 100 (binary)
5 (decimel) = 101 (binary)
4|5         = 101 (binary) = 5(decimel)   


a logical or is used for true/false values.
blue monday - Tue Apr 22, 2008 5:54 pm
Post subject:
Interesting...
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group