DragonPrime - LoGD Resource Community

Modules, Themes and other customizations for your game => Completed Forest, Village and Travel Events for Version 1.x.x => Topic started by: Apollon on March 20, 2017, 02:56:40 PM



Title: File Discussion - the patrol
Post by: Apollon 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! ;) :)


Title: Re: File Discussion - the patrol
Post by: Aeolus on March 20, 2017, 04:12:02 PM
Two discussion threads, both with a copy of the module...?


Title: Re: File Discussion - the patrol
Post by: Apollon 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?!  ;) 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.  :)


Title: Re: File Discussion - the patrol
Post by: TGTarheel 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...


Title: Re: File Discussion - the patrol
Post by: MarcTheSlayer 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?


Title: Re: File Discussion - the patrol
Post by: TGTarheel 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!



Title: Re: File Discussion - the patrol
Post by: MarcTheSlayer 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. :)


Title: Re: File Discussion - the patrol
Post by: TGTarheel 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. :)

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.


Title: Re: File Discussion - the patrol
Post by: MarcTheSlayer 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. :)


Title: Re: File Discussion - the patrol
Post by: TGTarheel 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. :)
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.

© 2017 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines