summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-06 07:39:10 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-06 07:39:10 +0000
commit759691f121b3af537b04a10267bada2aa8655e9c (patch)
tree05fac1e0e1854b8d084525cc72bc46863b84f9fb /src/map/script.c
parent7572f8b6cc524460a49049d166fcb2e37e4f448f (diff)
downloadhercules-759691f121b3af537b04a10267bada2aa8655e9c.tar.gz
hercules-759691f121b3af537b04a10267bada2aa8655e9c.tar.bz2
hercules-759691f121b3af537b04a10267bada2aa8655e9c.tar.xz
hercules-759691f121b3af537b04a10267bada2aa8655e9c.zip
* Updated Chase Walk
* Added 'checkoption2' and 'checkoption3' script functions git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@472 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index f198d42fe..6a6b0c932 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -289,6 +289,8 @@ int buildin_npcspeed(struct script_state *st); // [Valaris]
int buildin_npcwalkto(struct script_state *st); // [Valaris]
int buildin_npcstop(struct script_state *st); // [Valaris]
int buildin_getmapxy(struct script_state *st); //get map position for player/npc/pet/mob by Lorky [Lupus]
+int buildin_checkoption2(struct script_state *st); // [celest]
+int buildin_checkoption3(struct script_state *st); // [celest]
void push_val(struct script_stack *stack,int type,int val);
@@ -499,6 +501,8 @@ struct {
{buildin_npcwalkto,"npcwalkto","ii"}, // [Valaris]
{buildin_npcstop,"npcstop",""}, // [Valaris]
{buildin_getmapxy,"getmapxy","siii*"}, //by Lorky [Lupus]
+ {buildin_checkoption2,"checkoption2","i"},
+ {buildin_checkoption3,"checkoption3","i"},
{NULL,NULL,NULL},
};
int buildin_message(struct script_state *st); // [MouseJstr]
@@ -3299,6 +3303,46 @@ int buildin_checkoption(struct script_state *st)
return 0;
}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_checkoption2(struct script_state *st)
+{
+ int type;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+
+ if(sd->opt2 & type){
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+
+ return 0;
+}
+/*==========================================
+ *
+ *------------------------------------------
+ */
+int buildin_checkoption3(struct script_state *st)
+{
+ int type;
+ struct map_session_data *sd;
+
+ type=conv_num(st,& (st->stack->stack_data[st->start+2]));
+ sd=script_rid2sd(st);
+
+ if(sd->opt3 & type){
+ push_val(st->stack,C_INT,1);
+ } else {
+ push_val(st->stack,C_INT,0);
+ }
+
+ return 0;
+}
/*==========================================
*