DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • May 31, 2016, 08:58:10 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: help with my first mod  (Read 4138 times)
0 Members and 1 Guest are viewing this topic.
phofire
Guest
« on: March 12, 2004, 10:50:33 AM »

I am trying to put together my first mod. im having a query tho

i want to have multiple choices for flair that each one has its own out put, but they all should share the same rewards system. do i need to put the reward after every option or can i put it after all the options


forgive me but im an idiot with half a clue searching for the other half
Logged
Voratus
Guest
« Reply #1 on: March 12, 2004, 11:57:31 AM »

I'm guessing your mod looks something like:
if op=option1 {}
elseif op=option2{}
elseif op=option3{}
etc.
just add a final one, elseif op="reward"{}
at the end of your other options, put in a $HTTP_GET_VARS[op]="reward"
Logged
strider
Guest
« Reply #2 on: March 12, 2004, 12:47:38 PM »

Vortus has it basically covered, but let me ask you, what is it precisely that you want this mod to do and we could probably offer a good template to go off of.

Don't be afraid to share a bit of the story as that can affect the way you approach the coding.

Logged
phofire
Guest
« Reply #3 on: March 12, 2004, 05:59:04 PM »

ok im writing a brothel,

for a cost of 2 gems you pick someone to spend time with and each npc has a set script (too lazy to write multiple scripts at this time) but they all pool from the same reward pool gain to forest fights loose all gems and gold on hand by being robbed and then the really sepcial on. I am adding a class to the game but not allowing it to be player selectable. through the brothel encounters are the only way to gain these skill points and they will be random rewards. i will probably find a way to limit to a single visitr a day.

mostly i am just looking at examples of how other things work in other scripts and trying to make it work in mine.
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5462



View Profile WWW
« Reply #4 on: March 12, 2004, 06:02:17 PM »

Interesting idea with potential for different applications (doesn't have to be a brothel in a family server)

If you were to have several "ladies", each with a different script and MOSTLY the same rewards offered...but each having one unique special reward appearing only once in a while, it would take players a while to clue into who has the potential to provide what boon.
Logged

Play the latest beta version here on DragonPrime
phofire
Guest
« Reply #5 on: March 12, 2004, 06:04:55 PM »

well brothel was a request by someone on mys erver and the deviats that play mine will adapt well. I am trying to keep the script pg  (maybe pg 13) i like the idea talisman about the particular of each one offering a different unique, but im already biting off more then i can chew and hoping for the best.

Logged
george
Guest
« Reply #6 on: March 12, 2004, 06:25:08 PM »

A Brothel has already been done and is in use.
You idea for a brothel is VERY similiar to the existing one.
Logged
phofire
Guest
« Reply #7 on: March 12, 2004, 06:29:27 PM »

Damn Where!

instead of writing all this **** code id just edit that to add the occaisional skill point increase
Logged
bwatford
Guest
« Reply #8 on: March 12, 2004, 06:30:38 PM »

Hey where can I get that copy of the brothel I want to see if I can use it for the castle's Moulin Rouge Louge....Or at least use it as a guide.
Logged
phofire
Guest
« Reply #9 on: March 12, 2004, 08:24:14 PM »

OK I give up


run as a test it fails on line 13 and i give up trying to make it work - spent an hour and a half trying to update it and associated lines so maybe it would work

no sucj luck
Logged
Peanut_Butter_Wolf
Guest
« Reply #10 on: March 12, 2004, 08:32:32 PM »

what's line 13?
Logged
phofire
Guest
« Reply #11 on: March 12, 2004, 08:43:30 PM »

if ($session[user][sex]=0)
Logged
Peanut_Butter_Wolf
Guest
« Reply #12 on: March 12, 2004, 08:55:06 PM »

it should be..

if ($session[user][sex]==0){
Logged
phofire
Guest
« Reply #13 on: March 12, 2004, 09:04:27 PM »

ok well this is it so far

i have commented out most of it to just try the basic script and was planning on removing comments bit by bit till it worked

<?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");

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");
}elseif ($session[user][sex]==1){
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" `n `n `6)


//}else if ($HTTP_GET_VARS[op]=="alanna"){
//output ("they do stuff with you" `n `n `6

//}else if ($HTTP_GET_VARS[op]=="juliel"){
//output ("they do stuff with you" `n `n `6

//}else if ($HTTP_GET_VARS[op]=="elissa"){
//output ("they do stuff with you" `n `n `6

//}else if ($HTTP_GET_VARS[op]=="vincent"){
//output ("they do stuff with you" `n `n `6

//}else if ($HTTP_GET_VARS[op]=="william"){
//output ("they do stuff with you" `n `n `6

//}else if ($HTTP_GET_VARS[op]=="edward"){
//output ("they do stuff with you" `n `n `6

//}else if ($HTTP_GET_VARS[op]=="caramon"){
//output ("they do stuff with you" `n `n `6

//}else if ($HTTP_GET_VARS[op]=="reward"){
//output ("they do stuff with you" `n `n `6

switch(e_rand(1,10)){

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

case 4:

case 5:

case 6:

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

case 9:

case 10:

?>
Logged
Peanut_Butter_Wolf
Guest
« Reply #14 on: March 12, 2004, 09:09:52 PM »

you need semi colons after your outputs, and you only need { after an if statement
eg.
Quote
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"); <-- need that
and
Quote
output("`c`b `^Ge'Mah's Relaxation Respite`b`c");{ <-- no need for that there
 

also add just before the end of the php..
page_footer();

$session[user][gold]+=100
 anything like that needs a semi colon after.

Hope that helps,

- pbw
« Last Edit: March 12, 2004, 09:12:31 PM by Peanut_Butter_Wolf » Logged
Pages: [1] 2   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!
Who's Online
29 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search