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
Shidhun
Journeyman
*

Posts: 59
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Jul 2012
Reputation: 1



Post: #9
RE: Race selection script
A simple version would be this "racegate"
You need to change the following things on the gate, to adjust it properly :

Name --> The Name of the Race
Color --> Body-Color of the race
Morep --> The Coordinates to which the player should go

Of course this is not a complex script. You could add a Gump-Menu for GMs, to easily change the Racegate and so on. This is a very (!) simple version.

Code:
[itemdef i_racegate]
ID=i_moongate_red //or what ever you want
name=Race-Selector
type=t_script
weight=1000.0

on=@create
    attr=attr_move_never
    
on=@click
    if !<src.isgm>
        message Race-Gate for <name>
    else
        message Race : <name>
        message Color : <color>
        message MoreP : <morep>
    endif
    return 1
    
on=@step
if (<morex> == 0)&&(<morey> == 0)
    src.sysmessage @026 Please page for a gamemaster, the Racegate is broken
    return 1
endif
if strmatch(<src.tag0.race>,<name>))
    src.sysmessage @,,1 You allready belong to this race.
else
    sdialog d_select_race
endif

[DIALOG d_select_race]
50,71
//nodispose
//´noclose
page 0
resizepic 0 0 3000 320 285
dhtmlgump 20 50 280 40 0 0 <def.center><def.BFONT>color="#444444"><def.big>Do you really want to belong to the race of <name>?<def.BFONTE><def.centere>
radio 20 110 2510 2511 0 1
radio 20 150 2510 2511 1 2
dhtmlgump 40 110 250 40 0 0 <def.BFONT>color="#440000"><def.big>Yes i want to belong to this race<def.BFONTE>
dhtmlgump 40 150 250 40 0 0 <def.BFONT>color="#440000"><def.big>Oh no, i just slipped and fell on this tile<def.BFONTE>
button 130 223 2117 2118 1 0 100
dhtmlgump 150 220 200 30 0 0 <def.BFONT>color="#444444"><def.big>Accept<def.BFONTE>

[DIALOG d_select_race BUTTON]
On=0
return 1

on=100
    if <argchk[1]>
        src.tag.race <name>
        SOUND=snd_spell_gate_travel
        SRC.GO <morep>
        SRC.COLOR <color>
    else
        src.sysmessageua 030,0,0,enu You choose, not to be a member of this race
        src.go <put the general starting coordinates here, the player MUST NOT stay on the tile, else the dialog will fire again with the simple @step-trigger you are using>
    endif
    return 1
09-16-2013 09:59 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)