ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Biza on November 11, 2015, 08:35:58 AM
-
So when I open the character context menu (for insurance, titles menu ect) by clicking on my character I get
all info in container info down to #contkind
After that its just normal_gump yc yc 0. I want to use exevent popup to bring up the gump in my script yet I need the ID of the player context menu. Is this not added in to euo? or is something broken on my end? If anyone has the ID that would be just grand as well.
-
You just use the #CHARID variable for that. Note on OSI, the selection of the menu index doesn't work in EUO (but does on RunUO). So for EA/OSI, you will need to click the menu selection by hand unless that's been fixed.
-
Bleh, that stinks. I have problems in my script clicking myself.. pet gets in the way, then I try to release him, clicking on monsters ect.. I doubt it will get fixed, how long has it been since tiles worked? yeah, didn't think so.
-
Bleh, that stinks. I have problems in my script clicking myself.. pet gets in the way, then I try to release him, clicking on monsters ect.. I doubt it will get fixed, how long has it been since tiles worked? yeah, didn't think so.
You shouldn't have to worry about actually clicking yourself. exevent popup still "works" in that it will open the context menu at 0,0 on your screen. You can use the conposx,y offsets to determine the line you need to click. I forget how many pixels there are per line, but it shouldn't interfere with your character because the context menu is opened nearly off the screen.
lol, also in looking at the EasyUO wiki regarding this, at version 252, the syntax function changed of this command. Instead of fixing the old syntax, it was changed for some reason. Frankly, I like the way it was intended to work better. *shrugs*
http://wiki.easyuo.com/index.php?title=Exevent_Popup
-
ooooooOOOoooHHHhhHHH
it opens it up 0,0 on the screen not on my character, you just saved me a lot of frustration good sir! exevent
insureit:
;;;;SET %cursorX #cliXRes / 2 + #cliLeft + 10
;;;;SET %cursorY #cliYRes / 2 + #cliTop - 60
;;;;click %cursorX %cursorY f ; clicks on the user
;;;;wait 3s
exevent popup #charid 0 0
wait 50
IF #contkind <> %menukind
{
goto insureit:
}
SET %cursorX %cursorX + 30
SET %cursorY %cursorY + 180
click %cursorX %cursorY f
wait 20
not clicking right in the menu but it will when im done. I guess I can remove the contkind check as well since it will always open the context I want with #charid. thanks.
-
have you try
exevent Popup #CHARID to open the list
-
ya 2 posts up lol.
-
I play on OSI and this command work. What are you trying to bring up.
Let said you want to see your rating.
exevent Popup #CHARID
wait 10
gosub offsetclick 20 75
halt
;=========== offset click sub =======
sub offsetclick
set !clickx ( #contposx + %1 )
set !clicky ( #contposy + %2 )
click !clickx !clicky %3 %4 %5
return
;============= end sub =======
Voila.
-
It works, TM beat you to it a few posts up.
-
You shouldn't have to worry about actually clicking yourself. exevent popup still "works" in that it will open the context menu at 0,0 on your screen. You can use the conposx,y offsets to determine the line you need to click. I forget how many pixels there are per line, but it shouldn't interfere with your character because the context menu is opened nearly off the screen.
lol, also in looking at the EasyUO wiki regarding this, at version 252, the syntax function changed of this command. Instead of fixing the old syntax, it was changed for some reason. Frankly, I like the way it was intended to work better. *shrugs*
I just got done playing with this - BTW , I went back to a EUO ver 241 so I could keep the context menuitem selection parameter - I agree that the new option kinda stinks:) Anyways, there is a 12 pixel border at the top and bottom of the context menus, and each entry is 18 pixels tall. I believe that there is also a 12 pixel left hand border, but I just set my ContY offset to 15 and it worked. So :
To calculate line #4 for example : Get the ContX position on screen ; add 12 (for top border), Then I added ( (selection# - 1) * 18 ) + 9 to place me halfway down the 4th selection.
You can also use this to test how many context options there are (ContX Size - pull it from the xxx_yyy field) , then subtract 24 (borders) and divide by 18. So that way, if someone programs a selection #5 on a 3-item menu, you can error out.
LochLinn