y785 / script-api Goto Github PK
View Code? Open in Web Editor NEWA java MapleStory🍁 scripting api.
License: MIT License
A java MapleStory🍁 scripting api.
License: MIT License
Could be something like
default exchange(int... args) { exchange(Tuple.listOf(args)); }
appendFormat -> appendf
...
And others in the same vein.
Add support for all client features under ScriptFormatter.
i.e.
ScriptFormatter.format("#m{}#", fieldId) would be ScriptFormatter.field(fieldId)
tuple.forEach((left, right)->x
See https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Map.html#forEach(java.util.function.BiConsumer) for an example
There isn't a way to determine the script name being called.
Normally this isn't needed, but since I added aliases (multiple names -> single script), it is.
This is similar to how the notfound scripts work.
Need to add a way for older versions to offset the script types based on version, or just set them.
Parameters just need to be switched around 🙂
Need to expand upon say/askMenu/askYesno to include all the default types.
This is more about adding the messengers with correct/needed parameters.
Missing:
SayImage
AskText
AskNumber
AskQuiz
AskSpeedQuiz
AskAvatar
AskMemberShopAvatar
AskPet
AskPetAll
Script(?)
AskAccept
AskBoxText
AskSlideMenu
AskCenter(?)
Example
<T> Tuple<T,T>[] for(T... pairs)
Should be a relatively simple fix, but it needs fixing nonetheless.
askMenu doesn't use always use the indices sent to the client, it uses an array's. This will cause the script to end on custom indices being sent to the client, i.e.
\#L0# test #lr\n#L1000# test #l
-> The client will send 1000, but the server thinks the max is 1.
Calling two script actions (i.e. say, askYesNo) consecutively may result in messengers sending packets too soon.
Typical usage of the API would look like the below, chained together with andThen
askYesNo("...",()->{...}).andThen(()->say(...))
Erroneous usage would look like
askYesNo("...",()->{...});
say(...);
This should throw an exception.
title
The API lacks any way to set or get quest values.
While we already have askMenu("Example", Tuple.of(x, y), Tuple.of(a,b)...)
, I'd like to support askMenu("Example", tuples)
As of right now, Moematter has methods like item() to create strings with the MapleStory client's formatting options.
I'd like shortcuts inside ScriptStringBuilder to append them.
ssb.item(1302000)
would equate to ssb.append(Moematter.item(1302000))
I'd like if there was collection support where varargs are supported on all script methods.
Script validators should validate various things passed to them.
Hair ids, npc ids, etc etc.
Should default to true -- trust the scripts.
Will be useful for various between-version issues.
Tests for most SpeakingScript functions have yet to be written.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.