DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • August 17, 2019, 10:29:07 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: 1 [2]   Go Down
  Print  
Author Topic: help with my first mod  (Read 6807 times)
0 Members and 1 Guest are viewing this topic.
anpera
Guest
« Reply #15 on: March 13, 2004, 09:07:28 AM »

Oh dear...

Try this one (not tested)
Code:
<?php
//Created by Kallell for www.phofire.com/logd
//
//
//
//A Brothel which offers rewards at a cost along with the only way to get access to a certain specialty

require_once "common.php";
page_header("Ge'Mah's Relaxation Respite");
addnav("Go to Town Square","village.php");

if (
$HTTP_GET_VARS[op]==""){
   
addnav("Spend time With . . .")
   if (
$session[user][sex]==0){ 
      
addnav("Brandi","brothel.php?op=brandi");
      
addnav("Alanna","brothel.php?op=alanna");
      
addnav("Juliel","brothel.php?op=juliel");
      
addnav("Elissa","brothel.php?op=elissa");
   }else{ 
      
addnav("Vincent","brothel.php?op=vincent");
      
addnav("Willaim","brothel.php?op=william");
      
addnav("Edward","brothel.php?op=edward");
      
addnav("Caramon","brothel.php?op=caramon");
   }

   
output("`c`b `^Ge'Mah's Relaxation Respite`b`c");

   
output("`2As you walk into a Large home behind thick foilage you are greeted by `5Ge'Mah, `2 an elf of incredible beauty. Behind her a number of Men and Woman bustle about. `5 Please come in and rest while one of my staff sees to your needs for only 2 gems`2 she says");

}else{
   if (
$HTTP_GET_VARS[op]=="brandi"){
         
output ("Brandi Leads you to a private room where you spend much time enraptured by her eyes, she coaxes many stories of your bravery from you and you feel like a new man" ```6);

   }else if (
$HTTP_GET_VARS[op]=="alanna"){
      output ("they do stuff with you" 
```6");
      // put in here what they do
   }else if (
$HTTP_GET_VARS[op]=="juliel"){
      output ("
they do stuff with you" `n `n `6");
      
// put in here what they do
   
}else if ($HTTP_GET_VARS[op]=="elissa"){
      
output ("they do stuff with you" ```6");
      // put in here what they do
   }else if (
$HTTP_GET_VARS[op]=="vincent"){
      output ("they do stuff with you" 
```6");
      // put in here what they do
   }else if (
$HTTP_GET_VARS[op]=="william"){
      output ("
they do stuff with you" `n `n `6");
      
// put in here what they do
   
}else if ($HTTP_GET_VARS[op]=="edward"){
      
output ("they do stuff with you" ```6");
      // put in here what they do
   }else if (
$HTTP_GET_VARS[op]=="caramon"){
      output ("they do stuff with you" 
```6");
      // put in here what they do
   }
   
   //rewards for all the above
   switch(e_rand(1,10)){ 

      case 1:
      output("
You now feel fully refreshedready to face the world. ``n");
      output("
``bYou Gain 2 forest fights!`b");
      
$session[user][turns]+=2;
      
$session[user][gems]-=2;
      break;
      case 2:
      output("Your realize you have fallen asleep, upon gathering your articles your purse is a little light");
      output("
``bYou have been robbed!`b");
      
$session[user][gems]=0;
      
$session[user][gold]=0;
      break;
      case 3:

      break;
      case 4:

      break;
      case 5:

      break;
      case 6:

      break;
      case 7:
      output("
how you feel");
      output("
``bwhat happens to you`b");
      
$session[user][gems]-=2;
      
$session[user][gold]+=100;
      break;
      case 8:

      break;
      case 9:

      break;
      case 10:
      break;
   }
}
page_footer();
?>
Wink
Logged
phofire
Guest
« Reply #16 on: March 14, 2004, 03:14:05 PM »

thanks that got me past the original error, fixed the ones left myself.

another question tho, how do i alter the chances for certain rewards
Logged
Peanut_Butter_Wolf
Guest
« Reply #17 on: March 14, 2004, 04:34:00 PM »

just change the number of cases associated with it..

eg.

case 1: case 2: case 3:

(75% chance) something happens.

case 4:

(25% chance) something else happens.

-pbw
Logged
phofire
Guest
« Reply #18 on: March 14, 2004, 04:56:14 PM »

thanks i knew it was something like that but not sure if it was prior associated case numbers or follwing.


Script is almost finished now with a few light touches, i need to add an edit to not allow entry if you dont have the gems (thats a slight problem right now) and then to write the hidden class and insert that text
Logged
Peanut_Butter_Wolf
Guest
« Reply #19 on: March 14, 2004, 05:13:56 PM »

if ($session ['user']['gems']>0){
stuff
}else{
Logged
phofire
Guest
« Reply #20 on: March 14, 2004, 06:12:18 PM »

i hate coding, i really do

http://dragonprime.cawsquad.net/users/phofire/brothel.zip

ok the argument for the gems is conflicting with other arguments (i think) or i am just that lost . . . probably the latter if i can get that argument to work i should just need to change the last case for the specialty i add (i hope) in a week or so i may get a book explaining php and sql andmaybe ill be doing something besided flying on a wing , a prayer and the kindness of other modders.

fix that and change the last reward to something fitting and its complete really

i need to take a break, maybe ill go watch my hair grey

« Last Edit: March 14, 2004, 06:29:55 PM by phofire » Logged
speedyplastic
Guest
« Reply #21 on: April 22, 2004, 10:21:31 AM »

I put this script on my test server and i noticed i can go in and spend gems i dont even have.  when i leave it shows i have -2 gems....   did i set it up wrong?  
thanks.
Logged
phofire
Guest
« Reply #22 on: April 22, 2004, 10:40:06 AM »

no, its because i still wrote it wrong. I have it fixed on my server but am more worried about finding a job thern re uploading it here. if you want you can pull it off my site www.phofire.com/logd just need to fix the rewards to pull out the one that rewards skill points in forgotten arts
Logged
speedyplastic
Guest
« Reply #23 on: April 22, 2004, 10:41:22 AM »

Thank you my friend and i were trying to fix it ourself without much luck...  

thanks!!!

Logged
Kyky
Guest
« Reply #24 on: April 22, 2004, 10:45:14 AM »

well you could just add
Code:
if ($session[user][gems]>=2){ addnav("whatever","brothel.php");}

if you add that then only people with 2 gems or greater can even see the link so that should keep people who don't have enough gems from using it. Smiley
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
91 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search