summaryrefslogtreecommitdiff
path: root/npc/functions/hub.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions/hub.txt')
-rw-r--r--npc/functions/hub.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 528473584..3c5fd8425 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -245,3 +245,52 @@ function script HUB_SkillInvoke {
return;
}
+
+
+
+
+
+// HUB_PvP ( ) - killedrid must be set
+function script HUB_PvP {
+ // Update global PK count
+ $PLAYERS_KILLED+=1;
+
+ // Prepare local variables
+ .@atk=get_BR(getcharid(3));
+ .@def=get_BR(killedrid);
+ .@m$=getmap();
+
+ // TODO: Start using readparam2() to read if the opponent was worthy
+ // That is, read total attack, defense, HP, evasion and hit chance
+ // And compare with your own readparam2(), then use a % and a table
+ // based on your (assassin's) level.
+ .@bxp=readparam(BaseLevel, killedrid);
+ .@jxp=readparam(JobLevel, killedrid);
+ if (compare(.@m$, "001-8")) {
+ // Quirino Voraz PVP Arena
+ // You get 5 times killed player level, and 1 time job level
+ getexp .@bxp*5, .@jxp;
+ } else if (compare(.@m$, "ARENA") || compare(.@m$, "003-13")) {
+ // Tulimshar Duel Arena
+ // You get 3 times killed player level, and 2 times job level
+ getexp .@bxp*3, .@jxp*2;
+ } else if (compare(.@m$, "001-10")) {
+ // Call Of Dusty
+ // You get 3 times killed player level, and 3 times job level
+ getexp .@bxp*3, .@jxp*3;
+ } else if (compare(.@m$, "001-10-1")) {
+ // Call Of Dusty Boss Room
+ // You _may_ get a Bottled Dusty at random, but dead player status affect
+ .@bagistr=(readparam2(bAgi, killedrid)*2)+readparam2(bDex, killedrid);
+ //.@b2=readparam(MaxHp, killedrid);
+ if (.@bagistr > 20)
+ if (rand2(0,250) < readparam2(bLuk)+readparam2(bLuk, killedrid))
+ getitem BottledDust, any(1,1,2);
+ } else {
+ // Anywhere else
+ // You get 0.5 times killed player level, and 0 times job level
+ getexp (.@bxp/2), 0;
+ }
+ return;
+}
+