Ultima Online Fan Board > UO-Related Tutorials

Needing help with learning to script

(1/5) > >>

cybercasper:
I have been looking and looking trying to read as much as possible but I am still either dumb or blind. I saw that someone was willing to help people start learning to script with a small script where you pick a chest or crate in ur house and drag and item like a sword to the chest. would anyone be willing to spare sometime and let me try and get this to work and maybe help me along in my scripting career. I would really like to contribute something even if it is just some knowledge of what I learn on the way if I never become really good at it.

cybercasper:
This is what I got so far

--- Code: ---finditem WW ; the weapon type
if #FINDCNT > 0
{
            Exevent Drag #findID   ; finding the weapon and picking it up
            wait 10
            Exevent Dropc #CONTID PEDWYND    ; dropping it into the container of choice
            wait 10
halt
}


--- End code ---

Crisis:
This is quick and basic and I cannot check it but it should give you an idea to get you going


--- Code: ---set %weapon WW
set %secure PEDWYND

finditem %weapon C_ , #backpackid
if #FINDCNT > 0
for #findindex 1 #findcnt
  {
    exevent drag #findid
    exevent drop %secure
  }
return
--- End code ---

cybercasper:
Ok cool just trying to learn and that is what he was offering kind of teaching I got it to work the way I did but ur way looks so much easier and nicer than mine

cybercasper:
just tried yours out something weird is going on with it the weapon disappears until I log out an back in

Navigation

[0] Message Index

[#] Next page

Go to full version