From: Luca P. <lpa...@us...> - 2005-11-24 23:21:19
|
Update of /cvsroot/planeshift/planeshift/www/serverconsole/npcs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20290/serverconsole/npcs Modified Files: npc_actions.php Log Message: fixed a but in money exchange triggers. Added check for baseitemid. Index: npc_actions.php =================================================================== RCS file: /cvsroot/planeshift/planeshift/www/serverconsole/npcs/npc_actions.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** npc_actions.php 1 Nov 2005 22:53:39 -0000 1.38 --- npc_actions.php 24 Nov 2005 23:21:11 -0000 1.39 *************** *** 1025,1029 **** } ! $phrase="<l money=\"$trias,$hexas,$octas,$circles\">"; if ($itemid!="none") { $itemid = strtolower($itemid); --- 1025,1029 ---- } ! $phrase="<l money=\"$circles,$octas,$hexas,$trias\">"; if ($itemid!="none") { $itemid = strtolower($itemid); *************** *** 1150,1153 **** --- 1150,1156 ---- $trigtype = "Phrase"; $is_script = parseTriggerScript($trigger); + + $base_item_max_id = getBaseItemMax (); + if ($is_script[0] == '1'){ *************** *** 1162,1169 **** $tok4 = strtok(","); ! echo "<br>Money: trias <input type=text name=trias size=5 value=$tok1>, hexas <input type=text name=hexas size=5 value=$tok2>"; ! echo "octas <input type=text name=octas size=5 value=$tok3>, circles <input type=text name=circles size=5 value=$tok4><br>"; ! $query = 'select id, item_type, name, flags from item_stats order by item_type, name'; $result = mysql_query2($query); --- 1165,1172 ---- $tok4 = strtok(","); ! echo "<br>Money: trias <input type=text name=trias size=5 value=$tok4>, hexas <input type=text name=hexas size=5 value=$tok3>"; ! echo "octas <input type=text name=octas size=5 value=$tok2>, circles <input type=text name=circles size=5 value=$tok1><br>"; ! $query = 'select id, item_type, name, flags from item_stats where id<'.$base_item_max_id.' order by item_type, name'; $result = mysql_query2($query); *************** *** 1182,1186 **** echo "<TR><TD><b>OR</b></TD></TR>"; ! $query = 'select id, item_type, name, flags from item_stats order by item_type, name'; $result = mysql_query2($query); --- 1185,1189 ---- echo "<TR><TD><b>OR</b></TD></TR>"; ! $query = 'select id, item_type, name, flags from item_stats where id<'.$base_item_max_id.' order by item_type, name'; $result = mysql_query2($query); |