DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • June 17, 2013, 09:32:59 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: 1 ... 15 16 [17]   Go Down
  Print  
Author Topic: Pet Shop and Editor 3.81  (Read 35939 times)
0 Members and 1 Guest are viewing this topic.
topdog
Guest
« Reply #240 on: June 24, 2008, 08:53:08 AM »

Hi,
For all of my pets, that is, the pets I added to the pet shop, when I installed the petshop mod there weren't any pets, the pets cannot be fed.
Why?
Logged
Afkamm
Mod God
*****
Offline Offline

Posts: 1578

MarcTheSlayer


View Profile WWW
« Reply #241 on: June 27, 2008, 04:39:58 PM »

Added a setting to set a player level at which they're allowed to sell their pet. This is to stop people buying a really expensive pet before they DK and then selling it on level 1 and buying the best weapon/armour available. Plus a bug fix.

Code:
#
#-----[ FILE ]-----
#
modules/petshop.php

#
#-----[ FIND ]-----
#
"givegift"=>"Allow players to buy pets as gifts?,bool|1",

#
#-----[ AFTER, ADD ]-----
#
"selllevel"=>"At which level can a user sell a pet?,int|4",

#
#-----[ FIND ]-----
#
$petlose = get_module_pref("petdiechance");

#
#-----[ REPLACE WITH ]-----
#
$petlose = get_module_setting("petdiechance");

#
#-----[ FIND ]-----
#
}else{
//sell price is currently half of buy price
$sellpricegold = round($row['valuegold']/2);
$sellpricegems = round($row['valuegems']/2);
$petname = get_module_pref("customname");
output("`2With a twinge of regret, you inquire about selling `3%s`2.", $petname);
output(" `2The shopkeeper asks if you're sure, and quotes you a price of `^%s gold `2and `%%s gems`2.`n`n", $sellpricegold,$sellpricegems);
addnav("Yes", $from."op=finalsale&choice=yes");
addnav("No", $from."op=finalsale&choice=no");
}

#
#-----[ REPLACE WITH ]-----
#
}
else
{
$sell_level = get_module_setting("selllevel");
if( $session['user']['level'] < $sell_level )
{
output("`2The shopkeeper tells you that he isn't buying any pets at this time and that you should try asking again at a later date.`n`n");
addnav("Go Back", "runmodule.php?module=petshop&op=entershop");
villagenav();
}
else
{
//sell price is currently half of buy price
$sellpricegold = round($row['valuegold']/2);
$sellpricegems = round($row['valuegems']/2);
$petname = get_module_pref("customname");
output("`2With a twinge of regret, you inquire about selling `3%s`2.", $petname);
output(" `2The shopkeeper asks if you're sure, and quotes you a price of `^%s gold `2and `%%s gems`2.`n`n", $sellpricegold,$sellpricegems);
addnav("Yes", $from."op=finalsale&choice=yes");
addnav("No", $from."op=finalsale&choice=no");
}
}

#
#-----[ FIND AND DELETE ]-----
#
# Line: 715 and 715
#
$session['user']['gold']+=$sellpricegold;
$session['user']['gems']+=$sellpricegems;

#
#-----[ END ]-----
#

I know Sixf00t4 caught the get_module_setting error 2 pages back (just noticed a few minutes ago) thought I'd keep it in incase anybody missed it.
Logged

Michelina
Militia
**
Offline Offline

Posts: 35


Some days being me just isn't worth it.


View Profile WWW
« Reply #242 on: November 16, 2008, 02:32:20 PM »

I am running 1.1.0.
I install and activate petshop.php (3.81, Eth) into my game.

I take care of the settings and go to make sure that the shop shows up in the village I set it to, with the name I gave it. All is well.

I go to the grotto and click on "Pet Editor" and nothing...
<http://www.alteredstaterpg.net/badnav.php>

I am stymied. I have deactivated it, uninstalled it. Waited as long as 24 hours before doing it all over again.

<notes: It in the modules folder and I have verified that I am running with MySQL 5.0; also I have put in a race-less town and one with a race same reaction.>

Thanks,
Miche
Logged

Don't you wish you were short like me?

AlteredState RPG


Boris735
Mod God
*****
Offline Offline

Posts: 532


View Profile
« Reply #243 on: November 16, 2008, 07:42:27 PM »

Seems like this query should be in the thread for this module.  Have you tried reading through that for any assistance?

Addendum: This module installs on my 1.1.1 test server, and I can enter and use the editor satisfactorily.  I'm afraid I'm not familiar enough with the differences between 1.1.0 and 1.1.1 to speculate as to the issue.

If you are able to access the web server's error logs, any error messages there may provide more explanation.
« Last Edit: November 16, 2008, 07:57:46 PM by Boris735 » Logged
Michelina
Militia
**
Offline Offline

Posts: 35


Some days being me just isn't worth it.


View Profile WWW
« Reply #244 on: November 19, 2008, 08:52:09 PM »

I read the about 10 is pages of the petshop stuff none of it helped in this situation.

Error log shows badnav..not what kind or where it is trying to hook.
Logged

Don't you wish you were short like me?

AlteredState RPG


Balrog
Militia
**
Offline Offline

Posts: 31



View Profile WWW
« Reply #245 on: January 10, 2009, 09:00:41 PM »

having the same problem as Miche. was previously working and then the server was changed. now they have the bad nav issue trying to get into the editor.

any thoughts? previously in this thread, Eth had talked about this but didn't really provide a solution.
Logged

eyric101
Guest
« Reply #246 on: February 12, 2009, 07:39:10 AM »

I was able to resolve the issue on Miches server.  I am not sure why her server is pickier then a fresh out of the box server would be.  In petshop.php, lines 528, 529, 530, 532, 533, and 534, take out the op=shop&.  It is redundant.  I would like to see if anyone knows why this would be a problem on one server where it works fine on a fresh install with the latest codebase
Logged
Elessa
Faerie
Mod God
*****
Offline Offline

Posts: 3592


short, sweet and to the point


View Profile WWW
« Reply #247 on: February 12, 2009, 08:36:55 AM »

the two servers are identical in versions of PHP, mySQL, PHPAdmin, etc?
Logged

Uuma ma ten rashwe, ta tuluva a lle

Play the latest beta version here on LoGD DragonPrime - Axebridge
Afkamm
Mod God
*****
Offline Offline

Posts: 1578

MarcTheSlayer


View Profile WWW
« Reply #248 on: February 12, 2009, 09:08:38 AM »

I would like to see if anyone knows why this would be a problem on one server where it works fine on a fresh install with the latest codebase

&op= is set twice in those 4 urls.

Example:
Code:
?module=petshop&op=shop&op=sellpet
?module=petshop&op=shop&op=giftpet

And the server settings are probably set to "very picky". Cheesy
Logged

Balrog
Militia
**
Offline Offline

Posts: 31



View Profile WWW
« Reply #249 on: February 14, 2009, 11:01:03 PM »

yeah, I had the same issue, it worked on one server but not the other, had to take out the op=shop. it stops people from selling their pets too.
Logged

Afkamm
Mod God
*****
Offline Offline

Posts: 1578

MarcTheSlayer


View Profile WWW
« Reply #250 on: April 20, 2009, 04:17:05 PM »

Anyone else having pets that should attack automatically, but are not doing so?

Code:
<?php
#
#-----[ OPEN ]-----
#
//modules/petshop.php

#
#-----[ FIND ]-----
#
if (get_module_pref("petattack")==&& get_module_pref("attacktype")==&& get_module_pref("petturns")>0){
if ($args['type']=="forest" || $args['type'] == "dragon"){
set_module_pref("petturns"get_module_pref("petturns") - 1);
$min get_module_pref("mindamage");
$max get_module_pref("maxdamage");
apply_buff('petattack', array(
"name"=>"`^Pet Attack",
"rounds"=>-1,
"wearoff"=>"$customname `Qis too tired to fight and retreats to the forest.",
"minioncount"=>1,
"effectmsg"=>"`@$customname `Qattacks {badguy} and causes `^{damage}`Q damage!",
"effectnodmgmsg"=>"{badguy} `Qnarrowly dodges your pet's attack.",
"effectfailmsg"=>"{badguy} `Qnarrowly dodges your pet's attack.",
"minbadguydamage"=>$min,
"maxbadguydamage"=>$max,
"schema"=>"petshop"
));
}
}

#
#-----[ REPLACE WITH ]-----
#
if( get_module_pref('petattack') && get_module_pref('attacktype') && get_module_pref('petturns') )
{
set_module_pref('petturns'get_module_pref('petturns') - 1);
if( !has_buff('petattack'))
{
apply_buff('petattack', array(
"name"=>"",
"allowinpvp"=>0,
"allowintrain"=>0,
"rounds"=>-1,
"minioncount"=>1,
"effectmsg"=>"`@$customname `Qattacks {badguy} `Qand causes `^{damage}`Q damage!",
"effectnodmgmsg"=>"{badguy} `Qnarrowly dodges your pet's attack.",
"minbadguydamage"=>get_module_pref('mindamage'),
"maxbadguydamage"=>get_module_pref('maxdamage'),
"schema"=>"petshop"
));
}
}

The problem was.
Code:
<?php
if ($args['type']=="forest" || $args['type'] == "dragon"){

Type "forest" doesn't exist so your pet will only automatically attack if you're fighting the Dragon, although I don't think types "dragon", "pvp" or "graveyard" exist either. :-/
Logged

Pages: 1 ... 15 16 [17]   Go Up
  Print  
 
Jump to:  


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

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
19 Guests, 1 User
KaosKaizer
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search