PHPXRef 0.7 : NEABExplorer : /object_type_code/equip_ring.php source
[ Index ]
PHP Cross Reference of NEABExplorer
if (gwGetCookie('xrefnav')=='off')
document.write('[ Show Explorer ]');
else
document.write('[ Hide Explorer ]');
[ Show Explorer ]
[ Hide Navbar ]
titleBody[close]
/object_type_code/ -> equip_ring.php (source)
[Summary view]
[Print]
[Text view]
1 <?PHP
2 /**
3 * Code used when a player equips a ring.
4 */
5
6 $info=object_info($id);
7 if(inventory_check($id) > 0)
8 {
9 if($uservals["RING1"]+0 != 0 && $uservals["RING2"]+0 != 0)
10 {
11 echo "<BR><DIV ALIGN=CENTER><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2 BGCOLOR=#A00000>";
12 echo "<TR><TH><B><FONT COLOR=#FFFFFF>Result</FONT></B></TH></TR>\n";
13 echo "<TR><TD BGCOLOR=#E0E0E0>";
14 echo "You cannot equip more rings !\n";
15 echo "</TD></TR></TABLE></DIV><BR>\n";
16 }
17 else
18 {
19 $uservals["ATTACK"]+=$info["ATTACK"];
20 $uservals["PROTECTION"]+=$info["PROTECTION"];
21 $uservals["DEXMOD"]+=$info["DEXTERITY"];
22 $uservals["STRMOD"]+=$info["STRONGNESS"];
23 $uservals["CHAMOD"]+=$info["CHARISMA"];
24 $uservals["INTMOD"]+=$info["INTELLIGENCE"];
25 $uservals["BLOCK"]+=$info["BLOCK"];
26 $uservals["HPMOD"]+=$info["HP"];
27 $uservals["MPMOD"]+=$info["MP"];
28
29 if(($uservals["HP"]+0) > ($uservals["HPMOD"]+$uservals["MAXHP"]))
30 $uservals["HP"]=$uservals["HPMOD"]+$uservals["MAXHP"];
31
32 if(($uservals["MP"]+0) > ($uservals["MPMOD"]+$uservals["MAXMP"]))
33 $uservals["MP"]=$uservals["MPMOD"]+$uservals["MAXMP"];
34
35 if($uservals["RING1"]+0 == 0)
36 $uservals["RING1"]=$id;
37 else if($uservals["RING2"]+0 == 0)
38 $uservals["RING2"]=$id;
39
40 $db->Execute("UPDATE PLAYER SET ATTACK={$uservals['ATTACK']}, PROTECTION={$uservals['PROTECTION']},
41 DEXMOD={$uservals['DEXMOD']}, STRMOD={$uservals['STRMOD']}, CHAMOD={$uservals['CHAMOD']},
42 INTMOD={$uservals['INTMOD']}, HPMOD={$uservals['HPMOD']}, MPMOD={$uservals['MPMOD']},
43 HP={$uservals['HP']}, MP={$uservals['MP']}, BLOCK={$uservals['BLOCK']},
44 RING1={$uservals['RING1']},RING2={$uservals['RING2']} WHERE ID=$userid");
45
46 inventory_add($id,-1);
47
48 echo "<BR><DIV ALIGN=CENTER><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2 BGCOLOR=#00A000>";
49 echo "<TR><TH><B><FONT COLOR=#FFFFFF>Result</FONT></B></TH></TR>\n";
50 echo "<TR><TD BGCOLOR=#E0E0E0>";
51 echo "You equipped your ".$info["NAME"]." successfully.\n";
52 echo "</TD></TR></TABLE></DIV><BR>\n";
53 }
54 }
55 ?>
FUNC_DATA={
'inventory_add': ['inventory_add', 'Adds an item to the inventory. (no message) ', [['libs','objects_util.php',359]], 49],
'inventory_check': ['inventory_check', 'Checks if the player have this item. ', [['libs','objects_util.php',425]], 44],
'execute': ['execute', '', [['libs','db_conn_5.php',37],['libs','db_conn_4.php',37]], 652],
'object_info': ['object_info', 'Retreive the information about an object. ', [['libs','objects_util.php',457]], 20]};
CLASS_DATA={
};
CONST_DATA={
};
titleDescriptionBody
titleDescriptionBody
titleDescriptionBody
titleBody
Generated: Sun Jul 8 18:11:25 2007
Cross-referenced by PHPXref 0.7
Wyszukiwarka
Podobne podstrony:
equip ringequip ringequip shieldthree axis ring plot kiodane jan27Beyoncé Single ladies (Put a ring on it)equip armortoken ring 3 6rl5faenidlemor5ydzvykagrrwoxbl4jwrxs7y 6rl5faenidlemor5ydzvykagrrwoxbl4jwrxs7yBronze Signet Ringtoken ring zkvitl2vd5ubrwvzjrajzjtxnhq46vd3mavwomi zkvitl2vd5ubrwvzjrajzjtxnhq46vd3mavwomiRing [alternatywna solucja]Lost Souls The Promise RingHaggard, H Rider Queen Sheba s Ringringbead&button peeking pearls ring and earringsQuick Start LotR War of the Ringwięcej podobnych podstron