Commit c1aabda3 authored by Nemo Ma's avatar Nemo Ma

Update fireseedevent.func.php

Logoff 0711
parent fb7eaa32
...@@ -10,6 +10,7 @@ if(!defined('IN_GAME')) { ...@@ -10,6 +10,7 @@ if(!defined('IN_GAME')) {
//sumintensity - calculate the total intensity of a given player by adding up each of Fireseed NPC's clbstatusd with the PlayerID clbstatusc //sumintensity - calculate the total intensity of a given player by adding up each of Fireseed NPC's clbstatusd with the PlayerID clbstatusc
//repairfireseed - utility that reset a Fireseed NPC's equipment and HP. //repairfireseed - utility that reset a Fireseed NPC's equipment and HP.
//spawnfireseed - utility that spawns a Fireseed NPC at a given location pls. //spawnfireseed - utility that spawns a Fireseed NPC at a given location pls.
//movefiressed - utility that moves a Fireseed NPC to a given location pls.
function fireseedprocess($intensity){ function fireseedprocess($intensity){
# $intensity = SUM of rates of fireseed NPCs under a certain club22 player's team. # $intensity = SUM of rates of fireseed NPCs under a certain club22 player's team.
# For now, storing the owner ID of a fireseed NPC in its clbstatusc field. # For now, storing the owner ID of a fireseed NPC in its clbstatusc field.
...@@ -19,9 +20,19 @@ function fireseedprocess($intensity){ ...@@ -19,9 +20,19 @@ function fireseedprocess($intensity){
//process Fireseed auto obtain items //process Fireseed auto obtain items
# Item obtain rate = ($intensity / 20 ) %, caps at 100% # Item obtain rate = ($intensity / 20 ) %, caps at 100%
# Generate Fireseed $pls Pool
# Process Get Item - Spawning an item from pool into player's $itm0
//process Fireseed auto drain NPC HP //process Fireseed auto drain NPC HP
# NPC HP drain rate = $intensity, HP caps at 1 # NPC HP drain rate = $intensity, HP caps at 1
# NPC HP drain Logic
//Get ALL valid NPC Data that matches Fireseed $pls pool
//Calculate new $hp value of the NPCs by subtracting $hp with $intensity in a while loop
// ... do a check to ensure we don't kill off any of the NPC.
} }
function fireseedrecruit($playerID, $fireseedID){ function fireseedrecruit($playerID, $fireseedID){
...@@ -37,6 +48,9 @@ function fireseedrecruit($playerID, $fireseedID){ ...@@ -37,6 +48,9 @@ function fireseedrecruit($playerID, $fireseedID){
$brandingFireseed['clbstatusc'] = $playerID; $brandingFireseed['clbstatusc'] = $playerID;
#Init rate #Init rate
$brandingFireseed['clbstatusd'] = 1; $brandingFireseed['clbstatusd'] = 1;
#Fireseed joins dummy team
$brandingFireseed['teamID'] = $playerID. "FireSeedCrew"; //maybe generate a random string when creating club22 and use that for this.
$brandingFireseed['teampass'] = 'HerNameIsMAPLE';
#Monster Reborn that Fireseed NPC #Monster Reborn that Fireseed NPC
$brandingFireseed['hp'] = $brandingFireseed['mhp']; $brandingFireseed['hp'] = $brandingFireseed['mhp'];
...@@ -116,4 +130,48 @@ function repairfireseed($fireseedID){ ...@@ -116,4 +130,48 @@ function repairfireseed($fireseedID){
$log .= "FIRESEED $fireseedID REPAIR SUCCESSFUL.<br>"; $log .= "FIRESEED $fireseedID REPAIR SUCCESSFUL.<br>";
} }
function spawnFireseed($pls, $playerID, $intensity){
global $log, $db, $tablepre;
//Create 1 真实的火种 at given $pls location.
$db->query("INSERT INTO {$tablepre}players
(type, name, icon, hp, mhp, sp, msp, att, def, pls, lvl, money,
wep, wepk, wepe, weps, wepsk,
arb, arbk, arbe, arbs, arbsk,
arh, arhk, arhe, arhs, arhsk,
ara, arak, arae, aras, arask,
arf, arfk, arfe, arfs, arfsk,
art, artk, arte, arts, artsk,
clbstatusc, clbstatusd)
VALUES
(92, '✦真实的火种', '30', '17', '17', '23', '23', '27', '99999', $pls, '13', '250',
'✧真实之础','WF','1','50','',
'◆篝火','DB','1','1','a',
'◆埋火','DH','1','1','B',
'◆残火','DA','1','1','b',
'◆永火','DF','1','1','M',
'◆焰火','A','1','1','H',
$playerID, $intensity)");
//DEBUG
$log .= "TRUE FIRESEED ADD SUCCESSFUL.<br>";
//Assign Dummy Team,
// if ($playerID != 0){
//
// }
//DUMMY, Reserved for possible club skill.
}
function moveFireseed($fireseedID, $pls){
global $log, $db, $tablepre;
//Process moving Fireseed NPC
#Get Fireseed NPC to Move
$checkMovableFireseed = "SELECT FROM {$tablepre}players WHERE type = 92 AND pid = $fireseedID";
$movableFireseed = $db->query($checkMovableFireseed);
$movableFireseed['pls'] = $pls;
//DEBUG
$log .= "FIRESEED $fireseedID MOVED TO PLACE $pls .<br>";
}
?> ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment