Jump to content
  • 0

VIP system?


Question

7 answers to this question

Recommended Posts

Posted

http://athena-scripts.googlecode.com/svn/dev/Brian/script_requests/vip_rental.txt

//===== eAthena Script =======================================

//= VIP Rental System

//===== By: ==================================================

//= Brian

//===== Current Version: =====================================

//= 1.0

//===== Compatible With: =====================================

//= eAthena SVN (SQL only)

//===== Description: =========================================

//= Makes a player VIP (GM level 1) for a set amount of time.

//===== Additional Comments: =================================

//=

//============================================================

function script F_VIPstart {

set .@ticks, getarg(0); // getarg(0) = ticks (seconds)

if (.@ticks <= 0) {

debugmes "F_VIPstart - tried to set a timer in the past";

end;

}

// #VIP_expire = Unixtime when their VIP expires

set #VIP_expire, ((#VIP_expire > gettimetick(2)) ? #VIP_expire : gettimetick(2)) + .@ticks;

doevent "vip_rental::OnPCLoginEvent"; // trigger the VIP to start

return;

}

- script vip_rental -1,{

OnPCLoginEvent:

if (#VIP_expire > gettimetick(2)) {

// they still have time left

dispbottom "VIP Rental : expires in " + callfunc("Time2Str",#VIP_expire);

atcommand "@adjgroup 1 "+strcharinfo(0);

deltimer strnpcinfo(3)+"::OnPCLoginEvent";

if ((#VIP_expire - gettimetick(2)) < 2147483) { // prevent overflow error

addtimer (#VIP_expire - gettimetick(2)) *1000, strnpcinfo(3)+"::OnPCLoginEvent";

} else {

addtimer 2147483000, strnpcinfo(3)+"::OnPCLoginEvent";

}

} else if (#VIP_expire) {

atcommand "@adjgroup 0 "+strcharinfo(0);

set #VIP_expire, 0;

dispbottom "Your VIP Rental has expired.";

}

end;

}

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.

  • Recently Browsing   0 members

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