Event Property Help

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

Event Property Help

Post by Devlin »

I had a script that pulled the Lvl/XP from my wep and displayed it in a little box. A new change botched the XP portion of this. Two questions

-Anyone able to tweak this to get the XP functioning again?
-Anyone know how to scan your wep in hand for the id and save it to a variable? Gotta manually set each wep as it is.

Code: Select all

menu show
menu window size 25 50
menu text LVL 35 5
menu text EXP 27 25

;finditem C_ , #lhandid
;set %wepID #findid

set %wepID STBTSND ; Change to your weapon

loop:
onhotkey F1 set %wepID #lliftedid
event property %wepID
str pos #property Experience
set %start #strres + 11
str mid #property %start 7
set %EXP #strres
menu set EXP XP: %EXP

event property %wepID
str pos #property Level
set %start #strres + 7
str mid #property %start 2
set %LVL #strres
menu set LVL Level: %LVL


goto loop:
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
Relysis
Grandmaster Scribe
Posts: 85
Joined: Tue Apr 10, 2012 4:48 pm

Re: Event Property Help

Post by Relysis »

Hmm, yeah #property appears to be broken by the html tag <basefont color... On some weapons I'm able to return Experience as a property, but even in those cases increasing the string length past the end of the xp value will display <basefont... No string past this can be returned (quiver, abilities).
Dramoor
Legendary Scribe
Posts: 450
Joined: Wed Feb 23, 2011 7:37 pm

Re: Event Property Help

Post by Dramoor »

I don't use easyuo anymore but


I think you are both crazy. I see the Level and the XP on there perfectly fine.

But here you go (since #RhandID and #LhandID don't work properly)

Code: Select all

menu show
menu window size 25 50
menu text LVL 35 5
menu text EXP 27 25

;finditem C_ , #lhandid
;set %wepID #findid

;set %wepID STBTSND ; Change to your weapon

loop:
onhotkey F1
{
set %wepID #lliftedid
}
event property %wepID
str pos #property Experience
set %start #strres + 11
str mid #property %start 7
set %EXP #strres
menu set EXP XP: %EXP

event property %wepID
str pos #property Level
set %start #strres + 7
str mid #property %start 2
set %LVL #strres
menu set LVL Level: %LVL


goto loop:

Now you just hit F1 after equipping whatever weapon you want and you're good.
You forgot the { and } to make it work. Simple fix.
Dramoor
Legendary Scribe
Posts: 450
Joined: Wed Feb 23, 2011 7:37 pm

Re: Event Property Help

Post by Dramoor »

After thinking about it.


You could do this and use 2 hotkeys and just equip which one ur going to do, then hit the hotkey after to set the id (still is same result imho) This also would not work with one handed weapons while having a shield equipped ahead of time as this would unequip and re equip the weapon thus giving the shield slot the hitting stance and no exp gained on the weapon, but it at least does what u wanted it to.

Code: Select all

menu show
menu window size 25 50
menu text LVL 35 5
menu text EXP 27 25

;finditem C_ , #lhandid
;set %wepID #findid

;set %wepID STBTSND ; Change to your weapon

loop:
onhotkey F1
{
;set %wepID #lliftedid
 event macro 24 2 ;disarm Right
  set %wepID #RHandID
  wait 60
  event macro 24 2 ;rearm right
}

onhotkey F2
{
  event macro 24 1 ;disarm left
  set %wepID #LHandID
  wait 60
  event macro 24 1 ; rearm right
  }


event property %wepID
str pos #property Experience
set %start #strres + 11
str mid #property %start 7
set %EXP #strres
menu set EXP XP: %EXP

event property %wepID
str pos #property Level
set %start #strres + 7
str mid #property %start 2
set %LVL #strres
menu set LVL Level: %LVL


goto loop:
Locked