DragonPrime - LoGD Resource Community

Modules, Themes and other customizations for your game => v0.9.7 Modification Discussions => Topic started by: rax on March 03, 2004, 01:14:18 PM



Title: Greystone Chapel v1.12
Post by: rax on March 03, 2004, 01:14:18 PM
Uploaded a while back, and now posted here.    Greystone Chapel (http://dragonprime.cawsquad.net/users/rax/GreystoneChapel-1_12.zip) provides players with:
  • Marriage to other players
  • Divorce
  • Name change (player name only)
  • Make and announcement
  • Blessing (gain temporary effect)
  • Steal (risky, but can net some nice stuff)
All features can be disabled by editing the constant declarations at the top of the file, so you can use only the features you want on your server.  Feel free to leave feedback.  
8)



Title: Re:Greystone Chapel v1.12
Post by: rax on March 29, 2004, 01:27:52 PM
A minor update to the Chapel.     Thanks to phofire for find the "divorce bug".    

New code is here:

http://dragonprime.cawsquad.net/users/rax/GreystoneChapel-1_12.zip (http://dragonprime.cawsquad.net/users/rax/GreystoneChapel-1_12.zip)



Title: Re:Greystone Chapel v1.12
Post by: robert on March 30, 2004, 09:13:11 PM
Same problem as before - if the solution was posted, I missed it or cant find it.

It sends out the email on a proposal to the person recieving the proposal...When they go to the chapel they don't get a "View Proposals" option and the email they recieve for the proposal has no accept/decline links in it.

I know this was asked once before, what was the solution to fix this problem?


Title: Re:Greystone Chapel v1.12
Post by: rax on March 30, 2004, 09:25:22 PM
Same problem as before - if the solution was posted, I missed it or cant find it.

It sends out the email on a proposal to the person recieving the proposal...When they go to the chapel they don't get a "View Proposals" option and the email they recieve for the proposal has no accept/decline links in it.

I know this was asked once before, what was the solution to fix this problem?

Wasn't aware of this problem, but I will take a look at it and get back to you.


Title: Re:Greystone Chapel v1.12
Post by: Sumgi on April 02, 2004, 07:43:15 PM
How do I tone down the prices? I tried changing the 10000 to 1000 in chapel.php but it didn't seem to effect it. At least Brother Thomas still said it would cost 10000 for a level 1 rez. Didn't actually go through with it to see if it was saying something different then it was charging.


Title: Re:Greystone Chapel v1.12
Post by: Sumgi on April 03, 2004, 11:22:45 AM
Also, I have a level 3 guy with 0 charm and he's trying to marry .... anyone. Every single person I choose I get a message saying they are not good enough for me, I can do better, blah blah. Thier charm ratings are all higher then mine....

Any ideas?


Title: Re:Greystone Chapel v1.12
Post by: rax on April 15, 2004, 10:59:41 AM
How do I tone down the prices? I tried changing the 10000 to 1000 in chapel.php but it didn't seem to effect it. At least Brother Thomas still said it would cost 10000 for a level 1 rez. Didn't actually go through with it to see if it was saying something different then it was charging.

Those prices are stored in the settings database table.   You'll need to go into your admin console and change them since there is no interface for the chapel.  

As for the charm thing, you can change line 189 from:

if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){

to:

if($charmdiff > 10){

and it will let anyone marry someone who is within 10 charm  or:

if(true){

to just disable the entire charm checking deal.


Title: Re:Greystone Chapel v1.12
Post by: Arune on April 15, 2004, 02:15:11 PM
I actually have the same problem that robert has. They get the proposal but do not get the view proposals option when entering the chapel.

I deleted the entire marriages table and remade it with the newest version of the chapel, but still the same =/

Thanks for checking into it.


Title: Re:Greystone Chapel v1.12
Post by: sixf00t4 on April 19, 2004, 01:23:35 PM
i am also having the problem where they get the email, but no option to do anything from there.


Title: Re:Greystone Chapel v1.12
Post by: Mr Fix It on April 19, 2004, 02:51:49 PM
i am also having the problem where they get the email, but no option to do anything from there.

In the database change:

suitor tinyint(4) NOT NULL default '0',
proposed tinyint(4) NOT NULL default '0',



To this:

suitor int(11) NOT NULL default '0',
proposed int(11) NOT NULL default '0',

This should fix your problem.



Title: Re:Greystone Chapel v1.12
Post by: sixf00t4 on April 19, 2004, 03:10:22 PM
that'll do it!  


Title: Re:Greystone Chapel v1.12
Post by: Ben on April 24, 2004, 05:13:41 AM
Hi!

I have download the Addon and i have create the table "marriage" in mysql.
But i found the " Greystone Chapel"

Why?
Where is the error on my game?

http://lotgd.tiger4you.de/ (http://lotgd.tiger4you.de/)


Title: Re:Greystone Chapel v1.12
Post by: zousug on April 24, 2004, 09:58:34 PM
hello,

this addon is working fine in all ways except 1..  

when i goto (i = any one) ask some one to marrie them they get this message

"I don't think (user name here) is quite up to your standards. I think you can do better." Brother Thomas suggests.


i have changed this line

if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){

to:

if(true){

as its meant to disable the charm thing..

but i am still getting this message.

"I don't think (user name here) is quite up to your standards. I think you can do better." Brother Thomas suggests.


one player is level 1 and my char is level 13 and i get the message (this is an example of some players levels)

please help


---EDIT---

it also has under it this message

(Your charm is too high to marry this player)


---END EDIT---


Title: Re:Greystone Chapel v1.12
Post by: ATJ on April 26, 2004, 11:42:05 PM
I think i have the solution.

where you had

if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){

change it to

if($charmdiff > 100000 && $session[user]['charm'] < 19 || $row['charm'] < 19){

that should get rid of your problem.
worked for me!


Title: Re:Greystone Chapel v1.12
Post by: zousug on April 27, 2004, 12:08:41 AM
hello,

hey thanx for that atj, it seems to have fixed it :D

thanx again


Title: Re:Greystone Chapel v1.12
Post by: zousug on April 30, 2004, 09:45:07 PM
hey..

is there away to turn the charm off??

i have it so that it set to this

--CODE--
if($charmdiff > 100000 && $session[user]['charm'] < 19 || $row['charm'] < 19){
--END CODE--

and i thought it was working...

but i just went to ask some one to marrie my char and it says that my charm is too highto marry this player..

any one got ideas?

thnx


Title: Re:Greystone Chapel v1.12
Post by: ATJ on May 01, 2004, 02:07:05 AM
if($charmdiff < 0 && $session[user]['charm'] < 19 || $row['charm'] < 19){


what about dass?


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 01, 2004, 03:45:24 PM
hey,

ill give it a go and see how it goes..

--EDIT--

nope it still comes up with this

"I don't think (name) is quite up to your standards. I think you can do better." Brother Thomas suggests.



(Your charm is too high to marry this player)
--END EDIT--

and its showing her as being smoking hot..


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 01, 2004, 06:26:12 PM
ok, this is getting annoying lol

no one can marrie.. they keep getting the message saying there charm is to high..

--EDIT--

or to low (even if there charm is the same)

--END EDIT


Title: Re:Greystone Chapel v1.12
Post by: ATJ on May 02, 2004, 01:04:49 AM
umm, then just delete the entire line of code


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 02, 2004, 01:06:49 AM
umm, then just delete the entire line of code

so just completely delete this??

--CODE--
if($charmdiff > 100000 && $session[user]['charm'] < 19 || $row['charm'] < 19){
--END CODE--

??



Title: Re:Greystone Chapel v1.12
Post by: FW Viper on May 02, 2004, 09:23:26 PM
okay here I go

Code:
if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){

leymans terms.

If your charm is not within 10 points of eachother and you charm is less then 19 you CAN NOT marry.

Also, Allows same-sex marriages switch is broken if you set it to yes it disalous it. A player fixed this for me (I am sure his reasons for fixing it was purly selfish ;) ) link to the fix (http://hfs.cjb.net/forums/viewtopic.php?t=87) mind you the link is only a topic in my test server forum the fixed code for the chapel is like the 4th post.

-edit 1-
You also have to make the following SQL change to make this script work.
In the database change:

suitor tinyint(4) NOT NULL default '0',
proposed tinyint(4) NOT NULL default '0',

To this:

suitor int(11) NOT NULL default '0',
proposed int(11) NOT NULL default '0',

This should fix your problem.

Hope that helps


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 12:11:37 AM
hello..

i see i see i see said the blind man to his deaf dog... (excuse spelling half asleep)

so.. acorting to this..

Quote
if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){  
 

leymans terms.

If your charm is not within 10 points of eachother and you charm is less then 19 you CAN NOT marry.

if i change the last <19 to say a 5 then players that are with ing 10 points and higher then 5 charm can get married??

cool thanx..

also im going to make the chagnes so LATER i can turn on the gay marrige if and only if i get a lot more players and they want it..  

thanx again :D


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 12:24:23 AM
ok, i made the changes to the database..

i copyed the code from your site and made a new chapel.php file.. (so as not to lose the other one..)

changed this line

--CODE--
if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){
--END CODE--

to this

--CODE--
if($charmdiff > 1000000000 && $session[user]['charm'] < 5 || $row['charm'] < 5){
--END CODE--

so in in thery (excuse spelling again) it should be saying..

if charm is with in 1000000000 points of each other and less then 5 you cannot marrie.. wait to me that dose not make sense... ???

lol oops lol to me it really dose not make sense now that im typeing it..

any way i tryed iy as it was and still did not work...

any ideas??

thnx

--edit--

ok here is what i was trying to say.. lol

so in thery if the charm is not with in 1000000000 and less then 5 you cannot get married..

right?

in also in thery the code should work right??

as both ppls charm is within that range and is higher then 5..  (17 and 19)

and im still getting themessage that says my charm is to low.. ????

strange.. i may try seomthing else..

--END EDIT--


Title: Re:Greystone Chapel v1.12
Post by: FW Viper on May 03, 2004, 01:33:55 AM
you make things more confusing then they have to be

change
Code:
if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){
to
Code:
if($session[user]['charm'] < 5 || $row['charm'] < 5){

of corse you can just remove the code all together

so that you can get marryed no mater what charm is at.

but I find adding big numbers like 1000000000 makes problems...

-edit 1-
changed the above change to code so that anyone with more then 5 charm can marrie.


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 01:37:16 AM
ah ok.. :D

--EDIT--
ok i changed the line to this

--CODE--
if($session[user]['charm'] < 19 || $row['charm'] < 19){
--END CODE--

and it says my charm is to high to marry the player

i also tryed puting this

/*  */ around that line and i get this erro

Parse error: parse error in /home/lsotfe52/public_html/logd/chapel.php on line 276


line 276 is

}else if ($HTTP_GET_VARS[op]=="pickname"){

??

--END EDIT--


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 01:57:40 AM
dont comment it out just change it to

Code:
if($row['charm'] < 0){

though I am new to php but that sould do it. you kind of NEED the if to point to the part of the script needed but you don't need the checks. If that makes any sense.

I will put that up on my test server and see what I get.

ok i did that and it is saying charm is 2 low to marry this player..

this is strange.. it should work as its a direct copy as what i sposted on ur forum..

this should have nothing to do with it but ill try turning gay marrige on and see if it helps.

--EDIT--

ok as i thought it made no differance..

--END EDIT--


Title: Re:Greystone Chapel v1.12
Post by: FW Viper on May 03, 2004, 02:01:06 AM
I tested it and it worked...

here


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 02:06:42 AM
I tested it and it worked...

here

ok, i downloaded that.. uploaded as is and it still says my charm is 2 low..???


Title: Re:Greystone Chapel v1.12
Post by: FW Viper on May 03, 2004, 02:07:26 AM
ya might want to look at your charm then, it is posible to go below 0 but not very easy...


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 02:08:21 AM
my charm is 18....

(i got it to show charm lvl in vital info box)


Title: Re:Greystone Chapel v1.12
Post by: FW Viper on May 03, 2004, 02:44:40 AM
really it's 4 am and I have been up for 2 days strate so if I brake something I don't claim resposibility

Code:
$row = db_fetch_assoc($result);
$charmdiff = $session[user]['charm'] - $row['charm'];
//if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){
//output("`n`n`&\"I don't think ".$row['name']."`& is quite up to your standards. I think you can do better.\"`7 `4
// `bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too high to marry this player)`7`b`c", true);
//}else if($charmdiff < 0){
//output("`n`n`&\"You don't have a chance with ".$row['name']."`&! Perhaps you should lower your expectations.\"`7 `4
//`bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too low to marry this player)`7`b`c", true);
//}
if($charmdiff =>0) {
switch($row[charm]){
case -3:
case -2:
case -1:
case 0:

thats should give ya a idea.

ya that file should work


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 04:59:52 AM
really it's 4 am and I have been up for 2 days strate so if I brake something I don't claim resposibility

Code:
$row = db_fetch_assoc($result);
$charmdiff = $session[user]['charm'] - $row['charm'];
//if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){
//output("`n`n`&\"I don't think ".$row['name']."`& is quite up to your standards. I think you can do better.\"`7 `4
// `bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too high to marry this player)`7`b`c", true);
//}else if($charmdiff < 0){
//output("`n`n`&\"You don't have a chance with ".$row['name']."`&! Perhaps you should lower your expectations.\"`7 `4
//`bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too low to marry this player)`7`b`c", true);
//}
if($charmdiff =>0) {
switch($row[charm]){
case -3:
case -2:
case -1:
case 0:

thats should give ya a idea.

ya that file should work

ok ive got that changes and i get this

Parse error: parse error in /home/lsotfe52/public_html/logd/chapel.php on line 195

line 195 is

if($charmdiff =>0) {

ggrrr.. lol :D

i see no reasino as to why it should not work as it was in the origonal file..

:'(


Title: Re:Greystone Chapel v1.12
Post by: lonnyl on May 03, 2004, 05:03:10 AM
Your actuall error is propably up further in the file   check for a missing bracket.  ex... ) }


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 05:04:05 AM
ok..

will do..

thnx


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 05:20:20 AM
line 195 is

if($charmdiff =>0) {

ok, i changes the above code (shown below as well)

if($charmdiff =>0) {

to this

if($charmdiff >0) {

and it takes away that error i was getting..

Quote
Parse error: parse error in /home/lsotfe52/public_html/logd/chapel.php on line 195

but.. when i select propose and select the person.. (no no errors lol.. (visible any ways))

it comes up with no messages..  (I.e dose not say the propose was sent)

so i logged into the account i proposed to and nutting.. no messages nothing at all..

the code i got now for charm diff is this


--CODE--
$charmdiff = $session[user]['charm'] - $row['charm'];
//if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){
//output("`n`n`&\"I don't think ".$row['name']."`& is quite up to your standards. I think you can do better.\"`7 `4 `bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too high to marry this player)`7`b`c", true);
//}else if($charmdiff < 0){
//output("`n`n`&\"You don't have a chance with ".$row['name']."`&! Perhaps you should lower your expectations.\"`7 `4`bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too low to marry this player)`7`b`c", true);
//}
if($charmdiff >0) {
--END CODE--

i have an idea which im going to try.. if it works ill post the solution
thnx


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 05:31:54 AM
hello.

got some good news :D

the code i had before was...

--CODE--
$charmdiff = $session[user]['charm'] - $row['charm'];
//if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){
//output("`n`n`&\"I don't think ".$row['name']."`& is quite up to your standards. I think you can do better.\"`7 `4 `bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too high to marry this player)`7`b`c", true);
//}else if($charmdiff < 0){
//output("`n`n`&\"You don't have a chance with ".$row['name']."`&! Perhaps you should lower your expectations.\"`7 `4`bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too low to marry this player)`7`b`c", true);
//}
if($charmdiff >0) {
--END CODE--

(thanx to viper)

this is the code im useing..

--CODE--
$charmdiff = $session[user]['charm'] - $row['charm'];
//if($charmdiff > 10 && $session[user]['charm'] < 19 || $row['charm'] < 19){
//output("`n`n`&\"I don't think ".$row['name']."`& is quite up to your standards. I think you can do better.\"`7 `4 `bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too high to marry this player)`7`b`c", true);
//}else if($charmdiff < 0){
//output("`n`n`&\"You don't have a chance with ".$row['name']."`&! Perhaps you should lower your expectations.\"`7 `4`bBrother Thomas`b`7 suggests.`n",true);
//output("`n`n`c`b`^(Your charm is too low to marry this player)`7`b`c", true);
//}
if($charmdiff >9) {
--END CODE--

and it is working fine.. (I.e it sends proposal.. waiting to see if it works when they accepts..)

THANX to all that helped :D

--EDIT--
ok, this is strange..

i was on me admin acc when i tested this code..

i loged into me other acc and tested it.. and it comes up with a blank page.. (all thats shown is the name (I.e The Greystone Chapel))

??

--END EDIT--


Title: Re:Greystone Chapel v1.12
Post by: FW Viper on May 03, 2004, 01:57:40 PM
try to reload the page, but then I wrote that fix when I was half asleep so.. I'll give it some thought


Title: Re:Greystone Chapel v1.12
Post by: FW Viper on May 03, 2004, 02:03:10 PM
loading blank cuse the new charicter probubly has = charm to the person he is proposing to. that is why I added => try >= so that those with charm = to the person they are asking to marry can.

If that made any sence

the way you have it now

Code:
$charmdiff >9

in the location you have it say anyone with a charmdiff of grater then 9 can marry but if you are within 9 points you can't marry.

I could be wrong... but I don't think so.


Title: Re:Greystone Chapel v1.12
Post by: zousug on May 03, 2004, 06:47:20 PM
hey..

oh ok.. ill try that then thanx viper

--EDIT--
nope, still dosent do it.. still shows the blank screen..


ok i think i know why it worked for my admin char when i had this code

--code--
$charmdiff >9
--end code--

he has liek 996 chamr (i was mucking around with the editor lol)
--END EDIT--


Title: Re:Greystone Chapel v1.12
Post by: thegleek on June 03, 2004, 01:01:21 PM
ok, i changes the above code (shown below as well)

if($charmdiff =>0) {

to this

if($charmdiff >0) {

allow me to explain. u cant use => as a 'equal to or greater then' operator...

=> is reserved by php for arrays and pointers

to use it you have to state:
Code:
if ($charmdiff >= 0) {

thats all the mixup was about... happy logd'n! :)


Title: Re:Greystone Chapel v1.12
Post by: brookstech on June 04, 2004, 06:12:18 PM
When I  use Purgatory, no email message is sent to the person I successfully Pray for. The code has been changed somewhat, but I didn't mess with the systemmail script at all. I added an addnews to it and it works fine...even the debug works perfectly...

Oh, the main change I made was to restore Maximum hitpoints rather than give soul points...and it worksm but it would be nice to know who saved your soul.

anyone else having this problem?


Title: Re:Greystone Chapel v1.12
Post by: Odyssey on June 10, 2004, 07:23:51 AM
Maybe a bug here...

I went into the Chapel and looked at the marriage list, and I got this:

Farmboy Odyssey is married to Farmboy Odyssey

This is me, and this shouldn't happen for two reasons: same sex, and same IP address

I went into my DB, and it had a number in the marriedto field.  Odd thing was, it wan't my id number.  

 ......screeeeech..... hold on.... I think I just figured it out.

I went in to see who account 21 is, and it someone (female) that does share the same IP address (we're on the same network).  She is a real player, and her own character.  Somehow, that confused it, and didn't know how to tell that it is two different accounts.

   Any work arounds to this?


Title: Re:Greystone Chapel v1.12
Post by: DeathDragon on June 10, 2004, 08:18:31 AM
Don't know how but this mod is very cool. :D


Title: Re:Greystone Chapel v1.12
Post by: Odyssey on June 10, 2004, 08:41:41 AM
Yes it is.   I also have the Gardens mod as well.  If you get married, does it reflect that in either mod?


Title: Re:Greystone Chapel v1.12
Post by: Odyssey on June 11, 2004, 09:40:20 AM
The marriage list is showing couples after just one FLIRT.   This time, it's not the IP thing.  This is two totally seperate players.  I also have the Garden mod installed....  I wonder if that's what it doing it?

    Any suggestions?


Title: Re:Greystone Chapel v1.12
Post by: Odyssey on June 15, 2004, 04:35:35 PM
Those prices are stored in the settings database table.   You'll need to go into your admin console and change them since there is no interface for the chapel.  


I don't have anything in my settings table, that is for the chapel.  I've went over the scripts, and there's nothing about what to add in to that table.  The only this is to create the marrage table.


Title: Re:Greystone Chapel v1.12
Post by: thegleek on June 30, 2004, 10:18:09 AM
got another fix to introduce to this mod...:

the original function of goldStealer() is:

Code:
function goldStealer(){
        global $session;
        $sql="SELECT goldinbank FROM accounts WHERE acctid=".THOMASID; $result=db_query($sql); $row=db_fetch_assoc($result);
        $pilfered=e_rand(1,$row[goldinbank]);
        $sql="UPDATE accounts SET goldinbank=".($row[goldinbank]-$pilfered)." WHERE acctid=".THOMASID;
        db_query($sql) or die(db_error(LINK));
        systemmail(THOMASID,"`#Gold Stolen`0",$session[user][name]."`^ stole ".$pilfered." gold to the church",$session[user]['acctid']);
        return $pilfered;
}

the prob with the above... is this:

Code:
mysql> select acctid,name,gold,goldinbank from accounts where acctid=4;
+--------+----------------+------+------------+
| acctid | name           | gold | goldinbank |
+--------+----------------+------+------------+
|      4 | Brother Thomas |    0 |          0 |
+--------+----------------+------+------------+
1 row in set (0.00 sec)

if the brother thomas npc has -0- gold in the bank, the user who robs the church will get -1 gold as reported to me by one of my players in the game:

Code:
[11:48] <FlatLine> You managed to jimmy the lock and pilfer -1 gold from the cash box
[11:48] #TheGleek.com: mode change '+v FlatLine' by GleekBot!thegleek@local.thegleek.com
[11:48] <FlatLine> . . . I think that needs to be fixed :P
[11:48] <FlatLine> I don't mind losing 1 gold, but yeah, you shouldn't be able to pilfer negative cash ;)

so, this is my new modifications to the goldStealer() function so that wont happen anymore:

Code:
function goldStealer(){
        global $session;
        $sql="SELECT goldinbank FROM accounts WHERE acctid=".THOMASID; $result=db_query($sql); $row=db_fetch_assoc($result);
        if ($row[goldinbank]>($session[user][level]*100)) {
                $pilfered=e_rand(1,$row[goldinbank]);
        } else {
                $pilfered=e_rand(1,(100*$session[user][level]));
        }
        if ($pilfered<$row[goldinbank]) {
                $sql="UPDATE accounts SET goldinbank=".($row[goldinbank]-$pilfered)." WHERE acctid=".THOMASID;
                db_query($sql) or die(db_error(LINK));
        }
        systemmail(THOMASID,"`#Gold Stolen`0",$session[user][name]."`^ stole ".$pilfered." gold from the church",$session[user]['acctid']);
        return $pilfered;
}

and again for all those who are using this wondful mod, i would suggest making the above fix! :)


Title: Re:Greystone Chapel v1.12
Post by: brookstech on July 21, 2004, 09:59:01 AM
My system mail is not sent after purgatory is used. Anyone else have this problem?


Title: Re:Greystone Chapel v1.12
Post by: Lancet Jades on September 03, 2004, 09:32:23 PM
Ok, here's my problem: I ran the SQL query, and uploaded the php file to the main directory, but it still doesn't work. Whats the problem?


Title: Re:Greystone Chapel v1.12
Post by: Talisman on September 03, 2004, 09:37:16 PM
You need to be a little more descriptive other than "it doesn't work".  What is it not doing, is it giving any indications or error messages, etc.

Have you read through the 4 pages of this thread and done any bug fixes which may have been reported or commented on?


Title: Re:Greystone Chapel v1.12
Post by: Lancet Jades on September 03, 2004, 09:40:26 PM
Sorry about that, by "doesn't work" I mean I can't find the nav to the chapel anywhere in the game. I uploaded the php to the Forest, and used the superuser permissions to access it, and everything else seems to work, so the only problem is that I can't access the nav any other way than that  :(


Title: Re:Greystone Chapel v1.12
Post by: Talisman on September 03, 2004, 09:42:15 PM
You need to add the nav whereever it is that you wish the players to be able to access the Chapel from.  Version .97 does not feature the same module system as .98, so all non-forest event additions must be editted in.


Title: Re:Greystone Chapel v1.12
Post by: Lancet Jades on September 03, 2004, 09:49:37 PM
Ok, so, what is the code for a new nav on village.php, and where in village.php do I add it?


Title: Re:Greystone Chapel v1.12
Post by: Talisman on September 03, 2004, 09:51:56 PM
Take a look at the code, it should be obvious.  

http://dragonprime.net/index.php?board=6;action=display;threadid=357;start=0


Title: Re:Greystone Chapel v1.12
Post by: Sichae on September 03, 2004, 11:03:18 PM
:giggles

I believe RAX should come back and make all these changes to the script. It would make it a heck of a lot easier for newer releases of it.


© 2019 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines