Jump to content
Euphy

Sit/Stand commands

Recommended Posts

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

@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

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

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

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

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

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

@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



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.