DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • December 12, 2017, 02:03:20 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3   Go Down
  Print  
Author Topic: Rob the bank  (Read 8087 times)
0 Members and 1 Guest are viewing this topic.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« on: February 25, 2005, 08:52:18 AM »

http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=1008

this is from scratch, which leads me to say 2 things.  1, i feel i don't need to ask who ever did the .9.7 to release it.
second, it's as buggy as a dead log in a wet forest.
« Last Edit: March 20, 2007, 01:35:43 AM by sixf00t4 » Logged

Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #1 on: February 25, 2005, 10:35:52 AM »

Going to try it out..

Good enough reasoning for me Smiley
Logged
lonnyl
Guest
« Reply #2 on: February 25, 2005, 10:51:57 AM »

Nope... you didn't need to ask.... just hadn't gotten around to converting the old one..... Grin
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #3 on: February 25, 2005, 11:00:19 AM »

thanks lonny, i thought either you or robert did the original, and the version i have running gives credit to mattshack, who ever that was.  

and before anyone gets any ideas or gets motivated (lonny) i am working on the jailhouse too, and will include my court system to get them out of jail.
Logged

Freeze
Guest
« Reply #4 on: February 26, 2005, 09:28:51 PM »

I think, not sure, that there is an error in the Rob Bank Module. The limit i have to rob a bank, is once per day, yet they can do it as much as they want. Also, i have the rariety set to 1 of 100 chances, yet the link is there everytime. Not just for me as the admin, but for regular users as well. I've isntalled the module straight in, not editing it. Is there somthing wrong on my end, or with the modu
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #5 on: February 26, 2005, 11:12:50 PM »

heh, had a less than sign instead of a greater sign in that link and the run option Grin  So with you having it at 1, it was showing 99% of the time.

fixed and cleaned a little.
Logged

sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #6 on: March 09, 2005, 04:50:56 AM »

updated to work with the jail and added a few other things.  suggestions and feed back are needed.
Logged

DaveS
Mod God
*****
Offline Offline

Posts: 1544


Dfly... you know, as in DaveFly


View Profile
« Reply #7 on: April 05, 2006, 12:38:46 PM »

I was looking at the code and I noticed... way down on the way down down bottom... by line 198... you have the following:

Code:
fightnav((bool)get_module_setting("allowspecial"),false,"runmodule.php?module=robbank");

I then looked way up on the way up up top at the settings and I didn't see a setting for allowspecial...

So I think you need to add a line:

Code:
"allowspecial"=>"Allow players to use their specialty when fighting the guard?,bool|1",

Otherwise, I think you're just teasing us.
Logged

Check out my Last Module:
The Dragon Eggs Expansion
http://dragonprime.net/index.php?topic=8474.0

About my Retirement:
http://dragonprime.net/index.php?topic=9080

See my complete module list here:
http://dragonprime.net/index.php?topic=3038.0
SexyCook
Codemeister
****
Offline Offline

Posts: 430



View Profile WWW
« Reply #8 on: June 18, 2006, 11:23:18 AM »

You might want to change the lines 130
Quote
addnews("`%$playername`5 robbed the bank and got away with $totalgold gold!");
to
Quote
addnews("`%%s`5 robbed the bank and got away with %s gold!",$playername,$totalgold);

and 192
Quote
addnews("$playername was caught and killed when trying to rob the bank!");
to
Quote
addnews("%s was caught and killed when trying to rob the bank!",$playername);

to improve translation readyness.

How do you do this for system mails? In this case:
Quote
                $mailmessage = "`^$playername robbed the bank and has taken $takengold of your gold.";
                systemmail($victim,"`2The bank was robbed!",$mailmessage);
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 #9 on: June 18, 2006, 11:27:35 AM »

Code:
$mailmessage = sprintf("`^%s `@robbed the bank and has taken `^%s `@of your gold.",$playername,$takengold);
systemmail($victim,"`2The bank was robbed!",$mailmessage);
Logged

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

SexyCook
Codemeister
****
Offline Offline

Posts: 430



View Profile WWW
« Reply #10 on: June 18, 2006, 11:33:20 AM »

Ah, thx. My first thought was Arrays.
Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #11 on: June 18, 2006, 11:46:01 AM »

Arrays would be the correct way.

The solution above will translate the message into the translation of the person who triggered the systemmail.

The more correct way would be:

Code:
$mailmessage = array("`^%s robbed the bank and has taken %s of your gold.", $playername, $takengold);
systemmail($victim,array("`2The bank was robbed!"),$mailmessage);
(See the second array for the subject, too!!!)
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 #12 on: June 18, 2006, 11:50:05 AM »

That is how I was told to do it, as bi-lingual servers weren't very common.
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 #13 on: June 18, 2006, 12:09:59 PM »

Yes, it is possible your way. It correct, too (for 99% of the servers out there). Yet in core it's always done with array/array constructs to cover the last percent, too. Smiley
Logged

Running for more than three years now:
SexyCook
Codemeister
****
Offline Offline

Posts: 430



View Profile WWW
« Reply #14 on: June 21, 2006, 10:12:03 AM »

During the battle mode 2 variables are not being read from the SQL database. Change:

Quote
if ($battle){

    $playername=$session['user']['name'];
to

Quote
if ($battle){

    $playername=$session['user']['name'];
    $guardname = get_module_setting("guardname");       
     $xploss=get_module_setting("xploss");   

and everything should display correctly.

Download of a fixed version inkl DaveS' fix
« Last Edit: June 21, 2006, 10:15:17 AM by SexyCook » Logged
Pages: [1] 2 3   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!
Recent Topics
DragonPrime LoGD
Who's Online
21 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search