Jump to content

Recommended Posts

Posted

Fake Icon Stats


This commands allow you to add fake icon stats. Right now the command does not clean the effect automatically after the time, cause who order this command want to be like this, so you can add sleep and remove the icon.

Sample Script:
 

prontera,150,150,5    Script    FakeIcon    90,{

    mes "[Fake Icon Stats]";
    mes "Hey.";
    switch(select("Receive Fake Icon 1 with 5 seconds (display only)","Receive Icon 2 for 10 seconds (display only)","Disable Icon 1 and 2"))
    {
        case 1:
            fakeIcon(getcharid(0),1,5000,1);
            break;
            
        case 2:
            fakeIcon(getcharid(0),2,10000,1);
            break;
            
        case 3:
            fakeIcon(getcharid(0),1,0,0);
            fakeIcon(getcharid(0),2,0,0);

            break;
    }
    close;
}


 

  • Upvote 2
Posted
1 hour ago, Eichi said:

What is the use of this, exactly?

You can add new icons in your Lua files for show player VIP time... Show woe duration, for Quests timers and what ever you want. 

Posted (edited)
On 9/18/2019 at 11:37 PM, Eichi said:

What is the use of this, exactly?

Tons of effects are linked to status icons

like soul linker blue effect 

And convex mirror icon

Edited by Naruto
  • 4 years later...
  • 8 months later...
Posted (edited)
On 10/10/2023 at 12:23 AM, Gidz Cross said:

What is the best way to remove the icon when the timer ends? Can this be done in src?

This is the fix for icon not going away. and i edited also the timer so it could handle 

set .@timer, vip_status(2) - gettimetick(2);

it will be 86400 for 1 day. So for 5 seconds it should be 5 i believe.

// Script.cpp
+/*
+* fakeIcon
+* fakeIcon(CHAR_ID,ICON_ID,TIME,STATE)
+*/
+BUILDIN_FUNC(fakeIcon)
+{
+	int16 icon = EFST_BLANK;
+	TBL_PC* sd = map_charid2sd(script_getnum(st, 2));
+	FETCH(3, icon);
+	int time = 1000 * abs(script_getnum(st, 4));
+	bool state = (script_getnum(st, 5) == 1);
+
+	if (sd == NULL)
+		return SCRIPT_CMD_FAILURE;
+
+	if (icon <= EFST_BLANK || icon >= EFST_MAX)
+		icon = EFST_BLANK;
+		
+	clif_status_change(&sd->bl, (enum efst_type)icon, state, time, 0, 0, 0);
+
+	return SCRIPT_CMD_SUCCESS;
+}

BUILDIN_FUNC(addrid)

// Script.cpp

++BUILDIN_DEF(fakeIcon,"iiii"),
BUILDIN_DEF(goto,"l"),

 

Edited by Louis T Steinhil
  • MVP 1
  • 6 months later...
Posted
On 6/16/2024 at 11:16 AM, Louis T Steinhil said:

This is the fix for icon not going away. and i edited also the timer so it could handle 

set .@timer, vip_status(2) - gettimetick(2);

it will be 86400 for 1 day. So for 5 seconds it should be 5 i believe.

// Script.cpp
+/*
+* fakeIcon
+* fakeIcon(CHAR_ID,ICON_ID,TIME,STATE)
+*/
+BUILDIN_FUNC(fakeIcon)
+{
+	int16 icon = EFST_BLANK;
+	TBL_PC* sd = map_charid2sd(script_getnum(st, 2));
+	FETCH(3, icon);
+	int time = 1000 * abs(script_getnum(st, 4));
+	bool state = (script_getnum(st, 5) == 1);
+
+	if (sd == NULL)
+		return SCRIPT_CMD_FAILURE;
+
+	if (icon <= EFST_BLANK || icon >= EFST_MAX)
+		icon = EFST_BLANK;
+		
+	clif_status_change(&sd->bl, (enum efst_type)icon, state, time, 0, 0, 0);
+
+	return SCRIPT_CMD_SUCCESS;
+}

BUILDIN_FUNC(addrid)

// Script.cpp

++BUILDIN_DEF(fakeIcon,"iiii"),
BUILDIN_DEF(goto,"l"),

 

I haven't got notification that you quote me on this thread. Haha. Sorry about that.

How do you apply the icon removal in zell's script?

 

Quote

prontera,150,150,5    Script    FakeIcon    90,{

    mes "[Fake Icon Stats]";
    mes "Hey.";
    switch(select("Receive Fake Icon 1 with 5 seconds (display only)","Receive Icon 2 for 10 seconds (display only)","Disable Icon 1 and 2"))
    {
        case 1:
            fakeIcon(getcharid(0),1,5000,1);
            break;
            
        case 2:
            fakeIcon(getcharid(0),2,10000,1);
            break;
            
        case 3:
            fakeIcon(getcharid(0),1,0,0);
            fakeIcon(getcharid(0),2,0,0);

            break;
    }
    close;
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...