DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • July 25, 2016, 05:37:19 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1] 2 3 ... 16   Go Down
  Print  
Author Topic: House System Module  (Read 37962 times)
0 Members and 1 Guest are viewing this topic.
Kujaku
Guest
« on: November 20, 2004, 11:01:46 AM »

This is my First Module i ever posted, i coded it all for myself and there is an sql file for german translation in the zip
sry, but the systemmails are german in this file, you have to translate it ...
http://dragonprime.net/users/Kujaku/house.zip
I think it was good work and i hope for constuctive criticism
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #1 on: November 20, 2004, 01:56:13 PM »

This is kinda odd...
Quote
* runmodule.php?module=house&lo=house& - House module for Legend of the Green Dragon 0.9.8+
 * by James M Burke (jburke -at- jbctech -dot- com)
 * Version 1.0 released on September 18, 2004

Apparently, JBC had a copy of this module, and this person got a hold of it. Transalated it over to German, and is releasing it back over.

Hrm.. Well, I will be taking a look, since this seems to be a working housing script.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Kujaku
Guest
« Reply #2 on: November 20, 2004, 02:18:52 PM »

nop, sry i just used one of JBCs modules as a template because this is my first module, i will change it immediately
i think it was the flirt module, so you can check it out for yourself (the date)

btw i need a better system for safe logoff, i just set alive=0 and that works fine, but the shows dead in the warrior lists, if i change something with the location i would need a new hook in the login.php to set the location back to the village

with this system you can build up a house at any location and it only showes up at this location.
but i wasn't able to test it enough

and sorry, i'm not able to write commentaries when i'm sunk in the code
« Last Edit: November 20, 2004, 02:49:45 PM by Kujaku » Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: November 20, 2004, 03:41:30 PM »

I was just wondering, does this module even work correctly?

On my testing server (I am transalating the System Mails and testing the mod) I am unable to get into the residential quarter...

Code:
SELECT * FROM keys WHERE ownerid='1' AND location='Degolburg'

Always get this error... and that means there is:

1. No way to build a house
2. No way for this mod to work right...

Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Tarus
Guest
« Reply #4 on: November 20, 2004, 04:31:02 PM »

Theres a simple way to bring that modul up running. But it's connected on the old 0.9.7 house modul. but it's still workin. but not fine  Embarrassed
Logged
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #5 on: November 21, 2004, 12:07:51 AM »

looks like you have put alot of work into this. Looks promising.

Will you be updating this as you progress?
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #6 on: November 21, 2004, 12:11:26 AM »

I have a working housing script ready (including key-genereation over hunters lodge, reparing lost keys (when players delete there accounts), building houses and safe logoff ...

I'm still working on translation readiness and some other bugfixes, so i will not release is publically now, but if anyone wants to see this code, PM me Wink

Maybe Kujaka, you could find an idea for safe-logoff there for your own script... Smiley
Logged

Running for more than three years now:
Kujaku
Guest
« Reply #7 on: November 21, 2004, 01:00:59 AM »

Quote
On my testing server (I am transalating the System Mails and testing the mod) I am unable to get into the residential quarter...

hmm, it did work on my server, but as i said i could't fully test it out.
please post or mail me the exact error and locatoin

Quote
Theres a simple way to bring that modul up running. But it's connected on the old 0.9.7 house modul. but it's still workin. but not fine
i coded it from 0.9.8-pre8 there is NO connection to 0.9.7, please report the errors to me more exactly and i will fix it

Quote
looks like you have put alot of work into this. Looks promising.

Will you be updating this as you progress?

of course *g*

Quote
I have a working housing script ready (including key-genereation over hunters lodge, reparing lost keys (when players delete there accounts), building houses and safe logoff ...

I'm still working on translation readiness and some other bugfixes, so i will not release is publically now, but if anyone wants to see this code, PM me

Maybe Kujaka, you could find an idea for safe-logoff there for your own script...
someone already sent me an idea therefor and i will try it immediately, if you have a house script, if you want we merge them and put out an official version?

Version 1.1 is out!
i just edited the safe logoff system, it now shows the name of the house as location and works...

i will code something else now, until you send me the bugs!
« Last Edit: November 21, 2004, 03:18:50 AM by Kujaku » Logged
Tarus
Guest
« Reply #8 on: November 21, 2004, 09:56:53 AM »

Same SQL error.

SELECT * FROM keys WHERE ownerid='2' AND location='Degolburg'
You have an error in your SQL syntax near 'keys WHERE ownerid='2' AND location='Degolburg'' at line 1

With my own SQL Database and some modifications in your housescript  it works.
Logged
Kujaku
Guest
« Reply #9 on: November 21, 2004, 02:59:01 PM »

Updated to Version 1.2!
the SQL error should be fixed, thanks to Tarus!

it seems that keys, which was the name of the table is a mysql keyword, that is because i didn't have any problems on my servers (i use prefixes, so the table name actually was lotgd_keys)
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #10 on: November 21, 2004, 04:05:05 PM »

Ya know what you could add?

Gem Storage and have an Admin Setting so that it can be turned on/off. ^.^

As well, you should kinda add in a time, when a person needs to stop extending their house. Like maybe, once they have 10 keys, block the extend nav.
« Last Edit: November 21, 2004, 04:07:07 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Tarus
Guest
« Reply #11 on: November 21, 2004, 04:22:01 PM »

So, i tested and it works. Some little bugs were found.

1. House Listing in Towns dont work. Only one House will shown on List but in every Town.

2. Nav Restore dont work. After Login, u Stand in Town and not in House Wink


Nun auf Deutsch:

Huser werden nicht aufgelistet, nur das erste Haus wird angezeigt. Allersdings kann man sein eigenes Haus, auch wenn es nicht angezeigt wird betreten. Das eine Haus ist berall zu sehen, also in jeder Stadt.

Das man im Haus aufwacht, funktioniert nur bedingt, oder garnicht.

Habe eine kleine nderrung vorgenommen und schicke sie Dir zu.

Greetings
Tarus
Logged
lonnyl
Guest
« Reply #12 on: November 22, 2004, 05:44:04 AM »

1. House Listing in Towns dont work. Only one House will shown on List but in every Town.

changing lines 732-746 to this should help (didn't test)
Code:
$i ++;
            rawoutput("<tr class='".($i%2?"trlight":"trdark")."'>");
            rawoutput("<td>$i</td><td>");
            output_notl(get_module_pref("name","house",$row['userid']));
            rawoutput("</td><td>");
            $sql = "SELECT name FROM ".db_prefix("accounts")." WHERE acctid=".$row['userid'];
            $result = db_query ($sql);
            $row2 = mysql_fetch_row ($result);
            output_notl($row2[0]);

            $housesize = get_module_pref("housesize","house",$row['userid']);
            rawoutput ("</td><td>");
            if ($housesize > 0) output_notl("$housesize");
            else output("`6In Construction");
            rawoutput("</td></tr>");

I haven't tested this (my test server isn't running this moment).....
I can't see running this until breakin's are possible.... (didn't see any code for this)
Gold and Gem storage should clear after dragonkill (this was a major unbalancing factor in anpera's 97 housing)
Logged
lonnyl
Guest
« Reply #13 on: November 22, 2004, 05:48:06 AM »

2. Nav Restore dont work. After Login, u Stand in Town and not in House Wink

Found a typo on line 118 should read
Code:
         $sql = "UPDATE ".db_prefix("accounts")." SET loggedin=0,location='".ereg_replace("`.","",get_module_pref ("name","house",$id))."' WHERE acctid=".$session['user']['acctid'];

hope that fixes it...
Logged
Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #14 on: November 22, 2004, 07:07:46 AM »

Gold and Gem storage should clear after dragonkill (this was a major unbalancing factor in anpera's 97 housing)


Kujaka, add these things into the dohook/install:
Code:
function house_install(){
module_addhook("village");
module_addhook("dragonkilltext");
return true;
}
function house_dohook($hookname, $args){
   global $session;
   switch ($hookname){
    case "village":
      tlschema($args['schemas']['tavernnav']);
      addnav($args["tavernnav"]);
      tlschema();
      addnav("Residential Quarter","runmodule.php?module=house");
   break;
        case "dragonkilltext":
                 set_module_pref("treasure",0);
                 //set_module_pref("gemsintreasure",0);
                 //That part is for if you decide to store gems as well.
            break;
   }
return $args;
}
« Last Edit: November 22, 2004, 07:11:23 AM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

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


*
DragonPrime Notices
Play LoGD on Dragonprime

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