Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 10:56

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

Advertisement



Equipment Viewer für SA / SL / GA only?

Discussion on Equipment Viewer für SA / SL / GA only? within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1



 
Samael's Avatar
 
elite*gold: 17
Join Date: May 2014
Posts: 2,094
Received Thanks: 1,279
Equipment Viewer für SA / SL / GA only?



möglich einzustellen das nur Leute mit [SL] , [SA] etc ingame auf Ausrüstung bei den Spielern klicken können? Dort wird angegeben das jeder mit [ im namen das aufrufen kann, das ist kontraproduktiv. Jemand ne idee?

PS: "[SL]" statt "[" habe ich bereits versucht, dann klappt es garnicht mehr. Sysrr gibt keine meldung aus.
Samael is offline  
Old 01/03/2017, 01:19   #2
 
elite*gold: 274
Join Date: Sep 2016
Posts: 101
Received Thanks: 56
</nQQpls> is offline  
Old 01/03/2017, 01:42   #3



 
Samael's Avatar
 
elite*gold: 17
Join Date: May 2014
Posts: 2,094
Received Thanks: 1,279
Quote:
Originally Posted by </nQQpls> View Post

nicht hilfreich. Wird auch als spam geahndet und gemeldet.
Samael is offline  
Old 01/03/2017, 02:35   #4

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Sowas solltest du generell nicht Clientside lösen, denn dann kann letzendlich jeder auf den EQ Viewer zugreifen.

Wenn du es doch Clientside machen willst:
Code:
import re

matcher = re.match("^\[(.+?)\].*$", player.GetName())
if matcher != None and matcher.group(1) in ["SA", "SL"]:
	self.showblabla
rollback is offline  
Thanks
1 User
Old 01/03/2017, 14:35   #5
wild wild son




 
Nick's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 5,830
Received Thanks: 3,369
Quote:
Originally Posted by xSaito View Post
nicht hilfreich. Wird auch als spam geahndet und gemeldet.
Hilfreich schon, dir scheinen nur die nötigen Kenntnisse zu fehlen, um das Ganze umzusetzen - wofür dich auch niemand verurteilt, allerdings solltest du keinen fertigen Code erwarten, man ist schließlich freiwillig hier.

Quote:
Originally Posted by xSaito View Post
[..] PS: "[SL]" statt "[" habe ich bereits versucht, dann klappt es garnicht mehr. Sysrr gibt keine meldung aus.
Damit würdest du abfragen, ob das allererste Zeichen im Namen "[SL]" ist, was schlecht möglich ist - der Button wird nicht angezeigt.

Zeichen:

Code:
if str(player.GetName())[0] == "[":
Segment:

Code:
if str(player.GetName())[0:4] == "[SL]":
Ich würde auch von einer clientseitigen Lösung abraten.
Nick is offline  
Thanks
1 User
Old 01/03/2017, 19:52   #6



 
Samael's Avatar
 
elite*gold: 17
Join Date: May 2014
Posts: 2,094
Received Thanks: 1,279
Ich weis das Clientlösungen nicht so schlau sind. Ist ja alles nur testweise. Danke euch beiden für die hilfreichen beiträge.
Samael is offline  
Old 01/03/2017, 22:26   #7
 
elite*gold: 0
Join Date: Feb 2016
Posts: 49
Received Thanks: 79
Hey,
hab damals dasselbe Problem gehabt, ich habs so gelöst dass ich ne Python Funktion(in Source) ersetzt habe.

PythonCharacterModule.cpp

Eigentliche Funktion :

Code:
PyObject * chrIsGameMaster(PyObject* poSelf, PyObject* poArgs)
{
	int iVirtualID;
	if (!PyTuple_GetInteger(poArgs, 0, &iVirtualID))
		return Py_BuildException();

	CInstanceBase * pInstance = CPythonCharacterManager::Instance().GetInstancePtr(iVirtualID);
	if (!pInstance)
		return Py_BuildValue("i", 0);

	return Py_BuildValue("i", pInstance->IsGameMaster());
}
Meine :
Code:
PyObject * chrIsGameMaster(PyObject* poSelf, PyObject* poArgs)
{
	CInstanceBase * pInstance = CPythonPlayer::Instance().NEW_GetMainActorPtr();
	if (!pInstance)
		return Py_BuildValue("i", 0);

	return Py_BuildValue("i", pInstance->IsGameMaster());
}
Füge noch unter den Includes das hinzu:
Code:
#include "PythonPlayer.h"

Nun kannst du mit einer if abfrage ob der main Charakter ein Gamemaster ist.

Beispiel :
Code:
import chr
import chat
if chr.IsGameMaster():
	chat.AppendChat(1, "Du bist GM!")
else:
	chat.AppendChat(1, "Du bist kein GM!")
Czny. is offline  
Thanks
2 Users
Reply

Tags
amena, einstellen, equip viewer, problem


Similar Threads Similar Threads
[Selling] YouNow Viewer + Chat Bot | Live 5k Viewer | Safe & Secure | Get NOW your PARTNERSHIP
09/19/2016 - Trading - 12 Replies
Hello my friends :) I sell now my new software - my YouNow Bot :pimp: Some people add me and want a bot for youknow - here is it :) #Login: http://www0.xup.in/exec/ximg.php?fid=76933032
[Selling] Believe's Twitch Viewer - Follower - Live Viewer Vouch Thread
06/12/2014 - Twitch Trading - 0 Replies
Hallo. Ich biete in geraumer Zeit einen eigenen Twitch.tv Boost an. Dieses Thread ist ein Vorläufer um bis zum richtigen Thread Vouches zu verteilen. Ihr habt hier eine Auswahl von Boosts die Ihr als Vouch nutzen könnt.
**Metin2 [B] Imba Equipment auf Server 18 Erfoo [S]Equipment auf S1 Mosha oder Psc**
08/21/2012 - Metin2 Trading - 4 Replies
huhu liebe com, da ich inaktiv auf s18 erfoo bin, biete ich hier mein restequip zum tausch/Verkauf an dgp+9 2k tp 5tp absorb 3crap 3+4er standard



All times are GMT +2. The time now is 10:56.


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.