summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-21 12:27:02 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-21 12:27:02 +0000
commit99ebdaf8e77e81e43d39825163837d6f4b2bc07a (patch)
tree5edaf24d7e804ab58c98897ea31e81af6277215d /src/map/script.c
parent45544327c64939d9e7ac9578cb476ff497c6c3ce (diff)
downloadhercules-99ebdaf8e77e81e43d39825163837d6f4b2bc07a.tar.gz
hercules-99ebdaf8e77e81e43d39825163837d6f4b2bc07a.tar.bz2
hercules-99ebdaf8e77e81e43d39825163837d6f4b2bc07a.tar.xz
hercules-99ebdaf8e77e81e43d39825163837d6f4b2bc07a.zip
* Updated most of map-server to 1082
* Removed my own additions for skill delays using aspd * Adapted skill_range_leniency to jA's code * Fixed drop rates only limited to multiples of 100's * Added missing code for castle_defense_rate * Removed pc_undead_nofreeze * Updated unrefineable items table * Added 3 new script commands * Added SC_SpeedUp0 * Merged itemdb_read for SQL and TXT * Removed itemdb_read_cardillustnametable limited to TXT only * Added reading itemslotcounttable.txt from the GRF to auto set number of slots per item * Added a display message when reading itemslottable from the GRF * Added options in battle_athena.conf to enable/disable reading the GRF git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@699 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c64
1 files changed, 63 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 5c6b89092..5d9d60385 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -274,6 +274,7 @@ int buildin_petloot(struct script_state *st); // pet looting [Valaris]
int buildin_petheal(struct script_state *st); // pet healing [Valaris]
int buildin_petmag(struct script_state *st); // pet magnificat [Valaris]
int buildin_petskillattack(struct script_state *st); // pet skill attacks [Valaris]
+int buildin_skilleffect(struct script_state *st); // skill effects [Celest]
int buildin_npcskilleffect(struct script_state *st); // skill effects for npcs [Valaris]
int buildin_specialeffect(struct script_state *st); // special effect script [Valaris]
int buildin_specialeffect2(struct script_state *st); // special effect script [Valaris]
@@ -292,6 +293,8 @@ int buildin_getmapxy(struct script_state *st); //get map position for player/np
int buildin_checkoption1(struct script_state *st); // [celest]
int buildin_checkoption2(struct script_state *st); // [celest]
int buildin_guildgetexp(struct script_state *st); // [celest]
+int buildin_skilluseid(struct script_state *st); // originally by Qamera [celest]
+int buildin_skillusepos(struct script_state *st); // originally by Qamera [celest]
void push_val(struct script_stack *stack,int type,int val);
int run_func(struct script_state *st);
@@ -481,6 +484,7 @@ struct {
{buildin_petheal,"petheal","iii"}, // [Valaris]
{buildin_petmag,"petmag","iiii"}, // [Valaris]
{buildin_petskillattack,"petskillattack","iiii"}, // [Valaris]
+ {buildin_skilleffect,"skilleffect","ii"}, // skill effect [Celest]
{buildin_npcskilleffect,"npcskilleffect","iiii"}, // npc skill effect [Valaris]
{buildin_specialeffect,"specialeffect","i"}, // npc skill effect [Valaris]
{buildin_specialeffect2,"specialeffect2","i"}, // skill effect on players[Valaris]
@@ -504,6 +508,9 @@ struct {
{buildin_checkoption1,"checkoption1","i"},
{buildin_checkoption2,"checkoption2","i"},
{buildin_guildgetexp,"guildgetexp","i"},
+ {buildin_skilluseid,"skilluseid","ii"}, // originally by Qamera [Celest]
+ {buildin_skilluseid,"doskill","ii"}, // since a lot of scripts would already use 'doskill'...
+ {buildin_skillusepos,"skillusepos","iiii"}, // [Celest]
{NULL,NULL,NULL},
};
int buildin_message(struct script_state *st); // [MouseJstr]
@@ -2323,7 +2330,8 @@ int buildin_getitem(struct script_state *st)
return 0;
if((flag = pc_additem(sd,&item_tmp,amount))) {
clif_additem(sd,0,0,flag);
- map_addflooritem(&item_tmp,amount,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
+ if(!pc_candrop(sd,nameid))
+ map_addflooritem(&item_tmp,amount,sd->bl.m,sd->bl.x,sd->bl.y,NULL,NULL,NULL,0);
}
}
@@ -5827,6 +5835,24 @@ int buildin_petskillattack(struct script_state *st)
return 0;
}
+
+/*==========================================
+ * Scripted skill effects [Celest]
+ *------------------------------------------
+ */
+int buildin_skilleffect(struct script_state *st)
+{
+ struct map_session_data *sd;
+
+ int skillid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ int skilllv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ sd=script_rid2sd(st);
+
+ clif_skill_nodamage(&sd->bl,&sd->bl,skillid,skilllv,1);
+
+ return 0;
+}
+
/*==========================================
* NPC skill effects [Valaris]
*------------------------------------------
@@ -6284,6 +6310,42 @@ int buildin_getmapxy(struct script_state *st){
return 0;
}
+/*=====================================================
+ * Allows players to use a skill - by Qamera
+ *-----------------------------------------------------
+ */
+int buildin_skilluseid (struct script_state *st)
+{
+ int skid,sklv;
+ struct map_session_data *sd;
+
+ skid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sklv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ sd=script_rid2sd(st);
+ skill_use_id(sd,sd->status.account_id,skid,sklv);
+
+ return 0;
+}
+
+/*=====================================================
+ * Allows players to use a skill on a position [Celest]
+ *-----------------------------------------------------
+ */
+int buildin_skillusepos(struct script_state *st)
+{
+ int skid,sklv,x,y;
+ struct map_session_data *sd;
+
+ skid=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sklv=conv_num(st,& (st->stack->stack_data[st->start+3]));
+ x=conv_num(st,& (st->stack->stack_data[st->start+4]));
+ y=conv_num(st,& (st->stack->stack_data[st->start+5]));
+
+ sd=script_rid2sd(st);
+ skill_use_pos(sd,x,y,skid,sklv);
+
+ return 0;
+}
//
// ŽÀs•”main