DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • November 22, 2017, 01:52:52 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: File Discussion - the patrol  (Read 1705 times)
0 Members and 1 Guest are viewing this topic.
Apollon
Captain of the Guard
***
Offline Offline

Posts: 144


This life is one of the hardest!


View Profile WWW
« on: March 20, 2017, 02:56:40 PM »

A simple village event for all who are feed up of drunken users walkdown the streets! Pleaase excuse the bad english in the text but I'm no natural speaker and if you think it's to bad change the text. Otherwise have fun with it! Wink Smiley
Logged

I am the country, my eyes am the sky, my limbs the trees, I am the rock, the depth of water. I am not here, in order to control mother nature or exploit her. I am even nature.
(Hopi)
Aeolus
Mod God
*****
Offline Offline

Posts: 1792


You're welcome.


View Profile WWW
« Reply #1 on: March 20, 2017, 04:12:02 PM »

Two discussion threads, both with a copy of the module...?
Logged

Apollon
Captain of the Guard
***
Offline Offline

Posts: 144


This life is one of the hardest!


View Profile WWW
« Reply #2 on: March 21, 2017, 12:31:30 AM »

hm, good morning sir *gg think you're right, it was late in germany when I made it and I didn't realise it.  So remove this one please. Or should I use it for the same event in german language as discussion?!  Wink I want to push it up too so german admins needn't translate. The german text is much better then the english one cause it's my native language.  Smiley
« Last Edit: March 21, 2017, 01:14:33 AM by Apollon » Logged

I am the country, my eyes am the sky, my limbs the trees, I am the rock, the depth of water. I am not here, in order to control mother nature or exploit her. I am even nature.
(Hopi)
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 169


View Profile
« Reply #3 on: July 15, 2017, 07:55:56 AM »

Hey, this looks like fun, i am grabbing this....there are NOT enough Village Events.  I myself coded a Village Event...maybe I should share it, I dunno.  It does require the Alignment System...
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1740


View Profile
« Reply #4 on: July 15, 2017, 12:03:44 PM »

Hi,

Code:
<?php
case 
"changesetting":
if ($allowall == 1){
        
if ($args['setting'] == "villagename") {
            
if ($args['old'] == get_module_setting("wapatloc")) {
                
set_module_setting("wapatloc"$args['new']);
            
}
        
}
    
}
    
break;

Where does $allowall come from?
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 169


View Profile
« Reply #5 on: July 15, 2017, 11:19:45 PM »

Hi,

Code:
<?php
case 
"changesetting":
if ($allowall == 1){
        
if ($args['setting'] == "villagename") {
            
if ($args['old'] == get_module_setting("wapatloc")) {
                
set_module_setting("wapatloc"$args['new']);
            
}
        
}
    
}
    
break;

Where does $allowall come from?

That's a good question.  I missed this, too.
Looking over the coding, I think we need to add a line

Between these two lines (in my file they are line 56 and 57)
Code:
case "changesetting":
if ($allowall == 1){

We need to add this:

Code:
$allowall = get_module_setting("allcities");

Great catch, Mark!

Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1740


View Profile
« Reply #6 on: July 16, 2017, 12:30:35 PM »

Unless I'm missing something, I don't think it's required and that IF statement can be removed.

If the villagename has been changed then the old name needs to be updated. Smiley
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 169


View Profile
« Reply #7 on: July 16, 2017, 02:18:16 PM »

Unless I'm missing something, I don't think it's required and that IF statement can be removed.

If the villagename has been changed then the old name needs to be updated. Smiley

It should be calling for the pref for allcities.  Meaning that this module could show in ALL cities...or only ONE city.

I think that is why it is there.  I have the module installed on my system nw and it has never tripped.

I think it is because the line I mentioned is not in there...i will try putting it in and see what happens.

This module, unless I am mistaken...is meant to be confirguarble to show in all cities...or an admin-specified city ONLY.
Logged
MarcTheSlayer
Mod God
*****
Offline Offline

Posts: 1740


View Profile
« Reply #8 on: July 16, 2017, 03:40:53 PM »

Yes, but it shouldn't matter if it only appears in one city or them all, the new name needs to be saved when it's changed. Smiley
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 169


View Profile
« Reply #9 on: July 17, 2017, 10:23:17 PM »

Yes, but it shouldn't matter if it only appears in one city or them all, the new name needs to be saved when it's changed. Smiley
I guess.  I do not really know since I do not know what the original coder's thought was on what they were trying to accomplish.  I am really, at best, an intermediate-level coder who knows just enough to be truly dangerous.

Which is also why I am not about to try to undertake a serious core code alteration such as was discussed on a different thread.  I come up with very twisted and demented solutions to problems but I can REALLY cause problems in the process.

LOL...the last code code update I did...in pageparts...caused everyone in The Shades to see who was online (like you see on the login screen_ instead of thier stats...and I do not know how the heck I did it!!

Fortunately, I had backed everything uop and went back to the beginning and re-did what I was trying to do and it worked.  So I have no idea where I went wrong, but everything works like I wanted no on that front...so I try prtty hard not to fool too much with core code anymore.

Although I am twisted enough to have figured out how to put Stables and a bank in the Shades (and Valhalla) and also how to have mounts available ONLY there!!

So far as I know, my site is the only one that does this.  You have mounts you can ONLY get when dead and then bring them back to the world of the living with you.

SO...like I said, I am intermediate at best, I oull off some cool stuff once in a while, but I am very dangerous too.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
22 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search