diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-24 22:45:32 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-08-24 22:45:32 +0000 |
commit | 9bf4c93d86a081c0c1254613d5115e8210e035ec (patch) | |
tree | 7047ed6cbdfca59eb5860e42dc9a5fbc1c9245c3 /src/map/script.c | |
parent | 2600d527592c3e5c6ed6ab827ce69c24f3c6b35b (diff) | |
download | hercules-9bf4c93d86a081c0c1254613d5115e8210e035ec.tar.gz hercules-9bf4c93d86a081c0c1254613d5115e8210e035ec.tar.bz2 hercules-9bf4c93d86a081c0c1254613d5115e8210e035ec.tar.xz hercules-9bf4c93d86a081c0c1254613d5115e8210e035ec.zip |
- Implemented Mercenary Scrolls (item_db)
- There are some little problems, like remaining time going to 0, but you can summon it, make it walk, follow you.
- Feel free to test it.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13126 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index ab75f0771..05d7a0736 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -28,6 +28,7 @@ #include "pet.h" #include "mapreg.h" #include "homunculus.h" +#include "mercenary.h" #include "intif.h" #include "skill.h" #include "status.h" @@ -12792,6 +12793,28 @@ BUILDIN_FUNC(setcell) return 0; } +/*========================================== + * Mercenary Commands + *------------------------------------------*/ +BUILDIN_FUNC(createmercenary) +{ + struct map_session_data *sd; + int class_, contract_time; + + if( (sd = script_rid2sd(st)) == NULL || sd->md || sd->status.mer_id != 0 ) + return 0; + + class_ = script_getnum(st,2); + + if( !merc_class(class_) ) + return 0; + + contract_time = script_getnum(st,3); + merc_create(sd, class_, contract_time); + + return 0; +} + /****************** Questlog script commands *******************/ @@ -13222,5 +13245,6 @@ struct script_function buildin_func[] = { BUILDIN_DEF(hasquest, "i"), BUILDIN_DEF(setwall,"siiiiis"), BUILDIN_DEF(delwall,"s"), + BUILDIN_DEF(createmercenary,"ii"), {NULL,NULL,NULL}, }; |