Jump to content
  • 0

NPC vip


Noctis

Question


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

First, yes, i searched first before, i tested all scripts of npcs who give vip for cash here in rathena and hercules, and no one works (for me), so plz, someone have a npc script who give vip days for cash plz?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  1543
  • Reputation:   238
  • Joined:  08/03/12
  • Last Seen:  

just use cash daily script.. but use VIP check..

ehmm.. 

-	script	hourlypoints	-1,{

//--Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;

OnTimer60000:
set @minute, @minute + 1;
if(@minute == 1440) && (vip_status(1) {
	set @minute,0;
	set .@point_amt, 5; //Points to get every 24 hour 
	set #CASHPOINTS, #CASHPOINTS + .@point_amt;
	dispbottom "You received "+.@point_amt+" Cash points by staying ingame for 24 hour";
	dispbottom "Current Balance = "+#CASHPOINTS+" Cash points";
	set @consecutive_hour, @consecutive_hour + 1;
	}
	
stopnpctimer;
initnpctimer;
end;

}
//--End of the Script

Didnt test it yet, but give a try ;)

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

18 hours ago, Exmas said:

give vip days for cash

If you mean exchanging Cash Points for extra VIP days, the above script won't work.

A simple NPC that adds VIP time and subtracts #CASHPOINTS is very easy to make. 

prontera,100,100,5	script	CashToVIP	123,{
	.@cashperday = 100;
	
	mes "["+ strnpcinfo(1)+"]";
	if(#CASHPOINTS == 0){
		mes "You need Cash Points in order to buy VIP time";
		close;
	}
	
	switch(vip_status(1)){
		case 0:
			mes "You're not a VIP";
			break;
		case 1:
			mes "You are a VIP";
			break;
	}
	
	mes "You currently have "+ #CASHPOINTS +" Cash Points.";
	mes "Each VIP Day will cost you ^0000ff"+ .@cashperday +"^000000";
	next;
	
	mes "["+ strnpcinfo(1)+"]";
	if( #CASHPOINTS < .@cashperday ){
		mes "You don't have enough Cash Points to purchase VIP Days";
		close;
	} else {
		mes "Would you like to purchase/increase your VIP Days?";
		switch(select(" - Nope: - Yeah!")){
			case 1:
				break;
			case 2:
				#CASHPOINTS -= .@cashperday;
				vip_time 1440;
				dispbottom "Current Cash Points: "+ #CASHPOINTS;
				dispbottom "VIP Expires: "+ vip_status(2);
				break;
		}
		close;
	}
}

 

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

1 hour ago, Akkarin said:

If you mean exchanging Cash Points for extra VIP days, the above script won't work.

A simple NPC that adds VIP time and subtracts #CASHPOINTS is very easy to make. 


prontera,100,100,5	script	CashToVIP	123,{
	.@cashperday = 100;
	
	mes "["+ strnpcinfo(1)+"]";
	if(#CASHPOINTS == 0){
		mes "You need Cash Points in order to buy VIP time";
		close;
	}
	
	switch(vip_status(1)){
		case 0:
			mes "You're not a VIP";
			break;
		case 1:
			mes "You are a VIP";
			break;
	}
	
	mes "You currently have "+ #CASHPOINTS +" Cash Points.";
	mes "Each VIP Day will cost you ^0000ff"+ .@cashperday +"^000000";
	next;
	
	mes "["+ strnpcinfo(1)+"]";
	if( #CASHPOINTS < .@cashperday ){
		mes "You don't have enough Cash Points to purchase VIP Days";
		close;
	} else {
		mes "Would you like to purchase/increase your VIP Days?";
		switch(select(" - Nope: - Yeah!")){
			case 1:
				break;
			case 2:
				#CASHPOINTS - .@cashperday;
				vip_time 1440;
				dispbottom "Current Cash Points: "+ #CASHPOINTS;
				dispbottom "VIP Expires: "+ vip_status(2);
				break;
		}
		close;
	}
}

 

tried that one yesterday but i have this error

error.png

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

2 hours ago, Exmas said:

#CASHPOINTS - .@cashperday;

I'm a tool. Should be -= or replace that line with this if you want to look them up in the command logs too:

atcommand "@cash -" + .@cashperday;

I also just did a quick search on the forums because i'm sure i've already seem something similar and found this:

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

2 hours ago, Akkarin said:

I'm a tool. Should be -= or replace that line with this if you want to look them up in the command logs too:


atcommand "@cash -" + .@cashperday;

I also just did a quick search on the forums because i'm sure i've already seem something similar and found this:

 

 

I put the atcommand "@cash -" + .@cashperday; and it worked, but Now Happen this

errrrrrrrrr.png

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

6 minutes ago, Akkarin said:

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

/// Enable VIP script changes? (requires VIP_ENABLE)
/// The primary effects of this are restrictions on non-VIP players, such as requiring
/// a Reset Stone to change into third classes, paying more for equipment upgrades, and
/// so forth. Note that the changes are based on euRO, not iRO.
#define VIP_SCRIPT 0

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

You don't even have VIP enabled..

Remove the comments before VIP_ENABLE.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

14 hours ago, Akkarin said:

You don't even have VIP enabled..

Remove the comments before VIP_ENABLE.

oh lol thought it was not like the conf files to remove that lines //, but ty i'll try it again

 

It works thx :D , but it only give 1 day  vip, i think is boring for you but you know/can tell me how to put it to choose between 10,20 and 30 days vip?

if no its alright, ill just try a way to put it

Edited by Exmas
Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

Add extra menu items for different days and use vip_time (.@days * 1440).

The script_commands.txt file will help you with this.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  226
  • Reputation:   13
  • Joined:  02/17/15
  • Last Seen:  

2 minutes ago, Akkarin said:

Add extra menu items for different days and use vip_time (.@days * 1440).

The script_commands.txt file will help you with this.

Thx , so that file can teach me how to work with scripts?

Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

25 minutes ago, Exmas said:

Thx , so that file can teach me how to work with scripts?

Yes - it describes each script command and how to use them. Most have examples. The top few hundred lines explains the types of NPC scripts, variables and syntax. It's supposed to be the first place anyone goes to see how to script anything.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  05/03/13
  • Last Seen:  

On 1/13/2017 at 7:48 PM, Akkarin said:

 


prontera,100,100,5	script	CashToVIP	123,{
	.@cashperday = 100;
	
	mes "["+ strnpcinfo(1)+"]";
	if(#CASHPOINTS == 0){
		mes "You need Cash Points in order to buy VIP time";
		close;
	}
	
	switch(vip_status(1)){
		case 0:
			mes "You're not a VIP";
			break;
		case 1:
			mes "You are a VIP";
			break;
	}
	
	mes "You currently have "+ #CASHPOINTS +" Cash Points.";
	mes "Each VIP Day will cost you ^0000ff"+ .@cashperday +"^000000";
	next;
	
	mes "["+ strnpcinfo(1)+"]";
	if( #CASHPOINTS < .@cashperday ){
		mes "You don't have enough Cash Points to purchase VIP Days";
		close;
	} else {
		mes "Would you like to purchase/increase your VIP Days?";
		switch(select(" - Nope: - Yeah!")){
			case 1:
				break;
			case 2:
				#CASHPOINTS -= .@cashperday;
				vip_time 1440;
				dispbottom "Current Cash Points: "+ #CASHPOINTS;
				dispbottom "VIP Expires: "+ vip_status(2);
				break;
		}
		close;
	}
}

it works perfectly for me, but i would to use item 7959 in exchange for VIP, can you help me on this, thank you in advance

 

Edited by diamondhole
wrongly message
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...