DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • November 12, 2018, 10:42:48 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: Forcing level 15 players to FIGHT the DRAGON  (Read 6140 times)
0 Members and 1 Guest are viewing this topic.
thegleek
Guest
« on: June 01, 2004, 01:54:20 PM »

HI!

i'm new to this site, but i have taken A LOT of mods from it... so far so good!

let me know what you think. i'm also open for critisisms and improvement tips...

ok. not sure how many of you logd siteop's out there run across this.

but since installing that house/residential mod... many of my players are NOT killing
the green dragon so they can keep killing players and NPCs to earn more gold and
gems... i really dont see this as being fair... so i added this mod to my logd:

http://dragonprime.cawsquad.net/users/thegleek/ForceFightDragon.txt

Logged
anpera
Guest
« Reply #1 on: June 01, 2004, 06:52:20 PM »

Jap, that's a good one.
Seems like houses addon needs something like this. I've had this problem very soon, too, but I didn't realize that it came from housing mod. Shocked
I'm using a very similar trick to force players to fight the dragon, but they are caught in village so they can't escape it by fighting other players and avoinding the forest.

See it as german translation of this one Wink
-klick-
Logged
robert
Old Dog
Moderator
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #2 on: June 01, 2004, 06:53:02 PM »

for this to work:

if (getsetting("automaster",1) && $session[user][seendragon]!=1) {
needs to be changed to
if (getsetting("automaster",1) && $session[user][seendragon]==0) {

and also
if ($session[user][experience]>$expreqd) { $session[user][seendragon]=1;
changed to
if ($session[user][experience]>$expreqd) { $session[user][seendragon]==0;

After making these changes - it worked like a charm!
 Smiley
Logged

thegleek
Guest
« Reply #3 on: June 01, 2004, 09:20:17 PM »

for this to work:

if (getsetting("automaster",1) && $session[user][seendragon]!=1) {
needs to be changed to
if (getsetting("automaster",1) && $session[user][seendragon]==0) {

and also
if ($session[user][experience]>$expreqd) { $session[user][seendragon]=1;
changed to
if ($session[user][experience]>$expreqd) { $session[user][seendragon]==0;

After making these changes - it worked like a charm!  Smiley

i'm sorry then. cuz your changes make no sense. i took the code from the original script
for the master to fight you if yer truant (having too much experience beyond the normal)...

Code:
if (getsetting("automaster",1) && $session[user][seendragon]!=1) {
needs to be changed to
if (getsetting("automaster",1) && $session[user][seendragon]==0) {

basically both will work. cuz $foo != 1 means any value in $foo besides 1
your way just basically checks $foo == 0. which if it matches 0 only it'll be true. both ways
will work 100% since the varible $session[user][seendragon] will only be 0 or 1 (boolean)

Code:
if ($session[user][experience]>$expreqd) { $session[user][seendragon]=1;
changed to
if ($session[user][experience]>$expreqd) { $session[user][seendragon]==0;

that ^ however is completely wrong... the == is only used when comparing values. in the above code, i am assigning the value of 1 to $session[user][seendragon], meaning since i am forcing the user to fight the dragon, i now set the value to be true. by your way, setting the value to a 0 means the player will fight the dragon and still can fight it again on the same day.

i hope i cleared things up for you on this... any ?'s, just ask!

« Last Edit: June 01, 2004, 09:20:41 PM by thegleek » Logged
Spider
Guest
« Reply #4 on: June 03, 2004, 04:21:00 AM »

nice work, but you need to put in a check for if they're seen the dragon today already.

Certainly on my server there are a couple of ways you can get to the forest which aren't from the village square so you could use that to your advantage to fight the dragon twice in a day...
Logged
thegleek
Guest
« Reply #5 on: June 03, 2004, 06:44:12 AM »

you got a point..but if i put that check into the dragon.php, the original code wouldn't work
properly as forest.php contains:

Code:
if ($HTTP_GET_VARS[op]=="dragon")
        addnav("Enter the cave","dragon.php");
        addnav("Run away like a baby","inn.php");
-snip-
        $session[user][seendragon]=1;
}

so basically, if you qualify as level 15 and seendragon=0, you have the link to seek out the dragon from function forest($noshowmessage=false) { within common.php:

Code:
if ($session[user][level]>=15 && $session[user][seendragon]==0){ addnav("G?`@Seek out the Green Dragon","forest.php?op=dragon"); }

do you even see what i'm trying to get at here?

the [op]=="dragon" part in forest.php should NOT set the seendragon to 1 UNTIL you actually enter the cave (ie: load up the dragon.php module), but it doesnt do that. it sets seendragon to 1 no matter if you click enter the cave or run away to the inn...

i sure hope they have rectified this problem in the 0.98 code.

« Last Edit: June 03, 2004, 06:46:24 AM by thegleek » Logged
Spider
Guest
« Reply #6 on: June 03, 2004, 09:15:12 AM »

nope, thats right.  It means you can't go looking for the dragon and then change your mind at the last minute and get away with it.

In my opinion that makes sense in the game context, if you've already gone looking for the dragon once today you should be able to go looking again, whether you faced it or not.
Logged
thegleek
Guest
« Reply #7 on: June 03, 2004, 09:31:48 AM »

ok then i see what yer getting at... i should change this line:

Code:
if ($session[user][level]>=15) {

to this then right?

Code:
if ($session[user][level]>=15 && $session[user][seendragon]==0) {

Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #8 on: June 03, 2004, 09:49:14 AM »

many of my players are NOT killing the green dragon so they can keep killing players and NPCs to earn more gold and
gems
I had a similar problem on my server, and I've found this solution.
Go to newday.php and find
Code:
$session['user']['laston'] = date("Y-m-d H:i:s");
$bgold = $session['user']['goldinbank'];
$session['user']['goldinbank'] *= $interestrate;
$nbgold = $session['user']['goldinbank'] - $bgold;
if ($nbgold != 0) {
    debuglog(($nbgold >= 0 ? "guadagna " : "paga ") . abs($nbgold) . " pezzi d'oro in interessi");
    }
I've modified it this way:
Code:
if ($session['user']['goldinbank']<100000){
    $session['user']['laston'] = date("Y-m-d H:i:s");
    $bgold = $session['user']['goldinbank'];
    $session['user']['goldinbank'] *= $interestrate;
    $nbgold = $session['user']['goldinbank'] - $bgold;
    if ($nbgold != 0) {
        debuglog(($nbgold >= 0 ? "gain " : "pay ") . abs($nbgold) . " gold in interests");
    }
}
This way people accumulate amount of gold higher then 100.000 don't receive interests. I have also implemented an automated system to get informed about player that has less then 100.000 but more then 90.000 Wink
so I can cut off interests for them  Grin
It works, and I don't have any problem about this.
BTW at level 15 you can't buy gems with gold  Wink

Rgds Excalibur
« Last Edit: June 03, 2004, 09:50:03 AM by Excalibur » Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
thegleek
Guest
« Reply #9 on: June 03, 2004, 10:12:12 AM »

This way people accumulate amount of gold higher then 100.000 don't receive interests. I have also implemented an automated system to get informed about player that has less then 100.000 but more then 90.000 Wink
so I can cut off interests for them  Grin

i have a problem with that mod only cuz its not real-to-life.

when the rich gain money and invest it wisely into their bank, by all means they have every right to gain interest on their wealth and keep getting richer. thats how the world works. and so shall this game.

no such thing ever has a rich man been cut off of interest at any bank. in the world. IRL.
Logged
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #10 on: June 03, 2004, 10:23:54 AM »

no such thing ever has a rich man been cut off of interest at any bank. in the world. IRL.
Your right, but I've seen too many players playing dirty that I've been forced to use this line.
I've also limited to 2k per lvl gold loss on PvP as some players was going intentionally with 1M gold in hand and low life to get killed by another char they owned to transfer money to it (money transfer is not allowed on my server).

Ah, btw this game is not RL, and I'm the game admin, so players will do what I let them do  Grin

Rgds Excalibur
Logged

Spock: Random chance seems to have operated in our favor.
McCoy: In plain, non-Vulcan English, we've been lucky.
Spock: I believe I said that, Doctor.
Voratus
Guest
« Reply #11 on: June 03, 2004, 02:12:03 PM »

If you want to talk realism, I'm considering changing my bank so it charges interest for safe-keeping of money.
I mean, where does the bank get all the money to pay out in interest?
 Cool
Logged
lonnyl
Guest
« Reply #12 on: June 03, 2004, 04:49:53 PM »

I have simply implemented a taxman who taxes gold and gems... seems to work pretty well and limits the wealth....
Logged
thegleek
Guest
« Reply #13 on: June 03, 2004, 10:00:18 PM »

I have simply implemented a taxman who taxes gold and gems... seems to work pretty well and limits the wealth....

* thegleek looks for the taxman.php mod...

 Roll Eyes
Logged
robert
Old Dog
Moderator
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #14 on: June 03, 2004, 11:04:04 PM »

Quote from: thegleek
[me=thegleek
looks for the taxman.php mod... [/me]
 Roll Eyes
Quote

Taken from sourceforge when it was there - works  great to avoid goldhording.

add to newday:

if ($session['user']['goldinbank'] > 50000){
$tax = 25000;
($session['user']['goldinbank']-=$tax);
output(" `n`3Your wealth is outstanding, `\$So are your back TAXES!`3, `nYour back taxes of `^$tax  `3has been withdrawn from your Bank Account! `n");
$name = $session['user']['name'];
debuglog("gave $tax for over due taxes");
addnews("$name was taxed $tax by the taxman.");
}
« Last Edit: June 03, 2004, 11:06:21 PM by robert » Logged

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
77 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search