Jump to content
  • 0

VIP Status on Fake Icon Timer


Louis T Steinhil

Question


  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   16
  • Joined:  06/22/13
  • Last Seen:  

This is the code that i found searching but it's not right when displaying it on icon timer.

	if ( vip_status(1) ) {
			set .@timer, vip_status(2) - gettimetick(2);
        	fakeIcon(getcharid(0),EFST_VIPSTATE2,.@timer,1);					
			set MaxWeight, MaxWeight + 2000;
			hateffect 19,true;
			dispbottom "Server Time: "+gettimestr("%H:%M:%S", 10)+"";
			dispbottom "=============================================";
			dispbottom "Account Status : Premium Account";
			dispbottom "Account Status : Exp & Job Increase 100%";
			dispbottom "Account Status : Drop Increase 100%";
			dispbottom "Time left : "+ callfunc("Time2Str",vip_status(VIP_STATUS_EXPIRE));
			dispbottom "=============================================";
    		end;
}

it's always 1 minute

image.png.e845972760387b93e785de53ee7d903a.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   16
  • Joined:  06/22/13
  • Last Seen:  

Nevermind I edited the src. Anyone interested here it is, this also fix the icon not going away and entering negative values for timer.

// 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"),

image.png.c9031d583739722ff3998a0d8a49c6d4.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1658
  • Reputation:   262
  • Joined:  08/03/12
  • Last Seen:  

47 minutes ago, Louis T Steinhil said:

This is the code that i found searching but it's not right when displaying it on icon timer.

	if ( vip_status(1) ) {
			set .@timer, vip_status(2) - gettimetick(2);
        	fakeIcon(getcharid(0),EFST_VIPSTATE2,.@timer,1);					
			set MaxWeight, MaxWeight + 2000;
			hateffect 19,true;
			dispbottom "Server Time: "+gettimestr("%H:%M:%S", 10)+"";
			dispbottom "=============================================";
			dispbottom "Account Status : Premium Account";
			dispbottom "Account Status : Exp & Job Increase 100%";
			dispbottom "Account Status : Drop Increase 100%";
			dispbottom "Time left : "+ callfunc("Time2Str",vip_status(VIP_STATUS_EXPIRE));
			dispbottom "=============================================";
    		end;
}

it's always 1 minute

image.png.e845972760387b93e785de53ee7d903a.png

that is stateicon description.

the code you show is displaybottom which will be display at chat.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  32
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   16
  • Joined:  06/22/13
  • Last Seen:  

1 hour ago, UptoYou said:

Pls share script 😆

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.

×
×
  • Create New...