<commit_before>-- I_61.lua Goldm&uuml;nzen einschmelzen

-- UPDATE common SET com_script='item.id_61_goldcoins' WHERE com_itemid IN (61);

require("base.common")

module("item.id_61_goldcoins", package.seeall)

if not InitTime then
	InitTime=true;
	TimeList = {};
end

function UseItem(User,SourceItem,TargetItem,Counter,Param)
	if ( SourceItem.number == 1 ) then  --works only with 1 coin

    	if TimeList[User.id]~=nil then
			if  ( (math.abs(world:getTime("second") - TimeList[User.id]) ) <=3) then  --1 Rl. second delay
				return;
			end
		end
      	TimeList[User.id] = world:getTime("second");
		
		if math.random(2) == 1 then	gValue = "Kopf"; eValue = "head";
		else gValue = "Zahl"; eValue = "tail"; end    
		
		User:talkLanguage(Character.say, Player.german, "#me wirft eine Mnze in die Luft und fngt sie wieder auf. Sie zeigt "..gValue..".");
		User:talkLanguage(Character.say, Player.english, "#me throws a coin in the air and catches it again. It shows "..eValue..".");

	end
	
	
	if (User:isAdmin()) then
	
		world:createItemFromId(10, 1 ,position (240,732,0),false, 0, 0);
        world:createItemFromId(10, 1 ,position (240,722,0),false, 0, 0);
        world:createItemFromId(10, 1 ,position (250,732,0),false, 0, 0);
        world:createItemFromId(10, 1 ,position (250,722,0),false, 0, 0);
        
        User:inform("portale stehen nahe 240,732,0 rum");
        
		world:createItemFromId(434, 1 ,position (220,735,0),false, 333, 333);
        world:createItemFromId(434, 1 ,position (220,737,0),false, 333, 333);
        world:createItemFromId(434, 1 ,position (220,739,0),false, 333, 333);
        world:createItemFromId(434, 1 ,position (220,741,0),false, 333, 333);
        world:createItemFromId(434, 1 ,position (220,743,0),false, 333, 333);

		world:createItemFromId(434, 1 ,position (33,20,0),false, 333, 333);    --elevator test
		world:createItemFromId(434, 1 ,position (33,10,0),false, 333, 333);
		
        User:inform("<NAME> nahe 220,735,0 rum");
        
        
	end
end

function MoveItemAfterMove(User, SourceItem, TargetItem)

    if TargetItem.pos == (User.pos == position(890,390,0) then -- donation to cherga to reduce death counter, for one cold we reduce all deathes at once!
	    getProgress = deadPlayer:getQuestProgress(666)
		if getProgress == 0 then
			getProgress = 10000
		end	
		
		deathCounter = getProgress-((math.floor(getProgress/10))*10)  
		deadPlayer:setQuestProgress(666,getProgress - deathCounter)
		world:erase(TargetItem,1)
        world:gfx(31,position(890,390,0))
	end	
return true
end<commit_msg>missing bracket<commit_after>-- I_61.lua Goldm&uuml;nzen einschmelzen

-- UPDATE common SET com_script='item.id_61_goldcoins' WHERE com_itemid IN (61);

require("base.common")

module("item.id_61_goldcoins", package.seeall)

if not InitTime then
	InitTime=true;
	TimeList = {};
end

function UseItem(User,SourceItem,TargetItem,Counter,Param)
	if ( SourceItem.number == 1 ) then  --works only with 1 coin

    	if TimeList[User.id]~=nil then
			if  ( (math.abs(world:getTime("second") - TimeList[User.id]) ) <=3) then  --1 Rl. second delay
				return;
			end
		end
      	TimeList[User.id] = world:getTime("second");
		
		if math.random(2) == 1 then	gValue = "Kopf"; eValue = "head";
		else gValue = "Zahl"; eValue = "tail"; end    
		
		User:talkLanguage(Character.say, Player.german, "#me wirft eine Mnze in die Luft und fngt sie wieder auf. Sie zeigt "..gValue..".");
		User:talkLanguage(Character.say, Player.english, "#me throws a coin in the air and catches it again. It shows "..eValue..".");

	end
	
	
	if (User:isAdmin()) then
	
		world:createItemFromId(10, 1 ,position (240,732,0),false, 0, 0);
        world:createItemFromId(10, 1 ,position (240,722,0),false, 0, 0);
        world:createItemFromId(10, 1 ,position (250,732,0),false, 0, 0);
        world:createItemFromId(10, 1 ,position (250,722,0),false, 0, 0);
        
        User:inform("portale stehen nahe 240,732,0 rum");
        
		world:createItemFromId(434, 1 ,position (220,735,0),false, 333, 333);
        world:createItemFromId(434, 1 ,position (220,737,0),false, 333, 333);
        world:createItemFromId(434, 1 ,position (220,739,0),false, 333, 333);
        world:createItemFromId(434, 1 ,position (220,741,0),false, 333, 333);
        world:createItemFromId(434, 1 ,position (220,743,0),false, 333, 333);

		world:createItemFromId(434, 1 ,position (33,20,0),false, 333, 333);    --elevator test
		world:createItemFromId(434, 1 ,position (33,10,0),false, 333, 333);
		
        User:inform("<NAME> nahe 220,735,0 rum");
        
        
	end
end

function MoveItemAfterMove(User, SourceItem, TargetItem)

    if TargetItem.pos == (User.pos == position(890,390,0)) then -- donation to cherga to reduce death counter, for one cold we reduce all deathes at once!
	    getProgress = deadPlayer:getQuestProgress(666)
		if getProgress == 0 then
			getProgress = 10000
		end	
		
		deathCounter = getProgress-((math.floor(getProgress/10))*10)  
		deadPlayer:setQuestProgress(666,getProgress - deathCounter)
		world:erase(TargetItem,1)
        world:gfx(31,position(890,390,0))
	end	
return true
end
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.08731241473396999, 'mean_word_length': 3.925143953934741, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6505424', 'n_tokens_mistral': 2187, 'n_tokens_neox': 1773, 'n_words': 448}