Jump to content

Sit/Stand commands


Euphy

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

These would be good to have. :>

Objections?

Code from Freya: https://ookoo.org/svn/freya/trunk/src/map/script.c

/*==========================================
* sit - Makes a player sit
*------------------------------------------
*/
int buildin_sit(struct script_state *st)
{
   struct map_session_data *sd = script_rid2sd(st);

   if (sd)
   {
       // Sit down
       pc_setsit(sd);
       clif_sitting(sd);
   }
   return 0;
}

/*==========================================
* stand - Makes a player stand
*------------------------------------------
*/
int buildin_stand(struct script_state *st)
{
   struct map_session_data *sd = script_rid2sd(st);

   if (sd)
   {
       // Stand up
       pc_setstand(sd);
       clif_standing(sd);
   }
   return 0;
}

Link to comment
Share on other sites


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

For some reason all I could think of with this was playing Musical Chairs.

Are there NPCs that make player sit/stand?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

(If we decide to add this,) should the sit script command do unit_stop_walking first?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@Aleos: No, this would only be custom. It's not very much code, so I thought, "why not?" xD.

@Brian: Oh, I didn't see that! Yeah, that looks much better.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

lol !

if this one going to add, then why not also add issit() script command ? xD

if ( issit() ) stand; else sit;

something like this

probably going to be useful in certain event scripts

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   13
  • Joined:  06/20/12
  • Last Seen:  

and @sitall as well :)

(Sit everyone on map)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

and @sitall as well :)

That would be easy to write a script/mod for, but not really needed in the SVN. XD

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  135
  • Reputation:   13
  • Joined:  06/20/12
  • Last Seen:  

Sit/Stand isn't needed too if you analize o.O

They're all extra 'tools' to make the adm's life easier haha

@sitall is very good for event organizing, I already have this command on my server xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

guess we can add those but in something more general to not but overflowed with more and more npc command, trying to regroup them with topic.

Beside that for issit isstand I think it's better to use the readparameter, (like weight, baseclass and such) wich allow to know the value directly in script.

(from what I got this function is just made to know player info so would be better to continue there then to create new one)

  • Upvote 1
Link to comment
Share on other sites

  • 2 months later...

  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

If people approve I'll apply it.

 

If anyone has any other suggestions, shoot. :)

sitting.patch

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Looks great mate. On a side note, shouldn't const.txt be updated with those new SP_*? it is just painful to read scripts with just numbers not knowing what that number pertains to(dunno if it is just me). :)

Link to comment
Share on other sites


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

Yeah I was thinking of giving it a value in the const but as you can see there are a few that don't exist. I didn't want to label it bSitting either since it's not really a bonus which in my reasoning is why many things aren't defined there (Like killedrid, killerrid, etc). I lied, I just noticed they are labeled above the rest of the statuses.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

@Aleos: Looks good, but why did you write 'script_pushint'?

Here's some documentation:

script_commands.txt.patch

@clydelion: I agree, but they're not used in very many scripts; it seems like a good idea, though. Would you like to do it?

Link to comment
Share on other sites


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

Sorry, the pushint was a copy-pasta mistake. :)



Applied in r17174.

Link to comment
Share on other sites

×
×
  • Create New...