SphereCommunity
Deny new character creation or deletion - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Deny new character creation or deletion (/Thread-Deny-new-character-creation-or-deletion)



Deny new character creation or deletion - Lano - 02-14-2015 08:46 AM

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


RE: Deny new character creation or deletion - Extreme - 02-14-2015 05:19 PM

Limit 3 chars per account, then t they will can't create new chars using default system.


RE: Deny new character creation or deletion - XuN - 02-14-2015 05:56 PM

This menu is handled by the client so you can either modify the client to auto select first character or do what Extreme said.


RE: Deny new character creation or deletion - Coruja - 02-16-2015 01:23 AM

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


RE: Deny new character creation or deletion - ThatSide - 03-11-2015 10:05 AM

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?


RE: Deny new character creation or deletion - XuN - 03-17-2015 08:44 PM

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.