The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[PetzVB v2] Improving PetzVB v2... (battle options and more!) Details »» | |||||||||||||||||||||||||||
[PetzVB v2] Improving PetzVB v2... (battle options and more!)
Developer Last Online: Nov 2023
IMPROVING BATTLES
I modified my petzVB to not increase the stats (HP, MHP, STR, DEF, AGI) when you level up.... That way, your pet changes "phisically" (graphically) but the stats stays fixed. I did that change, because i had many users complaining about: - Petz with higher levels killing weaker petz in just one attack - Stronger Petz accepting challenges of weaker petz - Stronger pets does not have opponents to challenge (because with a small difference of 2-3 levels the battle is unbalanced) Now, - the new users can battle old users, - the battles are more balanced and the number of - active battles grew up a lot... - the batlles resides on strategy and not on your level FIXED STATS TO BALANCE BATTLES If you want to make this change, find in petz.php: Code:
// Level Up Petz Stats $pet1[MHP]=$pet1[MHP]+$increase[MHP]; $pet1[STR]=$pet1[STR]+$increase[STR]; $pet1[DEF]=$pet1[DEF]+$increase[DEF]; $pet1[AGI]=$pet1[AGI]+$increase[AGI]; $pet1[EXP]=0; // Store The Changes $DB_site->query(" UPDATE " . TABLE_PREFIX . "petz_petz SET MHP='$pet1[MHP]' WHERE ID='$pet1[ID]' "); $DB_site->query(" UPDATE " . TABLE_PREFIX . "petz_petz SET STR='$pet1[STR]' WHERE ID='$pet1[ID]' "); $DB_site->query(" UPDATE " . TABLE_PREFIX . "petz_petz SET DEF='$pet1[DEF]' WHERE ID='$pet1[ID]' "); $DB_site->query(" UPDATE " . TABLE_PREFIX . "petz_petz SET AGI='$pet1[AGI]' WHERE ID='$pet1[ID]' "); Code:
// Level Up Petz Stats //$pet1[MHP]=$pet1[MHP]+$increase[MHP]; //$pet1[STR]=$pet1[STR]+$increase[STR]; //$pet1[DEF]=$pet1[DEF]+$increase[DEF]; //$pet1[AGI]=$pet1[AGI]+$increase[AGI]; $pet1[EXP]=0; // Store The Changes //$DB_site->query(" //UPDATE " . TABLE_PREFIX . "petz_petz SET MHP='$pet1[MHP]' WHERE ID='$pet1[ID]' //"); //$DB_site->query(" //UPDATE " . TABLE_PREFIX . "petz_petz SET STR='$pet1[STR]' WHERE ID='$pet1[ID]' //"); //$DB_site->query(" //UPDATE " . TABLE_PREFIX . "petz_petz SET DEF='$pet1[DEF]' WHERE ID='$pet1[ID]' //"); //$DB_site->query(" //UPDATE " . TABLE_PREFIX . "petz_petz SET AGI='$pet1[AGI]' WHERE ID='$pet1[ID]' //"); Code:
// Level Up Petz Stats $pet2[MHP]=$pet2[MHP]+$increase[MHP]; $pet2[STR]=$pet2[STR]+$increase[STR]; $pet2[DEF]=$pet2[DEF]+$increase[DEF]; $pet2[AGI]=$pet2[AGI]+$increase[AGI]; $pet2[EXP]=0; // Store The Changes $DB_site->query(" UPDATE " . TABLE_PREFIX . "petz_petz SET MHP='$pet2[MHP]' WHERE ID='$pet2[ID]' "); $DB_site->query(" UPDATE " . TABLE_PREFIX . "petz_petz SET STR='$pet2[STR]' WHERE ID='$pet2[ID]' "); $DB_site->query(" UPDATE " . TABLE_PREFIX . "petz_petz SET DEF='$pet2[DEF]' WHERE ID='$pet2[ID]' "); $DB_site->query(" UPDATE " . TABLE_PREFIX . "petz_petz SET AGI='$pet2[AGI]' WHERE ID='$pet2[ID]' "); Code:
// Level Up Petz Stats //$pet2[MHP]=$pet2[MHP]+$increase[MHP]; //$pet2[STR]=$pet2[STR]+$increase[STR]; //$pet2[DEF]=$pet2[DEF]+$increase[DEF]; //$pet2[AGI]=$pet2[AGI]+$increase[AGI]; $pet2[EXP]=0; // Store The Changes //$DB_site->query(" //UPDATE " . TABLE_PREFIX . "petz_petz SET MHP='$pet2[MHP]' WHERE ID='$pet2[ID]' //"); //$DB_site->query(" //UPDATE " . TABLE_PREFIX . "petz_petz SET STR='$pet2[STR]' WHERE ID='$pet2[ID]' //"); //$DB_site->query(" //UPDATE " . TABLE_PREFIX . "petz_petz SET DEF='$pet2[DEF]' WHERE ID='$pet2[ID]' //"); //$DB_site->query(" //UPDATE " . TABLE_PREFIX . "petz_petz SET AGI='$pet2[AGI]' WHERE ID='$pet2[ID]' //"); - Set the default max HP = 150 Run the following Sql query in your database: Code:
UPDATE `petz_petz` SET HP='150' WHERE 1; UPDATE `petz_petz` SET MHP='150' WHERE 1; Dog-> (STR:40) + (DEF:30) + (AGI:30) = 100 Cat-> (STR:40) + (DEF:20) + (AGI:40) = 100 Snail-> (STR:15) + (DEF:60) + (AGI:25) = 100 Turtle-> (STR:20) + (DEF:70) + (AGI:10) = 100 Spider-> (STR:50) + (DEF:10) + (AGI:40) = 100 Run the following Sql queries in your database to reset the pet's stats: Code:
UPDATE `petz_petz` SET STR='40' WHERE type='1'; UPDATE `petz_petz` SET DEF='30' WHERE type='1'; UPDATE `petz_petz` SET AGI='30' WHERE type='1'; UPDATE `petz_petz` SET STR='40' WHERE type='2'; UPDATE `petz_petz` SET DEF='20' WHERE type='2'; UPDATE `petz_petz` SET AGI='40' WHERE type='2'; UPDATE `petz_petz` SET STR='35' WHERE type='3'; UPDATE `petz_petz` SET DEF='40' WHERE type='3'; UPDATE `petz_petz` SET AGI='25' WHERE type='3'; UPDATE `petz_petz` SET STR='40' WHERE type='4'; UPDATE `petz_petz` SET DEF='40' WHERE type='4'; UPDATE `petz_petz` SET AGI='20' WHERE type='4'; UPDATE `petz_petz` SET STR='50' WHERE type='5'; UPDATE `petz_petz` SET DEF='10' WHERE type='5'; UPDATE `petz_petz` SET AGI='40' WHERE type='5'; If you want to Reset the Win/Loss Stats, run this sql query: Code:
UPDATE `petz_petz` SET LOSS='0' WHERE 1; UPDATE `petz_petz` SET WIMPS='0' WHERE 1; UPDATE `petz_petz` SET WINS='0' WHERE 1; If you modified the 'Str,Def,Agi' Stats, then you need to unequip the items so they can change the new stats correctly. just run this sql query: Code:
UPDATE `petz_inventory` SET EQUIP='0' WHERE 1; the 'MHP, Str, Def, Agi' Stats permanently, but making those items equipmentables That's it. The battles are now more balanced and resides more on strategy than your level Good Luck Show Your Support
|
Comments |
#2
|
||||
|
||||
would it be possible for you to contact the originator and see if you can take over the hack? this hack was super popular on my boards once, but due to lack of updates and support, i took it down when i upgraded to 3.0.7.
since you've been doing some awesome addons and your ideas are exactly what this hack needs, it'd be cool if you can rerelease it. |
#3
|
|||
|
|||
seriously... i am with yinyang
|
#4
|
||||
|
||||
Quote:
and besides, that it would not be fair with the original author of the hack. However, i will share all the modifications, bug-fixes or tips that i think that others can find useful... for example, i'm trying to make these changes: - Gain EXP (to Level-up) when Feeding your pet [since many active users enjoy taking care of their pets but does not likes to fight in the arena] - Gain EXP when playing with other pets - Use (healing) objects during battles |
#5
|
||||
|
||||
INFINITE EXPERIENCE BUG
There's a "bug" in the petz hack: - If you are in the arena , copy the shorcut of the "ATTACK" action - If you visit that link, it does not matters if is not your turn, you can attack - When it's not your turn, you can fail the attack BUT (and here's the bug) you gain Experience, so If you are in a battle you can gain enough experience to raise many levels I fixed that by doing this: (not increasing the EXP when the attack is 0) File: petz.php Find this code: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
#6
|
||||
|
||||
Gain EXP (to Level-up) when Feeding your pet
[i made this since many active users enjoy taking care of their pets but does not likes to fight in the arena] edit the file: /forum/profile.php find the code: Code:
$DB_site->query(" DELETE FROM " . TABLE_PREFIX . "petz_inventory WHERE ID='$itemid' "); Code:
// <GAIN EXP> if (abs($theitem[HNG]) >0) { $myaddexp= abs($theitem[HNG]/4.5) + rand(0,9); $myaddexp= round($myaddexp,0); $petz[EXP]=$petz[EXP]+$myaddexp; // Do The Levelling UP if ($petz[EXP] >= 100) { if ($petz[LVL]!=100) { $petz[LVL]=$petz[LVL]+1; } $petz[EXP]=0; $DB_site->query("UPDATE " . TABLE_PREFIX . "petz_petz SET LVL='$petz[LVL]' WHERE ID='$petz[ID]'"); } $DB_site->query("UPDATE " . TABLE_PREFIX . "petz_petz SET EXP='$petz[EXP]' WHERE ID='$petz[ID]'"); } // </GAIN EXP> |
#7
|
||||
|
||||
there is another "Cheat"....
- If you have Health potions in your inventory purchased before a battle, you can enter to your inventory (during a battle) and use the health potions whenever you want... Suggestion: if this is possible, it should be possible to show the attack option: "Use potion" if there's any present in your inventory... that would be nice/usefull |
#8
|
||||
|
||||
USE HEALTH POTIONS DURING A BATTLE
This is a small change to show the health potions you have in your inventory during a battle. You can use them at any time if you already own them (it does not counts as a regular TURN) maybe in the future i change it to counts as a battle turn and log it into the battle_log.... Edit File: petz.php Find this: Code:
eval('$petzbody = "' . fetch_template('petz_battle') . '";'); Code:
// <USE HEALTH POTIONS DURING A BATTLE MODIFICATION> // Show Health Items - PET1 $result_inventory = $DB_site->query(" SELECT * FROM " . TABLE_PREFIX . "petz_inventory WHERE UID='$pet1[OWNER]' AND EQUIP='0' "); $results = $DB_site->num_rows($result_inventory); $inventoryitems=$results; if ($results==0) { // do nothing $pet1_items ="No Potions Available"; $pet1_items_guest ="No Potions Available"; } else {$pet1_items = "Available Potions: "; $pet1_items_guest = "Available Potions: "; while ( $inventory = $DB_site->fetch_array($result_inventory)) { $result_youritem = $DB_site->query(" SELECT * FROM " . TABLE_PREFIX . "petz_items WHERE ID='$inventory[IID]' "); $youritems = $DB_site->fetch_array($result_youritem); $youritems[NAME]=stripslashes($youritems[NAME]); if ($youritems[HP]!=0) { $pet1_items .= " <A href=\"profile.php?do=doitem&id=$inventory[ID]\" target=\"_blank\"><IMG SRC=\"images/petz/items/$youritems[IMG]\" width=16 height=16 border=0 ALT=\"$youritems[NAME]: Cures $youritems[HP] HP\"></A> "; $pet1_items_guest .= " <IMG SRC=\"images/petz/items/$youritems[IMG]\" width=16 height=16 border=0 ALT=\"$youritems[NAME]: Cures $youritems[HP] HP\"> "; } } // end While } // Show Health Items - PET2 $result_inventory = $DB_site->query(" SELECT * FROM " . TABLE_PREFIX . "petz_inventory WHERE UID='$pet2[OWNER]' AND EQUIP='0' "); $results = $DB_site->num_rows($result_inventory); $inventoryitems=$results; if ($results==0) { // do nothing $pet2_items ="No Potions Available"; $pet2_items_guest ="No Potions Available"; } else {$pet2_items = "Available Potions: "; $pet2_items_guest = "Available Potions: "; while ($inventory = $DB_site->fetch_array($result_inventory)) { $result_youritem = $DB_site->query(" SELECT * FROM " . TABLE_PREFIX . "petz_items WHERE ID='$inventory[IID]' "); $youritems = $DB_site->fetch_array($result_youritem); $youritems[NAME]=stripslashes($youritems[NAME]); if ($youritems[HP]!=0) { $pet2_items .= " <A href=\"profile.php?do=doitem&id=$inventory[ID]\" target=\"_blank\"><IMG SRC=\"images/petz/items/$youritems[IMG]\" width=16 height=16 border=0 ALT=\"$youritems[NAME]: Cures $youritems[HP] HP\"></A> "; $pet2_items_guest .= " <IMG SRC=\"images/petz/items/$youritems[IMG]\" width=16 height=16 border=0 ALT=\"$youritems[NAME]: Cures $youritems[HP] HP\"> "; } } // end While } // </USE HEALTH POTIONS DURING A BATTLE MODIFICATION> eval('$petzbody = "' . fetch_template('petz_battle') . '";'); Find this: Code:
<if condition="$userid==$pet1[OWNER]"> <small> <a href="$vboptions[bburl]/petz.php?do=arena&id=2&vb=$vb&op=4" config="Attack" >Surrender</a> </small> </if> Code:
<br> <small> <if condition="$userid==$pet1[OWNER]"> $pet1_items <else /> $pet1_items_guest </if> </small> Code:
<if condition="$userid==$pet2[OWNER]"> <small> <a href="$vboptions[bburl]/petz.php?do=arena&id=2&vb=$vb&op=4" config="Attack" >Surrender</a> </small> </if> Code:
<br> <small> <if condition="$userid==$pet2[OWNER]"> $pet2_items <else /> $pet2_items_guest </if> </small> |
#9
|
|||
|
|||
seriously. you are my hero. ^_^
you have so many cool ideas. here's my question... is there any way you can pet your own pet? |
#10
|
||||
|
||||
Not directly....
but you can do this: Create a shop item that increases the pleasure of the pet (1 or 2 points) then edit the database and change the price to 1 or something cheap... you can call it "play with your pet" or whatever you want |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|