yapma bunu yapma bunu 150 account desen ortalama 3 karakterden 450 adet var eder.
şöyle sphereserverdan alıntı yapalım
Kod:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Unique Character Names v1.4 - Scripted by Mordaunt
//
// Now the server will physically check the names of existing characters on existing accounts. (a little heavier
//but only runs on creation)
// This allows for use on pre-existing servers, players with the same names prior to installing this script would be
// "Grandfathered in" after installation a player may not name their character the same as one which already exists.
//
// To prevent problems caused by logging out and back in (or disconnects) & duplicate names when renaming a player
// Under an all player event (or create one of your own) place the following:
//
// ON=@Login
// if <tag0.badname>
// timerf 3, namechange
// endif
//
// ON=@Rename
// if (<argo.isplayer>)
// ref1 <argo>
// for x 0 <eval <serv.accounts> -1>
// for y 0 <eval <account.chars> -1>
// ref2 = <serv.account.<dlocal.x>.char.<dlocal.y>>
// if !(strcmpi(<args>,<ref2.name>)) && !(<ref1>==<ref2>)
// ref1.namechange
// return 1
// endif
// endfor
// endfor
// endif
//
//
// New 1.1: Added check to prevent loss of dialog by logging out or being disconnected.
// New 1.2: Added case sensitive check & update to account.chatname as suggested by phibertap
// New 1.3: Removed LIST (I don't know why I used them here to begin with)
// New 1.4: Added check to prevent an already used name from being entered if a player is
//renamed for any reason (requires 56c r1675 or later)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[FUNCTION f_onchar_create]
src.name_check
[FUNCTION name_check]
ref1=<src>
for x 0 <eval <serv.accounts> -1>
for y 0 <eval <account.chars> -1>
ref2 = <serv.account.<dlocal.x>.char.<dlocal.y>>
if !(strcmpi(<ref1.name>,<ref2.name>)) && !(<ref1>==<ref2>)
ref1.timerf 2, namechange
endif
endfor
endfor
[function namechange]
src.flags=(<src.flags>|040000)
src.tag0.badname=1
src.sysmessage @32,,1 The name you have chosen is not available
src.sysmessage @,,1 You will remain frozen until you choose a new name
src.sdialog d_name_change
return 1
[Dialog d_name_change]
150,220
nomove
noclose
page 0 // Basic layout
gumppictiled 0 0 310 150 0a40
checkertrans 1 1 308 148
dtext 85 10 90 This name is not available
dtext 80 30 90 Please choose a new name
gumppic 20 50 1143 0
dtextentry 30 52 150 50 0 0
dtext 200 120 90 Confirm
button 250 120 0fa5 0fa7 1 0 1
[Dialog d_name_change BUTTON]
ON=1
if strregex(^[aA-zZ]+$,<argtxt[0]>)
local.length=<argtxt[0]>
if (<eval strlen(<local.length>)> < 3) || (<eval strlen(<local.length>)> > 16)
src.sysmessage @32,,1 Invalid name
src.sysmessage @,,1 Valid names must me 3 - 16 characters in length
src.sdialog d_name_change
return 1
else
for x 0 <eval <serv.accounts> -1>
for y 0 <eval <account.chars> -1>
ref2 = <serv.account.<dlocal.x>.char.<dlocal.y>>
if !(strcmpi(<argtxt[0]>,<ref2.name>)) && !(<src>==<ref2>)
src.namechange
return 1
endif
endfor
endfor
src.name <argtxt[0]>
src.account.chatname <argtxt[0]>
src.flags=(<src.flags>& ~040000)
src.sysmessage @,,1 Your name is now <src.name>
src.tag0.badname=
return 1
endif
else
src.sysmessage @32,,1 Invalid name
src.sysmessage @,,1 Names may only contain letters a - z
src.sdialog d_name_change
return 1
endif
mordaunt un scripti ingilizcen yoksa çevirebilirim