Jump to content
  • 0
FleXx

savepoint

Question

Hi Herc,

I have a House System on my Server. I added a Kafra there with a savepoint.

 

What im searching for is:

When i release the House everyone should get a new savepoint.

I got some help from someone with query sqL:

query_sql("UPDATE `char` SET `save_map`='prontera', `save_x`='156', `save_y`='191' WHERE `char_id`='"+getcharid(CHAR_ID_CHAR, getd("$house" + getarg(0) + "_user$"))+"'");

 

But this does not work. And even if it will work its only for the owner of the house who release the House.

Could anyone help me out?

 

Thank you

~cheers

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0
7 hours ago, FleXx said:

Hi Herc,

I have a House System on my Server. I added a Kafra there with a savepoint.

 

What im searching for is:

When i release the House everyone should get a new savepoint.

I got some help from someone with query sqL:

query_sql("UPDATE `char` SET `save_map`='prontera', `save_x`='156', `save_y`='191' WHERE `char_id`='"+getcharid(CHAR_ID_CHAR, getd("$house" + getarg(0) + "_user$"))+"'");

 

But this does not work. And even if it will work its only for the owner of the house who release the House.

Could anyone help me out?

 

Thank you

~cheers

 

I thought of some ways to do this, however I want to understand your script to try to do it functionally for you, first note:

*getcharid(<type>{, "<character name>"})

This function will return a unique ID number of the invoking character,
or, if a character name is specified, of that player.

Type is the kind of associated ID number required:

(0) CHAR_ID_CHAR - Character ID number.
(1) CHAR_ID_PARTY - Party ID number.
(2) CHAR_ID_GUILD - Guild ID number.
(3) CHAR_ID_ACCOUNT - Account ID number.
(4) CHAR_ID_BG - Battle ground ID
(5) CHAR_ID_CLAN - Clan ID number.


WHERE `char_id`='"+getcharid(CHAR_ID_CHAR, getd("$house" + getarg(0) + "_user$"))+"'");

At this point in his SQL query he uses the getcharid command, his sql uses 3 variables that I don't know the values:  $house, getarg(0) and _user$ in a second parameter of the getcharid call that may not even be necessary, just by char id you can do everything.

About working only for the character who releases the house, a repeating structure can be done by passing the IDs of the characters you wish to have access to, in the case of your script the sql command only runs once, using a search condition that passes the Scripting Character ID, you need to somehow get the character IDs you want and create a "for/while" for sql.

Share this post


Link to post
Share on other sites
  • 0
On 11/28/2019 at 10:53 PM, FleXx said:

Hi Herc,

I have a House System on my Server. I added a Kafra there with a savepoint.

 

What im searching for is:

When i release the House everyone should get a new savepoint.

I got some help from someone with query sqL:

query_sql("UPDATE `char` SET `save_map`='prontera', `save_x`='156', `save_y`='191' WHERE `char_id`='"+getcharid(CHAR_ID_CHAR, getd("$house" + getarg(0) + "_user$"))+"'");

 

But this does not work. And even if it will work its only for the owner of the house who release the House.

Could anyone help me out?

 

Thank you

~cheers


*savepoint("<map name>", <x>, <y>)

This command saves where the invoking character will return to upon
'return to save point', if dead or in some other cases. The two versions
are equivalent. Map name, X coordinate and Y coordinate should be
perfectly obvious. This ignores any and all map flags, and can make a
character respawn where no teleportation is otherwise possible.

	savepoint("place", 350, 75);

so use this to alter the save point of character if player is online:

savepoint("prontera", 156, 191)

 

Share this post


Link to post
Share on other sites
  • 0

Thank you for the replay guys.

 

if I use savepoint("prontera", 156, 191)

I need something like to add it to all Charakters or warp them outside if the rent is over.

Share this post


Link to post
Share on other sites
  • 0

like i said you want something of a function that does this 

 

OnPCLogin:

> Checks for house ownership

>if yes then ignore them

>if no then change their save 

Share this post


Link to post
Share on other sites
  • 0

Yeah I know. But when I do it like that.

Just the owner could save or stay.

 

im currently using it alomost like you said, but the players are disappointed because they want also to save there till the house rent is over or till the password from the house owner  gets changed.

 

im pretty sure there is a way but it’s not in my mind or I don’t have the skills to do it.

There are some Server who have this feature.

 

cheers

Share this post


Link to post
Share on other sites
  • 0

Hi.

 

Would be nice to see the script you're using to let us know how you store the IDs of chars that should have their save point changed.

 

 

~Kenpachi

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

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