DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • May 29, 2016, 03:55:42 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Ruined Citadel  (Read 4771 times)
0 Members and 1 Guest are viewing this topic.
Eth
Member
Codemeister
****
Offline Offline

Posts: 302


Shameless Drunk


View Profile
« on: May 27, 2004, 11:47:27 PM »

I present to you one of my finer creations: the Citadel of Eth!

http://dragonprime.cawsquad.net/users/Eth/ethcitadel.zip

Just a random forest event where you happen upon the ruins of an ancient fortress. The player can opt to search the ruins, leave a message in the chat area, or simply pack up and leave.

What can be found by searching, you ask?

1.) Gold/gems
2.) Unique Weapon/Armor
3.) Magic Buff (only one at the moment)
4.) Nothing at all
5.) Death

Weapon/Armor names and stats, and  gold/gem amount are controlled through variables stored at the top of the script.  I didn't include a readme, as the script is well commented. That, and I'm feeling a bit too lazy at the moment.

Comments/Suggestions/Offers of Free Whiskey are welcome!
« Last Edit: May 28, 2004, 06:33:41 PM by Eth » Logged

Purveyor of fine cloaks, gloves, boots, gerbils, and Siamese cats.
lsgworldl
Guest
« Reply #1 on: May 28, 2004, 02:17:37 AM »

ok installed it hope the ppl who play my game like it

thx

 Cool
Logged
Voratus
Guest
« Reply #2 on: May 28, 2004, 08:54:02 AM »

I just read through it, and it looks to be a nice addition for the game.  Smiley
Logged
Eth
Member
Codemeister
****
Offline Offline

Posts: 302


Shameless Drunk


View Profile
« Reply #3 on: May 28, 2004, 06:42:28 PM »

Update - Version 1.20:

Additions:
1.) Added one new event, a magic fountain. Take a drink, or dip your weapon into it for a blessing. Fun for the whole family (Well, no not really)

Revisions:
1.) Added a check to ensure a player can only find one legendary weapon
2.) Added a check to ensure the player can only receive one suit of armor
3.) Added a check to ensure the player can only receive one blessing
4.) Fixed minor spelling errors
5.) Poured myself a drink for a job well done

Replaced the old version with the new version in the first post. Enjoy!
Logged

Purveyor of fine cloaks, gloves, boots, gerbils, and Siamese cats.
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #4 on: May 29, 2004, 03:25:08 PM »

IMHO there's something wrong with this:
Code:
$weapondmg = e_rand(17,23);
...
$session[user][weapondmg]=$weapondmg;
...
$session[user][attack]=$session[user][weapondmg];
If you are a farmboy lvl 15, with weapon lvl 15 your attack is 30.
If you get one the these legendary weapons (same for armors) you risk to lower your attack (or defense).
This could be better:
Code:
$weapondmg = e_rand(17,23);
...
$session[user][attack]=$session[user][weapondmg]+$session[user][level];
It's ok for a 10-15 lvl player, but it's too overpowered for a lvl 1, so a lvl-check it's needed here:
Code:
if ($session[user][level] < 11){
    $weapondmg = e_rand(2,8) + $session[user][weapondmg];
}else $weapondmg = e_rand(17,23);
...
$session[user][attack]=$session[user][weapondmg]+$session[user][level];
All these thoughts don't take count of DP Smiley but I'm too tired right now to think something to balance the script considering them  Roll Eyes

BTW all above IMVHO Wink

Cheers 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.
Eth
Member
Codemeister
****
Offline Offline

Posts: 302


Shameless Drunk


View Profile
« Reply #5 on: May 29, 2004, 03:48:29 PM »

Right you are, Excalibur Smiley

What you suggested was on the block for the next round of revisions, actually.  Caught it last night after I had uploaded the previous version. ::chuckles::

Time permitting, I should have something of the like implemented by this evening, among other things.

Thanks for the input

Oh, and to Voratus: Thanks Smiley To lsgworldl: Hope they enjoy it!
Logged

Purveyor of fine cloaks, gloves, boots, gerbils, and Siamese cats.
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #6 on: June 15, 2004, 05:42:13 AM »

Any news about the ruined citadel Eth ?
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.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #7 on: June 16, 2004, 11:12:37 PM »

you need to change the way the new weapons/armor are assigned.

you need to subtract the old weapon/armor from the overall atk/def and then add the new atk/def to the overall.  (right now, you are setting the overall equal to the new weapon.)  that is not a good thing.  one of the reasons for my 0 defense bug.  slowly we are getting to the bottom of all the files...
Logged

Eth
Member
Codemeister
****
Offline Offline

Posts: 302


Shameless Drunk


View Profile
« Reply #8 on: June 18, 2004, 09:31:56 PM »

Well, my sincerest apologies for the delay. I got buried under a mountain of projects at work; took a whole two weeks crawl out from under it.  Shocked

Now that my free time has been restored, back to work on my mod.

you need to change the way the new weapons/armor are assigned.

you need to subtract the old weapon/armor from the overall atk/def and then add the new atk/def to the overall.  (right now, you are setting the overall equal to the new weapon.)  that is not a good thing.  one of the reasons for my 0 defense bug.  slowly we are getting to the bottom of all the files...

Ah hah! I knew there was something amiss with the way I was doing my weapon/armor calculations.  A few of my players were reporting rather...peculiar results. Thanks for the pointer(s), six. Ah, the trials and tribulations of learning how to mod.

I'll get around to fixing that tonight. Erm, maybe I should stop saying that...

Well, enough yakking. Best I get about making these changes. (insert deity of choice)-willing, I'll have something to show over the weekend. Smiley
Logged

Purveyor of fine cloaks, gloves, boots, gerbils, and Siamese cats.
Eth
Member
Codemeister
****
Offline Offline

Posts: 302


Shameless Drunk


View Profile
« Reply #9 on: June 18, 2004, 11:27:14 PM »

Even though it's only a few hours after my last post, it's Saturday here, and therefor the weekend. So, here's the promised new version.

Eth's Citadel Version 1.30

Additions/Revisions:
1.) Adjusted the attack/defense calcs as per Sixf00t4's suggestion
2.) Added User Level Check (low level players receive less powerful versions of the Legendary Weapons/Armor) - as suggested by Excalibur
3.) Cleaned up minor typos
4.) Vowed never again to say "I'll get that fixed this weekend."

File replaces the previous version. Link avaiable in the first post of this thread. Enjoy.

I'm also toying with the idea of making the citadel available only to players with a certain number of dragonkills or higher. Or perhaps just the weapons/armor available to players over a certain level. Can't quite make up my mind however...
« Last Edit: June 18, 2004, 11:43:42 PM by Eth » Logged

Purveyor of fine cloaks, gloves, boots, gerbils, and Siamese cats.
Seyr
Guest
« Reply #10 on: June 21, 2004, 01:41:30 PM »

Well done. I'm acutally using it and it works very good on my site. Will translate it soon to germany as well, because I have german players.
Keep up the good work.   Smiley
Logged
dvd871
Guest
« Reply #11 on: July 05, 2004, 10:29:08 PM »

Another little thing to change:
Code:
$randnumber = e_rand (1,13);
$randarmnumber = e_rand(1,13);

Should be:

$randnumber = e_rand (0,12);
$randarmnumber = e_rand(0,12);

Arrays are indexed numerically starting from 0.  The way it is now, you'll never get the first element in the array, and if the random number happens to be 13, you will get nothing as you've overshot the array index.

Great mod though!
Logged
Voratus
Guest
« Reply #12 on: July 06, 2004, 07:55:05 AM »

..and unless you've changed your e_rand, if you want each random option the same chance of happening, use mt_rant()
Logged
Zanzaras
Captain of the Guard
***
Offline Offline

Posts: 219


*Snipe*


View Profile
« Reply #13 on: August 18, 2004, 09:05:40 AM »

Eth,

I installed the Ruined Citadel a few weeks back and came across it for the first time today during my turns. I think I've discovered a new bug. I tripped the armor disintegrate trap and it reset me to t-shirt armor (which is fine) however it also set my Defense to 0 which is not. I have multiple dragon kills and have used those points to boost my defense. It should have reset me to a 9 defense.

You may want to look at your code and make sure you are factoring in dragon-point enhancements to attack and defense correctly. I wish I could offer you a quick fix suggestion, but I've never delved into that part of the LoTG code. Someone else who reads this may want to take a look at it and see what they think.

Nice mod by the way!


Thanks!
Zan
Logged

"Intelligence is like a river, the deeper it is the less noise it makes."
Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #14 on: August 18, 2004, 01:54:17 PM »

Hi Zanzaras, I've found this bug not long time ago, and this is my personal solution.
Find in the original code:
Code:
$session[user][armor] = "T-shirt";
$session[user][armordef] = 2;
$session[user][defence]=$session[user][armordef];
$session[user][armorvalue] = 0;
and replace it with:
Code:
$session[user][armor] = "T-shirt";
$session[user][defence]-=$session[user][armordef];
$session[user][armordef] = 0;
$session[user][armorvalue] = 0;

You should replace also the script that take care of the weapon, find:
Code:
$curseweapon= "Fists";
$session[user][weapon]=$curseweapon;
$session[user][weapondmg]=$session[user][level];
$session[user][weaponvalue]=0;
$session[user][attack]=$session[user][weapondmg];
and replace it with:
Code:
$session[user][weapon]= "Fists";
$session[user][attack]-=$session[user][weapondmg];
$session[user][weapondmg]=0;
$session[user][weaponvalue]=0;

It should fix your problem.

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.
Pages: [1]   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!
Who's Online
34 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search