Skip to content

Commit

Permalink
Update script.c
Browse files Browse the repository at this point in the history
- Update instance_enter
  • Loading branch information
CairoLee committed Feb 23, 2014
1 parent f20e541 commit d068dff
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions src/map/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -16901,28 +16901,11 @@ BUILDIN_FUNC(instance_enter)
{
struct map_session_data *sd;

if((sd = script_rid2sd(st)) != NULL)
script_pushint(st,instance_enter(sd,script_getstr(st, 2)));
else
return 1;
return SCRIPT_CMD_SUCCESS;

}

/*==========================================
* Warps player to instance at the specified coordinates [CairoLee]
* Results:
* 0: Success
* 1: Character not in party
* 2: Party doesn't have instance
* 3: Other errors (instance not in DB, instance doesn't match with party, etc.)
*------------------------------------------*/
BUILDIN_FUNC(instance_enter2)
{
struct map_session_data *sd;

if((sd = script_rid2sd(st)) != NULL){
script_pushint(st,instance_enter_position(sd,script_getstr(st, 2),script_getnum(st, 3),script_getnum(st, 4)));
if (script_hasdata(st,3) && script_hasdata(st,4))
script_pushint(st,instance_enter_position(sd,script_getstr(st, 2),script_getnum(st, 3),script_getnum(st, 4)));
else
script_pushint(st,instance_enter(sd,script_getstr(st, 2)));
}
else
return 1;
Expand Down

0 comments on commit d068dff

Please sign in to comment.