Jump to content

[ Dead Download Link ] [RELEASE] Shop with the new currency [ We Need You ]


Recommended Posts

Sanchez nekem írhatsz magyarul is :D

 

Na szóval, megnéztem, benne van.

 

Ezt az új rendszert próbálgatom de ezt írogatja, a jelentése pedig:

 

SHOP_BUY_INFO    Válaszd ki a tárgyat, amit meg akarsz vásárolni a bolt ablakból.

 

UI: vásárlásnál írja

  • Premium

I don't have any idea, because I'm not tested the codes, but I think the problem will be with the quest calling. Make a debug messages at item purchasing and you will see where is the problem.

networkModule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiToolTip.py, line 547)

I'm not sure if I undestand what you want to change in uitooltip. Can u explain?

Can someone help me with the quest please, instead of it finding the TR amount from the questflag, i want it to find it from mysql, and when buying something from the TR shop, it reduces TR from database.

  • 2 weeks later...
  • Premium

I already gave some instructions in this topic about this system. Use database to store the coins of the player and always resend it at login and at item purchasing. Please look back with few pages and check out my comments.

This quest is with mysql:

quest achievement begin
	state start begin
		function getcoins()
			local a = mysql_query("SELECT * FROM player.player WHERE id = "..pc.get_player_id().."")
			return a.coins[1]
		end
		function addcoins(coins_ammount)
			local a = mysql_query("UPDATE player.player SET coins = coins+"..coins_ammount.." WHERE id = "..pc.get_player_id().."")	
		end
		function removecoins(coins_ammount)
			local a = mysql_query("UPDATE player.player SET coins = coins-"..coins_ammount.." WHERE id = "..pc.get_player_id().."")	
		end		
		function buy(id,count)
			pc.give_item2(id,count)
		end		
		when 20095.chat."Sklep Osiagniec " begin
			cmdchat("SetIsNpc")
			npc.open_shop(16)
			setskin(NOWINDOW)
			cmdchat("SetPrice 200|200|200|200|200|0|0|100|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0")
		end
		when login begin
			cmdchat("SetQuestIndex "..q.getcurrentquestindex())
			cmdchat("setPP "..tonumber(achievement.getcoins()))
		end
		when button or info begin
			local items = {
				[0]={71124, 1, 200},
				[1]={71125, 1, 200},
				[2]={71126, 1, 200},
				[3]={71127, 1, 200},
				[4]={71128, 1, 200},
			}
			local slot = tonumber(achievement.GetInput("GetInput"))
			if achievement.getcoins() >= items[slot][3] then
				achievement.removecoins(tonumber(items[slot][3]))
				cmdchat("setPP "..tonumber(achievement.getcoins()))
				achievement.buy(items[slot][1], items[slot][2])
			else
				cmdchat("NieMamPP")
			end
		end
		function GetInput(value)
			cmdchat("GetInputStart")
			local ret = input(cmdchat(value))
			cmdchat("GetInputStop")
			return ret
		end
	end
end

 

Use console to add this to player.player

ALTER TABLE player.player ADD coins int(11) NOT NULL;

*Not tested*

  • Love 2

Hi i was trying add this system and get this syserr clientside.

 

Crash after login screen when  will show my characther to login.

0423 09:04:08134 :: 
networkModule.py(line:194) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:23) ?
system.py(line:130) __pack_import
system.py(line:110) _process_result
uiAffectShower.py(line:8) ?
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - exceptions.IndentationError:expected an indented block (line 546)

0423 09:04:08134 :: ============================================================================================================
0423 09:04:08134 :: Abort!!!!

I tried check after which file this start happen and then i take this conclusion.

inventorywindows.py: OK

constinfo.py: OK

uishop.py(uploaded by Sanchez): when i try shop haven't any tooltip.

game.py: stop on loading screen to join ingame after character select.

uitooltip.py: crash after login

uiinventory.py: crash after login

 

thats all i think.

sry for the low knowledge to give more information.

 

You had syntax errors everywhere, but check it now:

This is the hidden content, please

 

Thanks Sanchez. Now i will compare both files to see where was my errors.

 

 

-----EDIT-----

 

 

Crash after login Sanchez. and get this syserr.

0424 08:58:05465 ::
networkModule.py(line:194) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:28) ?
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:14) ?
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - exceptions.IndentationError:unindent does not match any outer indentation level (line 475)

0424 08:58:05465 :: ============================================================================================================
0424 08:58:05465 :: Abort!!!!

 

Same syserr. Only change the line error now to 503

0424 11:14:06732 ::
networkModule.py(line:194) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:28) ?
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:14) ?
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - exceptions.IndentationError:unindent does not match any outer indentation level (line 503)

0424 11:14:06732 :: ============================================================================================================
0424 11:14:06732 :: Abort!!!!


This quest is with mysql:

quest achievement begin
	state start begin
		function getcoins()
			local a = mysql_query("SELECT * FROM player.player WHERE id = "..pc.get_player_id().."")
			return a.coins[1]
		end
		function addcoins(coins_ammount)
			local a = mysql_query("UPDATE player.player SET coins = coins+"..coins_ammount.." WHERE id = "..pc.get_player_id().."")	
		end
		function removecoins(coins_ammount)
			local a = mysql_query("UPDATE player.player SET coins = coins-"..coins_ammount.." WHERE id = "..pc.get_player_id().."")	
		end		
		function buy(id,count)
			pc.give_item2(id,count)
		end		
		when 20095.chat."Sklep Osiagniec " begin
			cmdchat("SetIsNpc")
			npc.open_shop(16)
			setskin(NOWINDOW)
			cmdchat("SetPrice 200|200|200|200|200|0|0|100|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0")
		end
		when login begin
			cmdchat("SetQuestIndex "..q.getcurrentquestindex())
			cmdchat("setPP "..tonumber(achievement.getcoins()))
		end
		when button or info begin
			local items = {
				[0]={71124, 1, 200},
				[1]={71125, 1, 200},
				[2]={71126, 1, 200},
				[3]={71127, 1, 200},
				[4]={71128, 1, 200},
			}
			local slot = tonumber(achievement.GetInput("GetInput"))
			if achievement.getcoins() >= items[slot][3] then
				achievement.removecoins(tonumber(items[slot][3]))
				cmdchat("setPP "..tonumber(achievement.getcoins()))
				achievement.buy(items[slot][1], items[slot][2])
			else
				cmdchat("NieMamPP")
			end
		end
		function GetInput(value)
			cmdchat("GetInputStart")
			local ret = input(cmdchat(value))
			cmdchat("GetInputStop")
			return ret
		end
	end
end

 

Use console to add this to player.player

ALTER TABLE player.player ADD coins int(11) NOT NULL;

*Not tested*

The inventory shows 1234567, any solution?

 

The inventory shoes 1234567, any solution?

 

 

 

I had the same problem, have you got any errors in sysser (i mean errors with wrong command in client or sth)?If yes you must do sth wrong in servercommandlist in game, but  if no; the problem is in the quest, my looks little bit different e.g 

function getcoins()
			local a = mysql_query("SELECT coins from player.player WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1]
			a = tonumber(a)
			return a
		end
cmdchat("setPP"..achievementy.getcoins())

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.