Помощь - Поиск - Пользователи - Календарь
Полная версия: Npc travaller
UoKit.com Форумы > Ultima Online : Dev > Sphere Server > Архив готовых скриптов
KonstantiN
Код

////////////////////////////// TRAVELLING /////////////////////////

[CHARDEF c_h_traveller]
ID=c_man
NAME=#NAMES_HUMANMALE the Traveller
TSPEECH=spk_traveller

ON=@CREATE
DORAND 2
    ID=c_man
    ID=c_woman
ENDDO
    NPC=brain_vendor
    COLOR=colors_skin
    NEED=i_gold
    STR={66 80}
    DEX=90
    INT={66 80}
    FENCING={15.0 38.0}
    PARRYING={45.0 68.0}
    SWORDSMANSHIP={15.0 38.0}
    WRESTLING={15.0 38.0}
    MACEFIGHTING={15.0 38.0}
    MAGICRESISTANCE={45.0 68.0}
    TACTICS={45.0 68.0}
    ITEMNEWBIE=i_lantern
    ITEMNEWBIE=random_male_hair
    COLOR=colors_hair
    ITEMNEWBIE=random_facial_hair
    COLOR=match_hair
    ITEMNEWBIE=i_shirt_plain
    COLOR=colors_all
    ITEMNEWBIE=random_pants
    COLOR=colors_all
    ITEMNEWBIE=random_shoes
    COLOR=colors_neutral

[SPEECH spk_traveller]
ON=hi*
say @,3,1 Hello Stranger.
ON=hello*
say @,3,1 Hello Stranger.
ON=travel*
if !(<src.restest 250 i_gold>)
say @,3,1 You don't have 250 gold pieces. I'm sorry Stranger.
else
src.dialog d_traveller
say @,3,1 Where will you go?
endif
ON=working
say @,3,1 I'm working on <serv.name> now.

[DIALOG d_traveller]
100,100

resizepic 0 0 3500 300 300
text 25 20 920 0
text 25 35 920 1
button 35 83 1210 1210 1 0 1
text 50 80 920 2
button 35 103 1210 1210 1 0 2
text 50 100 920 3
button 35 123 1210 1210 1 0 3
text 50 120 920 4
button 35 143 1210 1210 1 0 4
text 50 140 920 5
button 35 163 1210 1210 1 0 5
text 50 160 920 6
button 35 183 1210 1210 1 0 6
text 50 180 920 7
button 35 203 1210 1210 1 0 7
text 50 200 920 8
button 35 223 1210 1210 1 0 8
text 50 220 920 9

[DIALOG d_traveller text]
Where will you go?
Travelling cost is 250 gold pieces.
Britain
Skara Brae
Moonglow
Cove
Trinsic
Vesper
Jhelom
Tokuno Islands [+1000 gold pieces.]

[DIALOG d_traveller button]
ON=1
if !(<src.restest 250 i_gold>)
src.message @,3,1 You don't have 250 gold pieces.
else
src.go 1482,1770,-2
src.consume 250 i_gold
return 1
endif
ON=2
if !(<src.restest 250 i_gold>)
src.message @,3,1 You don't have 250 gold pieces.
else
src.go 677,2246,-2
src.consume 250 i_gold
return 1
endif
ON=3
if !(<src.restest 250 i_gold>)
src.message @,3,1 You don't have 250 gold pieces.
else
src.go 4388,1025,-2
src.consume 250 i_gold
return 1
endif
ON=4
if !(<src.restest 250 i_gold>)
src.message @,3,1 You don't have 250 gold pieces.
else
src.go 2257,1170,-2
src.consume 250 i_gold
return 1
endif
ON=5
if !(<src.restest 250 i_gold>)
src.message @,3,1 You don't have 250 gold pieces.
else
src.go 2085,2861,-2
src.consume 250 i_gold
return 1
endif
ON=6
if !(<src.restest 250 i_gold>)
src.message @,3,1 You don't have 250 gold pieces.
else
src.go 3043,837,-2
src.consume 250 i_gold
return 1
endif
ON=7
if !(<src.restest 250 i_gold>)
src.message @,3,1 You don't have 250 gold pieces.
else
src.go 1514,3709,-2
src.consume 250 i_gold
return 1
endif
ON=8
if !(<src.restest 1250 i_gold>)
src.message @,3,1 You don't have 1250 gold pieces.
else
src.go 1363,765,-1,4
src.consume 1250 i_gold
return 1
endif
Sirocco
Это какая сфера? я вижу тут строчку - "message @,3,1"
За такие скрипты нужно руки отрывать.

Код
ON={1 7}
doswitch <<argn> - 1>
begin
local.gold =
local.coordinate =
end
но это слишком длинно
можно TAG.
ИЛИ
f_function <local.gold> <local.coordinate> - через argv для 55r
enddo

[]
if !(<src.restest <local.gold> i_gold>)
src.message @,3,1 You don't have <eval <local.gold>> gold pieces.
return 1
endif
src.go <local.coordinate>
src.consume <local.gold> i_gold
return 1 - зачем тут нужен был ретурн1?
KonstantiN
55r
Это текстовая версия — только основной контент. Для просмотра полной версии этой страницы, пожалуйста, нажмите сюда.
Русская версия Invision Power Board © 2001-2024 Invision Power Services, Inc.