Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 01:00

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

Advertisement



[LIB]Item2, PC2 (set_attr, get_attr, equip, set_level und mehr)

Discussion on [LIB]Item2, PC2 (set_attr, get_attr, equip, set_level und mehr) within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
[LIB]Item2, PC2 (set_attr, get_attr, equip, set_level und mehr)

Hey,
Lib enthält folgende Funktionen/Lib contains the following functions:
Code:
# function(arguments) -- return type - notes
  item2.get_wearflag() -- int
  item2.is_wearflag(WEAR_FLAG) -- bool
  item2.set_attr(index, type, value) -- bool
  item2.get_attr(index) -- int, int
  item2.equip(slot) -- bool - equips the current item to the wearslot "slot"
  pc2.give_or_drop_item_and_select(int vnum||string item_name) -- official function
  pc2.set_level(level) -- bool - requires relog/teleport
Download:
libstdc++.so.6:

Oh yeah, and the lib is obviously 34083 only

iMer
iMer is offline  
Thanks
64 Users
Old 09/29/2013, 17:14   #2
 
elite*gold: 260
Join Date: Jan 2013
Posts: 178
Received Thanks: 104
Thank you.

it's a nice release you are the best iMer.
Metin2 Team is offline  
Old 09/29/2013, 17:26   #3
 
.Xilent's Avatar
 
elite*gold: 12
Join Date: Jun 2012
Posts: 978
Received Thanks: 860
Danke sehr! pc2.set_level(level) -- bool - requires relog/teleport < Hab lange nach der Funktion gesucht ^.^
.Xilent is offline  
Old 09/29/2013, 17:28   #4
 
Stαgє6's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 2,019
Received Thanks: 1,471
Kann man sicherlich gut gebrauchen wird einigen weiterhelfen,
Stαgє6 is offline  
Old 09/29/2013, 17:43   #5
 
elite*gold: 0
Join Date: Aug 2012
Posts: 974
Received Thanks: 89
ok und was bringen die?
item2.get_wearflag() -- ???
item2.is_wearflag(WEAR_FLAG) -- ???
item2.set_attr(index, type, value) -- setzt ein boni???
item2.get_attr(index) -- prüft ein boni???
item2.equip(slot) --überpüft ein slot im eq???
pc2.give_or_drop_item_and_select(int vnum||string item_name) -- ka?!
pc2.set_level(level) -- bool - besserer set lvl? geht damit auch runter leveln?
thespeedyy is offline  
Old 09/29/2013, 17:52   #6

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by thespeedyy View Post
ok und was bringen die?
item2.get_wearflag() -- ???
item2.is_wearflag(WEAR_FLAG) -- ???
item2.set_attr(index, type, value) -- setzt ein boni???
item2.get_attr(index) -- prüft ein boni???
item2.equip(slot) --überpüft ein slot im eq???
pc2.give_or_drop_item_and_select(int vnum||string item_name) -- ka?!
pc2.set_level(level) -- bool - besserer set lvl? geht damit auch runter leveln?
get_wearflag Gibt die "wearflag" zurück
is_wearflag Überprüft ob "WEAR_FLAG" in der wearflag enthalten ist, weil ich kp habe wie ich bitfunktionen in lua benutze - ich benutz es um zu prüfen ob nen Stein in Waffe oder Rüstung geht.
set_attr Setzt nen Bonus
get_attr Selbsterklärend
equip Rüstet nen Item aus - falls du per Quest z.b. ne waffe anziehen willst kannst du das tun
give_or_drop_item_and_select wie der Name sagt: Er gibt dir das Item und wenn kein Platz im Inventar ist Drop er es, und er wählt es als aktuell aktives Item aus.
set_level - Yep, Kannst das Level von nem Char setzen
iMer is offline  
Thanks
1 User
Old 09/29/2013, 19:22   #7
 
xCPx's Avatar
 
elite*gold: 20
Join Date: Jun 2011
Posts: 2,901
Received Thanks: 3,341
iMer?
Warum das:

Quote:
pc2.set_level(level) -- bool - requires relog/teleport

warum hast du nicht einfach die do_advance func übernommen?
Dann geht das allesamt ohne relog/teleport
xCPx is offline  
Old 09/29/2013, 19:24   #8
 
elite*gold: 0
Join Date: Dec 2009
Posts: 113
Received Thanks: 44
Nice job iMer
miguelmig is offline  
Old 09/29/2013, 19:25   #9


 
elite*gold: 0
Join Date: Feb 2010
Posts: 7,220
Received Thanks: 6,758
Ich vermisse irgendwie dann noch eine 'Equip-Auszieh-Funktion' :>
#SoNiice is offline  
Old 09/29/2013, 20:12   #10
 
elite*gold: 121
Join Date: Feb 2008
Posts: 654
Received Thanks: 411
Nehme mal an das die lib für die r34083 ist, oder?

Edit: Lesen bildet, sorry. lol
Legend2007 is offline  
Old 09/29/2013, 20:34   #11
 
elite*gold: 0
Join Date: Jul 2012
Posts: 16
Received Thanks: 3
thanks for the upload! :d
FlAT!K is offline  
Old 09/29/2013, 20:59   #12
 
elite*gold: 39
Join Date: Jun 2009
Posts: 500
Received Thanks: 212
Quote:
Originally Posted by Hühnchenkopf View Post
Ich vermisse irgendwie dann noch eine 'Equip-Auszieh-Funktion' :>
Code:
function pc.unequip_item(item_cell)
	if item.select_cell(tonumber(item_cell)) then
		local vnum = item.get_vnum()
		local attr = {{item2.get_attr(0)}, {item2.get_attr(1)}, {item2.get_attr(2)}, {item2.get_attr(3)}, {item2.get_attr(4)}, {item2.get_attr(5)}, {item2.get_attr(6)}}
		local socket = {item.get_socket(0), item.get_socket(1), item.get_socket(2)}
		item.remove()
		pc2.give_or_drop_item_and_select(vnum)
		for i = 1, table.getn(attr) do
			if tonumber(attr[i][1]) > 0
				item.set_attr(i-1, attr[i][1], attr[i][2])
			end
		end
		for i = 1, table.getn(socket) do
			if tonumber(socket[i]) > 0 then
				item.set_socket(i-1, socket[i])
			end
		end
		return true
	end
	return false
end
Win.
.HC'Destrox is offline  
Thanks
2 Users
Old 09/29/2013, 21:06   #13
 
elite*gold: 0
Join Date: Aug 2012
Posts: 974
Received Thanks: 89
wie kann ich nochmal mehrere libs einfügen?
thespeedyy is offline  
Old 09/29/2013, 21:08   #14

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by xCPx View Post
iMer?
Warum das:




warum hast du nicht einfach die do_advance func übernommen?
Dann geht das allesamt ohne relog/teleport
oops.
Hab ich nicht dran gedacht - bin einfach davon ausgegangen dass es nicht ohne weiteres geht, weil das vorher ja auch niemand gemacht hat.
Wird geändert.. irgendwann..

Quote:
Originally Posted by Hühnchenkopf View Post
Ich vermisse irgendwie dann noch eine 'Equip-Auszieh-Funktion' :>
Wird eingefügt.. irgendwann..
iMer is offline  
Old 09/29/2013, 21:31   #15
 
elite*gold: 0
Join Date: Apr 2007
Posts: 33
Received Thanks: 6
Can i use it for 2089 aswell ? Or can u make a verios for 2089 ? I will much apreciate it.
King Regards.
DaDrag0n is offline  
Reply


Similar Threads Similar Threads
Problem mit Item2.eix & .epk
07/03/2011 - Metin2 Private Server - 4 Replies
Moin Leute hab ein problem mit dem einfügen der waffen die sich in item2 eix und epk befinden ... hab alles richtig gemacth navicat eingetragen itemlist eingetragen( mit richtigen TAB-Abständen) aber werden mir ingame nicht angezeigt ... wenn ich für die itemproto clientside die zeile vom schwert+0 1 zu 1 übernehme und nur die value ändere benutzt der die als fasut also irgendwo wis ich auch nimmer weiter hilfe wäre nett. (habe auch schon 20 andere waffen eingefügt funktionieren ohne probleme)
TuxBot(AIMBOT) & Trainer GIS & ITEM2 + BONUS Etc UPDATE March 21 2010
03/22/2011 - General Gaming Discussion - 10 Replies
TuxBot(AIMBOT) & Trainer GIS & COLOR + POWER USER 2 + SUDDEN DEATH + ITEM2 + BONUS + AUTOWIN UPDATE 03/21 Features: TuxBoT v1 Memory Mode = Screen Complete(longshot)
Tux-Trainer + bonus pro + item2 infinite + auto win hack
05/16/2010 - General Gaming Discussion - 3 Replies
TuxBot(AIMBOT) & Trainer GIS & COLOR + POWER USER 2 + BONUS + WIN + ANTILAG + SUDDEN DEATH + ITEM2 PRO Instructions: 1.-Open Trainer as normally and enter to GB 2.-Press ALT + TAB and press SUPR/DELETE BUTTON 3.-Back to GB and Press Page up y Page dow for Change the mobile 4.- Change the Game Interface (Turn to interface old) 5.-To mesure, PUT MOUSE ON THE ENEMY AND Press hold CTRL



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


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