Jump to content
  • 0

moving speed problem


emo182

Question


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

i have 2 items with same effect

- a weapon, ex:knife,sword,etc { bonus bSpeedRate,50;}

- a headgear, ex:ifrit mask,poring hat,etc { bonus bSpeedRate,50;}

i tried both, but the effect is different.

can someone explain that please ?

and how to check movement speed variable ? (or variable name)

sorry for my bad english >.<

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Very easy, edit your atcommand.c, search for:

sprintf(atcmd_output, "Please, enter a speed value (usage: @speed <%d-%d>).", MIN_WALK_SPEED, MAX_WALK_SPEED);

Change into:

sprintf(atcmd_output, "Current speed: %d.", sd->base_status.speed);

Recompile your server, use '@speed', problem solved... /no1

(Don't forget to press the rep_up.png button if it works :P)

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

Very easy, edit your atcommand.c, search for:

sprintf(atcmd_output, "Please, enter a speed value (usage: @speed <%d-%d>).", MIN_WALK_SPEED, MAX_WALK_SPEED);

Change into:

sprintf(atcmd_output, "Current speed: %d.", sd->base_status.speed);

Recompile your server, use '@speed', problem solved... /no1

(Don't forget to press the rep_up.png button if it works :P)

thanks...

i will try it later...

edit:

@nanakiwurtz

it's not working.

if i change speed with command @speed (@speed 100) , value of sd->base_status.speed is changed to 100

but if it's change from { bonus bspeedrate effect }, value of sd->base_status.speed is not changed.

do u have another solution ?

Edited by emo182
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

@speed is used to alter your speed...not check your speed....

nanakiwurtz do it in a wrong place.....

perhap ycan try this...

add a new command...

ACMD_FUNC(checkspeed)
{
nullpo_retr(-1, sd);
sprintf(atcmd_output, "Current Movement Speed : %d", sd->base_status.speed);
clif_displaymessage(fd, atcmd_output);
return 0;
}

and this at below part..

ACMD_DEF(checkspeed)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Oh I thought you only need the base value of char speed, if that's the case, then we need to calculate base speed & bonus speed (from item/cards).

if (!message || !*message || sscanf(message, "%d", &speed) < 1) {
sprintf(atcmd_output, "Current speed: %d.", (sd->base_status.speed)+(sd->bonus.speed_rate));
clif_displaymessage(fd, atcmd_output);
return -1;
}

Recompile your server and voila! Your actual speed (+item effect is now working)

Remember, smaller means faster walking.

@speed is used to alter your speed...not check your speed....

nanakiwurtz do it in a wrong place.....

@Emistry: I use '@speed' with a blank value, so it will return -1, it means I didn't change the speed, I only read the value from 'base_status.speed' /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  21
  • Reputation:   0
  • Joined:  11/26/11
  • Last Seen:  

yeah, it's work with bonus bspeedrate effect now.

but it's not show total value of current speed.

i was try with speed potion, windwalk skill, cart boost and increase agility skill.

speed value not affected by them.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

I think I found an explanation for this, it's the official behavior, thanks malufett :)

Link to comment
Share on other sites

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.

×
×
  • Create New...