Jump to content
  • 0

Playtime Reward


PapaZola

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

hello rA

its posibble to make if player have already play on game or online already 72 hours in game can claim a reward from npc example reward

5013 lord kaho horn

2629 megingjard

if player still not enough game time the npc will show how many hours more he need to wait and online

please help

 

Edited by PapaZola
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  926
  • Reputation:   168
  • Joined:  04/05/13
  • Last Seen:  

Store gettimetick and calculated it each hours (Maybe OnClock event).

(See in D:\rathena\doc\script_commands.txt)

Edited by Start_
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

Script Request. i haven't tried it since i'm not on PC. but i think its working without bugs.

prontera,155,181,3	script	Yumi	94,{

	mes .name$;
	if(#PlayTimeReward){
		mes "You already received your play time reward.";
		end;
	}
	if(#PlayTime<.PlayTime){
		mes "Your current Playtime is ^0055FF"+#PlayTime+"^000000 minutes.\n";
		mes "You still need "+(.PlayTime-#PlayTime)+" minutes to receive your play time reward.";
		end;
	}
	if(!checkweight2(.RewardsID,.RewardsAmt)){
		mes "Insufficient inventory space or weight.";
		end;
	}
	for(.@i=0;.@i<getarraysize(.Rewards);.@i++)
		getitem .RewardsID[.@i],.RewardsAmt[.@i];
	#PlayTimeReward = 1;
	mes "You received your rewards!";
end;

OnPCLoginEvent:
	if( #PlayTime < .PlayTime || !#PlayTimeReward )
		addtimer 60000,strnpcinfo(0)+"::OnPlayTime";
end;

OnPlayTime:
	if( #PlayTime >= .PlayTime )
		end;
	#PlayTime += 1;
	addtimer 60000,strnpcinfo(0)+"::OnPlayTime";
end;

OnInit:
	.name$ = "[ ^FF5500Playtime Reward^000000 ]";
	.Playtime = 4320; //In Minutes
	
	setarray .RewardsID[0],5013,2629;
	setarray .RewardsAmt[0],1,2;
	
end;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

On 4/20/2020 at 3:39 PM, Haruka Mayumi said:

Script Request. i haven't tried it since i'm not on PC. but i think its working without bugs.


prontera,155,181,3	script	Yumi	94,{

	mes .name$;
	if(#PlayTimeReward){
		mes "You already received your play time reward.";
		end;
	}
	if(#PlayTime<.PlayTime){
		mes "Your current Playtime is ^0055FF"+#PlayTime+"^000000 minutes.\n";
		mes "You still need "+(.PlayTime-#PlayTime)+" minutes to receive your play time reward.";
		end;
	}
	if(!checkweight2(.RewardsID,.RewardsAmt)){
		mes "Insufficient inventory space or weight.";
		end;
	}
	for(.@i=0;.@i<getarraysize(.Rewards);.@i++)
		getitem .RewardsID[.@i],.RewardsAmt[.@i];
	#PlayTimeReward = 1;
	mes "You received your rewards!";
end;

OnPCLoginEvent:
	if( #PlayTime < .PlayTime || !#PlayTimeReward )
		addtimer 60000,strnpcinfo(0)+"::OnPlayTime";
end;

OnPlayTime:
	if( #PlayTime >= .PlayTime )
		end;
	#PlayTime += 1;
	addtimer 60000,strnpcinfo(0)+"::OnPlayTime";
end;

OnInit:
	.name$ = "[ ^FF5500Playtime Reward^000000 ]";
	.Playtime = 4320; //In Minutes
	
	setarray .RewardsID[0],5013,2629;
	setarray .RewardsAmt[0],1,2;
	
end;
}

 

thanks sir gonna try it

 

not working sir

in only got this when trying claim reward.help please

53nDk2.png

bump anyone can help??please urgent

Edited by PapaZola
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  926
  • Reputation:   168
  • Joined:  04/05/13
  • Last Seen:  

Change

for(.@i=0;.@i<getarraysize(.Rewards);.@i++)

to

for(.@i=0;.@i<getarraysize(.RewardsID);.@i++)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

1 hour ago, Start_ said:

Change

for(.@i=0;.@i<getarraysize(.Rewards);.@i++)

to

for(.@i=0;.@i<getarraysize(.RewardsID);.@i++)

53jvag.png

 

and 

old account trying claim still said u already received the reward

53nDk2.png

 

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