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

  Show Posts
Pages: 1 2 [3] 4 5 ... 11
31  Coding Support / Coding Support Desk / Re: How Do I Remove Color-Coding Notations From Page Headers? on: October 10, 2017, 05:02:41 AM
Where the dwellings code uses the page_header function when you enter a dwelling, use the sanitize function first on the dwelling name, then pass that into page_header.

Thanks.  I wonder how come dwellings was not done that way to begin with. Oh well.  Should solve my problem.
32  Coding Support / Coding Support Desk / How Do I Remove Color-Coding Notations From Page Headers? on: October 09, 2017, 03:00:16 PM
Even if it is a two-step process, no biggie.

But in my Dwellings, when anyone uses bolds or color in their Dwelling name...then the page header for their dwelling us the name f their Dwelling, as should be...but the stupid color codes are there so that I get "` b Joe's Dwellling ` b" etc, when all I WANT there is "Joe's Dwelling"

So...how do I strip those color codes out so that the page header will not include them, since they do not parse in page headers?
33  Coding Support / Coding Support Desk / Re: Idea For An Item Cabinet on: October 06, 2017, 05:10:13 PM
I actually made all the items I wanted - by modifying the code of houses.php - but it is all hard-coded specific to my site and my items.

I would release this to anyone who may want it with the note that you can't just plug and play this, you would have to alter the hard coding for your own site.

It works on 1.1.0 and I see no reason it should not work on any 1.x.x version.
34  Coding Support / Coding Support Desk / Re: get_module_objpref and how to use it on: October 06, 2017, 05:07:30 PM
Because I do not look at how old a thread is.  I'm not sure why that matters so much.

It was a subject I was interested in, okay?

Maybe the better question is why you and some others must absolutely find fault with everyone else. 

I have n idea why some people here are so absoultely terrible to other people?  Why the cruelty?

Because it's a thread that is a decade old. The code has advanced great amounts since then, so further comments to it are probably irrelevant due to deprecated code, especially when they didn't actually contribute anything.

If you had an idea on it, you should have started a new thread. It's not cruelty (wow, drama, much), it's efficiency.

Didn't your mothers ever teach you that if you don't have something nice to say, DON'T SAY ANYTHING AT ALL??

You COULD have just let it go if efficiency is what you were after, so I call B.S.  - you were cruel and intended to be so.
35  Coding Support / Coding Support Desk / Re: get_module_objpref and how to use it on: October 06, 2017, 08:39:31 AM
Why do you dig up a 10 year old thread without even asking a question?  Huh

Because I do not look at how old a thread is.  I'm not sure why that matters so much.

It was a subject I was interested in, okay?

Maybe the better question is why you and some others must absolutely find fault with everyone else. 

I have n idea why some people here are so absoultely terrible to other people?  Why the cruelty?
36  Coding Support / Coding Support Desk / Re: get_module_objpref and how to use it on: October 03, 2017, 06:50:25 AM
I run 1.1.0 - the way I got around thee being no increment fuction was to increment a different variable, and then use the set function to set the value to the variable value...and just increment the variable.

It's a three-step process istead of a one-step process but it works.

I know, nobody but me uses 1.1.0 anymore right...because older core is so terrible, right?

BUT if you are using older core...or you don't really understand how to use the increment...or, if you are like me and you LIKE more steps so that you can SEE each step...this is how it can be done.

I know I am a terrible and sloppy coder, and not too confident of my abilities, so I tend, myself, to like the extra steps so that I can SEE each function as it happens.  I am just not all that confident of getting it right when I skip steps or combine steps.  Just an idiosyncracy I have.

SO...FWIW, there is a workaround for the not having an increment function, if anyone is interested.
37  Coding Support / Coding Support Desk / Re: Is It Possible To.... on: October 03, 2017, 06:44:15 AM
Hummm, I do not see anywhere in the Creature Editor I can do this.

I should mention, at the moment, I am running 1.1.0 - is that matter?  Is this something that can only be done on higher versions?

Again, this was a curiousity question.


I now have a test server...and I am looking at the possibility of an upgrade, but ONLY if it can be done without breaking anything I already have in place.
38  Coding Support / Coding Support Desk / Re: Is It Possible To.... on: September 28, 2017, 01:00:47 AM
Cool.  Have to try it.
39  Coding Support / Coding Support Desk / Re: Is It Possible To.... on: September 26, 2017, 12:26:03 PM
That is a very neat idea for something such as a highwayman that targets women. It very much is possible - however without a module to prevent the fight from starting, the creature has a chance to hit once, through the surprise attack mechanic. This can be done through an AI script (Be careful who you give creature editor). You would have to decide on what conditions the creature should attack. If you want it to attack women, you would want to check if $session['user']['sex'] is the constant SEX_FEMALE.

Code:
<?php
global $session$enemies$badguy;
if (
$session['user']['sex'] == SEX_FEMALE) {
    
//We want our highwayman to attack women, but not men. Return to continue the next round of fighting.
    
return;
}
foreach (
$enemies as $id => $enemy) {
    if (
$enemy['creaturename'] == $badguy['creaturename']) {
        unset(
$enemies[$id]);
        
//Remove the highwayman from the fight array. He should flee in group combat.
    
}
}
$badguy['creaturegold'] = 0;
$badguy['creatureexp'] = 0;
$badguy['dead'] = true;
// Remove the rewards, remove the creature from the fight.
output("The Highwayman notices a little too late that you are a male and flees!`n");

Neat.  so this is not a module, but something which goes in the Creature Editor, right?

Because that is what I am looking for.

I am looking to create a few creatures that only attack men...and a few that attack only women.

As an extension to this, I also wanted to create a creature that only attacks a certain race...for example, only Elves or only Trolls, or only Humans or whatever.
40  Coding Support / Coding Support Desk / Is It Possible To.... on: September 25, 2017, 07:49:59 PM
Just a complete random curiousity question...

is it possible to set a Creature, in the Creature Editor...to attack only a certain gender...or only a certain race....or only a certain alignment character?
41  Game Administration, Installation and Configuration / The Idea Place / Re: Account ID on: September 23, 2017, 03:12:34 AM
Thanks, everyone for the help, then.

I just needed to have a way to control beta-testing access to new modules, one that did not grant Grotto Access, so that some players could also beta-test.

This is something I like to do after I have first assured myself that there is nothing that causes a conflict or parsing error or call stack somewhere.  Then, the next thing is to test functionality to be sure things function as intended.
42  Core Code Development Discussions / Core Development Discussion / Re: LotGD Rewrite (Daenerys) Weekly Updates on: September 23, 2017, 03:09:04 AM
@Nder' what kind of storytelling do you like ? darker sword and sorcery Style or rather heroic Lotr style ? Just wondering --

My own mind seems to go best towards young person faces tragedy (usually death of a parent) - is thrown into adverse situation against their will (usually a dark magic/evil situation) - suffers for years, manages to escape, begins to build new life....that is the general theme I ted to write best.  Usually the protagonist is persecuted and finds a way to rise above it (usually by kicking butt) - I like female buttkickers.

If you remember Dragon Warrior/Dragon Quest from the 1980's - 1990's, think in terms of Alena.
43  Game Administration, Installation and Configuration / The Idea Place / Re: Account ID on: September 22, 2017, 04:37:21 AM
I've actually got a couple of modules that make it so that you can grant access to certain players, by granting access to them via UE. I've added the necessary snippets of code for it. The first one goes at the top of the module, at the end of your $info section of the module.

Code:
"prefs"=>array(
"allowed"=>"Is this player allowed into the area?,bool|0",

Then, under the cases, where you've got your village case:

Code:
case "village":
$allowed = get_module_pref("allowed");
if ($allowed == 1 && $session['user']['location'] == "InsertVillageNameHere"){
addnav("Ale Alley");
addnav("Name for Nav","runmodule.php?module=InsertnameofModulehere&loc=enter");
}


That should help. I hope.

This would make it so that you can pick and choose which players have access to the specific module you are testing.

Yes, I like it.  I see where this works.
I could then set the boolean to default 1 and re-install the module when beta-testing is done, thus keeping it in and making the ability to re-beta the thin if necessary later.

Thanks!
44  Game Administration, Installation and Configuration / The Idea Place / Re: Account ID on: September 22, 2017, 04:32:54 AM
Code:
dohook:
$allowed_acctids = array( acct id's go here );

case "village or whatever"
if(in_array($session['user']['acctid'],$allowed_acctids))
{
addnav
}
in this case, I assume the account id's a separated by commas?
45  Game Administration, Installation and Configuration / The Idea Place / Re: Account ID on: September 20, 2017, 01:57:52 PM
OK...I could try.

What I am actually doing...

Is setting up so that in, let's say, in the hook for village (where my modue would show up)

While it is in the testing stage, I only want it to access certain values and add the nav ONLY for those values.  Everyone else would not have the nav, thus would not stumble into what is not fully tested.

The reason why this first came up in the multi-poke thread, was because that one has setting in it where you can allow ONLY certain account ID's to use certain pokes.

I wanted to know how I would set that up within a module, as a temporary thing, so that, once fully tested, it could then be taken out and thus everyone would get the nav, see?

Now, the way I had done this in the past would be something like this:

Code:
if ($session['user']['id'] <= 10) {
addnav whatever
} else {}

That way only users with an account ID 10 or lower would see the nav.

So, without setting superuser tags on someone...how would I make a player a betatester on something...so that they could still see the nav where other players could not?

THAT is where I am trying to get.  I do not want to give someone Grotto Access just in order to allow them to beta test.  I have some longer-term players that I normally would consider for use for beta-testing, but their account ID's are all over the place and I wanted to order those players so that everything was in the same rage, so that my above coding would work.

I am being told this is not a good plan.  So what I am looking for then....is code that would allow access only to certain players...and without giving them Grotto Access.
Pages: 1 2 [3] 4 5 ... 11

*
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
23 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search