gekigengar Posted February 11, 2014 Share Posted February 11, 2014 (edited) I wonder if a single player instance is possible? (Without check party). It would be lovely if it is, could give players a private dungeon. If yes, how do I do it? Edited February 11, 2014 by gekigengar Quote Link to comment Share on other sites More sharing options...
Euphy Posted February 11, 2014 Share Posted February 11, 2014 Instances are attached to parties, so you can't create one without having a party. However, you can easily work around this: ensure that the player does not have a party before creating/entering the instance, and let the NPC create the party. Like this: [paste=1941ov47vbzx] 1 Quote Link to comment Share on other sites More sharing options...
gekigengar Posted February 11, 2014 Author Share Posted February 11, 2014 (edited) Instances are attached to parties, so you can't create one without having a party. However, you can easily work around this: ensure that the player does not have a party before creating/entering the instance, and let the NPC create the party. Like this: [paste=1941ov47vbzx] Thanks Euphy! May I ask what is "while (1)"? It seems like something that will run infinitely without an exit sentinel (But somehow it works!) Edited February 11, 2014 by gekigengar Quote Link to comment Share on other sites More sharing options...
Euphy Posted February 11, 2014 Share Posted February 11, 2014 May I ask what is "while (1)"? It seems like something that will run infinitely without an exit sentinel (But somehow it works!) Here's the code, commented: // The 'while' statement will loop infinitely (since '1' is always true) // until a 'break' statement is reached, or the server detects an infinite // loop (related to check_gotocount). while (1) { // This tries to pick a random party name that is unlikely to exist // ("i50928", "i18735", etc.). [email protected]$ = "i" + rand(100000); // 'party_create' returns '1' if the party was successfully created. // If it succeeds, break out of the loop. // If it fails, try again with a different party name. if (party_create([email protected]$) > 0) break; } 1 Quote Link to comment Share on other sites More sharing options...
gekigengar Posted February 12, 2014 Author Share Posted February 12, 2014 May I ask what is "while (1)"? It seems like something that will run infinitely without an exit sentinel (But somehow it works!) Here's the code, commented: // The 'while' statement will loop infinitely (since '1' is always true) // until a 'break' statement is reached, or the server detects an infinite // loop (related to check_gotocount). while (1) { // This tries to pick a random party name that is unlikely to exist // ("i50928", "i18735", etc.). [email protected]$ = "i" + rand(100000); // 'party_create' returns '1' if the party was successfully created. // If it succeeds, break out of the loop. // If it fails, try again with a different party name. if (party_create([email protected]$) > 0) break; } Thank you very much!, I understand the others, but the while loop confuses me, But now I understand that one can break through a while loop using the "break;" function I appreciate the explanation ^^ Quote Link to comment Share on other sites More sharing options...
I wonder if a single player instance is possible? (Without check party).
It would be lovely if it is, could give players a private dungeon.
If yes, how do I do it?
Edited by gekigengarLink to comment
Share on other sites