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
Race selection script
Author Message
dagger4k
Journeyman
*

Posts: 194
Likes Given: 1
Likes Received: 12 in 12 posts
Joined: Mar 2012
Reputation: 0



Post: #2
RE: Race selection script
yes, At the start, depending on how you set the races (stone, gump selection etc) just make it set a tag to .tag.elf

for a button selection
Code:
onbutton = 2
src.tag.race.elf= 1
return 1

Obviously you will want to add something in there to make it so someone can't be 2 races. A way around this could be to use the 1 tag to deal with the race system
tag.race = 1 // 1 being elf, 2 being human, 3 being vampire etc

Code:
onbutton = 2
src.tag.race= 1 // elf
return 1

then for the door you can try something around the line of
Code:
[itemdef i_elf_door]
id=06e9
Name= Elf door

on=@dclick
if (<src.tag.race>==1) // elf
return 0
else
src.sysmessage = You are not the right class to use this door! blah blah
return 1

You might also want to add something to the player event such as
Code:
[event e_player]
on=@click
IF     (0<tag.race>== 01)
        message= [Elf]
                message=<name>
Elseif
       (0<tag.race>== 02)
                message= [Human]
                message=<name>
Elseif
       (0<tag.race>== 03)
                message= [vampire]
                message=<name>
Else
         message=[Race not selected]
         message=<name>
Return 1
This might work, but mess around with it. I haven't actually scripted in ages and didn't test this atall Tongue
you might even want to make the door teleport the player to the door so other people can't actually pass through it.
(This post was last modified: 09-15-2013 07:58 PM by dagger4k.)
09-15-2013 07:52 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Race selection script - maos32 - 09-15-2013, 06:37 PM
RE: Race selection script - dagger4k - 09-15-2013 07:52 PM
RE: Race selection script - maos32 - 09-15-2013, 09:24 PM
RE: Race selection script - Shidhun - 09-15-2013, 10:15 PM
RE: Race selection script - maos32 - 09-15-2013, 10:56 PM
RE: Race selection script - XuN - 09-15-2013, 11:17 PM
RE: Race selection script - Rattlehead - 09-16-2013, 08:29 AM
RE: Race selection script - maos32 - 09-16-2013, 08:10 PM
RE: Race selection script - Shidhun - 09-16-2013, 09:59 PM
RE: Race selection script - maos32 - 09-17-2013, 07:35 PM

Forum Jump:


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