Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
calling typedef problem
|
Author |
Message |
ograso
Journeyman
Posts: 135
Likes Given: 10
Likes Received: 2 in 2 posts
Joined: May 2014
Reputation: 0
|
calling typedef problem
Hey all,
I am trying to use chest system but I have a problem on chest spawn. Basicly I am using a pickaxe item for digging and I give a message "gratz. You pullout". Working perfectly till this line. after that script must be call this trigger "NEW.TYPE=T_L1MAP_CHEST" but nothing happened.
I dont understand Where is the problem
Code:
[ITEMDEF 0e85]
DEFNAME=i_pickaxe
TYPE=t_weapon_mace_pick
ReqStr=50
TEVENTS=t_equipitem
DUPELIST=0e86
ON=@Create
HITPOINTS={36 48}
ON=@Targon_item
if ((<src.targ.baseid>==i_plant_rushes) || (<src.targ.baseid> == i_plant_fern) || (<src.targ.baseid> == i_plant_fern_5))
src.anim 12
src.sound 0126
VAR.PERCENT=<EVAL RAND(100)>
if (<EVAL <VAR.PERCENT>>>80)
src.sysmessage @60 gratz. You pullout
NEW.TYPE=T_L1MAP_CHEST
elseif (<EVAL <VAR.PERCENT>><20)
src.sysmessage @38 bla bla bla
endif
endif
Return 1
ON=@Targon_ground
[ITEMDEF i_ttm_l1]
ID=i_map
NAME=Define haritasi [Level-1]
CATEGORY=Maps - Treasure
SUBSECTION=Level 1
DESCRIPTION=Map
ON=@Create
color=1153
TYPE=T_L1MAP
DORAND 2
MOREP=2354,3447,0
MOREP=1133,3403,0
ENDDO
[TYPEDEF T_L1MAP]
//LEVEL1MAP Deciphering
ON=@DCLICK
IF (!<SRC.RESTEST 1 i_pickaxe>)
SRC.MESSAGE <def.msg_no_pickaxe>
RETURN 1
endif
IF (<SRC.CARTOGRAPHY><50.0)
SRC.MESSAGE <def.msg_no_cartography>
RETURN 1
endif
IF (<MORE><0FFFF)
NAME=Acilmis Harita
TYPE=T_MAP
MORE1=((<MOREX> -180)*010000)+(<MOREY> -180)
MORE2=((<MOREX> +180)*010000)+(<MOREY> +180)
PIN=105,105 // dead center.
NEWITEM <DEF.TMTILES> //Place trigger random tile
NEW.TYPE=T_L1MAP_CHEST
NEW.TIMER=-1
NEW.ATTR=attr_static|attr_move_never
NEW.LINK=<UID>
NEW.P=<MOREP>
RETURN 0
ENDIF
[TYPEDEF T_L1MAP_CHEST]
//LEVEL1MAP Treasure map Chest Spawn
ON=@DCLICK
IF (<DISTANCE>>3)
src.MESSAGE="sdfdflkjkl"
RETURN 1
endif
IF (<LINK.TOPOBJ.UID> != <SRC.UID>)
RETURN 1
endif
IF ((<SRC.FINDLAYER(layer_hand1).BASEID>==i_PICKAXE) && (<SRC.MINING>>50.0))
SRC.ANIM 0B
SOUND 0126
NEWITEM TM_LOOT_1 // poor loot
NEW.P=<P>
SRC.MESSAGE=<def.msg_dig_treasure>
LINK.REMOVE //remove linked deciphered map
NEWITEM=i_Treas_Spawn_VEasy
NEW.P=<P>
REMOVE //remove trigger plant
RETURN 1
endif
RETURN 1
[TEMPLATE TM_LOOT_1]
CONTAINER=i_chest_treasure //Metal Chest
MORE2=1
ITEM=POOR_MAGIC_GOODIE
|
|
06-13-2014 07:25 AM |
|
|
ograso
Journeyman
Posts: 135
Likes Given: 10
Likes Received: 2 in 2 posts
Joined: May 2014
Reputation: 0
|
RE: calling typedef problem
(06-13-2014 09:02 AM)darksun84 Wrote: serv.newitem is missing?
If loop is working When I use the pickaxe and trying to dig on the tile. I can see the "gratz. You pullout" message but should be trig NEW.TYPE=T_L1MAP line but nothing happened. Thats mean, the treasure show up when I dig to tile but nothing happened..
Code:
ON=@Targon_item
if ((<src.targ.baseid>==i_plant_rushes) || (<src.targ.baseid> == i_plant_fern) || (<src.targ.baseid> == i_plant_fern_5))
src.anim 12
src.sound 0126
VAR.PERCENT=<EVAL RAND(100)>
if (<EVAL <VAR.PERCENT>>>80)
src.sysmessage @60 gratz. You pullout
NEW.TYPE=T_L1MAP
elseif (<EVAL <VAR.PERCENT>><20)
src.sysmessage @38 bla bla bla
endif
endif
Return 1
(This post was last modified: 06-13-2014 10:05 AM by ograso.)
|
|
06-13-2014 09:58 AM |
|
|
User(s) browsing this thread: 2 Guest(s)