UO-Dev Arama


Yazar: Bilinmiyor
Tarih: 08-06-2017 15:57





Umarim Herkese Faydası Olur
Kod:
[DEFNAME d_sg_defnames]
//Oyun bittiğinde, yılanın gönderileceği koordinat.
snake_coordinates 201,2628

//Oyundaki yem ve engellerin en düşük ve en yüksek X ve Y değerleri.
snake_min_x=192
snake_max_x=212

snake_min_y=2624
snake_max_y=2634

//H?z (1 çok hızlı, 100 çok yavaş)
snake_speed=4

// Ka? yem yendi?inde 1 kuyruk eklensin?
snake_extend=1

[Itemdef i_sg_snake]
ID=11835
NAME=snake
TYPE=t_normal

On=@Create
COLOR=07a1//07ad
ATTR=attr_static|attr_move_never
TAG.DIR=0 //Gideceği yön!
TAG.DIRBIN=0
TAG0.SNAKES=0
TAG.PLAYER=0
TAG0.EATEN=0
TAG0.POINTCHECK=0
TAG.SNAKE0=<UID>
TAG0.OVERRIDE_SG_SPEED=0
TAG0.OVERRIDE_SG_POINT=1

On=@DClick
RETURN 1

On=@Timer
REF5=<TAG.PLAYER>
IF !(<REF5.ISPLAYER>) //Oyuncu yok mu? :o
  TIMER -1
  RETURN 1
ENDIF

MOVE <TAG.DIR>
REF2=<TAG.SNAKE<EVAL <dTAG0.PLACE> + 1>>
IF (<REF2.BASEID> == i_sg_snake_tail)
  FOR 1 <dTAG0.SNAKES>
    REF2=<TAG.SNAKE<DLOCAL._FOR>>
    REF4=<TAG.SNAKE<EVAL <DLOCAL._FOR> - 1>>
    REF2.MOVE <REF4.TAG.DIRBIN> //Yılanın kuyruğunuda peşinden yollayalım.
    REF2.TAG.DIRBIN=<REF2.TAG.DIR>
    REF2.TAG.DIR=<REF4.TAG.DIRBIN>
    //REF2.TIMERD <sg_getSpeed>
  ENDFOR
ENDIF
TAG.DIRBIN=<TAG.DIR>
REF3=<UID>
FORITEMS 0
  IF (STRMATCH('<BASEID>', 'i_sg_food'))
    REF3.TAG0.EATEN ++
    REF3.TAG0.POINTCHECK ++
    IF (<REF3.dTAG0.EATEN> >= <DDEF.snake_extend>) // 3 defada bir kuyruk arttıralım.
      REF3.SG_ADDTAIL
    ENDIF
    REMOVE
    REF9=<REF3.TAG.PLAYER>
    LOCAL.POINT=<REF3.dTAG0.OVERRIDE_SG_POINT>
    IF (<REF3.dTAG0.POINTCHECK> >= <DLOCAL.POINT>)
      REF9.ACCOUNT.TAG0.SGPOINT +=1
      REF3.TAG0.POINTCHECK=0
    ENDIF
    f_sg_food
//    SERV.NEWITEM i_sg_food
//    NEW.P <R<DDEF.snake_min_x>,<DDEF.snake_max_x>>,<R<DDEF.snake_min_y>,<DDEF.snake_max_y>>
//    NEW.UPDATE
  ELIF !(STRMATCH('<UID>', '<REF3>'))
    REF3.SG_GAMEOVER
    RETURN 1
  ENDIF
ENDFOR
TRYSRC <REF5> LINK.SDIALOG d_sg_dialog
TIMERD <sg_getSpeed>
RETURN 1

[FUNCTION SG_ADDTAIL]
//Son kuyruğu hesaplayal?m;
REF1=<TAG.SNAKE<dTAG0.SNAKES>> //Kuyruk yoksa otomatik yılanı ciddiye alacaktır.
SERV.NEWITEM i_sg_snake_tail
NEW.COLOR={07a1,07a9}
NEW.P=<REF1.P>
NEW.UPDATE
NEW.MOVE <dirConverter <REF1.TAG.DIR>> //Son kuyruğa göre ekleme yapalım.
NEW.TAG.MAIN=<UID>
TAG0.SNAKES ++
NEW.TAG0.PLACE=<dTAG0.SNAKES>
TAG.SNAKE<dTAG0.SNAKES>=<NEW>
TAG0.EATEN=0
 
[FUNCTION SG_MOVEUP]
TAG.DIRBIN <TAG.DIR>
TAG.DIR n
IF (<TIMER> == -1)
  TIMERD <sg_getSpeed>
ENDIF

[FUNCTION SG_MOVEDOWN]
TAG.DIRBIN <TAG.DIR>
TAG.DIR s
IF (<TIMER> == -1)
  TIMERD <sg_getSpeed>
ENDIF

[FUNCTION SG_MOVELEFT]
TAG.DIRBIN <TAG.DIR>
TAG.DIR w
IF (<TIMER> == -1)
  TIMERD <sg_getSpeed>
ENDIF

[FUNCTION SG_MOVERIGHT]
TAG.DIRBIN <TAG.DIR>
TAG.DIR e
IF (<TIMER> == -1)
  TIMERD <sg_getSpeed>
ENDIF

[Itemdef i_sg_snake_tail]
ID=11835
NAME=snake tail
TYPE=t_normal

On=@Create
COLOR=07ad
ATTR=attr_static|attr_move_never

On=@DClick
RETURN 1

[FUNCTION CLOSEDIALOG]
DIALOGCLOSE <ARGS>

[Function DIALOGCLOSEALL] //.dialogcloseall
IF (<DIALOGLIST.COUNT>)
FOR 0 <EVAL <DIALOGLIST.COUNT>-1>
DIALOGCLOSE <DIALOGLIST.<DLOCAL._FOR>.ID>
ENDFOR
ENDIF

//SOURCE.SG_GAMEOVER
[FUNCTION SG_GAMEOVER]
//UID=YILAN
//TAG.PLAYER=Oyuncu
OBJ=<TAG.PLAYER>
TIMER -1
IF (<OBJ.ISPLAYER>) //Oyuncu var mı? Hep olacaktır ama yinede hatalardan kaçınmak için işimizi sağlama alalım.
  OBJ.EMOTE Game Over
ENDIF
IF (<dTAG0.SNAKES>) //Kuyruğu var mı?
  FOR 1 <dTAG0.SNAKES>
    REF2=<TAG.SNAKE<DLOCAL._FOR>>
    REF2.REMOVE //Kuyruğu silelim.
  ENDFOR
ENDIF
P=<DEF.snake_coordinates> //Yılanı başa yollayalım.
//Verileri sıfırlayalım;
TAG.DIR=0
TAG.DIRBIN=0
TAG0.SNAKES=0
TAG.PLAYER=0
TAG0.EATEN=0
TAG0.POINTCHECK=0
TAG.SNAKE0=<UID>
TAG0.PLACE=0
TAG0.OVERRIDE_SG_SPEED=0
TAG0.OVERRIDE_SG_POINT=1
TAG.PLAYER=0 //Oyuncuyu silelim.
f_sg_block 1 //Engelleri kaldıralım.
f_sg_food 1 //Yemleri kaldıralım.
UPDATE //Hata almamak için g?ncelleyelim.
TRYSRC <OBJ> DIALOGCLOSEALL

[ITEMDEF i_sg_stone]
ID=i_grave_stone
TYPE=t_normal
NAME=snake game

On=@Create
COLOR=07a1
ATTR=attr_static|attr_move_never

On=@Click
MESSAGE @,,1 Yılan Oyunu
RETURN 1

On=@DClick
IF (<SRC.TAG.EXP> < 5000)
  SRC.SYSM K,Oyunu oynamak icin hesabinizda 5k tix bulunmamaktadir.
  RETURN 1
ENDIF

IF (STRMATCH('<LINK.BASEID>', 'i_sg_snake'))
  REF1=<LINK.TAG.PLAYER>
  IF (<REF1.ISPLAYER>)
    RETURN 1
  ENDIF
ELSE //İlk önce yılanımızı oluşturalım...
  SERV.NEWITEM i_sg_snake
  NEW.P=<DEF.snake_coordinates>
  LINK=<NEW>
  NEW.UPDATE
ENDIF
f_sg_block
f_sg_food
LINK.TAG.PLAYER=<SRC>
LINK.TAG0.OVERRIDE_SG_SPEED=0
SRC.DIALOGCLOSEALL
SDIALOG d_sg_dialog,2
RETURN 1

[DIALOG d_sg_dialog]
100, 100
NOCLOSE
PAGE 1
//RESIZEPIC 81 500 8500 305 126
RESIZEPIC 81 500 3000 110 56
RESIZEPIC 321 500 3000 110 56
DHTMLGUMP 347 515 200 20 0 0 <SRC.ACCOUNT.DTAG0.SGPOINT> : Puan
DHTMLGUMP 115 515 100 20 0 0 Oyunu Bitir
BUTTON 85 510 2151 2152 5 5 5

IF (<LINK.dTAG0.OVERRIDE_SG_SPEED> > 1) || !(<LINK.dTAG0.OVERRIDE_SG_SPEED>)
  RESIZEPIC 201 500 3000 110 56
  DHTMLGUMP 235 515 200 20 0 0 Zorlastir
  BUTTON 205 513 1155 1153 10 10 6
ENDIF

IF !(STRMATCH('<LINK.TAG.DIR>', 'w')) && !(STRMATCH('<LINK.TAG.DIR>', 'e'))
  BUTTON 200 83 4507 4507 5 5 1
  BUTTON 250 133 4503 4503 5 5 2
ENDIF

IF !(STRMATCH('<LINK.TAG.DIR>', 'n')) && !(STRMATCH('<LINK.TAG.DIR>', 's'))
  BUTTON 200 133 4505 4505 5 5 3
  BUTTON 250 85 4501 4501 5 5 4
ENDIF

PAGE 2
RESIZEPIC 0 500 8500 305 126
RESIZEPIC 0 0 3000 180 150
RESIZEPIC 0 25 3000 180 30
RESIZEPIC 0 55 3000 180 30
RESIZEPIC 0 85 3000 180 30

DHTMLGUMP 30 5 200 036 0 0 Yılan Oyunu Seviye Sec
DHTMLGUMP 128 120 100 20 0 0 Ödüller
DHTMLGUMP 48 120 40 20 0 0 Vazgec
DHTMLGUMP 50 30 200 20 0 0 Kolay Seviye
DHTMLGUMP 50 60 200 20 0 0 Orta Seviye
DHTMLGUMP 50 90 200 20 0 0 Zor Seviye


BUTTON 20 30 210 211 5 5 7
BUTTON 20 60 210 211 5 5 8
BUTTON 20 90 210 211 5 5 9
BUTTON 15 115 2151 2152 5 5 5
BUTTON 95 115 2151 2152 5 5 10


[DIALOG d_sg_dialog BUTTON]
On=1
LINK.LINK=<UID>
LINK.SG_MOVELEFT

On=2
LINK.LINK=<UID>
LINK.SG_MOVERIGHT

On=3
LINK.LINK=<UID>
LINK.SG_MOVEDOWN

On=4
LINK.LINK=<UID>
LINK.SG_MOVEUP

On=5
LINK.SG_GAMEOVER

On=6
LOCAL.CURSPEED=<DDEF.snake_speed>
IF (<LINK.dTAG0.OVERRIDE_SG_SPEED>)
  LOCAL.CURSPEED=<LINK.dTAG0.OVERRIDE_SG_SPEED>
ENDIF
LOCAL.CURSPEED -=1
IF (<DLOCAL.CURSPEED> <= 0)
  LOCAL.CURSPEED=1
ENDIF
LINK.TAG0.OVERRIDE_SG_SPEED=<DLOCAL.CURSPEED>
LINK.TAG0.OVERRIDE_SG_POINT=<DLOCAL.CURSPEED>
SDIALOG d_sg_dialog

On=7 //Kolay
LINK.TAG0.OVERRIDE_SG_SPEED=4
LINK.TAG0.OVERRIDE_SG_POINT=4
SDIALOG d_sg_dialog
src.tag.exp -=5000

On=8 //Orta
LINK.TAG0.OVERRIDE_SG_SPEED=2
LINK.TAG0.OVERRIDE_SG_POINT=2
SDIALOG d_sg_dialog
src.tag.exp -=5000

On=9 //Zor
LINK.TAG0.OVERRIDE_SG_SPEED=1
LINK.TAG0.OVERRIDE_SG_POINT=1
SDIALOG d_sg_dialog
src.tag.exp -=5000
On=10
LINK.SG_GAMEOVER
yilan
src.sysm b,Trade Roomda (.yilan) Yazarak bu menüye Ulaşabilirsiniz...

[FUNCTION dirConverter]
IF (STRMATCH('<ARGS>', 'n'))
  RETURN s
ELIF (STRMATCH('<ARGS>', 's'))
  RETURN n
ELIF (STRMATCH('<ARGS>', 'e'))
  RETURN w
ELIF (STRMATCH('<ARGS>', 'w'))
  RETURN e
ENDIF
RETURN 0

[Itemdef i_sg_food]
ID=9906
NAME=food

On=@Create
ATTR=attr_static|attr_move_never
COLOR=07a1

On=@Click
RETURN 1

[FUNCTION f_sg_block]
LOCAL.X=<EVAL <DDEF.snake_max_x> - <DDEF.snake_min_x>>
LOCAL.Y=<EVAL <DDEF.snake_max_y> - <DDEF.snake_min_y>>

LOCAL.INS=<DLOCAL.Y>
IF (<DLOCAL.X> > <DLOCAL.Y>)
  LOCAL.INS=<DLOCAL.X>
ENDIF

FORITEMS <DLOCAL.INS>
  IF (STRMATCH('<BASEID>','i_sg_block'))
    REMOVE
  ENDIF
ENDFOR

IF (<DARGS>)
  RETURN 1
ENDIF

FOR 1 8
  SERV.NEWITEM i_sg_block
  NEW.P <R<DDEF.snake_min_x>,<DDEF.snake_max_x>>,<R<DDEF.snake_min_y>,<DDEF.snake_max_y>>
  NEW.UPDATE
 
  IF (STRMATCH('<NEW.P>', '<DEF.snake_coordinates>')) //Başlangıç noktasına denk gelirse kaldıralım.
    REMOVE
  ENDIF
ENDFOR

[FUNCTION f_sg_food]
LOCAL.X=<EVAL <DDEF.snake_max_x> - <DDEF.snake_min_x>>
LOCAL.Y=<EVAL <DDEF.snake_max_y> - <DDEF.snake_min_y>>

LOCAL.INS=<DLOCAL.Y>
IF (<DLOCAL.X> > <DLOCAL.Y>)
  LOCAL.INS=<DLOCAL.X>
ENDIF

FORITEMS <DLOCAL.INS>
  IF (STRMATCH('<BASEID>','i_sg_food'))
    REMOVE
  ENDIF
ENDFOR

IF (<DARGS>)
  RETURN 1
ENDIF

SERV.NEWITEM i_sg_food
NEW.P <R<DDEF.snake_min_x>,<DDEF.snake_max_x>>,<R<DDEF.snake_min_y>,<DDEF.snake_max_y>>
NEW.UPDATE
NEW.SG_CHECKAVAIBILITY

[FUNCTION SG_CHECKAVAIBILITY]
REF1=<UID>
LOCAL.CONT=0
FORITEMS 0
  IF !(<UID> == <REF1>)
    LOCAL.CONT=1
  ENDIF
ENDFOR

IF (<DLOCAL.CONT>)
  f_sg_food
ENDIF

[Itemdef i_sg_block]
ID=0788
NAME=block
TYPE=t_normal

On=@Create
COLOR=0846
ATTR=attr_static|attr_move_never

[FUNCTION sg_getSpeed]
LOCAL.CUR=<DDEF.snake_speed>
IF (<dTAG0.OVERRIDE_SG_SPEED>)
  LOCAL.CUR=<dTAG0.OVERRIDE_SG_SPEED>
ENDIF
RETURN <DLOCAL.CUR>



Yorumlar

Henüz yorum yapılmamıştır.

Oylamalar

Oylama :
Üyelerin oylama ortalaması (10 dışında) : 9.00   
Oylar: 1 den itibaren 25-07-2017 17:44

Benzer Sayfalar

SayfalarYorumlarGönderenTarih


Keywords:

ultima online, RunUO, ultima online download, sphere scripting, role play, uo grafik, second age ultima, uo loop, macroman, pvp server, server kurulumu, sphere, multool, ml mulls, 56b 55r 55i, htmlgumps, client 4x, client edit, sphere release, osi, rp server, sunucular, ghost mouse, inside uo, kingdom reborn, stygian abyss, uo nasıl oynanır, mondain's legacy, age of shadows, world build, grandmaster, ultima online pvp, player dosyaları, ultima online indir, frp game, RunUO 1.0.0, razor, uo rice, hue editör, skill tools, ultima online patch, axis, world build, verdata, verdata patcher, map editör, gump editör, mul patcher, aos mulls, scriptler, anim edit, anim publish, hues mul, hosting vps, event dialog, account sistemi, skill gain, static yapımı,