Jump to content
  • 0

VIP Scripts


ZelosAvalon

Question


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

i need a script for two items:

8036,Ticket Vip 15,Ticket Vip 15,0,50,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ ????? },{},{} 15 days vips

8037,Ticket Vip 30,Ticket Vip 30,0,50,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ ????? },{},{} 30 days vips

the item is consumable, and when someone use, will get time vip

and i need a script similar to that message "mtod" that appears whenever someone logs in, but this appears, the time vip that you possess, and the time remaining for your vip expires.

my sql vip table is located in: FROM `login` `vencimentoVip`

SELECT `ID` FROM `login` `account_id` `vencimentoVip` i need to configure query_sql to show, vip time when the char login.

and when i change it by item ticket vip or on website will show too!

Edited by ZelosAvalon
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

Here's one VIP Rental script: vip_rental.txt

It can be used in an item script or npc script:

{ callfunc "F_VIPstart", <ticks>; }

ticks = how long their VIP will last, in seconds

- 1 day = 86400

- 7 days = 604800

- 14 days = 1209600

etc.

Examples:

8036,Ticket_VIP_15,Ticket Vip (15 days),2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_VIPstart", 1296000; },{},{}
8037,Ticket_VIP_30,Ticket Vip (30 days),2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_VIPstart", 2592000; },{},{}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

Here's one VIP Rental script: vip_rental.txt

It can be used in an item script or npc script:

{ callfunc "F_VIPstart", <ticks>; }

ticks = how long their VIP will last, in seconds

- 1 day = 86400

- 7 days = 604800

- 14 days = 1209600

etc.

Examples:

8036,Ticket_VIP_15,Ticket Vip (15 days),2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_VIPstart", 1296000; },{},{}
8037,Ticket_VIP_30,Ticket Vip (30 days),2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_VIPstart", 2592000; },{},{}

ty man working , but if a player use the vip ticket 15 days and later use vip ticket 30 days, they don't add up, he loses the 15 days VIP, and won vip 30 days, instead of staying with 45 days vip.

you know how i can fix it ?


//========================================
//==Abaixo o controle dos dias vip
//========================================


- script vip -1,{

OnPCLoginEvent:
query_sql "SELECT `vencimentoVip` FROM `login` WHERE `account_id` = '"+ getcharid(3) +"'", .@vencimentoVip;
{
dispbottom "[VIP Control]: viptime "+.@vencimentoVip+".";
end;
}

}

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

my sql :

message when i log :

i need to show when i log : date vip will expire example : post-10870-0-70709100-1359225330_thumb.jpg

Here's one VIP Rental script: vip_rental.txt

It can be used in an item script or npc script:

{ callfunc "F_VIPstart", <ticks>; }

ticks = how long their VIP will last, in seconds

- 1 day = 86400

- 7 days = 604800

- 14 days = 1209600

etc.

Examples:

8036,Ticket_VIP_15,Ticket Vip (15 days),2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_VIPstart", 1296000; },{},{}
8037,Ticket_VIP_30,Ticket Vip (30 days),2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_VIPstart", 2592000; },{},{}

ty man working , but if a player use the vip ticket 15 days and later use vip ticket 30 days, they don't add up, he loses the 15 days VIP, and won vip 30 days, instead of staying with 45 days vip.

you know how i can fix it ?


//========================================
//==Abaixo o controle dos dias vip
//========================================


- script vip -1,{

OnPCLoginEvent:
query_sql "SELECT `vencimentoVip` FROM `login` WHERE `account_id` = '"+ getcharid(3) +"'", .@vencimentoVip;
{
dispbottom "[VIP Control]: viptime "+.@vencimentoVip+".";
end;
}

}

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

my sql : post-10870-0-76406500-1359225395_thumb.png

message when i log : post-10870-0-12928000-1359225399_thumb.jpg

i need to show when i log : date vip will expire example : post-10870-0-70709100-1359225330_thumb.jpg

Edited by ZelosAvalon
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

i need to show when i log : date vip will expire

Here you go:

-	script	vip_timeleft	-1,{
OnPCLoginEvent:
query_sql "SELECT UNIX_TIMESTAMP(`vencimentoVip`) FROM login WHERE account_id="+playerattached(), .@vencimentoVip;
if (.@vencimentoVip) {
	dispbottom "[Controle VIP] : expires in " + callfunc("Time2Str", .@vencimentoVip);
}
end;
}

ty man working , but if a player use the vip ticket 15 days and later use vip ticket 30 days, they don't add up, he loses the 15 days VIP, and won vip 30 days, instead of staying with 45 days vip.

you know how i can fix it ?

I fixed my script so if the player already has a VIP Rental, any new rentals will stack.

http://code.google.com/p/athena-scripts/source/detail?r=23

Edited by Brian
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   33
  • Joined:  11/11/12
  • Last Seen:  

-	script	vip_timeleft	-1,{
OnPCLoginEvent:
query_sql "SELECT UNIX_TIMESTAMP(`vencimentoVip`) FROM login WHERE account_id="+playerattached(), .@vencimentoVip;
if (.@vencimentoVip) {
	dispbottom "[Controle VIP] : expires in " + callfunc("Time2Str", .@vencimentoVip);
}
end;
}

dont work =(

ty man working , but if a player use the vip ticket 15 days and later use vip ticket 30 days, they don't add up, he loses the 15 days VIP, and won vip 30 days, instead of staying with 45 days vip.

you know how i can fix it ?

I fixed my script so if the player already has a VIP Rental, any new rentals will stack.

http://code.google.c...rce/detail?r=23

dont work too with this items :


8036,Ticket_VIP_15,Ticket Vip (15 days),2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_VIPstart", 1296000; },{},{}
8037,Ticket_VIP_30,Ticket Vip (30 days),2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "F_VIPstart", 2592000; },{},{}

Edited by ZelosAvalon
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

hmm maybe I misunderstood your SQL structure.

The expire time is stored in `login`.`vencimentoVip` as a datetime?

M0UmaxK.png

Try this instead:

-	script	vip_timeleft	-1,{
OnPCLoginEvent:
query_sql "SELECT TIMESTAMPDIFF(SECOND, NOW(),`vencimentoVip`) FROM login WHERE account_id="+playerattached(), .@seconds;
if (.@seconds > 0) {
	dispbottom "[Controle VIP] : expires in " + callfunc("Time2Str", gettimetick(2)+.@seconds);
}
end;
}


I edited my script and it works for me now. vip_rental.txt

ciE24ug.png

Edited by Brian
  • Upvote 1
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...