The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deny new character creation or deletion
Author Message
Lano
Apprentice
*

Posts: 28
Likes Given: 3
Likes Received: 0 in 0 posts
Joined: Oct 2012
Reputation: 0



Post: #1
Deny new character creation or deletion
I am using this script (wich i highjacked from in here somewhere)

in sphere_serv_triggers:

///////////////////

[FUNCTION f_onaccount_login]
if !<serv.account.<args>.chars> //I have 0 players, create 5 of them
//code for creating the newplayers here
FOR 0 2
newnpc c_newplayer //CHARDEF of the "New Character"
new.go 1982,1047,-28,2 //Send NPC to "Character Creation Room"
new.account = <args> //Assign NPC to account logging in.
new.disconnect // "Disconnect" the NPC, if you don't do this the NPC, even though attached to the account, will wander around aimlessly in the room.
serv.log New Player <local._for> for Account <args> created // Log notification
ENDFOR
else
if (<serv.account.<args>.chars> < 3)
newnpc c_newplayer
serv.log making additional chars
new.go 1982,1047,-28,2
new.account = <args>
new.disconnect
endif
serv.log Chars already created // Log notification
endif


[CHARDEF c_newplayer]
ID = c_wisp
Name = Create New Character

ON=@Create
color=00961
STR = 1
DEX = 1
INT = 1
allskills = 0.0


///////////////////

Working like a charm.... but:


I like that this script skips the entire vanilla creation process wich makes sense on my shard, where i have a race and class system, so players start out with presets once they have chosen their race and class.

Only problem is, i need to bypass the menu function of players beeing able to create or delete characters (from the menu)

i know i got:

[FUNCTION f_onchar_create] and [FUNCTION f_onchar_delete]
to work with, but i cant block the entire creation process since the server has to create those three new, blank character "slots"... i want players to handle the delete/create process from within the game :/

Please help Smile
02-14-2015 08:46 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Deny new character creation or deletion
Limit 3 chars per account, then t they will can't create new chars using default system.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
02-14-2015 05:19 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #3
RE: Deny new character creation or deletion
This menu is handled by the client so you can either modify the client to auto select first character or do what Extreme said.
02-14-2015 05:56 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: Deny new character creation or deletion
you must attach the char to the account directly on the account creation (f_onaccount_create), doing that the char will be avaible on the char select list on client login
(This post was last modified: 02-16-2015 01:24 AM by Coruja.)
02-16-2015 01:23 AM
Find all posts by this user Like Post Quote this message in a reply
ThatSide
Apprentice
*

Posts: 17
Likes Given: 5
Likes Received: 0 in 0 posts
Joined: Feb 2015
Reputation: 0



Post: #5
RE: Deny new character creation or deletion
I don't know if this is still actual, but isn't it easier just to make new and remove buttons transparent in your gumps?
03-11-2015 10:05 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #6
RE: Deny new character creation or deletion
It is a good visual fix, but you still need to deny it server side or players will be able to pass this restriction with another gump files.
03-17-2015 08:44 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)