Jump to content

Yang Bank System


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Spoiler

18071513a8ee9b0f.jpg.55494a1f84c0f2d3993
180715b1335941e4.jpg.c3feac57e970766c22e
180715d1ac4ff4be.jpg.043241066b5f6b6afd1

 

What is check system?

It's a simple system that allow you to trade an hight amount of yang.

 

Server Side for who change variables from int to long or long long

--***
--**Coded by Luzzo
--***

quest collect_check begin
	state start begin
		function money_operation(operation)
			if operation == 1 then
				say("How many yang do you want to deposit?")
				local money = tonumber(input())
				if money == nil then
					syschat("You have entered a not valid value")
					return
				end
				if money > 0 and money < 1999999999 and pc.get_gold() >= money then
					pc.changegold(-money)
					item.set_socket(0, item.get_socket(0)+money)
					syschat("You have deposited "..money.." yang.")
				else
					syschat("You have entered a not valid value")
				end
			elseif operation == 2 then
				say("How many yang do you want to take?")
				local money = tonumber(input())
				if money == nil then
					syschat("You have entered a not valid value")
					return
				end
				if money > 0 and item.get_socket(0) >= money and pc.get_gold()+money <= 1999999999 then
					pc.changegold(money)
					item.set_socket(0, item.get_socket(0)-money)
					syschat("You have taken "..money.." yang.")
				else
					syschat("You have entered a not valid value")
				end
			elseif operation == 3 then
				say("You will lose all money on this check")
				say_reward("Are you sure?")
				local conf_deleting = select("Yes, Delete","No,i will think")
				if conf_deleting == 1 then
					item.remove()
				end
			end
		end
					
		when 50512.use begin
			say_title("Check Manager")
			say("Hi "..pc.get_name().." how can i help you?")
			local selection = {"Deposit Money","Take Money","Delete Check","Exit"}
			local choice = select_table(selection)
			if choice != table.getn(selection) then
				say_title("Check Manager")
				say("Mode:"..selection[choice])
				collect_check.money_operation(choice)
			else
				return
			end
		end
	end
end
					
		

Server Side for no modified variables.(Common function source is int)

--***
--**Coded by Luzzo
--***

quest collect_check begin
	state start begin
		function money_operation(operation)
			if operation == 1 then
				say("How many yang do you want to deposit?")
				local money = tonumber(input())
				if money == nil then
					syschat("You have entered a not valid value")
					return
				end
				if money > 0 and money < 999999999 and pc.get_gold() >= money and item.get_socket(0)+money <=  999999999 then
					pc.changegold(-money)
					item.set_socket(0, item.get_socket(0)+money)
					syschat("You have deposited "..money.." yang.")
				else
					syschat("You have entered a not valid value")
				end
			elseif operation == 2 then
				say("How many yang do you want to take?")
				local money = tonumber(input())
				if money == nil then
					syschat("You have entered a not valid value")
					return
				end
				if money > 0 and item.get_socket(0) >= money and pc.get_gold()+money <= 1999999999 then
					pc.changegold(money)
					item.set_socket(0, item.get_socket(0)-money)
					syschat("You have taken "..money.." yang.")
				else
					syschat("You have entered a not valid value")
				end
			elseif operation == 3 then
				say("You will lose all money on this check")
				say_reward("Are you sure?")
				local conf_deleting = select("Yes, Delete","No,i will think")
				if conf_deleting == 1 then
					item.remove()
				end
			end
		end
					
		when 50512.use begin
			say_title("Check Manager")
			say("Hi "..pc.get_name().." how can i help you?")
			local selection = {"Deposit Money","Take Money","Delete Check","Exit"}
			local choice = select_table(selection)
			if choice != table.getn(selection) then
				say_title("Check Manager")
				say("Mode:"..selection[choice])
				collect_check.money_operation(choice)
			else
				return
			end
		end
	end
end
					
		

Cient Side

 

1)unpack root and open uitooltip.py

2)Find

		### Hair Preview Image ###
		if self.__IsHair(itemVnum):	
			self.__AppendHairIcon(itemVnum)

Is in AddItemData method

 

3) Before paste this

		if itemVnum == 50512:
			if metinSlot[0] != 0:
				self.AppendDescription("Yang Account: %s." %localeInfo.NumberToMoneyString(metinSlot[0]) , 26, self.CONDITION_COLOR)
			else:
				self.AppendDescription("Empty Check" , 26, self.CONDITION_COLOR)
				

I use 50512 item just to script the system you can use another value with a better icon =D

  • Metin2 Dev 3
  • Good 1
  • Love 8
Link to comment
Share on other sites

  • 1 year later...

It's an interesting way of allowing more gold trade without source. Clean, and well thought of!

If i know good, for more than 2kkk store in this item, you must too edit source for max long long

and when you have max gold in source, why this item need? if you can trade more than 2kkk 

It's much easier and cleaner to do it like that,because you don't even need to edit source, but still if you want to change the gold limit it's your choice.

Link to comment
Share on other sites

It's an interesting way of allowing more gold trade without source. Clean, and well thought of!

If i know good, for more than 2kkk store in this item, you must too edit source for max long long

and when you have max gold in source, why this item need? if you can trade more than 2kkk 

It's much easier and cleaner to do it like that,because you don't even need to edit source, but still if you want to change the gold limit it's your choice.

For more than 2kkk you must edit source, so this method its only for max 2kkk

Link to comment
Share on other sites

  • 3 years later...
On 6/5/2014 at 10:38 PM, luzzo said:

What is check system?

It's a simple system that allow you to trade an hight amount of yang.

 

Server Side for who change variables from int to long or long long


--***
--**Coded by Luzzo
--***

quest collect_check begin
	state start begin
		function money_operation(operation)
			if operation == 1 then
				say("How many yang do you want to deposit?")
				local money = tonumber(input())
				if money == nil then
					syschat("You have entered a not valid value")
					return
				end
				if money > 0 and money < 1999999999 and pc.get_gold() >= money then
					pc.changegold(-money)
					item.set_socket(0, item.get_socket(0)+money)
					syschat("You have deposited "..money.." yang.")
				else
					syschat("You have entered a not valid value")
				end
			elseif operation == 2 then
				say("How many yang do you want to take?")
				local money = tonumber(input())
				if money == nil then
					syschat("You have entered a not valid value")
					return
				end
				if money > 0 and item.get_socket(0) >= money and pc.get_gold()+money <= 1999999999 then
					pc.changegold(money)
					item.set_socket(0, item.get_socket(0)-money)
					syschat("You have taken "..money.." yang.")
				else
					syschat("You have entered a not valid value")
				end
			elseif operation == 3 then
				say("You will lose all money on this check")
				say_reward("Are you sure?")
				local conf_deleting = select("Yes, Delete","No,i will think")
				if conf_deleting == 1 then
					item.remove()
				end
			end
		end
					
		when 50512.use begin
			say_title("Check Manager")
			say("Hi "..pc.get_name().." how can i help you?")
			local selection = {"Deposit Money","Take Money","Delete Check","Exit"}
			local choice = select_table(selection)
			if choice != table.getn(selection) then
				say_title("Check Manager")
				say("Mode:"..selection[choice])
				collect_check.money_operation(choice)
			else
				return
			end
		end
	end
end
					
		

Server Side for no modified variables.(Common function source is int)


--***
--**Coded by Luzzo
--***

quest collect_check begin
	state start begin
		function money_operation(operation)
			if operation == 1 then
				say("How many yang do you want to deposit?")
				local money = tonumber(input())
				if money == nil then
					syschat("You have entered a not valid value")
					return
				end
				if money > 0 and money < 999999999 and pc.get_gold() >= money and item.get_socket(0)+money <=  999999999 then
					pc.changegold(-money)
					item.set_socket(0, item.get_socket(0)+money)
					syschat("You have deposited "..money.." yang.")
				else
					syschat("You have entered a not valid value")
				end
			elseif operation == 2 then
				say("How many yang do you want to take?")
				local money = tonumber(input())
				if money == nil then
					syschat("You have entered a not valid value")
					return
				end
				if money > 0 and item.get_socket(0) >= money and pc.get_gold()+money <= 1999999999 then
					pc.changegold(money)
					item.set_socket(0, item.get_socket(0)-money)
					syschat("You have taken "..money.." yang.")
				else
					syschat("You have entered a not valid value")
				end
			elseif operation == 3 then
				say("You will lose all money on this check")
				say_reward("Are you sure?")
				local conf_deleting = select("Yes, Delete","No,i will think")
				if conf_deleting == 1 then
					item.remove()
				end
			end
		end
					
		when 50512.use begin
			say_title("Check Manager")
			say("Hi "..pc.get_name().." how can i help you?")
			local selection = {"Deposit Money","Take Money","Delete Check","Exit"}
			local choice = select_table(selection)
			if choice != table.getn(selection) then
				say_title("Check Manager")
				say("Mode:"..selection[choice])
				collect_check.money_operation(choice)
			else
				return
			end
		end
	end
end
					
		

Cient Side

 

1)unpack root and open uitooltip.py

2)Find


		### Hair Preview Image ###
		if self.__IsHair(itemVnum):	
			self.__AppendHairIcon(itemVnum)

Is in AddItemData method

 

3) Before paste this


		if itemVnum == 50512:
			if metinSlot[0] != 0:
				self.AppendDescription("Yang Account: %s." %localeInfo.NumberToMoneyString(metinSlot[0]) , 26, self.CONDITION_COLOR)
			else:
				self.AppendDescription("Empty Check" , 26, self.CONDITION_COLOR)
				

I use 50512 item just to script the system you can use another value with a better icon =D

 

 

Screen

 

13a8ee9b0f.jpg

 

 

b1335941e4.jpg

 

d1ac4ff4be.jpg

 

 

Changelog

 

Added to different version

I need help.
Even though I have modified the Source, on Long Long, still after the Lua adjustment, still more than 2kkk will not take ..
Where can there be a mistake? :)
Thank you very much for your help.

I apologize for English, I am Czech and I can not speak English at all: D

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.