Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
phpdts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
phpdts
Commits
c1aabda3
Commit
c1aabda3
authored
Jul 11, 2023
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update fireseedevent.func.php
Logoff 0711
parent
fb7eaa32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
include/game/fireseedevent.func.php
include/game/fireseedevent.func.php
+58
-0
No files found.
include/game/fireseedevent.func.php
View file @
c1aabda3
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment