maynard Posted January 19, 2012 Posted January 19, 2012 (edited) 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 January 19, 2012 by maynard Quote
Brian Posted January 20, 2012 Posted January 20, 2012 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. Quote
maynard Posted January 19, 2012 Author Posted January 19, 2012 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. Quote
llchrisll Posted January 19, 2012 Posted January 19, 2012 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 1 Quote
maynard Posted January 20, 2012 Author Posted January 20, 2012 I got error... error in line 12 unexpected newline at string Quote
Sanasol Posted January 20, 2012 Posted January 20, 2012 mes .n$; Your Savepoint has been saved."; close; to mes .n$; mes "Your Savepoint has been saved."; close; Quote
maynard Posted January 20, 2012 Author Posted January 20, 2012 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 Quote
maynard Posted January 22, 2012 Author Posted January 22, 2012 · 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; }
Question
maynard
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 maynard8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.