DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • July 20, 2018, 12:04:50 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Vending Machine  (Read 2622 times)
0 Members and 1 Guest are viewing this topic.
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
« on: March 26, 2005, 01:43:38 AM »

Not sure where Village Specials go, but here is a new one.

Vending Machine, random thing given. Turns, Gem, Gold, Loss of HP, Crushing Near-Death.

Admin Settable Cost of Soda.

http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=97
« Last Edit: January 02, 2007, 07:25:03 PM by Sichae » Logged

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

XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #1 on: March 26, 2005, 01:59:55 AM »

just a simple thing, which ist not only relating this module...

When you have some translate_inline()s (like lines 30, 33 and 35) it easier to translate if you go that way:

Code:
$str1 = translate_inline("`@more than enough gold for a soda");
$str2 = translate_inline("`@just enough gold for a soda");
$str3 = translate_inline("`@not enough gold for a soda");
if  ($session['user']['gold'] > $cost){
$str = $str1;
$nav = 1;
}elseif($session['user']['gold'] == $cost){
$str = $str2;
$nav = 1;
}else{
$str = $str3;
$nav = 0;
}
         

This way I don't have to run through every single case to translate this module, but I'm able to translate every case at once...

For gender-specific translation this is extremely annoying... Tongue

BTW: In the second case ($str2) There should be a $nav = 1;, too... Smiley
Logged

Running for more than three years now:
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 #2 on: March 26, 2005, 10:30:01 AM »

Hmm... thought I had made $nav = 1; by default... oh well.

Same Link.
Logged

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

White Knight
Mod God
*****
Offline Offline

Posts: 1030

For the truth!


View Profile
« Reply #3 on: January 02, 2007, 04:30:13 PM »

The link above will take you to Hurl. Use this:
http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=97
Logged

Helping you help yourself.
Pages: [1]   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
27 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search