summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-29 20:51:07 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-29 20:51:07 +0000
commit085ec7da7865711d855bb4664afc7a4b820ce37c (patch)
tree1e7689fef3143c9a76e55254181d1dc9bd2efd56 /src/map/script.c
parent571ce8ac8aed5b8373cdb722cc54589e28f4c4b1 (diff)
downloadhercules-085ec7da7865711d855bb4664afc7a4b820ce37c.tar.gz
hercules-085ec7da7865711d855bb4664afc7a4b820ce37c.tar.bz2
hercules-085ec7da7865711d855bb4664afc7a4b820ce37c.tar.xz
hercules-085ec7da7865711d855bb4664afc7a4b820ce37c.zip
- pc_resetskill flag can now be &2, it only returns the total amount of skill points spent, it doesn't does a reset.
- added script command skillpointcount. Returns total amount of skill points a char has (the value returned is the same that SkillPoint would have after invoking a skill reset) - Modified Defender. Speed reduction is 35-5*lv%, damage reduction on devoted chars is 5+5*lv%. These values are custom, but should be closer to "reality" than what we have. - When you have the wrong ammo type equipped, the equip arrows first message will be sent, as suggested by Haplo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6384 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 145b09ea6..99f8269f0 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -271,6 +271,7 @@ int buildin_birthpet(struct script_state *st);
int buildin_resetlvl(struct script_state *st);
int buildin_resetstatus(struct script_state *st);
int buildin_resetskill(struct script_state *st);
+int buildin_skillpointcount(struct script_state *st);
int buildin_changebase(struct script_state *st);
int buildin_changesex(struct script_state *st);
int buildin_waitingroom(struct script_state *st);
@@ -594,6 +595,7 @@ struct {
{buildin_resetlvl,"resetlvl","i"},
{buildin_resetstatus,"resetstatus",""},
{buildin_resetskill,"resetskill",""},
+ {buildin_skillpointcount,"skillpointcount",""},
{buildin_changebase,"changebase","i"},
{buildin_changesex,"changesex",""},
{buildin_waitingroom,"waitingroom","si*"},
@@ -6322,6 +6324,18 @@ int buildin_resetskill(struct script_state *st)
}
/*==========================================
+ * Counts total amount of skill points.
+ *------------------------------------------
+ */
+int buildin_skillpointcount(struct script_state *st)
+{
+ struct map_session_data *sd;
+ sd=script_rid2sd(st);
+ push_val(st->stack,C_INT,sd->status.skill_point + pc_resetskill(sd,2));
+ return 0;
+}
+
+/*==========================================
*
*------------------------------------------
*/