Jump to content
  • 0

[SQL]Deletion of character on death


Epsynus

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   1
  • Joined:  12/26/12
  • Last Seen:  

Hello there people of rAthena, I am interested in modifiying the source code so that as soon as a person dies they do not have the option of respawning but instead they get kicked out and their character get's permanently deleted. MMO on a hardcore level.

anyways I have tried to call the deletion process in char.c

int delete_char_sql(int char_id)
{
........

right in the code where they die, in pc.c

int pc_dead(struct map_session_data *sd,struct block_list *src)
{
.......

but I realized quite quickly that that won't work due to them being seperate files and not linked together, then I thought about linking them together with a simple #include buut I realized that it will break with that too! with even more errors that time around.

So if anyone has any pointers to how this could be solved please do feel free to reply

Thanks for taking your time to reply with your take on this.

Edited by Epsynus
  • Upvote 1
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   1
  • Joined:  12/26/12
  • Last Seen:  

O_O.... perma death?

Yea :P mmo on a hardcore level!

Edited by Epsynus
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  520
  • Reputation:   64
  • Joined:  11/19/11
  • Last Seen:  

Try to create a npc script w/ OnPCDieEvent: and query_sql :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   1
  • Joined:  12/26/12
  • Last Seen:  

Try to create a npc script w/ OnPCDieEvent: and query_sql :)

I was thinking of something along the lines of doing that but I am not too sure if it would work out the way I would want to.

As I am not sure about the syntax of the query_sql.

As I cooked up this concept script but the syntax is off (as a keen eye can see it is originally from a php script.. whiiiich is a tad different from the scripting engine :P) anyways if anyone has any pointers to maybe doing it with a script here is the make-shift script I made.

http://pastebin.com/YGjwsBcW

Note: I am not intending to be hand-held with this just some pointers and a little help will do fine. afterall, I'm trying to learn from it too!

note for mods: I know this is the section for source help and not for scripts. But since it was relevant I posted my script here, the main point of the topic is still about the source.

EDIT: It seems to be unable to process anything but a SELECT query. still trying to solve a source mod for it.

EDIT2: I was stupid.. I solved it.

Edited by Epsynus
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...