Register for your free account! | Forgot your password?

You last visited: Today at 09:39

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

Advertisement



[Release] Neue Dropmethode

Discussion on [Release] Neue Dropmethode within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old 12/07/2013, 17:04   #31
 
DrHandAmSack's Avatar
 
elite*gold: 35
Join Date: May 2010
Posts: 311
Received Thanks: 36
Es wird immer zu 100% gedropt. Da kann man eingeben was man will.
MfG
DrHandAmSack is offline  
Old 12/07/2013, 20:39   #32
 
elite*gold: 0
Join Date: Jul 2013
Posts: 809
Received Thanks: 1,613
Quote:
Originally Posted by ~Crain~ View Post
bei mir droppen die mobs die schen trd 100 % ^^

hier der code was mach ich falsch

Code:
	[102] = {
		typ = "limit", -- type
		min_level = 1, -- mindestlevel
		max_level = 10, -- maxlevel
		dropps = {
			{23, 1, 1}, -- dropeintrag (vnum, count, chance)
			{4003, 1, 0.001},
			{2013, 1, 0.001},
			{5003, 1, 0.001},
			{7013, 1, 0.001},
			{3013, 1, 0.001},
		}
	},
ICh wurde ignoeriert als ich das erklären wollte. man kann glaube ich nicht
0.001% einstellen
CryPrime is offline  
Old 12/07/2013, 20:45   #33
 
elite*gold: 5
Join Date: Mar 2013
Posts: 1,986
Received Thanks: 2,254
Quote:
Originally Posted by CryPrime View Post
ICh wurde ignoeriert als ich das erklären wollte. man kann glaube ich nicht
0.001% einstellen
Chance auslesen:
PHP Code:
if dropList[self].dropps[i][3] == nil then -- checkt ob Eintrag existiert
    chance 
dropList[self].dropps[i][3] --Wenn ja chance auf den Wert der Tabelle setzen
else
    
chance 100--Wenn nicht auf 100%
end 
Ich schätze das hier irg. ein Fehler vorhanden ist:
PHP Code:
if dropList[self].dropps[i][3] == nil then 
habe mit Tabellen noch nicht so viel gemacht darum keine Ahnung...

€: Achso stimmt alles unter 2% geht nicht da:
PHP Code:
if math.random(1100) < chance then 
xGr33n is offline  
Old 12/07/2013, 21:36   #34
 
DrHandAmSack's Avatar
 
elite*gold: 35
Join Date: May 2010
Posts: 311
Received Thanks: 36
Also wenn ich z.B. 50% Chance in die droplist.lua eintrage dann kommt trotzdem immer 100% ein Item. Wenn ich aber in der questlib.lua chance anstatt 100 zu 50 mache dann kommt das item auch nur zu 50%. Also liest er die Droplist.lua nicht richtig aus.
Einer eine Idee wie es richtig geht?
MfG
DrHandAmSack is offline  
Old 12/07/2013, 21:46   #35
 
elite*gold: 5
Join Date: Mar 2013
Posts: 1,986
Received Thanks: 2,254
Quote:
Originally Posted by krieger3 View Post
Also wenn ich z.B. 50% Chance in die droplist.lua eintrage dann kommt trotzdem immer 100% ein Item. Wenn ich aber in der questlib.lua chance anstatt 100 zu 50 mache dann kommt das item auch nur zu 50%. Also liest er die Droplist.lua nicht richtig aus.
Einer eine Idee wie es richtig geht?
MfG

Versuch mal die hier da sollten einfach Texte im Chat erscheinen.. hab gerade keinen Server zum testen hier...:
PHP Code:
function drop(self)
    if 
dropList[self].typ == "limit" then
        
if dropList[self].min_level == nil or dropList[self].max_level == nil then return end
        
if dropList[self].min_level pc.level or dropList[self].max_level pc.level then return end
        local chance
,count
        table
.foreach(dropList[self].dropps, function(i)
            
chat("Chance: "..dropList[self].dropps[i][3].."")
            if 
dropList[self].dropps[i][3] == nil then
                chance 
dropList[self].dropps[i][3]
            else
                
chat("Chance auf 100% gesetzt")
                
chance 100
            end
            
if dropList[self].dropps[i][2] == nil then
                count 
dropList[self].dropps[i][2]
            else
                
count 1
            end
            
if math.random(1100) < chance then
                game
.drop_item_with_ownership(dropList[self].dropps[i][1], count)
            
end
        end
)
    elseif 
dropList[self].typ == "drop" then
        local chance
,count
        table
.foreach(dropList[self].dropps, function(i)
            
chat("Chance: "..dropList[self].dropps[i][3].."")
            if 
dropList[self].dropps[i][3] == nil then
                chance 
dropList[self].dropps[i][3]
            else
                
chat("Chance auf 100% gesetzt")
                
chance 100
            end
            
if dropList[self].dropps[i][2] == nil then
                count 
dropList[self].dropps[i][2]
            else
                
count 1
            end
            
if math.random(1100) < chance then
                game
.drop_item_with_ownership(dropList[self].dropps[i][1], count)
            
end
        end
)
    else
        return
    
end
end 
xGr33n is offline  
Thanks
1 User
Old 12/08/2013, 02:55   #36
 
DrHandAmSack's Avatar
 
elite*gold: 35
Join Date: May 2010
Posts: 311
Received Thanks: 36
Hier eine funktionieren Version.
Geändert:
-Chance von 0.001 bis 100 möglich
-Chancen funktionieren nun (nicht immer 100%)
-Es werden auch mehrere Items gedropt (vorher immer nur 1)
-Man muss die Werte vnum, count, chance angeben weil die Abfrage "else" raus ist. (find ich unnötig)
MfG
PHP Code:
dofile("/usr/home/game/share/locale/germany/droplist.lua")

function 
drop(self
    if 
dropList[self].typ == "limit" then 
        
if dropList[self].min_level == nil or dropList[self].max_level == nil then return end 
        
if dropList[self].min_level pc.level or dropList[self].max_level pc.level then return end 
        local chance
,count 
        table
.foreach(dropList[self].dropps, function(i
            if 
dropList[self].dropps[i][3then 
                chance 
dropList[self].dropps[i][3
            
end 
            
if dropList[self].dropps[i][2then
                count 
dropList[self].dropps[i][2
            
end 
            
if math.random(0.001100) < chance then 
                game
.drop_item_with_ownership(dropList[self].dropps[i][1], count
            
end 
        end

    elseif 
dropList[self].typ == "drop" then 
        local chance
,count 
        table
.foreach(dropList[self].dropps, function(i
            if 
dropList[self].dropps[i][3then 
                chance 
dropList[self].dropps[i][3]
            
end 
            
if dropList[self].dropps[i][2then 
                count 
dropList[self].dropps[i][2
            
end 
            
if math.random(0.001100) < chance then 
                game
.drop_item_with_ownership(dropList[self].dropps[i][1], count
            
end 
        end

    else 
        return 
    
end 
end 
DrHandAmSack is offline  
Old 12/08/2013, 04:17   #37



 
Insanity​'s Avatar
 
elite*gold: 212
The Black Market: 225/0/1
Join Date: Jul 2012
Posts: 14,508
Received Thanks: 5,528
Mathe nicht eure Stärke?
Je höher die Zahl nach dem Komma, desto geringer die Chance auf das Item.
Die 100 ist im Normalfall variabel.
Insanity​ is offline  
Old 12/08/2013, 11:43   #38
 
Mijago's Avatar
 
elite*gold: 191
Join Date: May 2009
Posts: 1,214
Received Thanks: 2,594
Kleiner Lösungsvorschlag:
aus
if math.random(1, 100) < chance then
mach
if math.random(1e6, 100e6) < chance*1e6 then
oder
if math.random(1, 100)*1e6 < chance*1e6 then

Vll hilfts euch
Mijago is offline  
Thanks
1 User
Old 12/13/2013, 08:54   #39
 
elite*gold: 50
Join Date: May 2011
Posts: 269
Received Thanks: 990
MyMod

Here is my modifications(untested!)
I added to it the "kill" and the "thiefgloves" types and a new "event" type.

0x01; Expanded LuaDrop

0x02; MultiLuaDrop

Special thanks to:
- iRemix[author]
- Mijago[chance]


With regards,
P3NG3R
xP3NG3Rx is offline  
Thanks
1 User
Old 12/14/2013, 15:03   #40
 
elite*gold: 0
Join Date: Dec 2013
Posts: 1
Received Thanks: 0
geht besser
kink.com is offline  
Old 12/15/2013, 16:07   #41
 
JachuPL's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 50
Received Thanks: 83
it is good for hamachi servers, on dedicated it will generate too much load. But this idea is great )
JachuPL is offline  
Thanks
1 User
Old 12/15/2013, 16:12   #42
 
elite*gold: 0
Join Date: Dec 2013
Posts: 60
Received Thanks: 12
Sehr nice kann jeder gebrauchen !
.Minuskind™ is offline  
Thanks
1 User
Old 02/16/2014, 18:11   #43
 
Mr.Xhater's Avatar
 
elite*gold: 0
Join Date: Nov 2013
Posts: 401
Received Thanks: 132
SYSERR: Feb 16 17:59:53 :: RunState: LUA_ERROR: locale/germany/quest/questlib.lua:1804: attempt to index field `?' (a nil value)
SYSERR: Feb 16 17:59:53 :: WriteRunningStateToSyserr: LUA_ERROR: quest lua_drop.start click
Mr.Xhater is offline  
Old 02/18/2014, 10:48   #44
 
atag's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 104
Received Thanks: 126
You need a minimal "error handling" in drop function.
Code:
function drop(self)
	if not dropList[self] then return end
	if dropList[self].typ == "limit" then
...
atag is offline  
Thanks
1 User
Old 02/18/2014, 15:35   #45
 
BΣQЦIΣƬ's Avatar
 
elite*gold: 1
Join Date: Jun 2013
Posts: 79
Received Thanks: 19
Hey,
also wenn ich mich recht erinnere wurde das
schon des öfteren " Publiziert" bzw. erwähnt ...

BΣQЦIΣƬ
BΣQЦIΣƬ is offline  
Reply

Tags
drops


Similar Threads Similar Threads
[Release]Metin2 Neue Ladebild/Login/Charaauswahl[Release]
12/21/2012 - Metin2 PServer Guides & Strategies - 57 Replies
Moin Alle zusammen erstmal muss ich euch erst sagen das ich ein anfänger bin bei sachen Designen usw. deswegen bitte ich darum das keine von euch gleich mit müll oder so kommt, jeder hat mal neu angefangen :). Ich habe bis jetzt nur einen Ladebild aber werde mehrere machen kommt aber drauf an wie es euch gefählt :), kann auch für die jenigen denn namen von Server reinschreiben, denn das was ich habe ist nur Test. es werden welche es gebrauchen :)



All times are GMT +2. The time now is 09:39.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.