Can I make a scheme for this scripting language?

Discussion Forums discussion Can I make a scheme for this scripting language?

This topic contains 0 voices and has 1 reply.

Viewing 2 posts - 1 through 2 (of 2 total)
Author Posts
Author Posts
December 10, 2006 at 5:16 am #150

Kyote
Member

Hello, I’ve been using PN off/on for several years. I think it’s fantastic for the things is does, especially in PN2 with it’s brace matching. SWEET!

I play UO(Ultima Online) and use a program called EasyUO. It has it’s own scripting language thats pretty simple. Fairly similar to some old basic languages. Here’s an example of a script:

;This script is simply to move gold into the ledger

;using a hotkey.

;The key-specifier can either be

;A-Z, 0-9, F1-F12 and ESC, BACK, TAB, ENTER, PAUSE,

;CAPSLOCK, SPACE, PGDN, PGUP, END, HOME, LEFT, RIGHT,

;UP, DOWN, PRNSCR, INSERT, DELETE, NUMLOCK or SCROLLLOCK.

if #CHARNAME = N/A

gosub openStatus

set %backpack #BACKPACKID

DISPLAY OK Target your Gold Ledger!

gosub chooseTarget

SET %myLedger #LTARGETID

Hotkeying:

onhotkey F2

gosub moveToLedger

goto Hotkeying

sub findGold

finditem POF C_ , %backpack

if #findkind = -1

return #FALSE

SET %goldID #FINDID

return #TRUE

return #FALSE

sub chooseTarget

SET #TARGCURS 1

waitfortarget:

IF #TARGCURS = 1

GOTO waitfortarget

return

sub openStatus

event macro 8 2

wait 5

event macro 10 2

return

sub moveToLedger

gosub findGold

if #RESULT = #FALSE

return

;nextCPos 0 0

SET #LOBJECTID %myLedger

event macro 17

waitforgump:

if #CONTNAME <> generic_gump && #CONTKIND <> MGT && #CONTSIZE <> 400_365

goto waitforgump

SET %ledgerX #CONTPOSX + 330

SET %ledgerY #CONTPOSY + 140

click %ledgerX %ledgerY f

waitfortarget:

if #TARGCURS <> 1

goto waitfortarget

SET #LTARGETID %goldID

event macro 22

wait 5

click %ledgerX %ledgerY r

;pause

return

I’d dearly love to make a scheme to allow me to write my scripts in PN2, but I’m rather new to this type os usage in PN. Is it possible to use a current Lexar with this scripting language or would I need to make one? If I have to make one I doubt I’ll be able to use PN2 for this.

Should I be able to make a scheme for this I think there will be ALOT more interest in PN. The member list of EasyUO is pretty extensive, many of which are long time coders of various languages, and I know many would love to use something that would allow them to speed up developement of their script writing.

Thank you for any help you can provide for this.

December 19, 2006 at 11:59 am #15234

simon
Key Master

This is a fairly simple language, you should be able to make it work by looking at a .userscheme file and customising it. Have a look in pnschemes for a sample one for VHDL. Ask for help here if you run into trouble.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.