Jump to content
  • 0

@Vip command


acidcooler

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  04/04/14
  • Last Seen:  

Hi There,

 

Recently, I have updated and activated the Rathena VIP system.

Now, I have build a new NPC to exchange CashPoints for VIP status.

 

 

//===== Config =====
set $precogmct,300; // Price (in CashPoints) for 15 days
set $daysweek,15; //15 days for 2 weeks VIP

 

function script vipct {
mes "I can provide you "+$daysweek+" days of VIP subscription in exchange for "+$precogmct+" CashPoints";
mes "What do you thing?";
if(select("Yes, I want IT!!:No, not for now.") == 2) close;
if(#CASHPOINTS < $precogmct){
  mes "You don't have enough CASHPOINTS!! Come back later.";
  close;
}

if(getgroupid() == 0 || getgroupid() == 5){
  set .@RandomFinalize,rand(100,999);
   mes "Are you sure you want to exchange ^FF0000"+$precogmct+"^000000 CashPoints? If your 100% sure type the number ^0000FF"+.@RandomFinalize+"^000000.";
   input .@Finalize;
   if(.@Finalize!=.@RandomFinalize) {
    next;
    mes "You really should thing about it First!.";
    close;
   }
  
  atcommand "@vip +"+$daysweek+"d "+strcharinfo(0);
  //set #CASHPOINTS,#CASHPOINTS - $precogmct;
  mes "Thank you very Much! We have added "+$daysweek+" days of VIP subscription to your account!";
  close;
}

mes "Your account level doesn't allow me to give you VIP status. Only normal and VIP account can have VIP status!";
close;
}

 

However, the atcommand line doesn't work.

This is suposed to make a @vip +15d mycharname.

 

Can anyone figure it our why doesn't work?

 

Br,

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  11/21/17
  • Last Seen:  

On 18/07/2014 at 10:38 AM, acidcooler said:

Hi There,

 

Recently, I have updated and activated the Rathena VIP system.

Now, I have build a new NPC to exchange CashPoints for VIP status.

 

 

However, the atcommand line doesn't work.

This is suposed to make a @vip +15d mycharname.

 

Can anyone figure it our why doesn't work?

 

Br,

 

Should BE:

//===== Config =====
set $precogmct,300; // Price (in CashPoints) for 15 days
set $daysweek,15; //15 days for 2 weeks VIP

 

function script vipct {
mes "I can provide you "+$daysweek+" days of VIP subscription in exchange for "+$precogmct+" CashPoints";
mes "What do you thing?";
if(select("Yes, I want IT!!:No, not for now.") == 2) close;
if(#CASHPOINTS < $precogmct){
  mes "You don't have enough CASHPOINTS!! Come back later.";
  close;
}

if(getgroupid() == 0 || getgroupid() == 5){
  set .@RandomFinalize,rand(100,999);
   mes "Are you sure you want to exchange ^FF0000"+$precogmct+"^000000 CashPoints? If your 100% sure type the number ^0000FF"+.@RandomFinalize+"^000000.";
   input .@Finalize;
   if(.@Finalize!=.@RandomFinalize) {
    next;
    mes "You really should thing about it First!.";
    close;
   }
  
  atcommand "@vip "+$daysweek+"d "+strcharinfo(0); 
  //set #CASHPOINTS,#CASHPOINTS - $precogmct;
  mes "Thank you very Much! We have added "+$daysweek+" days of VIP subscription to your account!";
  close;
}

mes "Your account level doesn't allow me to give you VIP status. Only normal and VIP account can have VIP status!";
close;
}

//You had an extra Plus signal

Edited by skyalpha
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  342
  • Reputation:   169
  • Joined:  02/25/12
  • Last Seen:  

It's also possible that the command doesn't work cause the char using it doesn't have the right to use it. I came accross this sometimes, which bring me to now use charcommand rather than atcommand, ensuring me that the command will be runned.

 

@skyalpha there's no extra plus, the command finally provided should be '@vip +15d Alayne'. your version will output '@vip 15d Alayne' ^^

Edited by Alayne
Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

old topic

However , the fix for that is rathena/src/config/core.h

/// Uncomment to enable VIP system.
//#define VIP_ENABLE

without that the command wont work

Edited by sader1992
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  04/04/14
  • Last Seen:  

atcommand "@vip +15d "+strcharinfo(0)+"";

 

I'm trying to use this command on a NPC script, but it doesn't work!!!

The linux console output gives me a Debug warning for this NPC when I use it.

If a GM types this command manually, it works fine!

 

Can anyone help me please?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

why are you not using the script commands?

 

 

*vip_status(<type>,{"<character name>"})

Returns various information about a player's VIP status.

Valid types:
 1 - VIP status. (1 if VIP, 0 if non-VIP)
 2 - VIP expire date. (timestamp string if VIP, 0 if non-VIP)
 3 - VIP time remaining. (timestamp string if VIP, 0 if non-VIP)

NOTE: This command is only available if the VIP System is enabled.

---------------------------------------

*vip_time <time>,{"<character name>"};

Changes a player's VIP time (in minutes). A positive value will increase time, and a
negative value will decrease time.

NOTE: This command is only available if the VIP System is enabled.

 

http://rathena.org/board/topic/89848-official-vip-system/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  04/04/14
  • Last Seen:  

ok, I check the script commands and I figured a work around for this.

 

So I replaced that atcommand line for these:

 

atcommand "@adjgroup 5";
vip_time 1440*15,strcharinfo(0);
atcommand "@reloadpcdb";

 

Now it works fine.

But anyway, my question still remains.... Why the atcommand on the npc script for the @vip doesn't work ??????

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   199
  • Joined:  05/03/13
  • Last Seen:  

Maybe just a syntax error for example:

@vip + 15 d Normynator

@vip +15d Normynator

 

or something like that

i dont use the vip system, i cant test it sorry

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