SphereCommunity
How to do an dynamic Skillmenu? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: How to do an dynamic Skillmenu? (/Thread-How-to-do-an-dynamic-Skillmenu)



How to do an dynamic Skillmenu? - escribano - 06-21-2015 12:57 PM

Hi Guys, its me again...

Today im trying to re-script the tracking system to show an ARROWQUEST pointing to the animal...

Everything works well on dialogs, but... i really like the skillmenu aparence of the native tracking so i've decided to re-script it all..

Ok, i've made the searching/counting on=@Select in the skill to show only the right icons on the menu:

Code:
[SKILLMENU sm_tracking]
Tracking

ON=i_pet_cow Animals
TESTIF=(<eval <src.ctag.TRACKEDANIMALS>> > 0)
SKILLMENU sm_tracking_animals

ON=i_pet_dragon Monsters
TESTIF=(<eval <src.CTAG.TRACKEDMONSTERS>> > 0)
SKILLMENU sm_tracking_monsters

ON=i_pet_man NPCs
TESTIF=(<eval <src.CTAG.TRACKEDHUMANS>> > 0)
SKILLMENU sm_tracking_npcs

ON=i_pet_woman Players
TESTIF=(<eval <src.CTAG.TRACKEDPLAYERS>> > 0)
SKILLMENU sm_tracking_players

ok, now if the player CAN find some char, the menu will appear and show only icons that have founded unleast 1 and call the respctive skillmenu.

Now, the problem: in the skillmenu we cant use dynamic functions??? i want to do something like this.

Code:
[SKILLMENU sm_tracking_animals]
Animals

FOR 0 <EVAL <src.CTAG.TRACKEDANIMALS>-1>
    ON=<UID.<CTAG.TRACKEDANIMALS.<EVAL <LOCAL._FOR>+1>>.icon> <UID.<CTAG.TRACKEDANIMALS.<EVAL <LOCAL._FOR>+1>>.name>
    f_tracking_tracker <UID.<CTAG.TRACKEDANIMALS.<EVAL <LOCAL._FOR>+1>>.uid>
ENDFOR

f_tracking_tracker is my function that show the ARROWQUEST on the player screen...

Thanks guys!


RE: How to do an dynamic Skillmenu? - Extreme - 06-22-2015 01:49 AM

Why you don't use @STROKE and set arrowquest on the tracked mob?
If I remember well, this is already implemented on latest releases.


RE: How to do an dynamic Skillmenu? - escribano - 07-22-2015 09:56 AM

Extreme im using something more complex on tracking then arrowquest, i've made a mini-map with real-time direction arrows.
I still trying to do this but i could not think a way to do that...

Someone? New ideas? Sphere developers, could help?


RE: How to do an dynamic Skillmenu? - XuN - 07-22-2015 06:19 PM

A Minimap means a dialog, real-time means closing and reopening ... all together can cause a weird display because of the dialog dissapearing and reappearing over and over.

If you are disposed to accept that then you can take a look on 'noob map' script from Mordaunt in the downloads section (I bet this was it's name) to see how to place points representing coordinates over a map.


RE: How to do an dynamic Skillmenu? - escribano - 07-23-2015 01:03 AM

Something like that....

It's like the "navigation system" posted here in the community forums that opens a dialog and show de directions to the npc, as a mini-map tracker but more sofisticated, im not making thousends requests on the server, it's a lightweight script.

The step-by-step is this:
1) Click on the tracking skill button
2) Make the radius-search on player to find npcs/players/monsters/animals
3) Shows on a SKILLMENU the icons of this 4 categorys (if there is at least 1 found)
4) Show a DIALOG with all found chars on the category
5) Open the mini-map dialog

I Would like to remove this dialog (Step 4) and use the SKILLMENU with a "FOR" inside, there is a way to do this? i've tryied many ways and i couldn't make it work!

Is horrible to show PET ICON's on dialogs... the skillmenu is so much more clean Smile

Thanks


RE: How to do an dynamic Skillmenu? - XuN - 07-24-2015 06:44 PM

There's no way to do so, SkillMenus are somehow 'static', they do not accept advanced scripting.


RE: How to do an dynamic Skillmenu? - escribano - 07-25-2015 04:29 PM

But they could, no? Smile

There are many functionalitys that we can do with it... the dev team could think about it!


RE: How to do an dynamic Skillmenu? - escribano - 08-01-2015 02:37 PM

Or maybe just not....