Onirim
Journeyman
Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0
UO: Rebellion
|
Basic script but...
It's a very basic script, and unfortunately I've a problem with it.
I've a gump menu for character creation, and I want to put some items on chars with the attribute newbie.
So I've dont that:
Code:
[DIALOG d_creation_class BUTTON]
ON=1050
DIALOG d_creation_peuple
ON=1051
if (<SRC.ID> = c_man)
ITEMNEWBIE=i_shirt_plain
COLOR=colors_all
ITEMNEWBIE=random_pants
COLOR=colors_neutral
ITEMNEWBIE=random_shoes
COLOR=colors_neutral
ITEMNEWBIE=i_dagger
ITEMNEWBIE=i_candle
ITEMNEWBIE=i_book_sm
ITEMNEWBIE=i_gold,1000
else
ITEMNEWBIE=i_shirt_plain
COLOR=colors_all
ITEMNEWBIE=random_skirt
COLOR=colors_neutral
ITEMNEWBIE=random_shoes
COLOR=colors_neutral
ITEMNEWBIE=i_dagger
ITEMNEWBIE=i_candle
ITEMNEWBIE=i_BOOK_SM
ITEMNEWBIE=i_gold,1000
endif
GO 2153,1837
But when I make choice in the menu, I'm just teleported to my destination, and Sphere telle me
Code:
16:49:ERROR:(creation.scp,367)Undefined keyword 'ITEMNEWBIE'
What the hell ?
|
|
12-31-2012 02:02 AM |
|
|
Mordaunt
Super Moderator
Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35
|
RE: Basic script but...
You may find that this is because of the fact that you are creating the character via a gump rather than in the normal way:
From spherewiki
Code:
In any case, this is another file that a lot of questions are asked about. "How do I make players start with 10000 gold?" people ask. Or, "How do I give all blacksmiths 800 ingots?" Now, I'm not saying I would like to play on a shard where you start with 10000 gold or blacksmiths start with 800 ingots. But this file would be the place to do it.
[NEWBIE MALE_DEFAULT]
// Male Generic Starting Clothes
ITEMNEWBIE=i_shirt_plain
COLOR=colors_all
ITEMNEWBIE=random_pants
COLOR=colors_neutral
ITEMNEWBIE=random_shoes
COLOR=colors_neutral
ITEMNEWBIE=i_dagger
ITEMNEWBIE=i_candle
ITEMNEWBIE=i_book_sm
ITEMNEWBIE=i_gold,100
This is what a typical script looks like. It looks kinda like a template doesn't it? Well there's a good reason for that. It really is a template. It just uses the ITEMNEWBIE tag rather than the ITEM tag. Look at the section in Chapter 1 on Templates for more information on how to structure this file!
The only real item of note is that these sections MUST have specific names that the server looks for. You cannot add a new newbie section, no matter how much you'd like to. Sorry!
However a work around would be to create the item and set it's attributes manually
Code:
NEWITEM=i_book_SM
NEW.ATTR=attr_newbie
e.t.c..
Make sure that the items do actually bounce to the player also.
|
|
12-31-2012 02:21 AM |
|
|
Onirim
Journeyman
Posts: 64
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jul 2012
Reputation: 0
UO: Rebellion
|
RE: Basic script but...
Damn... I've some other problems with Sphere Script ^^
When a character is created with my creation gump, the character gain a TAG.PEUPLE = something
So I don't want the creation menu open at every connection, and I put this on an player_event script:
Code:
on=@login
if (<TAG0.PEUPLE> == 0)
DIALOG d_creation
endif
When my TAG.PEOPLE doesn't exist, no problem the creation gump open and the creation occurs.
But when the character have a TAG.PEUPLE = something (ex: Telorien), the script doesn't work and sphere send me:
Code:
08:25:ERROR:(sphere_events_players.scp,335)Undefined symbol 'Telorien'
Why I've an undefined symbol ? I just make a IF on a TAG... no ?
|
|
12-31-2012 05:30 PM |
|
|
Ben
Sphere Developer
Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18
SphereCommunity
|
|
01-01-2013 01:09 AM |
|
|
Ben
Sphere Developer
Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18
SphereCommunity
|
|
01-02-2013 06:19 AM |
|
|