Jump to content
  • 0

save point


maynard

Question


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

A NPC that save his respawn point but random.

sample:

prontera 50 50

prontera 60 60

prontera 70 70

prontera 80 80

prontera 90 90

He will respawn randomly in that 5 save point when been killed and return to save point.

edit>>> A npc that save the player respawn point random......the player will respawn in that 5 location randomly.

Edited by maynard
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


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

Maybe a better way would be OnPCDieEvent --> randomize their savepoint (if they save on the map "prontera").

OnPCDieEvent:
   setarray .x[0], 50,60,70,80,90;
   setarray .y[0], 50,60,70,80,90;

   if (getsavepoint(0) == "prontera") {
       set .@i, rand(getarraysize(.x));
       savepoint "prontera", .x[.@i], .y[.@i];
   }
   end;

With the script llchrisll posted, that will warp them instantly when they die.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

You can't kill an NPC.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

sorry my bad, im poor in english, didnt explain it properly. What I mean to say is a NPC like a kafra that save the player respawn point or save point.When a player click the NPC it will ask if he wants to save.That NPC Its like the ordinary kafra that ask if save, storage and more but all i want is save. Then it has 5 save point. when the player died in battle or killed by a monster hi will respawn to the save point and that is prontera.If possible when he returns to his save point, he will respawn randomly in that 5 save point (the player).thank you.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

In my opinion this would be an src edit to disable/check if this npc is used or not.

Well here is my script:

prontera,150,180,0	script	SavePoint	100,{
set .n$,"["+strnpcinfo(1)+"]";
setarray .x[0],50,60,70,80,90;
setarray .y[0],50,60,70,80,90;

mes .n$;
mes "Do you want to save?";
if(select("- Yes:- No") - 1) close;
next;
set n_save,1;
mes .n$;
Your Savepoint has been saved.";
close;

OnPCDieEvent:
if(n_save) {
set coord,rand(6);
warp "SavePoint",.x[coord],.y[coord];
}
end;
}

I hope it's working and it was of help.

Regards,

Chris

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

I got error...

error in line 12 unexpected newline at string

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  185
  • Reputation:   53
  • Joined:  01/04/12
  • Last Seen:  

mes .n$;
Your Savepoint has been saved.";
close;

to

mes .n$;
mes "Your Savepoint has been saved.";
close;

:)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

its working now, I edit some of chris work and use brian and now it works perfectly as I wanted.Thank you very much to all who help me. DONE

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

Posted · Hidden by maynard, January 22, 2012 - move to support
Hidden by maynard, January 22, 2012 - move to support

I have a problem, it doesn't save if I click it.After clicking, it says your save point have been save but whenever I die I still respawn in my previous save point which is morocc.here is the script

prontera,157,186,4 script Save_Point 100,{
set .n$,"["+strnpcinfo(1)+"]";

mes .n$;
mes "Do you want to save?";
if(select("- Yes:- No") - 1) close;
next;
set n_save,1;
mes .n$;
mes "Your Save point has been saved.";
close;
OnPCDieEvent:
   setarray .x[0], 156,167,145,144,166;
   setarray .y[0], 184,178,177,202,202;
   if (getsavepoint(0) == "prontera") {
    set .@i, rand(getarraysize(.x));
    savepoint "prontera", .x[.@i], .y[.@i];
   }
   end;
}

Link to comment

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...