Scrifen -- Hafen scripting API

Forum for alternative clients, mods & discussions on the same.

Re: Scrifen -- Hafen scripting API

Postby b0r3d0m » Thu Apr 21, 2016 10:23 am

Update!

A lot of new API functions and events were added:

- takeItem(itemName) function
- onUserInput(input) event
- waitForPf() function
- Equipory functions:
* getEquippedItems()
* equipItem(itemName)
* unequipItem(itemName)
- Chat functions and event:
* sendAreaChatMessage(msg)
* sendPartyChatMessage(msg)
* sendVillageChatMessage(msg)
* sendPrivateChatMessage(to, msg)
* onChatMessage(chat, from, msg)
User avatar
b0r3d0m
 
Posts: 95
Joined: Sun Sep 13, 2015 2:39 pm

Re: Scrifen -- Hafen scripting API

Postby algorithm » Thu Apr 21, 2016 2:56 pm

b0r3d0m wrote:Update!

A lot of new API functions and events were added:

- takeItem(itemName) function
- onUserInput(input) event
- waitForPf() function
- Equipory functions:
* getEquippedItems()
* equipItem(itemName)
* unequipItem(itemName)
- Chat functions and event:
* sendAreaChatMessage(msg)
* sendPartyChatMessage(msg)
* sendVillageChatMessage(msg)
* sendPrivateChatMessage(to, msg)
* onChatMessage(chat, from, msg)


Great!! Thanks a lot for a good job!
algorithm wrote:Cape awarded? ;)

jorb wrote:Oh, for sure. Delivery 2022. ;)
algorithm
 
Posts: 216
Joined: Thu Aug 13, 2015 2:17 pm

Re: Scrifen -- Hafen scripting API

Postby Thedrah » Fri Apr 22, 2016 12:42 am

is it possible to log out using this?

so to make a script that would log in to multiple characters to load curios. or to perform multiple functions such as a hunter and a butcher

edit: found out after reading through some hehe
how would a character pick up/lift an object using this?
  ▲
▲ ▲
Thedrah
 
Posts: 936
Joined: Fri Apr 08, 2011 2:20 am
Location: behind you

Re: Scrifen -- Hafen scripting API

Postby b0r3d0m » Fri Apr 22, 2016 6:14 am

Thedrah wrote:is it possible to log out using this?

Yep, see the `logout` function.

Thedrah wrote:how would a character pick up/lift an object using this?

You can pick items like dandelions and blueberries via the `pickItem` function.
It's not possible to lift objects at the moment, I will think about it.
User avatar
b0r3d0m
 
Posts: 95
Joined: Sun Sep 13, 2015 2:39 pm

Re: Scrifen -- Hafen scripting API

Postby b0r3d0m » Fri Apr 22, 2016 2:59 pm

Thedrah wrote:lift an object using this?

Added. See `liftObject` and `mapRightClick` functions to lift and place it correspondingly.
User avatar
b0r3d0m
 
Posts: 95
Joined: Sun Sep 13, 2015 2:39 pm

Re: Scrifen -- Hafen scripting API

Postby b0r3d0m » Sat Apr 23, 2016 12:40 pm

Update is available.

The following API methods were added:

- getHP()
- getSpeed()
- setSpeed(speed)
- useMenuAction(hotkeys)
- craft(itemName)
- craftAll(itemName)
User avatar
b0r3d0m
 
Posts: 95
Joined: Sun Sep 13, 2015 2:39 pm

Re: Scrifen -- Hafen scripting API

Postby b0r3d0m » Tue Apr 26, 2016 8:54 am

Update is available.

New API methods were added:
- chooseFlowerMenuOption
- dropItem
- dropItemFromHand
- useItemFromHandOnObject

Fixed invalid `takeItem` function's return value and added additional checks to it.

I also changed flower menu interaction to fix a crash (you should call the `chooseFlowerMenuOption` function instead of returning an option name from the `onFlowerMenuOpen` hook now).
User avatar
b0r3d0m
 
Posts: 95
Joined: Sun Sep 13, 2015 2:39 pm

Re: Scrifen -- Hafen scripting API

Postby stya » Tue Apr 26, 2016 9:19 am

If I get a 'canPathTo' and 'getBarrel(contentType)' I will start using it :D

For the barrel thing you just have to check the Overlay, but I guess you guys know that already :roll:

Edit: also a 'isTileFree' or something in the same vein.
Image
User avatar
stya
 
Posts: 993
Joined: Wed May 21, 2014 3:13 pm

Re: Scrifen -- Hafen scripting API

Postby b0r3d0m » Tue Apr 26, 2016 3:42 pm

stya wrote:getBarrel(contentType)

Added. See the `getBarrelContent` function.
User avatar
b0r3d0m
 
Posts: 95
Joined: Sun Sep 13, 2015 2:39 pm

Re: Scrifen -- Hafen scripting API

Postby b0r3d0m » Fri Apr 29, 2016 10:08 pm

Update is available:

  • New API functions added -- getMapObjectsByFullName, getBarrelLiters and getGrowthStage
  • New fullName property added to the map objects returned from the getMapObjects, getMapObjectsByFullName and getAllMapObjects functions
User avatar
b0r3d0m
 
Posts: 95
Joined: Sun Sep 13, 2015 2:39 pm

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 95 guests