Jump to content
  • 0

how to disable @warp and @go command when you are at sleep status?


Question

Posted

how can i disable using @warp and @go command if you are under status of trickdead?

 

the novice can use Trick Dead skill and they can use @warp and @go commands.i just want to disable it. they should be back to normal status to use the @warp and @go commands. thanks in advance.

3 answers to this question

Recommended Posts

  • 1
Posted

You need just to add simple checking

ACMD_FUNC(go)
{
	int i;
	int town;
	char map_name[MAP_NAME_LENGTH];
	int16 m;
+	struct status_change *sc;

..........
	nullpo_retr(-1, sd);

+	sc = status_get_sc(sd);
+
+	if (sc->data[SC_TRICKDEAD]) {
+		clif_displaymessage(sd->fd,"You can't use this command under Trick Dead effect");
+		return 0;
+	}

similarly with @warp

 

Error 1 error C2065: 'sc'

sc = status_get_sc(sd);

if (sc->data[sC_TRICKDEAD]) {

Error 5 error C2223: left of '->data' must point to struct/union

if (sc->data[sC_TRICKDEAD]) {

 

i got these error

by the way problem solve.

 

just remove the sc = status_get_sc(sd);

 

and simply change the 

 

if (sc->data[sC_TRICKDEAD])

to

if (sd->sc.data[sC_TRICKDEAD])

 

thanks for showing how it works.

  • Upvote 1
Posted

You need just to add simple checking

ACMD_FUNC(go)

{

int i;

int town;

char map_name[MAP_NAME_LENGTH];

int16 m;

+ struct status_change *sc;

..........

nullpo_retr(-1, sd);

+ sc = status_get_sc(sd);

+

+ if (sc->data[SC_TRICKDEAD]) {

+ clif_displaymessage(sd->fd,"You can't use this command under Trick Dead effect");

+ return 0;

+ }

similarly with @warp

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...