Jump to content
  • 0

scripting hourly points


kombatzz

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  02/02/12
  • Last Seen:  

-    script    OnlineReward#1    -1,{
 
//--Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;

OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1) {
    dispbottom "The rewards has stopped because you were vending . Please relog if you wish to start again.";
    stopnpctimer;
    end;
}

OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 1 && (strcharinfo(3) == "louyang")){
    set @minute,0;
    set #CASHPOINTS,#CASHPOINTS+2;
    dispbottom "You received 2 Cash Points. Current Cash Points: " + #CASHPOINTS;
}
stopnpctimer;
initnpctimer;
end;
}

can you guys help me? from the script above, i need to if someone warped to louyang can participate the hourly event, rather than re-log in to the game. thanks for the support!

Edited by kombatzz
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  02/02/12
  • Last Seen:  

can someone help me?

Link to comment
Share on other sites

  • 0

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

louyang,150,150,0	script	OnlineReward	2248,300,300,{
	end;
	
OnTouch:
	attachnpctimer strcharinfo(0);
	initnpctimer;
	end;

OnTimer30000:
	if(checkvending() >= 1) {
		dispbottom "The rewards has stopped because you were vending . Please relog if you wish to start again.";
		stopnpctimer;
	}
	end;

OnTimer60000:
	if(strcharinfo(3) == "louyang"){
		#CASHPOINTS += 2;
		dispbottom "You received 2 Cash Points. Current Cash Points: " + #CASHPOINTS;
		stopnpctimer;
		initnpctimer;
	}
	else
	stopnpctimer;
	end;
}

 

Edited by TARTs
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  02/02/12
  • Last Seen:  

On 4/10/2019 at 10:43 AM, TARTs said:

louyang,150,150,0	script	OnlineReward	2248,300,300,{
	end;
	
OnTouch:
	attachnpctimer strcharinfo(0);
	initnpctimer;
	end;

OnTimer30000:
	if(checkvending() >= 1) {
		dispbottom "The rewards has stopped because you were vending . Please relog if you wish to start again.";
		stopnpctimer;
	}
	end;

OnTimer60000:
	if(strcharinfo(3) == "louyang"){
		#CASHPOINTS += 2;
		dispbottom "You received 2 Cash Points. Current Cash Points: " + #CASHPOINTS;
		stopnpctimer;
		initnpctimer;
	}
	else
	stopnpctimer;
	end;
}

 

it should touch the NPC to start the event or automatically? btw, thanks for ur reply

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

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