Jump to content

Question

Posted

Vengeance made me this custom commands...the problem is this...

when i try to type it...

it only show this

"You have now been warped to the Mall"

but nothing happens, i stay in the place where i am.

ACMD_FUNC(mall)
{
nullpo_retr(-1, sd);

pc_setpos(sd, "force_3-2", 19, 177, CLR_TELEPORT);
clif_displaymessage(fd, "You have now been warped to the Mall");
return 0;
}

{ "mall",				10,10,	 atcommand_mall },

7 answers to this question

Recommended Posts

  • 0
Posted

well, this is my way to create this type of stuffs..xD

/*-----------*
* @mall
*-----------*/
int atcommand_mall(const int fd, struct map_session_data *sd, const char *command, const char *message)
{
nullpo_retr(-1,sd);
npc_event(sd,"Mall::OnWarp",0);
return 0;
}

then create this NPC script

- script Mall -1,{
OnWarp:
message strcharinfo(0),"You have been warped to Mall.";
warp "mapname",0,0;
end;
}

  • 0
Posted (edited)

/*-----------*
* @Custom
*-----------*/
int atcommand_Custom(const int fd, struct map_session_data *sd, const char *command, const char *message)
{
nullpo_retr(-1,sd);
npc_event(sd,"Custom::OnCustom",0);
return 0;
}

- script Custom -1,{
OnCustom:
<content>
end;
}

change every single Custom that i write in above

basically, this command just run the specific part / Label of NPC script you have mentioned in the SRC there

Edited by Emistry
  • 0
Posted

/*-----------*
* @Custom
*-----------*/
int atcommand_Custom(const int fd, struct map_session_data *sd, const char *command, const char *message)
{
nullpo_retr(-1,sd);
npc_event(sd,"Custom::OnCustom",0);
return 0;
}

- script Custom -1,{
OnCustom:
<content>
end;
}

change every single Custom that i write in above

basically, this command just run the specific part / Label of NPC script you have mentioned in the SRC there

int_atcommand is OLD one

use ACMD_FUNC()

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...