function SetItem($no) { if (!$no) { return false; } $this->item = $no; $this->base = substr($no, 0, 4); //アイテムの基本番号 // 精錬値 $this->refine = (int) substr($no, 4, 2); if (!$this->refine) { $this->refine = 0; } // 付加能力 $this->option0 = substr($no, 6, 3); $this->option1 = substr($no, 9, 3); $this->option2 = substr($no, 12, 3); if ($item = LoadItemData($this->base)) { $this->type = $item["type"]; } }
function ShowItemDetail($item, $amount = false, $text = false, $need = false) { if (!$item) { return false; } $html = "<img src=\"" . IMG_ICON . $item["img"] . "\" class=\"vcent\">"; // 精錬値 if ($item["refine"]) { $html .= "+{$item[refine]} "; } if ($item["AddName"]) { $html .= "{$item[AddName]} "; } $html .= "{$item[base_name]}"; // 名前 if ($item["type"]) { $html .= "<span class=\"light\"> ({$item[type]})</span>"; } if ($amount) { //数量 $html .= " x<span class=\"bold\" style=\"font-size:80%\">{$amount}</span>"; } if ($item["atk"]["0"]) { //物理攻撃 $html .= ' / <span class="dmg">Atk:' . $item[atk][0] . '</span>'; } if ($item["atk"]["1"]) { //魔法攻撃 $html .= ' / <span class="spdmg">Matk:' . $item[atk][1] . '</span>'; } if ($item["def"]) { $html .= " / <span class=\"recover\">Def:{$item[def][0]}+{$item[def][1]}</span>"; $html .= " / <span class=\"support\">Mdef:{$item[def][2]}+{$item[def][3]}</span>"; } if ($item["P_SUMMON"]) { $html .= ' / <span class="support">Summon+' . $item["P_SUMMON"] . '%</span>'; } if (isset($item["handle"])) { $html .= ' / <span class="charge">h:' . $item[handle] . '</span>'; } if ($item["option"]) { $html .= ' / <span style="font-size:80%">' . substr($item["option"], 0, -2) . "</span>"; } if ($need && $item["need"]) { $html .= " /"; foreach ($item["need"] as $M_itemNo => $M_amount) { $M_item = LoadItemData($M_itemNo); $html .= "<img src=\"" . IMG_ICON . $M_item["img"] . "\" class=\"vcent\">"; $html .= "{$M_item[base_name]}"; // 名前 $html .= " x<span class=\"bold\" style=\"font-size:80%\">{$M_amount}</span>"; if ($need["{$M_itemNo}"]) { $html .= "<span class=\"light\">(" . $need["{$M_itemNo}"] . ")</span>"; } } } if ($text) { return $html; } print $html; }
function JudgeTargetsDead(&$target) { foreach($target as $key => $char) { // 与えたダメージの差分で経験値を取得するモンスターの場合。 if(method_exists($target[$key],'HpDifferenceEXP')) { $exp += $target[$key]->HpDifferenceEXP(); } if($target[$key]->CharJudgeDead()) {//死んだかどうか // 死亡メッセージ print("<span class=\"dmg\">".$target[$key]->Name(bold)." down.</span><br />\n"); //経験値の取得 $exp += $target[$key]->DropExp(); //お金の取得 $money += $target[$key]->DropMoney(); // アイテムドロップ if($item = $target[$key]->DropItem()) { $itemdrop["$item"]++; $item = LoadItemData($item); print($char->Name("bold")." dropped"); print("<img src=\"".IMG_ICON.$item["img"]."\" class=\"vcent\"/>\n"); print("<span class=\"bold u\">{$item[name]}</span>.<br />\n"); } //召喚キャラなら消す。 if($target[$key]->summon === true) { unset($target[$key]); } // 死んだのでディレイを直す。 $this->ChangeDelay(); } } return array($exp,$money,$itemdrop);//取得する経験値を返す }
function ItemAddArticle($item, $amount, $id, $time, $StartPrice, $comment) { // 終了時刻の計算 $Now = time(); $end = $Now + round($now + 60 * 60 * $time); // 開始価格のあれ if (preg_match("/^[0-9]/", $StartPrice)) { $price = (int) $StartPrice; } else { $price = 0; } // コメント処理 $comment = str_replace("\t", "", $comment); $comment = htmlspecialchars(trim($comment), ENT_QUOTES); $comment = stripslashes($comment); // 競売品番号 $this->ArticleNo++; if (9999 < $this->ArticleNo) { $this->ArticleNo = 0; } $New = array("No" => $this->ArticleNo, "end" => $end, "price" => (int) $price, "exhibitor" => $id, "item" => $item, "amount" => (int) $amount, "TotalBid" => 0, "bidder" => NULL, "latest" => NULL, "comment" => $comment, "IP" => $_SERVER[REMOTE_ADDR]); array_unshift($this->Article, $New); $itemData = LoadItemData($item); $this->AddLog("No." . $this->ArticleNo . " に <img src=\"" . IMG_ICON . $itemData["img"] . "\"><span class=\"bold\">{$itemData[name]} x{$amount}</span>個が<span class=\"charge\">出品されました。</span>"); $this->DataChange = true; }
function AuctionItemExhibitForm() { if (!AUCTION_EXHIBIT_TOGGLE) { return false; } include CLASS_JS_ITEMLIST; $possible = CanExhibitType(); ?> <div class="u bold">如何参展</div> <ol> <li>选择一种道具,拍卖。</li> <li>如果要拍卖超过两个以上是要输入数量。</li> <li>指定拍卖的时间。</li> <li>指定起拍价(不输入的话为0)</li> <li>输入您的描述。</li> <li>发送。</li> </ol> <div class="u bold">注意事项</div> <ul> <li>拍卖要交$500的手续费。</li> <li>负责拍卖工作的人似乎不会认真帮你办事的样子</li> </ul> <a href="?menu=auction">查看所有拍卖物</a> </div> <h4>出售</h4> <div style="margin-left:20px"> <div class="u bold">可以拍卖的道具</div> <?php if (!$this->item) { print "No items<br />\n"; return false; } $ExhibitList = new JS_ItemList(); $ExhibitList->SetID("auc"); $ExhibitList->SetName("type_auc"); // JSを使用しない。 if ($this->no_JS_itemlist) { $ExhibitList->NoJS(); } foreach ($this->item as $no => $amount) { $item = LoadItemData($no); if (!$possible[$item["type"]]) { continue; } $head = '<input type="radio" name="item_no" value="' . $no . '" class="vcent">'; $head .= ShowItemDetail($item, $amount, 1) . "<br />"; $ExhibitList->AddItem($item, $head); } print $ExhibitList->GetJavaScript("list"); print $ExhibitList->ShowSelect(); ?> <form action="?menu=auction" method="post"> <div id="list"><?php print $ExhibitList->ShowDefault(); ?> </div> <table><tr><td style="text-align:right"> 数量(Amount) :</td><td><input type="text" name="Amount" class="text" style="width:60px" value="1" /><br /> </td></tr><tr><td style="text-align:right"> 时间(Time) :</td><td> <select name="ExhibitTime"> <option value="24" selected>24 hour</option> <option value="18">18 hour</option> <option value="12">12 hour</option> <option value="6">6 hour</option> <option value="3">3 hour</option> <option value="1">1 hour</option> </select> </td></tr><tr><td> 起拍价(Start Price) :</td><td><input type="text" name="StartPrice" class="text" style="width:240px" maxlength="10"><br /> </td></tr><tr><td style="text-align:right"> 描述(Comment) :</td><td> <input type="text" name="Comment" class="text" style="width:240px" maxlength="40"> </td></tr><tr><td></td><td> <input type="submit" class="btn" value="Put Auction" name="PutAuction" style="width:240px"/> <input type="hidden" name="PutAuction" value="1"> </td></tr></table> </form> <?php }
print("<img src=\"".$img_f.$item[img]."\">"); print("</td><td>\n"); print($item[name]); print("</td><td>\n"); print($item[type]); print("</td><td>\n"); print($item[atk][0]."<br />".$item[atk][1]); print("</td><td>\n"); print($item[def][0]."+".$item[def][1]."<br />".$item[def][2]."+".$item[def][3]); print("</td><td>\n"); print($item[handle]); print("</td><td>\n"); print($item[buy]); print("</td><td>\n"); print($item[sell]); print("</td></tr>\n"); if($item["need"]) { print("<tr><td colspan=\"9\" style=\"text-align:left;padding-left:50px\">\n"); foreach($item["need"] as $M_item => $M_amount) { $M = LoadItemData($M_item); print("$M[name]"); print("<img src=\"".$img_f.$M[img]."\">"); print("x".$M_amount." / \n"); } print("</td></tr>\n"); } } print("</tbody></table>"); ?> </body> </html>
function CalcEquips() { if($this->monster) return false;//mobは設定せんでいい $equip = array("weapon","shield","armor","item");//装備箇所 $this->atk = array(0,0); $this->def = array(0,0,0,0); foreach($equip as $place) { if(!$this->{$place}) continue; // 武器タイプの記憶 $item = LoadItemData($this->{$place}); if($place == "weapon") $this->WEAPON = $item["type"]; $this->atk[0] += $item[atk][0];//物理攻撃力 $this->atk[1] += $item[atk][1];//魔法〃 $this->def[0] += $item[def][0];//物理防御(÷) $this->def[1] += $item[def][1];//〃(-) $this->def[2] += $item[def][2];//魔法防御(÷) $this->def[3] += $item[def][3];//〃(-) $this->P_MAXHP += $item["P_MAXHP"]; $this->M_MAXHP += $item["M_MAXHP"]; $this->P_MAXSP += $item["P_MAXSP"]; $this->M_MAXSP += $item["M_MAXSP"]; $this->P_STR += $item["P_STR"]; $this->P_INT += $item["P_INT"]; $this->P_DEX += $item["P_DEX"]; $this->P_SPD += $item["P_SPD"]; $this->P_LUK += $item["P_LUK"]; if($item["P_SUMMON"]) $this->GetSpecial("Summon",$item["P_SUMMON"]); // 防御無視の攻撃力 if($item["P_PIERCE"]) $this->GetSpecial("Pierce",$item["P_PIERCE"]); } }
当设为前卫的时候、<br /> 战斗时敌方攻击我方后卫时、<br /> 符合设定保护方式时、<br /> 角色将替后卫承受攻击。</p> <!-- ---------------------------------------------------------------- --> <a name="equip"></a> <h4>人物装备 <a href="#content"></a></h4> <p>在人物页面是会显示当前装备及可装备的物品。</p> <p>各装备和人物都有<span class="charge">handle</span> 值、<br /> 装备和记得<span class="charge">handle</span>值、不得超过人物的<span class="charge">handle</span>值。<br /> 这是装备的限制设定。dex和级别上等的话<span class="charge">handle</span>也会随之上升。</p> <?php $sample = array(1000, 1700, 5000); foreach ($sample as $val) { include_once DATA_ITEM; ShowItemDetail(LoadItemData($val)); print "<br />\n"; } ?> <p><ul> <li><span class="dmg">Atk</span> - 物理攻击力</li> <li><span class="spdmg">Matk</span> - 魔法攻击力</li> <li><span class="recover">Def</span> - 物理防御</li> <li><span class="support">Mdef</span> - 魔法防御</li> <li><span class="charge">h:</span> - handle值</li> </ul></p> <!-- ---------------------------------------------------------------- --> <a name="skill"></a> <h4>人物技能 <a href="#content"></a></h4> <?php $sample = array(1000, 1001, 1002, 2300, 3000, 3110);
<?php include_once DATA_ITEM; ?> <div style="margin:0 15px"> <?php $ItemList = array("武器(Weapon)" => array(1000, 1100, 1700, 1800, 2000), "盾(Shield)" => array(3000, 3001, 3100, 3101), "鎧(Armor)" => array(5000, 5001, 5100, 5101, 5200, 5202), "アイテム(Item)" => array(5500, 5501), "素材(Material)" => array(6000, 6001, 6040, 6180, 6800, 7000)); foreach ($ItemList as $Type => $ItemNoArray) { print "<h4>{$Type}</h4>\n"; foreach ($ItemNoArray as $ItemNo) { $item = LoadItemData($ItemNo); ShowItemDetail($item); print "<br />\n"; } } ?> </div>
function AuctionItemExhibitForm() { if (!AUCTION_EXHIBIT_TOGGLE) { return false; } include CLASS_JS_ITEMLIST; $possible = CanExhibitType(); ?> <div class="u bold">出品方法</div> <ol> <li>出品するアイテムを選択します。</li> <li>2個以上出品する場合、数量を入力します。</li> <li>出品している時間の長さを指定します。</li> <li>開始価格を指定します(記入無し = 0)</li> <li>コメントがあれば入力します。</li> <li>送信する。</li> </ol> <div class="u bold">注意事項</div> <ul> <li>出品には 手数料として$500 必要です。</li> <li>ちゃんとうごいてくれなさそう</li> </ul> <a href="?menu=auction">一覧に戻る</a> </div> <h4>出品する</h4> <div style="margin-left:20px"> <div class="u bold">出品可能な物一覧</div> <?php if (!$this->item) { print "No items<br />\n"; return false; } $ExhibitList = new JS_ItemList(); $ExhibitList->SetID("auc"); $ExhibitList->SetName("type_auc"); // JSを使用しない。 if ($this->no_JS_itemlist) { $ExhibitList->NoJS(); } foreach ($this->item as $no => $amount) { $item = LoadItemData($no); if (!$possible[$item["type"]]) { continue; } $head = '<input type="radio" name="item_no" value="' . $no . '" class="vcent">'; $head .= ShowItemDetail($item, $amount, 1) . "<br />"; $ExhibitList->AddItem($item, $head); } print $ExhibitList->GetJavaScript("list"); print $ExhibitList->ShowSelect(); ?> <form action="?menu=auction" method="post"> <div id="list"><?php echo $ExhibitList->ShowDefault(); ?> </div> <table><tr><td style="text-align:right"> 数量(Amount) :</td><td><input type="text" name="Amount" class="text" style="width:60px" value="1" /><br /> </td></tr><tr><td style="text-align:right"> 時間(Time) :</td><td> <select name="ExhibitTime"> <option value="24" selected>24 hour</option> <option value="18">18 hour</option> <option value="12">12 hour</option> <option value="6">6 hour</option> <option value="3">3 hour</option> <option value="1">1 hour</option> </select> </td></tr><tr><td> 開始価格(Start Price) :</td><td><input type="text" name="StartPrice" class="text" style="width:240px" maxlength="10"><br /> </td></tr><tr><td style="text-align:right"> コメント(Comment) :</td><td> <input type="text" name="Comment" class="text" style="width:240px" maxlength="40"> </td></tr><tr><td></td><td> <input type="submit" class="btn" value="Put Auction" name="PutAuction" style="width:240px"/> <input type="hidden" name="PutAuction" value="1"> </td></tr></table> </form> <?php }