Jump to content
MakeWebGames

Help with in progress paid mod


Seker
 Share

Recommended Posts

I have a pet mod I'm working on. I know what you're thinking. "Pets don't fit mafia games" and all that.

To be honest, I think this one will. Why? Well, glad you asked.

Some key features:

----- Ability to leash your pet to help in attacks

----- Ability to train your pet's stats (The higher the stats, the more the pet adds to the user's stats during an attack)

----- Pet vendor where the user can purchase a pet (Seems obvious, I know)

----- Pet trainer to train your pet's stats (Again, see above note)

----- Pet levels with their own leveling function

----- Pet globals file which organizes every used function and variable in one place for easy editing

----- Each user can only own one pet

----- Comes with 10 pre-created pet types and 5 pre-created leashes (Easy to change/not use/add on to)

And here's the real kicker, which makes this a dream for the MC coder...

----- Not a SINGLE addition to the users table

Also, I will be periodically releasing add-ons, both free and paid, in the future.

Upon completion, I will be selling this mod for $10. Personally, I feel this is a steal when considering the amount of time I've put into this, as well as the range of desirable features from both a coder's and a player's point of view.

I have everything completed with the exception of two frustrating, yet likely very easily fixed, kinks.

Number One - When listing the pets and leashes on the vendor page, it will not show ID 1 on either the leashes nor the pet types. I've tried adding all manner of things into the SELECT/ORDER BY statement to no avail.

Number Two - I am just not getting $_GET and $_POST at all. For some reason, it's usage is beyond me. Either can I seem to work making the purchase without using either. I know, I know, it's probably not rocket science. And yet, I'm stuck. As an example, on the vendor page, when you click purchase on anything listed, it asks you if you really want to purchase Spot (name of the first pet) and that's all. It will not select the different names/ID's/such like that. Not to mention, the query doesn't work. It does not update the pets table.

The first is a moderate problem. The second is a major problem.

I am looking for someone to help guide me through these issues. Note, I said guide. I do not wish to be spoon-fed. Though, a quick explanation of why my vendor page is not displaying properly would be appreciated. You're welcome to see the ORDER BY statement if you need it.

As for the second problem, perhaps just some simple to understand examples of $_GET and $_POST. (If you're just going to say "php.net" or "w3schools," please don't bother. I've checked both. It's obviously not helping.

Now, as this is a paid mod, I would appreciate someone who is established as a trustworthy coder around here. I have browsed quite a bit of posts, so do not think I don't know what this means. I cannot offer much compensation, though you would be welcome to a free copy of this mod upon completion if you so desired. Not to mention my respect and appreciation. (Those are worth something, right? :P)

Anywho. Please PM me if you're interested and have the time to help. Also, I would love some feedback about the features of the mod itself within this thread.

Appreciate you taking the time to read my ridiculous paragraph. Cheers.

Edited by Seker
Link to comment
Share on other sites

I would rather post here so people know it's getting attention.

I'm willing to help you out, but, only via skype.

So, Skype me :D

PS: My skype is on my profile.

Unfortunately, I do not have Skype. I will try to download it, but my internet connection may make that quite a process. Once done, I will contact you. Thanks for the offer.

Link to comment
Share on other sites

Okay, I think I explained incorrectly. Actually, I know I did. So, yeah, my bad.

Now, I've thought about it, and let's see if this makes more sense or just makes me look like more of an idiot. (REALLY makes you want to buy my mods, huh? :P)

I do know the usages of $_GET and $_POST. I was about to explain further, but I had another realization and figured that out as well. Okay, I'll be updating the original post.

Anywho, preferentially, I'd rather not use a form. Is there a way to give the same functionality without using a form? Or, is that the most efficient and best-advised way to do it?

Link to comment
Share on other sites

What is it your trying to do with get and or post?

I'm trying to set up buy_pet/leash functions. After studying itembuy.php, I'm wondering if I need to create another file. Would rather not do that, of course. Would rather have two functions sitting neatly in my pet globals file.

Of course, all these problems I'm having could be coming from working on the mod for close to 12 hours now, all done today. Perhaps I just need to refresh myself and come back to it.

Link to comment
Share on other sites

Optionally, you can send me the specific file you are having trouble with?

[email protected]

Skype is a mere 20mb, won't take half hour even on a 1mbp/s connection.

You'd think that'd be right. Here's the problem. Due to the location of my property, we cannot yet get high-speed internet out here. We're reduced to using Cricket. And, not only that, pretty sure I hit the soft cap. Put it this way. I started the download when you posted. It's at 4 mb out of 20. Yeah. It's that bad.

But, I will send you the section of my pet globals that's giving the issues.

Link to comment
Share on other sites

You'd think that'd be right. Here's the problem. Due to the location of my property, we cannot yet get high-speed internet out here. We're reduced to using Cricket. And, not only that, pretty sure I hit the soft cap. Put it this way. I started the download when you posted. It's at 4 mb out of 20. Yeah. It's that bad.

But, I will send you the section of my pet globals that's giving the issues.

No worries, Here in south africa, up until 2 year's ago, the maximum line speed we had was a 1mbps, and was way to expensive. Coming from mexico (10mbps uncapped) to south africa (384kbps capped at 1gig) is crap. So i know how you feel :P

Link to comment
Share on other sites

Alright, so, after much tinkering I ironed out all the bugs with purchasing a pet, and with listing them properly in the pet vendor.

Now, I'm running into a weird thing. I'm working on the trainer. Here's an example of how I have the stat gains set up. Probably will end up being a little more complicated than this, but the problem remains the same:

$traindef = rand(1,4) * $p['level'] + $p['pet_DEFENSE'] / 2;

 

The problem I'm having is, even though there's a different variable for each stat, they're all gaining the same. The rand() just doesn't seem to be working, and I cannot figure out why. Any suggestions?

Link to comment
Share on other sites

Hi Seker, I believe I can help you, if I understand what you're wanting help with.

You're not wanting to use a form, but post-like information to a page/request that will process the data, and return it in a form of information to the user, when purchasing a pet, correct?

If this is the case, look into switch() and use a form, but use css to style it so it doesn't look like a form, or generate and store a query string (_GET) in a variable and use that to your advantage.

Following on, ensure you've secured the variables - things that can change, pet id, quantity, etc etc - by sanitizing and filtering.

Good luck and I hope all goes well :)

- sniko

Link to comment
Share on other sites

Hi Seker, I believe I can help you, if I understand what you're wanting help with.

You're not wanting to use a form, but post-like information to a page/request that will process the data, and return it in a form of information to the user, when purchasing a pet, correct?

If this is the case, look into switch() and use a form, but use css to style it so it doesn't look like a form, or generate and store a query string (_GET) in a variable and use that to your advantage.

Following on, ensure you've secured the variables - things that can change, pet id, quantity, etc etc - by sanitizing and filtering.

Good luck and I hope all goes well :)

- sniko

Actually got that part all taken care of, but thanks a ton for the input sniko. :)

Link to comment
Share on other sites

Not sure if this will make a difference or not, but ....

 

$rand=rand(1,4)
$traindef=((($rand * $p['level']) +$p['pet_DEFENSE'])/2);

 

I ran into this problem once before. I am sure that there are better (smarter) ways of fixing this ... but it worked for me.

Link to comment
Share on other sites

Not sure if this will make a difference or not, but ....

 

$rand=rand(1,4)
$traindef=((($rand * $p['level']) +$p['pet_DEFENSE'])/2);

 

I ran into this problem once before. I am sure that there are better (smarter) ways of fixing this ... but it worked for me.

Ah That makes sense. God, I need sleep.

Link to comment
Share on other sites

Ah That makes sense. God, I need sleep.

I think at this point with no sleep and spending hours on this, you are your own worst enemy. Put it away ... get some sleep and come back fresh. Or if that is not an option ... work on another mod. Sometimes working with something else helps things to click.

Link to comment
Share on other sites

I think at this point with no sleep and spending hours on this, you are your own worst enemy. Put it away ... get some sleep and come back fresh. Or if that is not an option ... work on another mod. Sometimes working with something else helps things to click.

You are correct. I think it's just so close to being finished, I'm gunning that final push.

Link to comment
Share on other sites

Just a little progress update on this mod.

Finished And Working:

---- All functions and variables within the pet globals file

---- Pet Vendor

---- Pet Trainer

---- Pet Central (Including leash/sell pet)

---- Still working with NO additions to the users table

Untested:

---- Pet leveling function

Still To Do:

---- Pet Renaming

---- Include pets with attacking

---- Selling leashes

---- Pet Hall Of Fame

Expected Future Add-Ons:

---- More complex pet trainer which will work much like the regular gym

---- Pet Hospital

---- Pet Crimes/Jail

---- Pet Markets (Both crystals and cash)

I am expecting to have this mod finished and for sale sometime tonight (Currently 4 PM where I am)

Would appreciate any and all comments and suggestions regarding current features and future add-ons.

Preliminary Screenshots:

[ATTACH=CONFIG]465[/ATTACH]

[ATTACH=CONFIG]466[/ATTACH]

[ATTACH=CONFIG]467[/ATTACH]

petvendor.jpg.f0a6e31b4733f6da14c0f8de7f48c213.jpg

pettrainer.png.c17fc66a9479cabc35408c744e64fe21.png

petcentral.png.0fb6d30841b46bc291265d57789bea23.png

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...