Jump to content
  • 0

Help with Vip Icon


Motoharo

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   1
  • Joined:  05/18/19
  • Last Seen:  

-	script	Vip_Icon	-,{

OnPCLoginEvent:
	bonus_script_clear EFST_VIPSTATE;
	if(vip_status(1)) {
		set .@timer, vip_status(VIP_STATUS_EXPIRE);
		
		bonus_script "{}",3600,0,0,EFST_VIPSTATE;

		dispbottom "--- VIP ----";
		dispbottom "==========================";
		dispbottom "Jogador VIP";
		dispbottom "Duração do VIP restante :"+callfunc("Time2Str",.@timer);
		dispbottom "==========================";
		end;
	}
}

How to make the vip icon have the same duration as the player's VIP and keep counting even offline?

image.png.c9ebef0b2ff27c3397333c817644e560.png

Edited by Motoharo
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  109
  • Reputation:   19
  • Joined:  07/28/12
  • Last Seen:  

-	script	Vip_Icon	-,{

OnPCLoginEvent:
	if(vip_status(1)) {
		set .@a, vip_status(2) - gettimetick(2);
		bonus_script "{}",.@a,8,0,EFST_VIPSTATE;
		dispbottom "--- VIP ----";
		dispbottom "==========================";
		dispbottom "VIP Player";
		dispbottom "Remaining VIP duration :"+callfunc("Time2Str",vip_status(2));
		dispbottom "==========================";
		end;
	}
}

try with this

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  83
  • Reputation:   0
  • Joined:  01/30/12
  • Last Seen:  

On 9/20/2023 at 10:56 AM, Angeluz said:
-	script	Vip_Icon	-,{

OnPCLoginEvent:
	if(vip_status(1)) {
		set .@a, vip_status(2) - gettimetick(2);
		bonus_script "{}",.@a,8,0,EFST_VIPSTATE;
		dispbottom "--- VIP ----";
		dispbottom "==========================";
		dispbottom "VIP Player";
		dispbottom "Remaining VIP duration :"+callfunc("Time2Str",vip_status(2));
		dispbottom "==========================";
		end;
	}
}

try with this

Hi, I've try this script but instead of VIP status the one it show is for the Endure status and Icon

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  55
  • Reputation:   3
  • Joined:  11/29/13
  • Last Seen:  

On 12/29/2023 at 8:11 AM, Raymart said:

Hi, I've try this script but instead of VIP status the one it show is for the Endure status and Icon

it is because on that script, it is using EFST_VIPSTATE which is a custom variable and because you do not define it on your server, it is showing endure status and icon as a default fallback.
you have to define yours on your own server and client (adding custom status icon as well).

take a look at this as reference:


here is another guide if you are using old rathena:

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  11/16/24
  • Last Seen:  

To make the VIP icon have the same duration as the player's VIP status and keep counting even when the player is offline waffle game, you can modify your script to use a permanent timer that updates the VIP status icon. Here's an updated version of your script:

•  script Vip_Icon -1,{


OnPCLoginEvent:
bonus_script_clear EFST_VIPSTATE;
if (vip_status(1)) {
set .@timer, vip_status(VIP_STATUS_EXPIRE);

// Set the VIP status icon with the remaining time
bonus_script "{ bonus bAllStats, 1; }", .@timer, 0, 0, EFST_VIPSTATE;

dispbottom "--- VIP ----";
dispbottom "==========================";
dispbottom "Jogador VIP";
dispbottom "Duração do VIP restante :" + callfunc("Time2Str", .@timer);
dispbottom "==========================";
end;
}
}

function script Time2Str {
set .@time, getarg(0);
set .@days, .@time / 86400;
set .@hours, (.@time % 86400) / 3600;
set .@minutes, (.@time % 3600) / 60;
set .@seconds, .@time % 60;
return .@days + "d " + .@hours + "h " + .@minutes + "m " + .@seconds + "s";
}
 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  12/25/24
  • Last Seen:  

On 11/16/2024 at 9:28 AM, Nanasi2 said:

To make the VIP icon have the same duration as the player's VIP status and keep counting even when the player is offline waffle game, you can modify your script to use a permanent timer that updates the VIP status icon. Here's an updated version of your script:

•  script Vip_Icon -1,{


OnPCLoginEvent:
bonus_script_clear EFST_VIPSTATE;
if (vip_status(1)) {
set .@timer, vip_status(VIP_STATUS_EXPIRE);

// Set the VIP status icon with the remaining time
bonus_script "{ bonus bAllStats, 1; }", .@timer, 0, 0, EFST_VIPSTATE;

dispbottom "--- VIP ----";
dispbottom "==========================";
dispbottom "Jogador VIP";
dispbottom "Duração do VIP restante :" + callfunc("Time2Str", .@timer);
dispbottom "==========================";
end;
}
uno online

function script Time2Str {
set .@time, getarg(0);
set .@days, .@time / 86400;
set .@hours, (.@time % 86400) / 3600;
set .@minutes, (.@time % 3600) / 60;
set .@seconds, .@time % 60;
return .@days + "d " + .@hours + "h " + .@minutes + "m " + .@seconds + "s";
}
 

Does your program run smoothly on win10?

Edited by JanaeMitchell
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  12/26/24
  • Last Seen:  

22 hours ago, JanaeMitchell said:

Does your program run smoothly on win10?

slope 2

I have applied it

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.01
  • Content Count:  1281
  • Reputation:   170
  • Joined:  06/12/12
  • Last Seen:  

44 minutes ago, Masuidac said:

I have applied it

hi, can you share complete guide to apply VIP icon

and can you share stateiconimginfo.lub: translated file, because i don't have it.

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