From 318a9cd7c7d0ae20d4bfa0d6226380f4cf2f6cef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Jun 2020 06:59:48 +0300 Subject: Remove duplicated function time2str from bg_common.txt --- npc/custom/battleground/bg_common.txt | 36 ----------------------------------- 1 file changed, 36 deletions(-) (limited to 'npc') diff --git a/npc/custom/battleground/bg_common.txt b/npc/custom/battleground/bg_common.txt index 81ec22963..d997263e6 100644 --- a/npc/custom/battleground/bg_common.txt +++ b/npc/custom/battleground/bg_common.txt @@ -133,42 +133,6 @@ bat_room,160,140,3 script Prince Croix#custom 4_M_CRU_CRUA,{ end; } -// Time calculation Function -// ********************************************************************* -function script Time2Str { - set .@time_left, getarg(0) - gettimetick(2); - - set .@Days, .@time_left / 86400; - set .@time_left, .@time_left - (.@Days * 86400); - set .@Hours, .@time_left / 3600; - set .@time_left, .@time_left - (.@Hours * 3600); - set .@Minutes, .@time_left / 60; - set .@time_left, .@time_left - (.@Minutes * 60); - - set .@Time$, ""; - if( .@Days > 1 ) - set .@Time$, .@Time$ + .@Days + " days, "; - else if( .@Days > 0 ) - set .@Time$, .@Time$ + .@Days + " day, "; - - if( .@Hours > 1 ) - set .@Time$, .@Time$ + .@Hours + " hours, "; - else if( .@Hours > 0 ) - set .@Time$, .@Time$ + .@Hours + " hour, "; - - if( .@Minutes > 1 ) - set .@Time$, .@Time$ + .@Minutes + " minutes, "; - else if( .@Minutes > 0 ) - set .@Time$, .@Time$ + .@Minutes + " minute, "; - - if( .@time_left > 1 || .@time_left == 0 ) - set .@Time$, .@Time$ + .@time_left + " seconds."; - else if( .@time_left == 1 ) - set .@Time$, .@Time$ + .@time_left + " second."; - - return .@Time$; -} - // Guillaume Knight - Tierra Valley // ********************************************************************* bat_room,159,178,5 script Guillaume Knight#1c 4_M_KY_SOLD,{ -- cgit v1.2.3-60-g2f50