Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 07:01

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

Advertisement

Rappelz 9.5.2 JP to AP Exchange NPC Code

Discussion on Rappelz 9.5.2 JP to AP Exchange NPC Code within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2013
Posts: 16
Received Thanks: 2
Rappelz 9.5.2 JP to AP Exchange NPC Code

Just finished this up and implementing on my server tonight at next restart. BTW does anyone know why changes in the StringResourceEN Table don't take effect? I added a unused code, 0 group ID, and a value, then referenced it in the code but it always shows empty string. Same for anytime I change an existing value in that table.

If the code is not "clean" its because I learning LUA on the fly. Though I would share this though incase its useful to others.

Code:
dlg_menu( "JP To AP Exchange", "Exchange_JP_to_AP()" )
Code:
-- JP to AP Exchange Begin --
-- Max AP is 2,147,483 647 --
function Exchange_JP_to_AP()
	
	local exchange_rate = 0.00000001
	
	local numrac, exchange_ap, player_ap, text, numap

	numrac = gv("jp")    -- It fetches the amount of JP that is currently collected.
	exchange_ap = math.floor(numrac * exchange_rate)     -- Calculate the maximum AP amount that can be exchanged.
	player_ap = gv("ap") -- Get player current AP amount.
	numap = tonumber(exchange_ap .. player_ap)	--	The current user AP and the exchange AP are combined.
	
	dlg_title( "GreeneTech Shop" )
	text = sconv("You Have #@[email protected]# JP To Exchange For #@[email protected]# AP.", "#@[email protected]#",tostring( numrac ) , "#@[email protected]#",tostring(exchange_ap))   -- Replace variable with actual value (string).	
	dlg_text_without_quest_menu( text )       -- Insert text in the dialog window
		
		-- <Common menu>
		-- All exchange.
	if numrac >= 100000000 then
		dlg_menu( "@90010083", 'PointExchange_AP_num(' .. exchange_ap .. ')' )
	end
		
	local num1, num2, num3, num4

	num1 = 10

	if numrac <3000000000 then
		num1 = 1
		num2 = 5
		num3 = 10
		num4 = 20
	
	elseif numrac < 11000000000 then
		num2 = 30
		num3 = 50
		num4 = 100
		
	elseif numrac < 31000000000 then
		num2 = 50
		num3 = 100
		num4 = 300
	
	else
		num2 = 50
		num3 = 200
		num4 = 500

	end
		
	if numrac >= num1 then
		-- #@ number @ # exchange only. num1
		text = sconv("Purchase #@[email protected]# AP", "#@[email protected]#", tostring( num1 ) )   -- Replace variable with actual value (string).
		dlg_menu( text, 'PointExchange_AP_num(' .. num1 ..')' )
	end
	if numrac >= num2 then
		-- #@ number @ # exchange only. num2

		text = sconv("Purchase #@[email protected]# AP", "#@[email protected]#", tostring( num2 ) )   -- Replace variable with actual value (string)
		dlg_menu( text, 'PointExchange_AP_num(' .. num2 ..')' )
	end
	if numrac >= num3 then
		-- #@ number @ # exchange only. num3

		text = sconv("Purchase #@[email protected]# AP", "#@[email protected]#", tostring( num3 ) )   -- Replace variable with actual value (string)
		dlg_menu( text, 'PointExchange_AP_num(' .. num3 ..')' )
	end
	if numrac >= num4 then
		-- #@ number @ # exchange only. num4

		text = sconv("Purchase #@[email protected]# AP", "#@[email protected]#", tostring( num4 ) )   -- Replace variable with actual value (string)
		dlg_menu( text, 'PointExchange_AP_num(' .. num4 .. ')' )
	end
	dlg_menu( "@99000016", "NPC_RevoTrader_Contact()" )
	-- End conversation
	dlg_menu( "@90010002", "" )

	-- Outputting the dialog
	dlg_show()

end
-- JP to AP Exchange End --

-- JP Currency Exchange Begin --
function PointExchange_AP_num( ap_amount )

	player_jp = gv("jp")
	player_ap = gv("ap")
	ap_cost = ap_amount*100000000

		if player_jp >= ap_cost then
		temp_jp = player_jp - ap_cost
		temp_ap = player_ap + ap_amount
		
		-- Update Player AP Amount
		sv("ap", temp_ap )
		-- Update Player JP Amount		
		sv("jp", temp_jp )
			
		message( sconv( "Recieved #@[email protected]# AP", "#@[email protected]#", tostring(ap_amount) ) )
	end
	
	
end
-- JP Currency Exchange End --



ozman911 is offline  
Thanks
1 User
Old 03/15/2019, 09:00   #2
 
elite*gold: 0
Join Date: Sep 2012
Posts: 4
Received Thanks: 1
Hello,

Did you make your RDB file? StringResource.rdb


test83 is offline  
Thanks
1 User
Old 03/15/2019, 16:55   #3
 
elite*gold: 0
Join Date: Nov 2013
Posts: 16
Received Thanks: 2
No sir, and if I had to guess I'd say that is probably the issue lol. I am very much new to all of this, so please forgive any dumb questions. :-)



Quote:
Originally Posted by test83 View Post
Hello,

Did you make your RDB file? StringResource.rdb
So If I modify an existing Text String Code,, Should I then be modifying it elsewhere as well? (In the .rdb file you mentioned above.)
ozman911 is offline  
Old 03/15/2019, 17:31   #4
Moderator

 
elite*gold: 1
Join Date: Dec 2012
Posts: 3,647
Received Thanks: 1,190
You need to make use of an RDB tool and write a new RDB file from the database table.

With grimoire by Ismokedrow you can rebuild the data files of the client with new updates.

With glandu2's rdb tool you would need to write the RDB hash the file name for ascii or codepage launch and place it in the resource folder of the client.


ThunderNikk is offline  
Thanks
1 User
Old 03/16/2019, 09:00   #5
 
elite*gold: 0
Join Date: Nov 2013
Posts: 16
Received Thanks: 2
Trying my best not to have to ask questions but Ive hit a wall here. Im trying to update some of the .png files in the client as well as figure out the NPC Name Change, and the StringResource Names. Ive got a grasp on Grimoirev4 but it seems to not like connecting to my DB. Not really needed right now as I can use glandu2's tool to connect just fine. With Grimoirev4 when I try to update the .png in the data file it tells me the "value" is the wrong size?

Grimoirev2 seems to update the file with the correct .png as I redump it after updating, but with no way to rebuild the client it doesnt take, if I close and reopen its a wash.

Ive dug all the post and searched for hours but I am unable to find any kind of reference to this issue, but I assume its possible to replace the .png files.

Thanks for the previous info! It pointed me in the correct direction.
ozman911 is offline  
Old 03/16/2019, 15:42   #6
Moderator

 
elite*gold: 1
Join Date: Dec 2012
Posts: 3,647
Received Thanks: 1,190
Which pngs are you trying to replace?

Is it just a matter of not having the right language in the client and if so what client do you need.

As far as your error ismoke may have to assist with that as it is his program...SilentWisdom is the most recent forum name.

As far as resourcing pngs without rebuilding the client, it can be done that way as well.

Get the PNGs you want in the client.

Hash the file names (ascii) or code page if you launch like Windows-1252 or something

Place the hashed file name pngs in the resource folder of the client.
ThunderNikk is offline  
Old 03/16/2019, 16:42   #7
 
elite*gold: 0
Join Date: Nov 2013
Posts: 16
Received Thanks: 2
I am using Revolutions 9.5.2 Client from FEAR511's guide. The .png I am trying to change is the lobby_login_logo.png. I grabbed Ink's EN version of it as well but that logo is still Arabic and thought this would be a nice place to start learning the .rdb tools.

I made new MISS, FAIL, DODGE, etc, .png's as well though I believe Ink changed those in his upload.

So if I resource .png, and other items, using the hash filename method that overrides what is in the data.000?

I was waiting till I learn a little more about the tools before I message any of their Devs, These tools have been around a good min so its safe to assume that its an error on my part :-).
ozman911 is offline  
Old 03/16/2019, 18:09   #8
Moderator

 
elite*gold: 1
Join Date: Dec 2012
Posts: 3,647
Received Thanks: 1,190
What I am finding in the English client is lobby_login_game_logo(ascii).png

That name hashed for an ascii .bat file launch would be...

iWTyMw$#0gZe+def7^[email protected]`Ymvgd

If you are talking about this one...

I am just using the US retail client.
Attached Images
File Type: png lobby_login_game_logo(ascii).png (76.3 KB, 3 views)
ThunderNikk is offline  
Old 03/16/2019, 18:35   #9
 
elite*gold: 0
Join Date: Nov 2013
Posts: 16
Received Thanks: 2
I did a full dump on Revo's Client, in the png folder there is only the lobby_login_game_logo.png, (no sign of lobby_login_game_logo(ascii).png) (corrected the name of these files to inclue "game")

I am dumping Inks client at the moment to see what it contains. I believe he used the hashed file name method as it looks to be an identical dump.

I was really hoping to figure out how to insert into the data.*** just for learning purposes. I will give the hash filename a go though and see if I can at least get some results.

I grabbed the same .png file you linked and that is what I am trying to replace the Arabic version with.

ADDED
Woohoo! The hashed file name at least produced a working result. :-)

So I guess anything in the resource folder overrides what is in the data.*** files?

Is there a downside to putting a ton of stuff in the resource folder?
ozman911 is offline  
Old 03/16/2019, 20:38   #10
Moderator

 
elite*gold: 1
Join Date: Dec 2012
Posts: 3,647
Received Thanks: 1,190
Quote:
Originally Posted by ozman911 View Post
Is there a downside to putting a ton of stuff in the resource folder?
Eventually if it gets really large it will slow the game down.

Only the US client will have (ascii) names in the files.

If your bat does not have ascii in it you will not need ascii in the file names.

Your .bat launch argument is the driver behind what you need in the data files for game content.

That is why I like to use an English client for ascii launches it makes everything that much easier.
ThunderNikk is offline  
Thanks
1 User
Old 03/17/2019, 08:58   #11
 
elite*gold: 0
Join Date: Nov 2013
Posts: 16
Received Thanks: 2
I managed to get the files inserted into the data.*** files using grimoire v2 and im getting used to glandu2's rdb editor now. For whatever reason Grimorie v4 is a battle. Thank you for all the help! Its greatly appreciated!


ozman911 is offline  
Reply



« Rappelz 9.6 [Request] | [Question]Quest making ? »

Similar Threads
Deli Rappelz, Rappelz Private Server, Türkçe Rappelz Private Server, Rappelz Deli
03/10/2014 - Rappelz Private Server - 2 Replies
Merhaba kardeşlerim, deli rappelz açıldı. Oyundan kısaca bahsedersek oyun 7.4 versiyonlu muhteşem bi oyundur. Herkeze tavsiye edebilirim - Oyunda sadece oyuncuyum sizleride oyunda görürsek daha mutlu oluruz. Oyun 24 saat açıktır istediğiniz zaman girer oynarsınız. ######### Oyun özellikleri ######### x60 Drop özelliği (1 Saat içerisinde 100 level olabilme imkanı.) & ne zor ne kolay tam orta derece. sıkılmayacaksınız! Volkanus (Aktif!)



All times are GMT +1. The time now is 07:01.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 3KeUpz52VCbhmLwuwydqxu6U1xsgbT8YT5
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

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