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

Pages: [1]   Go Down
  Print  
Author Topic: Farms aka Slaves  (Read 3372 times)
0 Members and 1 Guest are viewing this topic.
All My Knights
Guest
« on: May 21, 2005, 05:45:06 AM »

ok I did it! I made my first add on.

Its a Farm mod. chek it out and let me know what you think.
keep in mind its my first try and I dont know any php, just what I learnd vrom the game,
I am sure there is a lot wrong with my coding but It works.

http://dragonprime.net/users/All%20My%20Knights/slaves.zip
Logged
robert
Old Dog
Moderator
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #1 on: May 22, 2005, 11:47:36 AM »

Just a few suggestions to help you along:
- Eliminate as much white space/unused space
- Use a spell checker and grammar editor
- Insert the tick marks in all [user][farms] ->['user']['farms'] -- while both do work, on rare occassions the ones without may not work and use of the tick marks is also the current practice.
- You also must add: farms, slaves, land, manager  to dragon.php list of items not cleared at DK OR else player will lose all such items.

On my version for new day outcomes I added some other outcomes:
- The drought has effected the harvest, you only earn 10%
- Maurading Raiders have damaged the crops, you only earn 20%
- The recent slave revolt has harmed production, you only earn 30%

« Last Edit: May 22, 2005, 12:11:53 PM by robert » Logged

All My Knights
Guest
« Reply #2 on: May 22, 2005, 04:15:57 PM »

Oh yes I forgot the dragon.php thing, thanks for reminding me!
Also yes I know my english blows! I am in florida since 8 years but my german roots still show in my spelling....

ok this is what I use in my dragon.php:

---in dragon.php----
   
   find:          
                     $nochange=array("acctid"=>1

   under it add:              
                       ,"manager"=>1
                            ,"land"=>1
                       
    find:
                       output("vile creature.");

    under it add:
   
       if ($session['user']['manager'] = 1)
   output(" `$ Apophis your Farm Manager reports that while you where gone the slaves burned all your Farms and ran away.'n");
--------------------------------------------------------------------------------

Did you see? I learnd! I used the marks '
 Grin
« Last Edit: May 22, 2005, 04:18:32 PM by All My Knights » Logged
robert
Old Dog
Moderator
Mod God
*****
Offline Offline

Posts: 1047


LoGD Buff!


View Profile WWW
« Reply #3 on: May 22, 2005, 08:31:16 PM »


LOL - Burning the farms and losing the slaves at DK!!!!
Actually that is quite good and balancing or else a player could take big advantage ...I'm running off to make that change myself  Cool
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 #4 on: May 22, 2005, 08:39:39 PM »

Slavery is wrong...

* Sichae downloads the mod, and applies it

Tongue
Logged

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

Excalibur
Member
Mod God
*****
Offline Offline

Posts: 573


I'm a newbie, plz forgive me!


View Profile WWW
« Reply #5 on: June 18, 2005, 07:39:38 AM »

Nice mod  Wink
I've written the dragon.php part that was missing in the script. There are 50% chance to lose 0~75% of the slaves and 10% chance to lose one farm. Here the code:
Code:
   if ($session['user']['manager'] > 0){
       $duecento = e_rand(1,200);
       if ($duecento <= 100){
          $duecento /= 1.33;
          $schiavipersi = intval(($duecento/100)*$session['user']['slaves']);
          $session['user']['slaves'] -= $schiavipersi;
          output("`n`n`&Apophis`\$, your Farm Manager, reports that while you where gone the `^".intval($duecento)."% `\$of the slaves, ");
          output("`^$schiavipersi `\$slaves, have risen in rebellion, burning lands before running away.`n");
       }
       $cento = e_rand(1,100);
       if ($cento > 90 AND $session['user']['farms'] > 0){
          output("`5Unfortunately you've lost also one of  your `@Farm`5. It was scorched to the ground by `\$fire `5spread from the flames set by the rebellious slaves.`n");
          $session['user']['farms'] --;
          if ($session['user']['slaves'] > ($session['user']['farms']*100)) {
             $schiavipersi = $session['user']['slaves'] - ($session['user']['farms']*100);
             $session['user']['slaves'] = ($session['user']['farms']*100);
             output("Actually, your farms can only support ".($session['user']['farms']*100)."slaves, so ");
             output("$schiavipersi of them having nothing to do abandon you!!`n`n");
          }
       }
    }

As usual it needs a grammar and spelling check  Grin

*** EDIT ***
Thanks to Elessa for giving me some suggestions about the grammar & spelling Wink
« Last Edit: June 19, 2005, 02:21:47 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.
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

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