DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • September 02, 2010, 09:46:53 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: Bluff Fight  (Read 1309 times)
0 Members and 1 Guest are viewing this topic.
keith
Guest
« on: January 27, 2005, 09:14:19 PM »

Here is my first module for v9.8 so it's not all the way finished

http://dragonprime.net/users/keith/blufffight.zip

this is a forest specia; event . What it is, is you come up to a cave in it you fing the green dragon and a fourtune. you can either choose to fight him, grab his treasure and run, or just run. If you fight him 4 out of  5 times he realy is a man in a coustume and he lets you have some treasure else you have to fight him and he is imposibly hard. if you  try to grab and run he will brush you out with his tail and you will loose hit points and get a little gold. if you run, you get away. I still havn't figured out how to make the fighting work though, since this is my first one, so if you can help I would appreciate it.
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 #1 on: January 29, 2005, 06:26:59 PM »

All in all, a nicely written mod. But, for it and maybe some others down the road, instead of setting the outputs as you have, (IE, only having it a several words, before going to the next) break them down into sentences.

As at start the each of an output, when a translator wishes to do this, it will show a t in the middle of the sentence, which is why we mainly do them at the beginning of the sentence.

Some glaring errors though:
Code:
$maxgold = get_module_setting("maxgold") * $session['user']['level'] * (($session['user']['dk']+1)*0.5);
Should be:
Code:
$maxgold = get_module_setting("maxgold") * $session['user']['level'] * (($session['user']['dragonkills']+1)*0.5);
As I do not believe DK is an existant field. If you were going for "seendragon" which is the setting for when they see the dragon, then use that.

Code:
$session['user']['gold'] = $session['user']['gold'] + $gold;
Could just be:
Code:
$session['user']['gold']+=$gold;

To handle the fight code, it is best to look at another Forest Event that handles a battle within it.
Logged

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

keith
Guest
« Reply #2 on: January 30, 2005, 11:32:06 PM »

Ok, I fixed the bugs, changed the output in to sentances, I've looked at the thieves.php for fighting and tried adding fighting it in mine put it doesn't work.
« Last Edit: January 30, 2005, 11:32:34 PM by keith » 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 #3 on: January 31, 2005, 09:40:44 AM »

Ok, I fixed the bugs, changed the output in to sentances, I've looked at the thieves.php for fighting and tried adding fighting it in mine put it doesn't work.

Look at the Anti Acronym Movement forest module.

Basically, you have to create a nav to go to the battle, or have it be a random case in a switch, then have $battle=true; Then:
Code:
if ($battle){
You should find that code in the thieves.php, as well as many others forest modules, that have battle strings.
Logged

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

keith
Guest
« Reply #4 on: February 02, 2005, 10:09:12 AM »

Ok, I got the fighting working, thanks for the help Sichae, the updated one is at the same link
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #5 on: February 22, 2005, 10:46:26 AM »

line 95 should be:
Code:
$session['user']['gold']=$gold;
since the description says:
 
Code:
you loose all but $gold pieces to the treasure on your way down
Logged

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!
Who's Online
31 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search