execute an action in a dropdownbox
i try to make a windows with a dropdownbox wich allow to choose a destination and cast the spell/use the object to go to the chosen place
for exemple if i chose in the dropdownbox : Spire portals , it cast the wizard portal to the spire i tried to use but it's not working OnSelect="/useability 1634378213" and OnSelect="action=/useability 1634378213" is there a way to execute a command just by selecting a line in the box ? also how can i make the first line of the dropdownbox always appear first or going back to it after executing a command? and last question: is it possible to equip an item, use it and maybe equip back the previous item ? for example to use the quel'ule or hua mein item thanks in advance :) |
The way you have it, every time you select an item it will try to use ability 1634378213 if you had the syntax correct.
First you never us the / for commands in the script. OnSelect="useability 1634378213" is the correct way. Here is the way I would do what ur wanting to do.. Code:
<DataSource Name="blah"> |
When calling commands via the UI, you never includes the slashes.
And it is possible to swap an item cast it and swap but, BUT the item has it be an instant cast. Fishbone Earring is an example. This is only possible with the in-game macro system though. Don't think there is any other way to equip/de-equip a specific item, unless I'm mistaken. |
oh ok i will try like that thanks :)
|
ok so now it work perfectly
i now have to find a way to be able to equip and use an item, i tried with the id of a macro wich equip and use, but it don't work as long an item need to be equiped before being used i won't be able to put it in i was wondering if it was possible to put two command in the same data, when i select it execute the first one , and with the help of a button it execute the second first one equip and second use , could be a solution but not sure it is do-able sorry to disturb you again guys :) but it's not as simple as i tought at first :D |
Something like..
Code:
<DataSource Name="blah"> |
i really have a lot to learn :D thanks you :)
|
Just remember scripts execute tom to bottom, right to left..
|
once again i'm stuck so here i am
i must be doing something wrong for the script part , the ui revert back tu default with /loadui each time i try something within the script="" i tried something like that : Code:
<Data Name="TP007" text="Quel'ule" Script= OnActivate = "inventory equipvdl=-703437333" Code:
<Data Name="TP007" text="Quel'ule" Script="inventory equipvdl=-703437333" Code:
<Data Name="TP007" text="Quel'ule" Script="inventory equipvdl=-703437333" /> \aITEM -703437333 -1044721553:[Pierre de téléportation de Quel'ule]\/a am i right ? ) could you give me an example of working script with two command to execute ? or is there a ui piece i could look at to the see how it work ? and for the button part, do i need to choose a location and size to be able to use it or does it activate each time i choose the line ? |
Code:
<Data Name="TP007" text="Quel'ule" Script="inventory equipvdl -703437333 |
Just as a side note... a few of your code blocks were having trouble because they were invalid XML and EQ2 could not parse it.
<Data Name="TP007" text="Quel'ule" Script= OnActivate = "inventory equipvdl=-703437333" "use_itemvdl=-703437333" /> Here we have a quoted string floating alone. It needs to be assigned to an Attribute. Nothing is being assigned to this Attribute. You cannot assign another Attribute to an Attribute. A single quoted string must be assigned to an XML Attribute. If you use more than one line, you must not close the quotation. You cannot use quotation marks within a quoted string or it will prematurely close the quotation. To use a quotation mark character in XML, you must use '"'. You shouldn't really have a need to use a quotation mark in EQ2 scripting however... only if you want a quotation mark visible in a label or something. |
i've finally get it to work partially, but there something strange :confused:
if i choose one of the line then clicking the button, the effect of the spell/item ( equip first, and use at second press on the button for the item) launch correctly but if i try to launch another one after that it's like it keep in memory the first script but not the new one here is the code for the ui as it is now Code:
<?xml version="1.0" encoding="utf-8"?> |
Are you editing in plain text, or in the UIBuilder?
Because single apostrophe's need to be replaced with ' |
i use notepad, i will change the ' but it that the cause of the problem ? because the ui lauch well and work exepted for the "keep script in memory" thing:(
|
Try
Code:
<?xml version="1.0" encoding="utf-8"?> |
Quote:
If you save in the UIbuilder it will convert them to ' for some reason but it isn't needed. |
Actually this is better coding here.. It checks to see if a script actually needs to be executed..
Code:
<?xml version="1.0" encoding="utf-8"?> |
i'm in a raid right know i will try it as soon as i can , thanks for all your help, advice and for pointing my mistake :)
so the IsScript="true" launch the script without any button if i understand correctly is there a limitation for using it or can it work with any kind of scripting ? in this line <Data Name="TP001" text="-------------------Spell-------------------" IsScript="true" /> you code the IsScript on true but on this one , it's on false <Data Name="TP006" text="----------------Item--------------------" IsScript="false" /> is there a reason ? i would like to understand how it work :) Edit i saw the button line after re-reading the code :p <Button Location="1,1" Name="TpButton" OnActivate="" OnPress="Activated=Parent.Tp_Dropdownbox.SelectedItem.IsScript OnActivate=Parent.Tp_Dropdownbox.SelectedItem.Script" ScrollExtent="19,19" Size="19,19" Style="/CommonElements.SmallPushButton" /> is it normal to leave this OnActivate empty ? |
Quote:
Quote:
Quote:
Quote:
|
so i tested the two version , ( with IsScript and without it ) and none work , it does the same thing i described before :confused:
i really don't know what to do , i understand most of my mistake with the help of your comment , but now i'm completely lost otherwise maybe i will be making two dropdownbox, one for the spell the other for item but it's strange it don't work multiple time with only one DDB :/ |
HAHA me and my no prof reading..
Change OnActivated to OnActivate in the Dropdownbox.. Mybad.. |
lol coding can be really strict :)
i will try it after work :) |
Quote:
|
Thanks it work perfectly now :) now i just need to gather all the vdl number for all the item with Teleports effect :)
edit : hum i just noticed a thing, the home tp id number change with the town your from, is there a way to imput all the ability id under the same line , so when i click the "home sweet home" line it will be able to launch the available "city tp" ? Found the solution, i was thinking to hard ^^ if i can disturb you one last time :p , i know i's impossible to create a slot to contain an ingame macro , but is there a way to add a button to equip the previous item ( after using a script with an item ) without specifying a vdl number or something like because no one use the same item , if in my case i use one of the SF charm, someone else might use a better item in the slot where the script equip an item before using it ( don't know if i'm explaining well :/ ) |
i tried to put some color on the text but it don't seem to work
i tried with TextColor Code:
<Data Name="TP007" TextColor="#CCCCFF" text="***ANTONICA***" IsScript="false" /> |
Text color in the drop down is controlled by the styles in the dropdownbox object. Each like of the drop down can not have separate colors.
|
well i'm just missing one vdl number , the one for "wormhole generator: moors of ykesha "
is someone can get it for me ? i asked around me , but no one has it neither eq2.wikia or zam |
If you need to get an item/spell Id number, see here:
http://www.eq2interface.com/forums/s...ad.php?t=13831 |
it's not that i don't know how to get it, it's just no one on my server ( Storms ) have the object, or even learn the recipe. that why i was asking for it here :)
|
Sites like lootdb.com can be good sources to get ItemID's as well.
|
i saw this one but it's the one for the recipe not the item itself
right now the ui use the fetish graphic style , is it possible to use the default one so any user can use it ? or even better a way to point to the graphic of the custom ui each one use ? if i change Style="/Fetish.dropdownlist.dropdown_default" to Style="/Default.dropdownlist.dropdown_default" will it work or did i miss something ? |
/CommonElements.Dropdown.data.style
should set it to default. |
Thanks :)
i think i will take some note , to remember all i learned while doing this window ^^ |
Quote:
Just put a Useability for each town in the script, like that : Code:
OnPress = "Useability XXXX Useability YYYYY useability ZZZZZ" useability 2993900090 Qeynos useability 4122759557 Freeport useability 368171195 Neriak useability 2358838930 Gorowyn useability 3114477944 Kelethin useability 995220757 Maj dul useability 3266969222 Guild Hall use_itemvdl -1476267979 Splitpaw use_itemvdl -159427518 Antonica (tinkering)) use_itemvdl 511770252 Commonlands (tinkering)) use_itemvdl 1465474154 Stein of Recollection (LoN) use_itemvdl -1974692711 Stein of the Alesmith (LoN) @ ++ Ewen@Storms |
oh ewen je ne te connaissait pas ce talent , c'est hithahrk ;)
j'ai trouvé la solution a ce probleme mais merci quand même , comme je l'ai dit il ne me manque plus qu'un objet |
All times are GMT -5. The time now is 03:06 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI