DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • May 23, 2019, 02:38:56 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3 ... 6   Go Down
  Print  
Author Topic: Playergames  (Read 23172 times)
0 Members and 1 Guest are viewing this topic.
Nightborn
Guest
« on: February 11, 2006, 12:36:27 PM »

yep, had nothing better to do so I wrote a piece of crap.

A game parlor that is either in all cities or just in one.

It creates a table where it stores games as it does the entire handling for this.

Then you use a module and hook into it...you have to have specific settings and you need to use the hook in a special way. I will write about that some short summary someday when I feel like it.

The word python there is just an exchange of sentences.

The creator pays and can shut down the game at once. If he invites somebody, they will get YOMs after the game has started. As well as the one who is next will be notified by YOM too.

Try it out, bugs and stuff, you know.

http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=119
« Last Edit: January 18, 2008, 08:44:56 AM by Nightborn » Logged
ShadowRaven
Mod God
*****
Offline Offline

Posts: 805


Silence is a virtue...


View Profile WWW
« Reply #1 on: February 11, 2006, 12:49:59 PM »

This looks fun Smiley what kind of games is this for?
« Last Edit: February 11, 2006, 12:50:14 PM by ShadowRaven » Logged

Nightborn
Guest
« Reply #2 on: February 11, 2006, 12:53:29 PM »

any round-based you can program.

I made a testmodule "word python" (yet no checks, usually you have to start the wordpart with the last word the previous player said).

It is a system where modules can hook in and get some functions and a table where results can be saved.

Maybe I will do a tic tac toe or so
Logged
kickme
Global Moderator
Mod God
*****
Offline Offline

Posts: 1589


Yay for elephants!


View Profile WWW
« Reply #3 on: February 11, 2006, 01:13:46 PM »

Sounds like fun. I might even get round to writing a chess game for it (which will be extremly hard)
Logged

Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka
Nightborn
Guest
« Reply #4 on: February 11, 2006, 01:15:28 PM »

everything that is round based will work.

there is a gamedata field where you can record the game.

edit: a few words into the wordpython how it works.
« Last Edit: February 11, 2006, 01:16:22 PM by Nightborn » Logged
Nightborn
Guest
« Reply #5 on: February 12, 2006, 02:52:27 PM »

well, just one sunday gift:

included the game "mad max" (don't know it's real name in English).

try it out, read the rules.

I also changed something in the remaining files, so copy the entire zip to your folder.

please report errors and bugs as I haven't tested it out with more people...
be precise what and when errors happen... it's hard to find out due to all the rules.
Logged
kickme
Global Moderator
Mod God
*****
Offline Offline

Posts: 1589


Yay for elephants!


View Profile WWW
« Reply #6 on: February 18, 2006, 05:28:31 PM »

You should use <?php instead of <?
Logged

Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka
Nightborn
Guest
« Reply #7 on: February 19, 2006, 12:34:41 AM »

any real need? Never had problems without it in my files.
« Last Edit: February 19, 2006, 12:36:16 AM by Nightborn » Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #8 on: February 19, 2006, 03:06:44 AM »

Quote
Tge first method (<?php. . .?>) is preferred, as it allows the usage of PHP in code conforming to the XML standard, e.g. XHTML.

It's only necessary if you mix up HTML, XML and PHP... (And for very old PHP version...)
Logged

Running for more than three years now:
Nightborn
Guest
« Reply #9 on: February 19, 2006, 08:59:30 AM »

as in LotGD there is no mix up (everything handled by functions) there is no real need I think.
Logged
kickme
Global Moderator
Mod God
*****
Offline Offline

Posts: 1589


Yay for elephants!


View Profile WWW
« Reply #10 on: February 19, 2006, 10:24:32 AM »

If a server has short tags disabled (such as one of mine), then they'll just get the code outputted and an error.
Logged

Waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka waka
Nightborn
Guest
« Reply #11 on: February 24, 2006, 07:17:30 AM »

ok, I changed this.
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #12 on: March 31, 2006, 12:33:40 AM »

I have email alerts when there's a php error for the game, and i got a bunch of emails with either of these messages

Quote
array_key_exists(): The second argument should be either an array or an object in /home/sixf00t4/public_html/dragon/modules/playergames/madmax_func.php (14)

      .stacktrace { background-color: #FFFFFF; color: #000000; }
      .stacktrace .function { color: #0000FF; }
      .stacktrace .number { color: #FF0000; }
      .stacktrace .string { color: #009900; }
      .stacktrace .bool { color: #000099; font-weight: bold; }
      .stacktrace .null { color: #999999; font-weight: bold; }
      .stacktrace .object { color: #009999; font-weight: bold; }
      .stacktrace .array { color: #990099; }
      .stacktrace .unknown { color: #669900; font-weight: bold; }
      .stacktrace blockquote { padding-top: 0px; padding-bottom: 0px; margin-top: 0px; margin-bottom: 0px; }
      Call Stack:2: array_key_exists("lifepoints", NULL)&nbsp;called from /home/sixf00t4/public_html/dragon/modules/playergames/madmax_func.php on line 143: getlifepoints("2")&nbsp;called from /home/sixf00t4/public_html/dragon/modules/madmax.php on line 1374: madmax_run()&nbsp;called from /home/sixf00t4/public_html/dragon/runmodule.php on line 32

or

Quote
array_pop(): The argument should be an array in /home/sixf00t4/public_html/dragon/modules/playergames/madmax_func.php (13)

      .stacktrace { background-color: #FFFFFF; color: #000000; }
      .stacktrace .function { color: #0000FF; }
      .stacktrace .number { color: #FF0000; }
      .stacktrace .string { color: #009900; }
      .stacktrace .bool { color: #000099; font-weight: bold; }
      .stacktrace .null { color: #999999; font-weight: bold; }
      .stacktrace .object { color: #009999; font-weight: bold; }
      .stacktrace .array { color: #990099; }
      .stacktrace .unknown { color: #669900; font-weight: bold; }
      .stacktrace blockquote { padding-top: 0px; padding-bottom: 0px; margin-top: 0px; margin-bottom: 0px; }
      Call Stack:2: array_pop(false)&nbsp;called from /home/sixf00t4/public_html/dragon/modules/playergames/madmax_func.php on line 133: getlifepoints("2")&nbsp;called from /home/sixf00t4/public_html/dragon/modules/madmax.php on line 1374: madmax_run()&nbsp;called from /home/sixf00t4/public_html/dragon/runmodule.php on line 32


I know DaveS was testing out the madmax module when he got a whitescreen (i don't have php errors shown) while playing.  He might shed some light on where he was when he got the white screen...
Logged

Nightborn
Guest
« Reply #13 on: March 31, 2006, 12:45:26 AM »

I have it too, I will upload the newest version here to the dl-section.

I  think that was an issue, but it should have been fixed.

Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #14 on: March 31, 2006, 01:28:53 AM »

that fixed the error emails and badnavs.

you need to use addslashes stripslashes since all the text is being stored right in the DB. 
Logged

Pages: [1] 2 3 ... 6   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
123 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search