DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • March 21, 2019, 08:52:09 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3 ... 11   Go Down
  Print  
Author Topic: Clan Pyramids  (Read 43423 times)
0 Members and 1 Guest are viewing this topic.
Kala
Codemeister
****
Offline Offline

Posts: 481

Who Me?


View Profile
« on: June 26, 2007, 08:18:21 PM »

Clan Wars style set of 3 Pyramids that randomly appear in the village, each with its own set of maps which players can take and defend for their clans.  Giving them some bonuses.

Clan Points HoF file included in pack to reflect the Points earned each month by the clan also the kills of other clans members in the pyramids.

Features:

- Random access to the pyramids in villages
- Only 2 of the 3 pyramids will show in the links
- HoF appears on both main HoF and in individual Clan Halls
-- Kills HoF in main shows overall kills
-- Kills HoF in clan shows within clan kills
- Bonus experience in forest for owning all 3 pyramids (this can be edited on line 127 of the main clanpyramid.php file, currently set at 10 per players level).
- Previous months winning Clan Name will be displayed in village.
- Maps of all 3 pyramids - with player pref to set them as a popup window, show in the main window, or not load at all (for those on dialup that images slow them down too much).
- Warriors Lists - all shown on the entrance page, so you can see where your opponent is, each pyramid, also has at least 1 other warrior list hidden within it, you have to find it to use it Smiley
- Clan War Vault (Written by Shadow Raven) - ability to buy attack and defense for your clan within the clan halls, Leaders can buy the attack and defense, from gold donated by clan members, admin settable how much gold per atk/def point. Top Donators HoF included.  Buying Attack ups your clan members attack when battling in the pyramids.  Buying Defense ups the size of a clans walls.

- The Pyramids themselves:

- Tzeltachs (Pyramid 1)
-- floating doors in the walls, which move with each pyramid take for each clan.
-- Doors must be found and broken down to take the throne in the centre, each with its own guardian to fight

- Chexalramins (Pyramid 2)
-- All walls are able to be demolished, each has its own guardian to fight
-- Partial maps shown as you cant see through to whats on the other side of a wall
-- Give up link (has seen players, including herself, lost in this one for half an hour or more).

- Prazlynx (Pyramid 3)
-- No walls, only the thrones
-- Random Transportation Portals, that can move you backwards, forwards or even to another pyramid.

Important, Please Note:

The images folder included here, extract the files from the folder, and place them in the now included /modules/clanpyramid/images folder.

There is a readme text.  Do NOT upgrade previous versions until you have read it.  It also explains how to modify experience given (this is not nor will ever be a setting).

Included is upgradepyramid files.  You must install and uninstall or your players will no longer have their player kills adding on.  This file removes all no longer used prefs and converts player kills and player clanpoints earned over to the clanhof module.  I take no responsibility for those who do not read.

Download Here: http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=1290


Images files don't quite fit in the max attachment size and can be dowloaded here: http://www.timerealms.net/test/images/pyramidimages.zip
« Last Edit: May 23, 2008, 10:53:53 PM by Kala » Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
rolland
Guest
« Reply #1 on: June 27, 2007, 04:06:34 AM »

I got this when I clicked explore

Quote
Parse error: syntax error, unexpected '}' in /home/tynas3/public_html/modules/clanpyramid/move_func.php on line 265
Logged
Kala
Codemeister
****
Offline Offline

Posts: 481

Who Me?


View Profile
« Reply #2 on: June 27, 2007, 05:04:54 AM »

Sorry about that..

I've fixed and attached the new file here.  Only replace /clanpyramid/move_func.php with this file.

Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #3 on: June 27, 2007, 05:38:52 AM »

You'd like a hint? You have three long lines in clanpyramids_func.php, which can be greatly reduced.

Code:
if ($which==1){
if ($squarenew==1) $squarename="A1"; if ($squarenew==2) $squarename="A2"; if ($squarenew==3) $squarename="A3"; if ($squarenew==4) $squarename="A4"; if ...

could be rewritten into:

Code:
if ($which == 1) {
  $squarename = chr(floor($squarenew/13)+65) . (($squarenew % 13) + 1);

for $which = 2 or 3 simply subtract 1000 / 2000

That reduces the file's size by 23'002 bytes!!! (And it is A LOT faster.) (And only works if the names of the squares are arranged in a rectangle... Tongue )

[EDIT START]And another 22'940 bytes, when I found the second occurence... Always assuming the maps are 13 squares wide... Smiley If not, I will find another way...[EDIT END]

Looking closer at the file, it seems it is not translation ready:

Code:
output("`b`^You are on $squarename`b`n");

should be

Code:
output("`b`^You are on %s`b`n", $squarename);
(Haven't looked further, but I bet I'll find more of them, right? Wink
« Last Edit: June 27, 2007, 05:43:31 AM by XChrisX » Logged

Running for more than three years now:
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #4 on: June 27, 2007, 05:45:07 AM »

Smaller file attached. (untested, though...)
Logged

Running for more than three years now:
Kala
Codemeister
****
Offline Offline

Posts: 481

Who Me?


View Profile
« Reply #5 on: June 27, 2007, 06:05:51 AM »

Thanks for the advice Chris...

And no its not translation ready.. I am intending to convert it, but as it was, on my server, it didn't need to be translation ready, so I have not yet had the time to convert.

The Pyramids have been in development for quite some time, I started on them just after finishing my PVP Arena, and a lot of the basic coding is the same.   Basically, I done what I needed to do with the code, in the best way I knew how. Smiley

Again thanks for the input, and I'll look at adding that to a later release, as I intend to add in the ability of clan members to upgrade their clans defence, thereby upgrading the size of the walls/doors within the pyramids themselves.


Edit:  Just tested your code XChrisX, it works to a point, as I'm not familiar with what you're doing *self taught and haven't come across that before*.  The first square becomes A2 and its impossible to go from B1 to A1 as that square no longer exists.  But A2 takes on its attributes.
« Last Edit: June 27, 2007, 09:52:04 PM by Kala » Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
Kala
Codemeister
****
Offline Offline

Posts: 481

Who Me?


View Profile
« Reply #6 on: June 27, 2007, 11:12:24 PM »

Ver 1.1

Converted to translation ready

added shortened code by XChrisX (Thank You) Smiley

Fixed bug in move_func.php as reported above
Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
danbi
Codemeister
****
Offline Offline

Posts: 366


View Profile
« Reply #7 on: June 28, 2007, 12:47:59 AM »

On lines 187 and 192 in move_func.php you index the arrays with r_rand(1,6), but the arrays are defined to only have 5 elements.

Line 75 in walls2_func.php list undefined variable $defence and line 79 $tatka. I guess both are typos.

There is one thing I don't understand Smiley I go trough walls without losing turns. I hit guardians with my clan's strenght, but they never hit me...
« Last Edit: June 28, 2007, 01:02:24 AM by danbi » Logged
rolland
Guest
« Reply #8 on: June 28, 2007, 02:06:18 AM »

Also upon going to the Tzeltalchs Pyramid, you just get a nav saying return to the village, and nothing else is there
Logged
rolland
Guest
« Reply #9 on: June 28, 2007, 02:14:33 AM »

And theres two move_func.php files, ones in a zip, which do we use?
Logged
Kala
Codemeister
****
Offline Offline

Posts: 481

Who Me?


View Profile
« Reply #10 on: June 28, 2007, 03:48:45 AM »

On lines 187 and 192 in move_func.php you index the arrays with r_rand(1,6), but the arrays are defined to only have 5 elements.

Line 75 in walls2_func.php list undefined variable $defence and line 79 $tatka. I guess both are typos.

There is one thing I don't understand Smiley I go trough walls without losing turns. I hit guardians with my clan's strenght, but they never hit me...

Perhaps Danbi, occasionally there is no door on that particular wall?  A lot of the interest from my players is the fact that they don't quite know what is going to happen all the time. Smiley

Oh and believe me the guardians do hit.. and when they do... ouch *my news often has <player> was hurled from a pyramid...*

Also this module does not 'kill'

$tatka should be $tatk so yes a typo and I am unable to find the variable $defence (even using Ctrl F)
the variable on line 75 is $def which is used just below to calculate wall hits.

The module was not written to take turns off them, if you wish you may add that.  The clans ability to buy atk/def and increase their walls and also atk bonus inside the pyramids will be added (as per my previous post) until then, your clan atk/def is hard coded throughout the module and set the same at each point.  This will change with the next version release.

Roland just delete the zip file that was inside, that is the old file, with the error fix I posted above.  Sorry about that and the confusion, I thought I deleted that.  I'm not having any trouble with entering Tzel Pyramid on my test server Smiley
« Last Edit: June 28, 2007, 04:04:14 AM by Kala » Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
danbi
Codemeister
****
Offline Offline

Posts: 366


View Profile
« Reply #11 on: June 28, 2007, 04:13:11 AM »

line 75 in walls2_func.php was actually

Code:
$def=$session['user']['defence'];

I guess you meant 'defense' for the index. Sorry for calling that variable too, but I just edited the line Smiley

My concern abouf guards never hitting back is, that most of my fights are me hitting them 2-3 times and they die Smiley Perhaps the reason is the balance of my character, with little hp and even spred of attack and defense for about 60DK).

Nice module.
Logged
Kala
Codemeister
****
Offline Offline

Posts: 481

Who Me?


View Profile
« Reply #12 on: June 28, 2007, 04:17:32 AM »

heh, yeah, I'll get that fixed up (blames being an aussie and spelling different lol).

Thanks.. I know I've got a lot of requests for it.. and once the clans have individual places to actually buy atk/def that bonus will even out a lot.   But those guards are sneaky.. they may only hit back once in 10 times or even more.. but when they do, they often kill in one go lol..

I'm thinking of maybe adding in that players get x amount of clan pyramid turns a new day, with the option for clans or players to buy more.. but that won't be for a lil while.
Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
ShadowRaven
Mod God
*****
Offline Offline

Posts: 805


Silence is a virtue...


View Profile WWW
« Reply #13 on: June 28, 2007, 12:14:07 PM »

Quote
Thanks.. I know I've got a lot of requests for it.. and once the clans have individual places to actually buy atk/def that bonus will even out a lot.

I wrote a module that does exactly this for the pyramids version on my game....I just have to test it to make sure it works with THIS version of the pyramids, and will release it soon.

*Kala, if you can get on yahoo still, please IM me....

Edit:

Here it is. Had to edit the pyramid module for the pyramid script to be able to pull the clans' att and def from the clan war vault clan prefs. If clan war vault is not installed it will just use the att and def bonus that it did before.
I just added this mod to the pyramid packages because its useless without it anyway. It won't work with anything else. But let me know if y'all think it should be a separate download.
btw, I also fixed atlease one instance that I found 'defence' and changed it to 'defense'. there might be more, I haven't really check all the files yet.

Admin settings:
Set how much it costs per clan att point
Set how much it costs per clan def point

Also Clan leaders can set whether or not officers can buy att/def for the clan
And there is a hof in the clan halls for clan donators

Package attached below
« Last Edit: June 28, 2007, 05:24:42 PM by ShadowRaven » Logged

Kala
Codemeister
****
Offline Offline

Posts: 481

Who Me?


View Profile
« Reply #14 on: June 28, 2007, 05:57:05 PM »

Thanks SR Smiley

Saves me several hours and probably another headache lol
Logged

~Why are there only 24 hours in a day, what I could do with an extra 1 ~
Pages: [1] 2 3 ... 11   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

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