Thread Rating:
- 0 Votes - 0 Average
- 1
- 2
- 3
- 4
- 5
Clothing Bless Deed & ContextMenus
|
Author |
Message |
Reflex
Journeyman
Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1
|
Clothing Bless Deed & ContextMenus
Now, for some reason.. After I bless an Item with the CBD the blessed item always calls the contextmenu instead of only when i want it to call it ? Even if I get the else message it still displays the context menu? wth.. why?
Code:
//override for t_clothing
[TYPEDEF t_clothing]
ON=@Click
IF (<TAG0.isblessed> = 1)
src.sysmessage This has tag.isblessed 1 and needs to call a contextmenu
TRIGGER ContextMenuRequest
message <name>
return 1 // thought maybe the returns were causing this.. dunno
ELSE
src.sysmessage Else
message <name>
RETURN 1
ENDIF
ON=@ContextMenuRequest
SRC.AddContextEntry 1000,3006278,0
SRC.AddContextEntry 2000,3006208,0
ON=@ContextMenuSelect
IF (<ARGN>==1000)
SRC.SAY CUT ARTICLE OF BLESSED CLOTHING
ENDIF
IF (<ARGN>==2000)
SRC.SAY GET CBD BACK
ENDIF
[eof]
[itemdef i_cbd]
id=i_deed
name=Clothing Bless Deed
on=@create
attr=04
CATEGORY=Custom
SUBSECTION=Special
DESCRIPTION=Clothing Bless Deed
ON=@DCLICK
IF (<CONT> == <SRC.FINDLAYER(21).uid>)
//src.sysmessageloc 1 1045156 //these dont seem to want to work?
src.sysmessageua 955 0 0 1 Select the article of clothing you wish to bless.
TARGETF f_BlessAnItem
RETURN 1
ELSE
SRC.SYSMESSAGELOC 1 1045156 // must be in backpack
RETURN 1
ENDIF
[FUNCTION f_BlessAnItem]
IF <ARGO.ISITEM>
IF (STRMATCH(*t_clothing*,<ARGO.TYPE>)) && (<ARGO.CONT> == <SRC.FINDLAYER(21).uid>)
IF !(<ARGO.ATTR> & attr_newbie)
SRC.SYSMESSAGELOC 1 1010025 1 // this cliloc wont display
//src.sysmessageua 955 0 0 1 The <ARGO.name> is now Blessed.
ARGO.ATTR=04
ARGO.NAME=<ARGO.NAME> [Blessed]
ARGO.HITPOINTS=0fffffff
ARGO.tag.isblessed=1
consume 1 i_cbd // is this ok or is there a more secure way?
ELSE
sysmessageua 955 0 0 1 This article of clothing is already Newbied or Blessed.
RETURN 1
ENDIF
ELSE
SRC.SYSMESSAGE This is not an article of clothing?
SRC.SYSMESSAGELOC 1 1005019
RETURN 1
ENDIF
ELSE
sysmessageua 955 0 0 1 This item is not able to be blessed.
RETURN 1
ENDIF
ON=@Targon_Char
src.sysmessageua 955 0 0 1 I dont think you can make someone else a newbie this way :/
return 1
//end of cbd
(This post was last modified: 04-21-2012 05:10 PM by Reflex.)
|
|
04-21-2012 05:04 PM |
|
|
User(s) browsing this thread: 1 Guest(s)