Jump to content

Photo

Fairy Mouse Script

Global FFC

  • Please log in to reply
4 replies to this topic

#1 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris
  • Gender:Intersexed

Posted 12 February 2014 - 04:28 AM

The Fairy Mouse Script


Description

This script gives the player a mouse pointer that acts like a fairy companion. Optional features inclide:

 

 

Messages on clicking enemies

"Emotes" on mousing over a FFC with the appropriate script attached.

Screenshots and Demo

Here's a demo quest to show the script in action:

http://www.2shared.c...ScriptTest.html

Code

Spoiler

Setup

For the global portion of this script:

You need to set up 4 combos for your cursor, arranged in Up, Down, Left, Right order.

Change FAIRY_COMBO to the first of these 4 combos. The script will automatically handle direction changing.

Change FAIRY_CSET to the desired CSet of your mouse icon.

 

The above instructions handle the visual part of this. The next portion is a bit more complicated, and involves a bit more setup.

 

Change FAIRY_ESTRING_OFFSET to the ID of the first string tied to your first enemy on the list. The list is explained below.

Change FAIRY_TOTAL_ENEMIES to the total number of enemies you're using messages for. If you don't want to use click messages, set this to zero.

Next, add your enemy ID's to the FAIRY_ESTRINGS array. This is what's used to identify which enemies to use messages for.

(Note, be sure to place a comma at the end of each one, If it's the last one on the list, don't put a comma. This is due to how arrays work.)

 

Now all you need to do is add your strings in ZQ! Remember to add them in the same order as listed in the array, even if you add more enemies. For example, as this script is currently set up, string number 4 should be tied to "Octorock Level 1 Fast", and message 10 should be for "Rope level 1".

 

 

For the FFC script, setup is simple.

Place an FFC with a non-zero invisible combo selected. Change the tile width and tile height to the selected area. Set your arguments as follows:

D0: The combo to draw over the cursor.

D1: The CSet to draw the combo in.

Resources
No extra resources required!

 

 

Credits

Avataro, for helping me sort out the mouse to direction setup

Saffith for helping me sort out the click messages.



#2 MoscowModder

MoscowModder

    Still fighting the inevitable

  • Members
  • Gender:Male
  • Location:Wisconsin (WHAT)

Posted 12 February 2014 - 11:52 PM

One tiny thing that can make this script a whole lot better: disable click-to-freeze in this quest. This doesn't affect any other quests or the user's ZC settings.

 

//In global void run() before while(true)
Game->ClickToFreezeEnabled = false;


#3 Avataro

Avataro

    Quest maker

  • Members
  • Real Name:Robin
  • Gender:Male
  • Location:Germany

Posted 13 February 2014 - 09:51 AM

Yeah! A Boy and His Cursor III: Adventures of the Cursor, confirmed xD

Looks like this is missing some functions though. You can now click enemies to get information on them, but it would be nice if it gives information on items and possibly specific combos on the screen too, so that you can also get information on NPCs, instead of just an emoticon? :)

#4 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris
  • Gender:Intersexed

Posted 13 February 2014 - 11:18 PM

Moscow modder: this is a detail that I had overlooked. I'll add that in when I get back to my computer.

Avataro: excellent ideas. I'll try to implement clicking ffcs for info. Items will be a bit difficult But I'm sure I can work that out too.

#5 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris
  • Gender:Intersexed

Posted 20 February 2014 - 11:13 AM

So I've got a small update for this script. Here you go!

 

Spoiler

 

I added Avataro's automatic ClickToFreeze setting change, as well as a function to plug in to an FFC script.

 

FAIRY_CLICK_LOCATION( Min_X, Min_Y, Max_X, Max_Y, Message)

This allows you to create a clickable message on any location on the screen via FFC script. If you had scripted FFC NPC's for example, you could use This->X and This->Y to create the clickbox around that FFC, and then select a message to play. I recommend adding another argument to your Void Run() in your FFC script to handle this message and make the FFC script usable for multiple NPC's.

 

Otherwise, if you want to make a certain area of the screen clickable, simply use an FFC to make that clickbox, and you're all set!

 

I'm working on the item clicking system. Not sure how I'm going to handle it quite yet, but I'll figure something out.

 

EDIT: Also, I'm open to any suggestions for features on this script! Anything I can do to improve this for the user would be great input :)


Edited by Master Maniac, 20 February 2014 - 11:15 AM.




Also tagged with one or more of these keywords: Global, FFC

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users