![]() |
|
Addon MAX SITE REBORN SYSTEM - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Website Scripting & Security (https://lckb.dev/forum/forumdisplay.php?fid=197) +---- Forum: Website Releases (https://lckb.dev/forum/forumdisplay.php?fid=135) +----- Forum: Ep1 Websites (https://lckb.dev/forum/forumdisplay.php?fid=185) +----- Thread: Addon MAX SITE REBORN SYSTEM (/showthread.php?tid=585) |
- roseon - 01-04-2012 This script will work on MaX Entertament No purchased MaX Site fail to use my script Buy 2 2 $playerz = $_POST[Name]; mysql_select_db( $SiteSQL["config-database_db"] , $Site_sqlcon) or die( mysql_error() ); $chars_info = mysql_query("SELECT a_index, a_user_index, a_name, a_level, a_max_hp, a_str, a_dex, a_int, a_con, a_teach_complete, a_job, a_job2, a_reborn, a_exp, a_statpt_remain FROM t_characters WHERE a_name = $playerz"); $r = 1; $t = 1; while( $row = mysql_fetch_array( $chars_info ) ) { if (($row[a_level] >= 150) && ($row[a_reborn] < 5)) { $doreborn = mysql_query("UPDATE t_characters SET a_level=1, a_exp=0, a_reborn=(a_reborn+1),a_statpt_remain=(a_statpt_remain+250) WHERE a_name =".$row[a_name]." AND a_name = $playerz"); $rest = substr($row[a_index], -1); echo " Reborn Success"; } else { echo " Not meeting requirements"; } $r++; $t++; } ?> - donwon - 01-04-2012 I dont kno if im posting this in the right place but how do i add this to my site - Jaynno - 01-04-2012 you forgot to say to ppl to add a column in t_characters called a_reborn with default 0 otherwise it will fail. aight put the file reborn.php in your main folder and change those field : [ATTACH=CONFIG]718[/ATTACH] and in your template folder, change index.tlp. change the char block with this one : {Name} {Level} - roseon - 01-05-2012 yea i just dint want to add our server web script - Jaynno - 01-05-2012 i have just left the minimum, icon, name and lvl. The rest is not there. - Sutz - 01-06-2012 Ok I have used this an made it better, added to my next update release coming soon. Options added to enable or disable the reborn system, set the char level needed for reborn and set the allowed amount of reborns per char all in the site setting. - Jaynno - 01-06-2012 i was trying to add a cash system like 10mil per reborn but item are stored in 10 different table, and in 5 different column. That make a lot of union of table and a lot of possibilities. - Sutz - 01-06-2012 why not add a reborn npc that sells a reborn ticket ![]() Then just use this to find the item: $userid = $User->ID; $end = substr("$userid", -1); $table="t_inven0".$end; $sql = "SELECT * FROM ".$table." WHERE a_item_idx0 = your ticket index OR a_item_idx1 = your ticket index OR a_item_idx2 = your ticket index OR a_item_idx3 = your ticket index OR a_item_idx4 = your ticket index "; That code could be wrong or there will be a better way to do the $sql im not pro php scripter ![]() - Jaynno - 01-06-2012 yes, that could be done. NPC sell a ticket that price of the reborn, then when you reborn, the item is deleted. But have no cash issue is ok too ;p - SibaN - 02-12-2012 pls any one help me how i add reborn at max hompage and i click at buy lc cash i dont see any think pls what i do |