DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • October 22, 2017, 03:39:48 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Jail Break  (Read 6262 times)
0 Members and 1 Guest are viewing this topic.
Dager
Guest
« on: October 01, 2005, 09:17:07 PM »

This is my first module ever.. I've got no idea if this has ever been done or attempted before, so sorry if I infringe on anyone's modules.

JailBreak allows users to escape from their jail cell (sixf00t4's 'jail') by digging a tunnel underneath the Jail building. The tunnel takes people to different locations or does different things, usually involving death Sad It's got a configurable setting for chance at a clean escape, though. I made this more or less just to teach myself how to code a module, and link other modules to it.

I'm not too good at PHP, so the code is probably horrendous. It seems pretty customizable for people with very basic php knowledge (me! =P), and is pretty open ended. I don't know much about module support and requirements, but I use alignment and jail. I've got some ideas for the bank event that I can't seem to put into motion just yet.. like having money actually disappear from some players bank accounts, or adding bounties onto players. MySQL is so unforgiving =(

Anyways, here's the file: http://dragonprime.net/users/Dager/jailbreak.txt

Requires:
Alignment and Jail
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #1 on: October 07, 2005, 02:17:51 PM »

why not just use the sheriff name from the jail module?

and i'm wondering if you even tested this, because the only hook you have is newday.   and you have code like
Code:
   $accntid=$session['user']['accntid'];
« Last Edit: October 07, 2005, 02:19:16 PM by sixf00t4 » Logged

Dager
Guest
« Reply #2 on: October 07, 2005, 03:07:13 PM »

I had noticed that after uploading the file. On my computer I keep one file as a .txt and one as .php. I know it sounds dumb, but the colors in Kate annoy me when I try to edit .php files, so I just edit as .txt =P And I wanted to use the same name as the jail modules sheriff, but wasnt sure of how to go about doing it.

All of those typos should be fixed, added some new stuff. Im trying to learn how modules work by making this.. I feel it will be better in the long run if I can make my own rather than have to rely on others to make them for me =P

Also.. when I initially made it, I didnt know about adding hooks. In retrospect, adding a "jail" hook would be nice to add the "Jail Break" nav.. but I edited jail.php to include the nav command.

Anyways, updated with all some typo fixes and my horrid attempt at sql queries (seem to work, though!.. no errors, anyways Tongue). Only thing I'm not too happy with is that no matter how I try, I can't seem to get an actual fight to work against the sheriff. The fight actually takes place, but something ends up going wrong once you win/lose and no navs show up.. so now it's just assumed that you lose =P Cheap, I know.. but its all I can do for now
« Last Edit: October 07, 2005, 03:10:46 PM by Dager » Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #3 on: April 05, 2006, 10:56:14 AM »

I decided to take a look at this program and fix it so that the hook to the jail works.  A couple little problems cleaned up with it too.  I actually think this is a good idea for a module.  I did not test all the results though; but it loaded and I escaped once or twice successfully.

Very nice, Dager.

New Download Location:

http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=413
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
DarQness
Guest
« Reply #4 on: April 06, 2006, 05:23:05 PM »

The plunder part does not work, but escaping is pretty sweet. =)
Logged
MvpZERO.net
Guest
« Reply #5 on: April 06, 2006, 09:49:06 PM »

i try to upload it to the module folder and get:


Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRI NG, expecting ')' in /modules/jailbreak.php on line 26
Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #6 on: April 06, 2006, 10:31:46 PM »

Do you have the jail module installed?
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
MvpZERO.net
Guest
« Reply #7 on: April 06, 2006, 11:05:37 PM »

Yes i do.
Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #8 on: April 07, 2006, 07:39:36 AM »

Also, are you downloading the version from the User Modules section?  The one that is linked above isn't the updated version.
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
MvpZERO.net
Guest
« Reply #9 on: April 07, 2006, 07:54:01 AM »

I've Downloaded:
http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=413

this version of Jailbreak, it comes up when i place it into the modules folder,
Do i have the wrong version of something?...

Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #10 on: April 07, 2006, 08:07:31 AM »

No... that's the right version...

I was missing a comma in there... I put a new version in at that location.  Just try that.  Let me know if it doesn't work.
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
MvpZERO.net
Guest
« Reply #11 on: April 07, 2006, 09:16:49 AM »

Thanks that worked ^^
Logged
DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #12 on: April 27, 2006, 03:42:00 PM »

V2.0

I finally got around to fixing this module up so now everything should work correctly.

Please let me know if there are still any problems.

Thanks!

DaveS
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
cyruss
Guest
« Reply #13 on: June 23, 2007, 05:47:04 AM »

got a problem with this module, it seems whenever myself and some other players go to "Examine Cell" it says we've already attempted to break out of Jail today, which we hadn't.

had a look in the admin section for my user, and noticed it was indeed set to 1 attempts today, which is wrong, so obviously when a new day is happening that isn't getting reset to 0 for all players who were in jail once.

could have swore it used to work, dunno tho.

maybe it has something to do with if you commit suicide in the jail, the attempts to break out doesn't reset to 0 on a new day?

Code:
switch($hookname){
case "newday-runonce":
set_module_pref("attempts",0,"jailbreak");
break;

i don't know about modules.. but would that code above only run if the player is still in their cell, and not back in the village or in the shades?
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #14 on: June 23, 2007, 06:39:27 AM »

that code will only run for 1 single player. For no one else.
Logged

Running for more than three years now:
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

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