summaryrefslogtreecommitdiff
path: root/world/map/npc/functions
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2019-07-29 14:15:06 -0400
committergumi <git@gumi.ca>2020-03-08 16:06:35 -0400
commit6e4491532daf12607093ad493a070f78aa7756d9 (patch)
tree18b226822fef5bd0eec661ce2c0eb8a15b782324 /world/map/npc/functions
parent0b3c98ddcce3b7c306c3416ffa54cc65c0806975 (diff)
downloadserverdata-6e4491532daf12607093ad493a070f78aa7756d9.tar.gz
serverdata-6e4491532daf12607093ad493a070f78aa7756d9.tar.bz2
serverdata-6e4491532daf12607093ad493a070f78aa7756d9.tar.xz
serverdata-6e4491532daf12607093ad493a070f78aa7756d9.zip
hardcore server
Diffstat (limited to 'world/map/npc/functions')
-rw-r--r--world/map/npc/functions/death.txt63
-rw-r--r--world/map/npc/functions/ghost.txt11
-rw-r--r--world/map/npc/functions/global_event_handler.txt3
3 files changed, 66 insertions, 11 deletions
diff --git a/world/map/npc/functions/death.txt b/world/map/npc/functions/death.txt
new file mode 100644
index 00000000..5818f315
--- /dev/null
+++ b/world/map/npc/functions/death.txt
@@ -0,0 +1,63 @@
+function|script|WarpToHell
+{
+ setarray @death_points[0], 35,63, 36,63, 55,34, 56,34;
+ set @point, rand(4) * 2;
+ warp "070-3", @death_points[@point], @death_points[@point + 1];
+ return;
+}
+
+function|script|CheckDeath
+{
+ if (getmap() != "070-3" && PC_DIE_COUNTER == 0) goto L_Return;
+ message strcharinfo(0), "Server : You are dead. Forever.";
+ if (getmap() == "070-3") goto L_Return;
+ callfunc "WarpToHell";
+ return;
+
+L_Return:
+ return;
+}
+
+function|script|HardKill
+{
+ if (getmap(@victimrid) == "070-3") goto L_Return;
+ announce strcharinfo(0) + " has brutally murdered " + strcharinfo(0, @victimrid) + " %%e", 0;
+ set Zeny, Zeny + get(Zeny, @victimrid); // loot them
+ getexp get(BaseExp, @victimrid), get(JobExp, @victimrid); // steal their exp
+ set @killed, 1, @victimrid;
+ return;
+
+L_Return:
+ return;
+}
+
+function|script|HardDeath
+{
+ if (getmap() == "070-3") goto L_Return;
+ getinventorylist;
+ set @item_it, 0;
+ freeloop 1;
+ goto L_Drop; // drop all items
+
+L_Drop:
+ makeitem @inventorylist_id[@item_it], @inventorylist_amount[@item_it], getmap(), POS_X + rand(-2, 2), POS_Y + rand(-2, 2);
+ set @item_it, @item_it + 1;
+ if (@item_it >= @inventorylist_count) goto L_Getstuff;
+ goto L_Drop;
+
+L_Getstuff:
+ if (@killed) goto L_Warp;
+ announce strcharinfo(0) + " has died %%S", 0;
+ makeitem "CasinoCoins", Zeny / 10, getmap(), POS_X + rand(-2, 2), POS_Y + rand(-2, 2);
+ goto L_Warp;
+
+L_Warp:
+ freeloop 0;
+ set @killed, 0;
+ set @item_it, 0;
+ callfunc "WarpToHell";
+ return;
+
+L_Return:
+ return;
+}
diff --git a/world/map/npc/functions/ghost.txt b/world/map/npc/functions/ghost.txt
index 921b8b79..f020092f 100644
--- a/world/map/npc/functions/ghost.txt
+++ b/world/map/npc/functions/ghost.txt
@@ -3,17 +3,6 @@ function|script|SpawnGhost
if ($GHOSTS_DISABLED)
goto L_Return;
- if (BaseLevel >= 40 &&
- (getmap() == "026-1" ||
- getmap() == "027-1" ||
- getmap() == "027-2" ||
- getmap() == "027-3" ||
- getmap() == "027-4" ||
- getmap() == "027-5"))
- goto L_Spawn;
- return;
-
-L_Spawn:
set .@x, POS_X;
set .@y, POS_Y;
diff --git a/world/map/npc/functions/global_event_handler.txt b/world/map/npc/functions/global_event_handler.txt
index fe87b380..01d01e62 100644
--- a/world/map/npc/functions/global_event_handler.txt
+++ b/world/map/npc/functions/global_event_handler.txt
@@ -16,12 +16,14 @@ OnPCLoginEvent:
addtimer 0, "Magic Timer::OnLogin"; // prevent cast rate abuse
callfunc "MaybeGiveBirthday";
callfunc "MiriamExpire"; // force the speed skill quest to expire
+ callfunc "CheckDeath";
// add more here
set @login_event, 2;
end;
OnPCKillEvent:
callfunc "elanore_decrease_exp"; // decrease heal exp for doing bad things
+ callfunc "HardKill";
end;
OnMobKillEvent:
@@ -33,6 +35,7 @@ OnPCDieEvent:
addtimer 0, "Magic Timer::OnClear"; // reset magic block on death
callfunc "SpawnGhost";
callfunc "MiriamExpire"; // force the speed skill quest to expire
+ callfunc "HardDeath";
set @killerrid, 0; // reset killer rid
end;