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
Function f_onser
Author Message
Elmortis
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2012
Reputation: 0



Post: #1
Function f_onser
Hi all, i have one problem. I wont when player create char and using in client race buton betwen i need change body player for guard system, but all create char have one race, not importend player use button or not

sorry my bad english
Code:
[FUNCTION f_onchar_create]
IF StrMatch("*'*","<SRC.NAME>") || StrMatch("*`*","<SRC.NAME>")
   SERV.LOG @[Account: <ARGS>] Char: <SRC.NAME> - Character name is forbidden.
   SRC.TAG.Delete=1
   SENDPACKET 053 B02
   SENDPACKET 026 B01
ELIF (<SERV.SQL_AccountCharacterExists 1,<SRC.NAME>>)
   SERV.LOG @[Account: <ARGS>] Char: <SRC.NAME> - Character name already exists.
   SRC.TAG.Delete=1
   SENDPACKET 053 B02
   SENDPACKET 026 B01
ELIF (<SERV.SQL_AccountCharacterCreate 1,<ARGS>,<SRC.NAME>,<SRC.UID>,<SERV.ACCOUNT.<ARGS>.LASTIP>>,<SERV.RTIME>>)
   SERV.LOG @[Account: <ARGS>] Char: <SRC.NAME> - Character successfull created to SQL.

   // 3010,3370,15 - Serpents Hold (Vampire)
   // 1496,1629,10 - Britain (Humans)
   SRC.HOME = <QVAL (<ARGN3>)?3010,3370,15,0:1496,1629,10,0>
   SRC.P = <SRC.HOME> // Установка где будет появляться персонаж
   // Цвет кожи вампиров всегда 0 (серый)
   SRC.OSKIN = <QVAL (<ARGN3>)?0:<SRC.OSKIN>>
   SRC.COLOR = <QVAL (<ARGN3>)?0:<SRC.COLOR>>
   SERV.LOG @> Character Name: <SRC.NAME>
   SERV.LOG @> Flags: <ARGN1>
   SERV.LOG @> Class: <ARGN3>
   SERV.LOG @> Profession: <ARGN2>
   SERV.LOG @> Home at: <SRC.HOME>
   SERV.LOG @> Start at: <SRC.P> [<SRC.REGION.NAME>]
   IF StrMatch("*_woman","<SRC.OBODY>")
      SERV.NEWITEM=i_shirt_plain,1,<SRC.UID>
      NEW.ATTR=attr_newbie
      NEW.COLOR=colors_all
      SERV.NEWITEM=random_skirt,1,<SRC.UID>
      NEW.ATTR=attr_newbie
      NEW.COLOR=colors_neutral
      SERV.NEWITEM=random_shoes,1,<SRC.UID>
      NEW.ATTR=attr_newbie
      NEW.COLOR=colors_neutral
   ELSE
      SERV.NEWITEM=i_shirt_plain,1,<SRC.UID>
      NEW.ATTR=attr_newbie
      NEW.COLOR=colors_all
      SERV.NEWITEM=random_pants,1,<SRC.UID>
      NEW.ATTR=attr_newbie
      NEW.COLOR=colors_neutral
      SERV.NEWITEM=random_shoes,1,<SRC.UID>
      NEW.ATTR=attr_newbie
      NEW.COLOR=colors_neutral
   ENDIF
   SERV.NEWITEM=i_spellbook,1,<SRC.FINDLAYER.21.UID>
   NEW.ATTR=attr_newbie
   SERV.NEWITEM=i_coin_silver,1000,<SRC.FINDLAYER.21.UID>
   SERV.NEWITEM={i_cutlass 1 i_kryss 1 i_maul 1},1,<SRC.FINDLAYER.21.UID>
   NEW.ATTR=attr_newbie
ELSE
   SERV.LOG @ERROR: [Account: <ARGS>] Char: <SRC.NAME> - Fail to create record into SQL.
   SRC.TAG.Delete=2
   SENDPACKET 053 B02
   SENDPACKET 026 B01
ENDIF
// This function is called after client have created a new char.
// SRC --> char being created
// ARGN1 --> flags
// ARGN2 --> profession chosen
// ARGN3 --> elf
// ARGS  --> account name

IF(<ARGN3> == 2) || StrMatch("c_elf_man","<SRC.OBODY>")
SRC.OBODY = cv_man
ELIF StrMatch("c_elf_woman","<SRC.OBODY>")
SRC.OBODY = cv_woman
ENDIF
08-05-2012 12:09 AM
Find all posts by this user Like Post Quote this message in a reply
Elmortis
Apprentice
*

Posts: 21
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Aug 2012
Reputation: 0



Post: #2
RE: Function f_onser
I fixx this problem
08-05-2012 10:58 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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