Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 21:48

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



request for a script

Discussion on request for a script within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2012
Posts: 9
Received Thanks: 1
request for a script

i want a rappelz script that gives u
a gift in your bag every hour of playing
zartin is offline  
Old 04/24/2015, 14:28   #2
 
elite*gold: 0
Join Date: Oct 2010
Posts: 2,555
Received Thanks: 2,460
Write a script called

function on_every_hour()
-- Logic
end

and create a scheduledcommand entry to fire that script every hour. (Thought I'm sure it won't be able to do targeted cmd's like insert_item, I could be wrong though)
ismokedrow is offline  
Thanks
1 User
Old 04/24/2015, 18:54   #3
 
elite*gold: 0
Join Date: May 2013
Posts: 159
Received Thanks: 14
I did some testing on scheduledcommand if the change type from 0 to 1 will appear as notice if the value 0 is the command but can not get it applied whether buff or tool
thund22222 is offline  
Old 04/24/2015, 19:44   #4
 
Dark.Gts's Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 12
Received Thanks: 13
NFlavor did something like this for a login event in 2014.

The way I understand it, the function 'on_time_based_event_reward()' (NPC_Event.lua) is run periodically for any player who has been logged in for a certain period of time if the environment variable 'game.use_time_based_event_script' is set.
This is done automatically on startup (assuming it wasn't removed from 'on_server_init()') by 'for_event_by_liveteam()' (NPC_Event.lua):
Code:
	set_env( "game.use_time_based_event_script",1 )
	set_env( "game.term_for_time_based_event_script",120 )
...where 120 is the required login period in minutes.

For example, if you set game.term_for_time_based_event_script to 5 and add the line insert_item(900000,1) to on_time_based_event_reward() without any further conditions, any player on the server will receive 1 stamina saver for every five minutes they are logged on.
Dark.Gts is offline  
Thanks
7 Users
Old 04/24/2015, 20:38   #5
 
elite*gold: 0
Join Date: May 2013
Posts: 159
Received Thanks: 14
Thank you very much, but you should be Put the function in on_server_init?
thund22222 is offline  
Old 04/24/2015, 21:07   #6
 
Dark.Gts's Avatar
 
elite*gold: 0
Join Date: Oct 2011
Posts: 12
Received Thanks: 13
Assuming your LUAs haven't been modified you won't have to add anything besides your own code. This is the important stuff:

server_init.lua:
Code:
[...]
function on_server_init()
	[...]
	for_event_by_liveteam() --라이브팀 사용 범위로 NPC_EVENT 스크립트에서 사용된다.
end
[...]
NPC_Event.lua:
Code:
[...]
function for_event_by_liveteam()

	play_time_event() --플레이 타임 이벤트
	[...]
end

function play_time_event()

	[...]
		set_env( "game.use_time_based_event_script",1 )
		set_env( "game.term_for_time_based_event_script",120 )
		--change the value above to your desired interval in minutes!
	[...]
end

function on_time_based_event_reward() 

	local state_code = get_local_info()  -- 국가코드
	local pcbang_grade = get_value("pcbang_user")	-- 프리미엄PC방 판단변수	
	local t_flag = get_flag( "reward_time_event" ) -- 캐릭터 별 플래그 값
	local account_t_flag = get_account_flag( "reward_time_event" ) -- 계정 별 플래그 값
	local current_time = get_os_date( "%Y-%m-%d %H:%M:%S" )
	local flag_current_time = get_os_date( "%Y-%m-%d" )
	local event_current_week = 0	
	local lv = get_value( "level" )

	--add your own code below!

	[...]
end
[...]
Dark.Gts is offline  
Thanks
4 Users
Old 05/08/2023, 04:56   #7
 
tanos77's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 109
Received Thanks: 11
Could someone show me how to use the scripts I have already tried from sql, copying and pasting into new queries but most of them give an error on certain lines.
tanos77 is offline  
Old 05/08/2023, 05:53   #8
 
Sh4doxie's Avatar
 
elite*gold: 0
Join Date: Jun 2021
Posts: 71
Received Thanks: 17
Quote:
Originally Posted by tanos77 View Post
Could someone show me how to use the scripts I have already tried from sql, copying and pasting into new queries but most of them give an error on certain lines.
pm me with ur discord nick, ill try to help but only if ure able to "ask".
Sh4doxie is offline  
Reply


Similar Threads Similar Threads
[Request] Script
04/07/2014 - Dekaron Private Server - 3 Replies
It's possible to send coins to all players in database ? Can anyone help me with script ?
[Request]Script
09/13/2012 - Metin2 PServer Guides & Strategies - 2 Replies
Hello, I would like, if possible, if create one script for recruiting friends,as official server! Thank you in advance! eXcCeSs Sorry for translate but is in GoogleTranslate!:):rtfm:
AHK script request
07/23/2012 - General Coding - 0 Replies
I did not see a AHK forum area, just autoit. Can someone make me a script that while holding down F, it will continuously scan the center of my screen around the crosshair, 1900X1080. If it detects red or a variation of red it will right click once. Only active while holding down F. Thanks in advance.
[Request] Script TUT
12/21/2009 - Grand Chase - 1 Replies
Is there a simple script editing tut. I tried the whole Kom extractor thing and using python but I'm not getting it, I type in Script without .kom like they said and I pressed enter and the code in script is still hidden. Could someone post an easier tut that people can actually understand and then someone said "This isn't the easy way, its the hard way." IS there a different way to edit Script?
[REQUEST] Can i Request A Acc/Char PHP Script
09/27/2008 - CO2 Private Server - 6 Replies
hello i was wondering if anyone have made a acc/char creation page in one yet? is so can anyone release itplease?



All times are GMT +1. The time now is 21:48.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.